ClanLib
2.3.7
|
GUI theme part description. More...
#include <gui_theme_part.h>
Classes | |
struct | VerticalTextPosition |
Public Member Functions | |
Construction | |
CL_GUIThemePart () | |
Constructs a GUI theme part. More... | |
CL_GUIThemePart (CL_GUIComponent *component, const CL_StringRef &relative_element_name=CL_StringRef()) | |
~CL_GUIThemePart () | |
Attributes | |
CL_StringRef | get_element_name () const |
Returns the CSS element name for the part in its current states. More... | |
bool | get_state (const CL_StringRef &name) const |
Returns the setting of a state. More... | |
CL_StringRef | get_property (const CL_GUIThemePartProperty &property) const |
Returns the value of a property. More... | |
int | get_property_int (const CL_GUIThemePartProperty &property) const |
Returns the value of a property as an integer. More... | |
CL_GUIComponent * | get_component () const |
Get Component. More... | |
CL_Rect | get_content_box (const CL_Rect &render_box_rect) const |
Returns the position of the content box for a given render box. More... | |
CL_Rect | get_content_shrink_box () const |
Returns the content shrink box of the theme part. More... | |
CL_Rect | get_render_box (const CL_Rect &content_box_rect) const |
Returns the position and size of a render box for a given content box. More... | |
CL_Size | get_minimum_size () const |
Returns the minimum size of a render box. More... | |
int | get_minimum_width () const |
Returns the minimum width of a render box. More... | |
int | get_minimum_height () const |
Returns the minimum height of a render box. More... | |
CL_Size | get_maximum_size () const |
Returns the maximum size of a render box. More... | |
int | get_maximum_width () const |
Returns the maximum width of a render box. More... | |
int | get_maximum_height () const |
Returns the maximum height of a render box. More... | |
CL_Size | get_preferred_size () const |
Returns the preferred size of a render box. More... | |
int | get_preferred_width () const |
Returns the preferred width of a render box. More... | |
int | get_preferred_height () const |
Returns the preferred height of a render box. More... | |
CL_Font | get_font () const |
Returns the part font. More... | |
CL_Size | get_text_size (CL_GraphicContext &gc, const CL_StringRef &str) const |
Calculates the text size using the font defined for the current state. More... | |
Operations | |
bool | set_state (const CL_StringRef &name, bool flag) |
Sets a part state. Returns true if the state was modified, false if it was already in wanted state. More... | |
void | render_box (CL_GraphicContext &gc, const CL_Rect &rect, const CL_Rect &clip_rect) |
Render box. More... | |
CL_Rect | render_text (CL_GraphicContext &gc, const CL_StringRef &text, const CL_Rect &content_rect, const CL_Rect &clip_rect) |
VerticalTextPosition | get_vertical_text_align (CL_GraphicContext &gc, CL_Font &font, const CL_Rect &content_rect) |
Calculates the vertical text position for the current font. More... | |
Implementation | |
class | CL_GUIThemePartProperty_Impl |
GUI theme part description.
CL_GUIThemePart::CL_GUIThemePart | ( | ) |
Constructs a GUI theme part.
CL_GUIThemePart::CL_GUIThemePart | ( | CL_GUIComponent * | component, |
const CL_StringRef & | relative_element_name = CL_StringRef() |
||
) |
CL_GUIThemePart::~CL_GUIThemePart | ( | ) |
CL_GUIComponent* CL_GUIThemePart::get_component | ( | ) | const |
Get Component.
Returns the position of the content box for a given render box.
CL_Rect CL_GUIThemePart::get_content_shrink_box | ( | ) | const |
Returns the content shrink box of the theme part.
CL_StringRef CL_GUIThemePart::get_element_name | ( | ) | const |
Returns the CSS element name for the part in its current states.
CL_Font CL_GUIThemePart::get_font | ( | ) | const |
Returns the part font.
int CL_GUIThemePart::get_maximum_height | ( | ) | const |
Returns the maximum height of a render box.
CL_Size CL_GUIThemePart::get_maximum_size | ( | ) | const |
Returns the maximum size of a render box.
int CL_GUIThemePart::get_maximum_width | ( | ) | const |
Returns the maximum width of a render box.
int CL_GUIThemePart::get_minimum_height | ( | ) | const |
Returns the minimum height of a render box.
CL_Size CL_GUIThemePart::get_minimum_size | ( | ) | const |
Returns the minimum size of a render box.
int CL_GUIThemePart::get_minimum_width | ( | ) | const |
Returns the minimum width of a render box.
int CL_GUIThemePart::get_preferred_height | ( | ) | const |
Returns the preferred height of a render box.
CL_Size CL_GUIThemePart::get_preferred_size | ( | ) | const |
Returns the preferred size of a render box.
int CL_GUIThemePart::get_preferred_width | ( | ) | const |
Returns the preferred width of a render box.
CL_StringRef CL_GUIThemePart::get_property | ( | const CL_GUIThemePartProperty & | property) | const |
Returns the value of a property.
int CL_GUIThemePart::get_property_int | ( | const CL_GUIThemePartProperty & | property) | const |
Returns the value of a property as an integer.
Returns the position and size of a render box for a given content box.
bool CL_GUIThemePart::get_state | ( | const CL_StringRef & | name) | const |
Returns the setting of a state.
CL_Size CL_GUIThemePart::get_text_size | ( | CL_GraphicContext & | gc, |
const CL_StringRef & | str | ||
) | const |
Calculates the text size using the font defined for the current state.
VerticalTextPosition CL_GUIThemePart::get_vertical_text_align | ( | CL_GraphicContext & | gc, |
CL_Font & | font, | ||
const CL_Rect & | content_rect | ||
) |
Calculates the vertical text position for the current font.
void CL_GUIThemePart::render_box | ( | CL_GraphicContext & | gc, |
const CL_Rect & | rect, | ||
const CL_Rect & | clip_rect | ||
) |
Render box.
gc | = Graphic Context |
rect | = Rect |
clip_rect | = Rect |
CL_Rect CL_GUIThemePart::render_text | ( | CL_GraphicContext & | gc, |
const CL_StringRef & | text, | ||
const CL_Rect & | content_rect, | ||
const CL_Rect & | clip_rect | ||
) |
bool CL_GUIThemePart::set_state | ( | const CL_StringRef & | name, |
bool | flag | ||
) |
Sets a part state. Returns true if the state was modified, false if it was already in wanted state.
|
friend |