]>
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(Widget
*parent
);
20 inline const ustring
& text(void) const { return _text
; }
21 void setText(const ustring
&text
);
23 virtual inline bool isHighlighted() const { return _highlight
; }
24 virtual void setHighlighted(bool h
);
26 RenderStyle::Justify
horizontalJustify() const { return _justify_horz
; }
27 virtual void setHorizontalJustify(RenderStyle::Justify j
);
28 RenderStyle::Justify
verticalJustify() const { return _justify_vert
; }
29 virtual void setVerticalJustify(RenderStyle::Justify j
);
31 const Font
*font() const { return _font
; }
32 virtual void setFont(const Font
*f
);
34 virtual void calcDefaultSizes();
36 virtual void styleChanged(const RenderStyle
&style
);
38 virtual void renderForeground(Surface
&surface
);
41 //! The color the label will use for rendering its text
42 RenderColor
*_forecolor
;
45 //! Text to be displayed in the label
47 //! Text to be displayed, parsed into its separate lines
48 std::vector
<ustring
> _parsedtext
;
49 //! The actual text being shown, may be a subset of _text
51 //! The font the text will be rendered with
53 //! The horizontal justification used for drawing text
54 RenderStyle::Justify _justify_horz
;
55 //! The vertical justification used for drawing text
56 RenderStyle::Justify _justify_vert
;
57 //! The drawing offset for the text
59 //! If the widget is highlighted or not
This page took 0.038403 seconds and 4 git commands to generate.