Reference TTheme
Declared in Codebot.Render.Widgets.pas on line 149
TTheme = class
public
{ Calculate the actual theme color }
function CalcColor(Widget: TWidget; Color: TThemeColor): TColorF; virtual; abstract;
{ Calculate the size of a widget }
function CalcSize(Widget: TWidget; Part: TThemePart): TSizeF; virtual; abstract;
{ Calculate the height of text in the widget }
function CalcTextHeight: Float; virtual; abstract;
{ Calculate how wide text is when drawn in the widget, including spaces }
function CalcTextWidth(Widget: TWidget; const Text: string): Float; virtual; abstract;
{ Render the widget }
procedure Render(Widget: TWidget; Stage: TPaintStage); virtual; abstract;
{ Render a hint for the widget }
procedure RenderHint(Widget: TWidget; Opacity: Float); virtual; abstract;
{ Calculate where the close button of a window is, relative to the top left
of the window. An empty rectangle means the theme has none. }
function CalcCloseRect(Window: TWindow): TRectF; virtual;
{ Draw what follows transformed by a matrix, until PopMatrix. The matrix is
applied before the transform already in use. }
procedure PushMatrix(Matrix: IMatrix); virtual;
{ Put the transform back as it was before PushMatrix }
procedure PopMatrix; virtual;
end;See also
Float in Codebot.System.pas
IMatrix in Codebot.Render.Graphics.pas
TColorF in Codebot.Graphics.Types.pas
TRectF in Codebot.Graphics.Types.pas