Reference TDesktopTheme
Declared in Codebot.Render.Widgets.Themes.pas on line 272
TDesktopTheme holds what the desktop styled themes below share: sizes, fonts, popup lists, and drawing helpers. It is not a theme on its own.
TDesktopTheme = class(TCanvasTheme)
protected
{ The color of a theme color as $RRGGBB }
function Palette(Widget: TWidget; Color: TThemeColor): LongWord; virtual; abstract;
function CaptionHeight: Float; virtual; abstract;
function ButtonHeight: Float; virtual; abstract;
function ThumbSize: TSizeF; virtual; abstract;
function WindowRadius: Float; virtual; abstract;
{ The thickness of the window frame, X for the sides and Y for the bottom }
function WindowBorder: TSizeF; virtual;
{ A $RRGGBB color faded by the opacity of the widget }
function Shade(Widget: TWidget; RGB: LongWord; Alpha: Float = 1): TColorF;
{ Set up the gradient brush to run down or across a rectangle }
procedure VertGradient(const R: TRectF; const Top, Bottom: TColorF);
procedure HorzGradient(const R: TRectF; const Left, Right: TColorF);
procedure CheckMark(const R: TRectF; const C: TColorF; Width: Float);
function CheckRect(Widget: TCheckBox; Size: Float): TRectF;
procedure CheckCaption(Widget: TCheckBox; Size: Float);
procedure SpinArrows(Widget: TSpinBox; const R: TRectF; const C: TColorF);
procedure GripLines(const R: TRectF; Horizontal: Boolean; const C: TColorF);
procedure LoadFonts(const FontName, FontFile, TitleName, TitleFile: string);
function GlyphSize: Float; override;
procedure Init(Canvas: ICanvas); override;
procedure DrawGlyphButton(Widget: TGlyphButton); override;
procedure DrawGlyphImage(Widget: TGlyphImage); override;
procedure PostDrawSpinBox(Widget: TSpinBox); override;
procedure DrawLabel(Widget: TLabel); override;
procedure DrawContainer(Widget: TContainerWidget); override;
public
function CalcColor(Widget: TWidget; Color: TThemeColor): TColorF; override;
function CalcSize(Widget: TWidget; Part: TThemePart): TSizeF; override;
end;See also
Float in Codebot.System.pas
ICanvas in Codebot.Render.Graphics.pas
TCheckBox in Codebot.Render.Widgets.pas
TColorF in Codebot.Graphics.Types.pas
TContainerWidget in Codebot.Render.Widgets.pas
TGlyphButton in Codebot.Render.Widgets.pas
TGlyphImage in Codebot.Render.Widgets.pas
TLabel in Codebot.Render.Widgets.pas
TRectF in Codebot.Graphics.Types.pas
TSizeF in Codebot.Render.Widgets.pas
TSpinBox in Codebot.Render.Widgets.pas
TThemeColor in Codebot.Render.Widgets.pas
TThemePart in Codebot.Render.Widgets.pas
TWidget in Codebot.Render.Widgets.pas