struct CCL::ITheme
Overview
A theme defines the look and feel of an application. More…
#include <itheme.h> struct ITheme: public CCL::IUnknown { // methods virtual StringID CCL_API getThemeID () const = 0; virtual int CCL_API getThemeMetric (ThemeMetricID which) = 0; virtual ColorRef CCL_API getThemeColor (ThemeColorID which) = 0; virtual FontRef CCL_API getThemeFont (ThemeFontID which) = 0; virtual IMouseCursor*CCL_API getThemeCursor (ThemeCursorID which) = 0; virtual const IVisualStyle&CCL_API getStyle (StringID name) = 0; virtual IUnknown*CCL_API getResource (StringID name) = 0; virtual IGradient*CCL_API getGradient (StringID name) = 0; virtual IImage*CCL_API getImage (StringID name) = 0; virtual IMouseCursor*CCL_API getCursor (StringID name) = 0; virtual IThemePainter&CCL_API getPainter () = 0; virtual IThemeStatics&CCL_API getStatics () = 0; virtual IView*CCL_API createView ( StringID name, IUnknown* controller, IAttributeList* arguments = nullptr ) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
A theme defines the look and feel of an application.
It provides resources like images, mouse cursors, styles, etc. and can create views by name. The theme is loaded from a skin package file or folder.
Methods
virtual StringID CCL_API getThemeID () const = 0
Get theme identifier.
virtual int CCL_API getThemeMetric (ThemeMetricID which) = 0
Get common theme metric.
virtual ColorRef CCL_API getThemeColor (ThemeColorID which) = 0
Get common theme color.
virtual FontRef CCL_API getThemeFont (ThemeFontID which) = 0
Get common theme font.
virtual IMouseCursor*CCL_API getThemeCursor (ThemeCursorID which) = 0
Get common theme cursor.
virtual const IVisualStyle&CCL_API getStyle (StringID name) = 0
Get style definition by name.
If style isn’t present, a default style is returned.
virtual IUnknown*CCL_API getResource (StringID name) = 0
Get resource by name.
virtual IGradient*CCL_API getGradient (StringID name) = 0
Get gradient by name.
virtual IImage*CCL_API getImage (StringID name) = 0
Get image resource by name.
virtual IMouseCursor*CCL_API getCursor (StringID name) = 0
Get mouse cursor by name.
virtual IThemePainter&CCL_API getPainter () = 0
Get theme painter.
virtual IThemeStatics&CCL_API getStatics () = 0
Get theme statics.
virtual IView*CCL_API createView ( StringID name, IUnknown* controller, IAttributeList* arguments = nullptr ) = 0
Create view by name with given controller and optional arguments.