]>
Dogcows Code - chaz/openbox/blob - otk/label.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 #include "renderstyle.hh"
14 class Label
: public Widget
{
17 Label(int screen
, EventDispatcher
*ed
, int bevel
= 3);
18 Label(Widget
*parent
);
21 inline const ustring
& text(void) const { return _text
; }
22 void setText(const ustring
&text
);
24 virtual inline bool isHighlighted() const { return _highlight
; }
25 virtual void setHighlighted(bool h
);
27 RenderStyle::Justify
horizontalJustify() const { return _justify_horz
; }
28 virtual void setHorizontalJustify(RenderStyle::Justify j
);
29 RenderStyle::Justify
verticalJustify() const { return _justify_vert
; }
30 virtual void setVerticalJustify(RenderStyle::Justify j
);
32 const Font
*font() const { return _font
; }
33 virtual void setFont(const Font
*f
);
35 virtual void styleChanged(const RenderStyle
&style
);
37 virtual void renderForeground(Surface
&surface
);
40 virtual void calcDefaultSizes();
42 //! The color the label will use for rendering its text
43 RenderColor
*_forecolor
;
46 //! Text to be displayed in the label
48 //! Text to be displayed, parsed into its separate lines
49 std::vector
<ustring
> _parsedtext
;
50 //! The actual text being shown, may be a subset of _text
52 //! The font the text will be rendered with
54 //! The horizontal justification used for drawing text
55 RenderStyle::Justify _justify_horz
;
56 //! The vertical justification used for drawing text
57 RenderStyle::Justify _justify_vert
;
58 //! The drawing offset for the text
60 //! If the widget is highlighted or not
This page took 0.037151 seconds and 4 git commands to generate.