|
Using TTeTheme |
Generally the themes is a set of properties and methods with the help of which it is possible to find out the necessary parameters (such as fonts, colors and metrics), and to paint the components of the interface.
ThemeEngine has an abstract base TTeTheme class, which contains all the necessary properties and methods for the correct use of the theme. In other words the programmer does not have to know which theme is active at the current moment, how to load, to change and at last how to paint different themes. ThemeEngine closes the details of realization of concrete themes, such as ThemeEngine themes, msstyles themes, the built-in themes. In other words it is impossible to find out directly what elements the theme consists of, in what format it is saved. The interaction process occurs via the TTeTheme base class.
The global variable CurrentTheme points to the theme active at the current moment. Before using this variable it is necessary to make sure, whether it is possible to use it calling the special IsThemeAvailable(CurrentTheme) function. If this function returns true the active theme is available. |