Determines what colors and fonts should be used to render component parts.
Public Member Functions | |
virtual Color | get_color (component_type type, int part) const =0 |
virtual Font | get_font (int id) const =0 |
virtual int | get_font_height (int id) const =0 |
virtual const Bitmap & | get_image (THEME_IMAGE img) const =0 |
virtual int | get_inner_tab_padding () const =0 |
virtual int | get_text_width (int id, std::string str) const =0 |
virtual void | set_color (component_type type, int part, const Color &color)=0 |
virtual void | set_defaults ()=0 |
virtual void | set_font (int id, const Font &font)=0 |
virtual void | set_image (THEME_IMAGE img, const Bitmap &bitmap)=0 |
virtual void | theme_changed ()=0 |
virtual | ~Theme () |
Protected Member Functions | |
virtual int | calc_font_height (const Font &font) const =0 |
ifm::Theme::~Theme | ( | ) | [virtual] |
virtual int ifm::Theme::calc_font_height | ( | const Font & | font | ) | const [protected, pure virtual] |
Calculates the height of the given Font.
Implemented in ifm::DefaultTheme.
virtual Color ifm::Theme::get_color | ( | component_type | type, | |
int | part | |||
) | const [pure virtual] |
Returns the color for the part for this component type. If the given part has no color defined for this component type, the color defined for ALL components will be returned.
Implemented in ifm::DefaultTheme.
virtual Font ifm::Theme::get_font | ( | int | id | ) | const [pure virtual] |
Returns the Font to use for this font id.
Implemented in ifm::DefaultTheme.
virtual int ifm::Theme::get_font_height | ( | int | id | ) | const [pure virtual] |
Returns the height of a space character when rendered in the Font for the given font id.
Implemented in ifm::DefaultTheme.
virtual const Bitmap& ifm::Theme::get_image | ( | THEME_IMAGE | img | ) | const [pure virtual] |
Returns the bitmap to use to render the given THEME_IMAGE
Implemented in ifm::DefaultTheme.
virtual int ifm::Theme::get_inner_tab_padding | ( | ) | const [pure virtual] |
Returns how much padding there should be between parts of a Tab (the text and the image).
Implemented in ifm::DefaultTheme.
virtual int ifm::Theme::get_text_width | ( | int | id, | |
std::string | str | |||
) | const [pure virtual] |
Implemented in ifm::DefaultTheme.
virtual void ifm::Theme::set_color | ( | component_type | type, | |
int | part, | |||
const Color & | color | |||
) | [pure virtual] |
Sets the color for the part for this component type. If you specify ALL as the component type, the default color for that part will be set, but any existing colors defined for this part already in components will not be changed.
Implemented in ifm::DefaultTheme.
virtual void ifm::Theme::set_defaults | ( | ) | [pure virtual] |
Initializes the default color and fonts. Can be used to revert any changes made to the fonts or colors.
Implemented in ifm::DefaultTheme.
virtual void ifm::Theme::set_font | ( | int | id, | |
const Font & | font | |||
) | [pure virtual] |
Sets the Font to use for this font id.
Implemented in ifm::DefaultTheme.
virtual void ifm::Theme::set_image | ( | THEME_IMAGE | img, | |
const Bitmap & | bitmap | |||
) | [pure virtual] |
Implemented in ifm::DefaultTheme.
virtual void ifm::Theme::theme_changed | ( | ) | [pure virtual] |
Called when the system theme changes. Colors should be updated to reflect the new system theme.
Implemented in ifm::DefaultTheme.