GUI theme interface. More...
#include <gui_theme_provider.h>
Public Member Functions | |
Construction | |
virtual | ~CL_GUIThemeProvider () |
Attributes | |
virtual CL_StringRef | get_property (const CL_GUIThemePart &part, const CL_StringRef &name, const CL_StringRef &css_value)=0 |
Allows the theme to alter GUI part properties. | |
virtual CL_ResourceManager | get_resources () const =0 |
Returns the resource manager associated with the theme. | |
Operations | |
virtual void | destroy ()=0 |
Destroys the provider. | |
virtual void | add_resources (CL_ResourceManager resources)=0 |
Adds a resource manager to be used to retrieve resources. | |
virtual void | set_resources (CL_ResourceManager resources)=0 |
Sets the resource manager to be used to retrieve resources. | |
virtual void | render_box (CL_GraphicContext &gc, CL_GUIThemePart &part, const CL_Rect &rect, const CL_Rect &clip_rect)=0 |
Renders a background box for the given theme part. | |
virtual CL_Rect | render_text (CL_GraphicContext &gc, CL_GUIThemePart &part, CL_Font &font, const CL_StringRef &text, const CL_Rect &content_rect, const CL_Rect &clip_rect)=0 |
virtual void | component_destroyed (CL_GUIComponent *component)=0 |
Notifies the theme that a component has been destroyed. |
GUI theme interface.
virtual CL_GUIThemeProvider::~CL_GUIThemeProvider | ( | ) | [inline, virtual] |
virtual void CL_GUIThemeProvider::add_resources | ( | CL_ResourceManager | resources | ) | [pure virtual] |
Adds a resource manager to be used to retrieve resources.
virtual void CL_GUIThemeProvider::component_destroyed | ( | CL_GUIComponent * | component | ) | [pure virtual] |
Notifies the theme that a component has been destroyed.
virtual void CL_GUIThemeProvider::destroy | ( | ) | [pure virtual] |
Destroys the provider.
virtual CL_StringRef CL_GUIThemeProvider::get_property | ( | const CL_GUIThemePart & | part, | |
const CL_StringRef & | name, | |||
const CL_StringRef & | css_value | |||
) | [pure virtual] |
Allows the theme to alter GUI part properties.
When a component queries a theme part for a property, the property is searched in the CSS document and then passed to get_property. If the theme does not wish to alter the value of the property, it simply returns the css_value parameter. The string returned by this function is the result of CL_GUIThemePart::get_property.
virtual CL_ResourceManager CL_GUIThemeProvider::get_resources | ( | ) | const [pure virtual] |
Returns the resource manager associated with the theme.
virtual void CL_GUIThemeProvider::render_box | ( | CL_GraphicContext & | gc, | |
CL_GUIThemePart & | part, | |||
const CL_Rect & | rect, | |||
const CL_Rect & | clip_rect | |||
) | [pure virtual] |
Renders a background box for the given theme part.
virtual CL_Rect CL_GUIThemeProvider::render_text | ( | CL_GraphicContext & | gc, | |
CL_GUIThemePart & | part, | |||
CL_Font & | font, | |||
const CL_StringRef & | text, | |||
const CL_Rect & | content_rect, | |||
const CL_Rect & | clip_rect | |||
) | [pure virtual] |
virtual void CL_GUIThemeProvider::set_resources | ( | CL_ResourceManager | resources | ) | [pure virtual] |
Sets the resource manager to be used to retrieve resources.