[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Themes' (#lcl)

TThemeServices

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements theme services for supported platforms.

Declaration

Source position: themes.pas line 425

type TThemeServices = class(TObject)

protected

  function InitThemes; virtual;

  

Always returns False.

  procedure UnloadThemeData; virtual;

  

An empty implementation in TThemeServices.

  function UseThemes; virtual;

  

Always returns False.

  function ThemedControlsEnabled; virtual;

  

Always returns False.

  function InternalColorToRGB(); virtual;

  

Converts the numeric color value to color reference.

  procedure InternalDrawParentBackground(); virtual;

  

An empty implementation in TThemeServices.

public

  constructor Create;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure IntfDoOnThemeChange; virtual;

  

Signals the OnThemeChange event handler (when assigned).

  function IsDisabled();

  

Indicates if the theme element value in Details is in a disabled state.

  function IsPushed();

  

Indicates if the theme element value in Details is in a pushed state.

  function IsHot();

  

Indicates if the theme element value in Details is in a hot or hovered state.

  function IsChecked();

  

Indicates if the theme element value in Details is in a checked state.

  function IsMixed();

  

Indicates if the theme element value in Details has more than one theming state.

  function GetElementDetails();

  

Fills members in the theme element details.

  function GetDetailSize(); virtual; deprecated ;

  

Deprecated. Use GetDetailSizeForPPI instead.

  function GetDetailSizeForWindow(); virtual;

  

Gets the dimensions for a theme element on the control with the specified window handle.

  function GetDetailSizeForPPI(); virtual;

  

Gets the dimensions for a theme element scaled to the specified Pixels per Inch (PPI).

  function GetDetailRegion(); virtual;

  

Gets the handle to the region for a theme element.

  function GetStockImage();

  

Always returns False.

  function GetOption(); virtual;

  

Returns 1 if the theme option is used for the platform, or 0 when not used.

  function GetTextExtent(); virtual;

  

Calculates the bounding rectangle for the text or caption in a theme element.

  function ColorToRGB();

  

Converts a TColor value to the Cardinal color constant needed for a theme element detail.

  function ContentRect(); virtual;

  

Adjusts the bounding rectangle for a theme element to contain the content area only.

  procedure DrawEdge(); virtual;

  

Default drawing for the edges on a themed element.

  procedure DrawElement(); virtual;

  

Draws a theme element using the specified theme element details.

  procedure DrawIcon();

  

Draws the icon for a theme element.

  procedure DrawParentBackground();

  

Draws a parent background using the specified window handle and device context.

  procedure DrawText();

  

Draws the text for a themed control.

  function HasTransparentParts(); virtual;

  

Always returns True.

  procedure PaintBorder(); virtual;

  

Default painting method for the borders for a control.

  procedure UpdateThemes;

  

Reloads theme elements and details when UseThemes is True.

  property DottedBrush: HBRUSH; [r]

  

Bitmap Handle for the Dotted Pattern Brush used to draw theme elements.

  property ThemesAvailable: Boolean; [r]

  

Indicates if theme data is available.

  property ThemesEnabled: Boolean; [r]

  

Indicates if themes are enabled for the platform.

  property OnThemeChange: TNotifyEvent; [rw]

  

Event handler signalled when the current window theme has been changed.

end;

Inheritance

TThemeServices

  

Implements theme services for supported platforms.

|

TObject

Description

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.


Version 3.2 Generated 2024-02-25 Home