GG
|
This is a noninteractive box with an optional label. More...
#include <GroupBox.h>
Static Protected Attributes | |
static const int | FRAME_THICK |
static const int | PIXEL_MARGIN |
Structors | |
GroupBox (X x, Y y, X w, Y h, const std::string &label, const boost::shared_ptr< Font > &font, Clr color, Clr text_color=CLR_BLACK, Clr interior=CLR_ZERO, Flags< WndFlag > flags=Flags< WndFlag >()) | |
GroupBox () | |
Accessors | |
virtual Pt | ClientUpperLeft () const |
virtual Pt | ClientLowerRight () const |
Mutators | |
virtual void | Render () |
void | SetColor (Clr c) |
void | SetTextColor (Clr c) |
void | SetInteriorColor (Clr c) |
void | SetClientCornersEqualToBoxCorners (bool b) |
virtual void | SetText (const std::string &str) |
This is a noninteractive box with an optional label.
Definition at line 42 of file GroupBox.h.
GG::GroupBox::GroupBox | ( | X | x, |
Y | y, | ||
X | w, | ||
Y | h, | ||
const std::string & | label, | ||
const boost::shared_ptr< Font > & | font, | ||
Clr | color, | ||
Clr | text_color = CLR_BLACK , |
||
Clr | interior = CLR_ZERO , |
||
Flags< WndFlag > | flags = Flags< WndFlag >() |
||
) |
Ctor. Height is determined from the font and point size used.
virtual Pt GG::GroupBox::ClientUpperLeft | ( | ) | const [virtual] |
Returns upper-left corner of window's client area in screen coordinates (or of the entire area, if no client area is specified). Virtual because different windows have different shapes (and so ways of calculating client area).
Reimplemented from GG::Wnd.
virtual Pt GG::GroupBox::ClientLowerRight | ( | ) | const [virtual] |
Returns (one pixel past) lower-right corner of window's client area in screen coordinates (or of the entire area, if no client area is specified). Virtual because different windows have different shapes (and so ways of calculating client area).
Reimplemented from GG::Wnd.
virtual void GG::GroupBox::Render | ( | ) | [virtual] |
Draws this Wnd. Note that Wnds being dragged for a drag-and-drop operation are rendered twice -- once in-place as normal, once in the location of the drag operation, attached to the cursor. Such Wnds may wish to render themselves differently in those two cases. To determine which render is being performed, they can call GUI::GetGUI()->RenderingDragDropWnds().
Reimplemented from GG::Wnd.
void GG::GroupBox::SetColor | ( | Clr | c | ) |
Sets the color of the group box.
void GG::GroupBox::SetTextColor | ( | Clr | c | ) |
Sets the color of the label's text.
void GG::GroupBox::SetInteriorColor | ( | Clr | c | ) |
Sets the interior color of the box.
void GG::GroupBox::SetClientCornersEqualToBoxCorners | ( | bool | b | ) |
Setting this to true causes ClientUpperLeft() and ClientLowerRight() to return UpperLeft() and LowerRight(), respectively. This is a horrible hack that is designed to allow the Eve layout engine to set this box's children at their desired locations without knowing anything about how GG Wnd client areas work.
const int GG::GroupBox::FRAME_THICK [static, protected] |
The thickness with which to render the frame.
Definition at line 84 of file GroupBox.h.
const int GG::GroupBox::PIXEL_MARGIN [static, protected] |
The number of pixels to leave between the client area and the frame.
Definition at line 88 of file GroupBox.h.