Implements Theme Services for supported platforms / widgetsets.

themes.pas contains an implementation of TThemeServices which is a designed to manage all necessary aspects of the Windows XP (and up) theme APIs. The component is responsible for loading and unloading of the theme DLL and offers properties and methods to test for various aspects of the theme APIs and to ease painting of themed window content.

The TThemeServices class is designed to work for controls which need XP-like painting. It does not manipulate any VCL class (for this task TThemeManager is responsible) and can be used standalone (also as general support tool in an application). Using the global ThemeServices function you can implicitely create and use a single instance of the class. Theme Manager uses the same approach.

The original file name ThemeSrv.pas was changed to themes.pas to be compatible with Delphi. Adapted for Lazarus by the Lazarus Team.

The initial developer of the original code is: Mike Lischke (public@soft-gems.net, www.soft-gems.net).

Represents elements which can be themed.
Represents theme elements for buttons.
Represents theme elements for a Clock.
Represents theme elemenets used to theme combo-box controls.
Represents theme elements used to theme Edit controls.
Represents theme elements used to theme an Explorer Bar.
Represents theme elements used to theme a Header control.
Represents theme elements used to theme List View controls.
Represents theme elements used to theme Menus.
Represents theme elements used for themed Page controls.
Represents theme elements used to theme progress bar controls.
Represents theme elements used to theme Rebar controls.
Represents theme elements used to theme scroll bars.
Represents theme elements used to theme spin button controls.
Represents theme elements used to theme the Start Panel.
Represents theme elements used to theme status bars.
Represents theme elements used to theme Tab controls.
Represents theme elements used to theme task bar bands.
Represents theme elements used to theme Task bars.
Represents theme elements used to theme tool bars.
Represents theme elements used to theme tool tips.
Represents theme elements used to theme track bars.
Represents theme elements used to theme tray notifications.
Represents theme elements used to theme tree view controls.
Represents theme elements used to theme Windows.
Pointer to a TThemedElementDetails instance.
Record type with a theme element, part, and state values.
Represents glyph / image options that can be enabled or disabled for a theme.
Show images on buttons.
Show images on menus.
Use hot / down effects on (button) glyphs.

The option is platform- or OS-dependent. Not supported for Windows or Mac. Requires WindowManager or Desktop Environment support on Linux platforms.

Implements theme services for supported platforms.

TThemeServices is a small foot print class to provide the user with pure Windows XP theme related abilities like painting elements and text, or retrieving theme element details.

Always returns False.
Always returns False.
An empty implementation in TThemeServices.
Always returns False.
Always returns False.
Always returns False.
Always returns False.
Converts the numeric color value to color reference.
Cardinal color reference as defined in the LCLType unit.
Not used in the method.
Numeric color value converted in the method.
An empty implementation in TThemeServices.
Constructor for the class instance.

Calls InitThemes to detrmine if theme data is available. Sets the value in the ThemesAvailable property. Calls UpdateThemes to load theme data.

Destructor for the class instance.
Signals the OnThemeChange event handler (when assigned).
Indicates if the theme element value in Details is in a disabled state.
Indicates if the theme element value in Details is in a pushed state.
Indicates if the theme element value in Details is in a hot or hovered state.
Indicates if the theme element value in Details is in a checked state.
Indicates if the theme element value in Details has more than one theming state.
Fills members in the theme element details.
Gets the default dimensions for a theme element detail.

Gets the default size for a theme element detail. -1 in the Width and Height for the TSize instance means the size for the theme element detail is not known.

Gets the handle to the region for a theme element.
Always returns False.
Returns 1 if the theme option is used for the platform, or 0 when not used.

Use of toUseGlyphEffects is OS-dependent. The option is used for Linux. It is not used for Windows or OSX.

Calculates the bounding rectangle for the text or caption in a theme element.
Converts a TColor value to the Cardinal color constant needed for a theme element detail.
Adjusts the bounding rectangle for a theme element to contain the content area only.
Default drawing for the edges on a themed element.
Draws a theme element using the specified theme element details.
Draws the icon for a theme element.

Overloaded to provide WIndows and non-Windows variants. Overridden in the TWin32ThemeServices descendant for compatability with Delphi.

Draws a parent background using the specified window handle and device context.
Draws the text for a themed control.

DrawText is an overloaded method used to draw the text or caption for a themed control.

Always returns True.
Default painting method for the borders for a control.

PaintBorder has an empty implementation in TThemeServices. It must be overridden in a descendent class to use the native border drawing style for the widgetset.

Reloads theme elements and details when UseThemes is True.

Called from the Create constructor. Think of it as the theme counterpart for the Loaded method used for components.

Bitmap Handle for the Dotted Pattern Brush used to draw theme elements.
Indicates if theme data is available.
Indicates if themes are enabled for the platform.
Event handler signalled when the current window theme has been changed.

OnThemeChange is a TNotifyEvent property with the event handler signalled when the current window theme has been changed. Applications must implement and assign an object procedure to the handler to respond to the event notification.

TNotifyEvent
Provides access to the Theme Services singleton for the widgetset.

ThemeServices is a TThemeServices function used to get the theme services singleton for the current widgetset. The return value is a TThemeServices descendant which implement the theming API for a specific widgetset / platform.

TThemeServices instance for the widgetset.
Compares the content for the specified theme element detail arguments.
Copyright information for the theme manager code.

Do not modify the copyright in any way! Usage of this unit is prohibited without the copyright notice in the compiled binary file.

Specifies an event handler signalled to draw an image in an image list to a Canvas instance.

TThemesImageDrawEvent is the type used for the ThemesImageDrawEvent variable in the unit.

Image list with the image drawn in the event handler.
TCanvas instance where the image is drawn.
Horizontal canvas coordinate where the image is drawn.
Vertical canvas coordinate where the image is drawn.
Ordinal position in the image list for the image drawn in the event handler.
Drawing effect applied to the image.
Width for the rendered image.
Reference to the control with the Canvas updated in the event handler.
Variable with the event handler signalled to draw a themed image to a Canvas.

ThemesImageDrawEvent is a unit global TThemesImageDrawEvent variable with the event handler signalled to draw an image in an imagelist to a Canvas. The value for the variable is assigned in the imglist unit when used in an application.