Class TGUISkin

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGUISkin = class(TAttributeExchangingObject)

Description

A skin modifies the look of the GUI elements.

Hierarchy

Overview

Methods

Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos, Clip, CheckClientArea: TRect) : TRect; overload; inline;
Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos, Clip: TRect): TRect; overload; inline;
Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos: TRect): TRect; overload; inline;
Public function GetColor(Color: TGUIDefaultColor): TARGBColor; inline;
Public function GetDefaultText(Text: TGUIDefaultText): StringType; inline;
Public function GetFont(Which: TGUIDefaultFont): TGUIFont; inline;
Public function GetIcon(Icon: TGUIDefaultIcon): LongWord; inline;
Public function GetSize(Size: TGUIDefaultSize): LongInt; inline;
Public function GetSpriteBank: TGUISpriteBank; inline;
Public procedure Draw2DRectangle(Element: TGUIElement; Color: TARGBColor; const Pos: TRect); overload; inline;
Public procedure Draw2DRectangle(Element: TGUIElement; Color: TARGBColor; const Pos, Clip: TRect); overload; inline;
Public procedure Draw3DButtonPanePressed(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;
Public procedure Draw3DButtonPanePressed(Element: TGUIElement; const Pos: TRect); overload; inline;
Public procedure Draw3DButtonPaneStandard(Element: TGUIElement; const Pos: TRect); overload; inline;
Public procedure Draw3DButtonPaneStandard(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;
Public procedure Draw3DMenuPane(Element: TGUIElement; const Pos: TRect); overload; inline;
Public procedure Draw3DMenuPane(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;
Public procedure Draw3DSunkenPane(Element: TGUIElement; Background: TARGBColor; Flat: Boolean; FillBackground: Boolean; const Pos, Clip: TRect); overload; inline;
Public procedure Draw3DSunkenPane(Element: TGUIElement; Background: TARGBColor; Flat: Boolean; FillBackground: Boolean; const Pos: TRect); overload; inline;
Public procedure Draw3DTabBody(Element: TGUIElement; Border, Background: Boolean; const Pos, Clip: TRect; TabHeight: LongInt; Alignment: TGUIAlignment = alUpperLeft); overload; inline;
Public procedure Draw3DTabBody(Element: TGUIElement; Border, Background: Boolean; const Pos: TRect); overload; inline;
Public procedure Draw3DTabButton(Element: TGUIElement; Active: Boolean; const Pos: TRect); overload; inline;
Public procedure Draw3DTabButton(Element: TGUIElement; Active: Boolean; const Pos, Clip: TRect; Alignment: TGUIAlignment = alUpperLeft); overload; inline;
Public procedure Draw3DToolBar(Element: TGUIElement; const Pos: TRect); overload; inline;
Public procedure Draw3DToolBar(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;
Public procedure DrawIcon(Element: TGUIElement; Icon: TGUIDefaultIcon; const Pos: TPoint; StartTime, CurrentTime: LongWord; Loop: Boolean; const Clip: TRect); overload; inline;
Public procedure DrawIcon(Element: TGUIElement; Icon: TGUIDefaultIcon; const Pos: TPoint; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = False); overload; inline;
Public procedure SetColor(Which: TGUIDefaultColor; NewColor: TARGBColor); inline;
Public procedure SetDefaultText(Which: TGUIDefaultText; const NewText: StringType); inline;
Public procedure SetFont(Font: TGUIFont; Which: TGUIDefaultFont = dfDefault); inline;
Public procedure SetIcon(Icon: TGUIDefaultIcon; Index: LongWord); inline;
Public procedure SetSize(Which: TGUIDefaultSize; Size: LongInt); inline;
Public procedure SetSpriteBank(Bank: TGUISpriteBank); inline;

Properties

Public property SkinType: TGUISkinType read GetType;

Description

Methods

Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos, Clip, CheckClientArea: TRect) : TRect; overload; inline;

Draws a window background.
Used for drawing the background of dialogs and windows.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
DrawTitleBar
Whether to draw the title bar.
TitleBarColor
The title bar color.
Pos
Defining area where to draw.
Clip
Clip rectangle.
CheckClientArea
The function will not draw anything, but will instead return the clientArea which can be used for drawing by the calling window. That is the area without borders and without titlebar.
Returns

Returns rect where it would be good to draw title bar text.

Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos, Clip: TRect): TRect; overload; inline;

Draws a window background.
Used for drawing the background of dialogs and windows.
Overloaded for default parameters; this function will actually draw instead of checking the client area. See the according parameter of the first definition of this function for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
DrawTitleBar
Whether to draw the title bar.
TitleBarColor
The title bar color.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Returns

Returns rect where it would be good to draw title bar text.

Public function Draw3DWindowBackground(Element: TGUIElement; DrawTitleBar: Boolean; TitleBarColor: TARGBColor; const Pos: TRect): TRect; overload; inline;

Draws a window background.
Used for drawing the background of dialogs and windows.
Overloaded for default parameters; this function will actually draw instead of checking the client area. See the according parameter of the first definition of this function for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
DrawTitleBar
Whether to draw the title bar.
TitleBarColor
The title bar color.
Pos
Defining area where to draw.
Returns

Returns rect where it would be good to draw title bar text.

Public function GetColor(Color: TGUIDefaultColor): TARGBColor; inline;

Returns the value of a default color.

Public function GetDefaultText(Text: TGUIDefaultText): StringType; inline;

Returns a default text string.

Public function GetFont(Which: TGUIDefaultFont): TGUIFont; inline;

Returns a default font.

Public function GetIcon(Icon: TGUIDefaultIcon): LongWord; inline;

Returns a default icon.

Public function GetSize(Size: TGUIDefaultSize): LongInt; inline;

Returns a default size constant.

Public function GetSpriteBank: TGUISpriteBank; inline;

Returns the skin's sprite bank.

Public procedure Draw2DRectangle(Element: TGUIElement; Color: TARGBColor; const Pos: TRect); overload; inline;

Draws a 2D rectangle.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this icon. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Color
Color of the rectangle to draw. The alpha component specifies how transparent the rectangle will be.
Pos
Position of the rectangle.
Public procedure Draw2DRectangle(Element: TGUIElement; Color: TARGBColor; const Pos, Clip: TRect); overload; inline;

Draws a 2D rectangle.

Parameters
Element
The element which wishes to draw this icon. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Color
Color of the rectangle to draw. The alpha component specifies how transparent the rectangle will be.
Pos
Position of the rectangle.
Clip
Rectangle against which the rectangle will be clipped.
Public procedure Draw3DButtonPanePressed(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;

Draws a pressed 3D button pane.
Used for drawing for example buttons in pressed state. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Public procedure Draw3DButtonPanePressed(Element: TGUIElement; const Pos: TRect); overload; inline;

Draws a pressed 3D button pane.
Used for drawing for example buttons in pressed state. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Public procedure Draw3DButtonPaneStandard(Element: TGUIElement; const Pos: TRect); overload; inline;

Draws a non-pressed 3D button pane.
Used for drawing for example buttons in normal state. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Public procedure Draw3DButtonPaneStandard(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;

Draws a non-pressed 3D button pane.
Used for drawing for example buttons in normal state. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Public procedure Draw3DMenuPane(Element: TGUIElement; const Pos: TRect); overload; inline;

Draws a default 3D menu pane.
Used for drawing for menus and context menus. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Public procedure Draw3DMenuPane(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;

Draws a default 3D menu pane.
Used for drawing for menus and context menus. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Public procedure Draw3DSunkenPane(Element: TGUIElement; Background: TARGBColor; Flat: Boolean; FillBackground: Boolean; const Pos, Clip: TRect); overload; inline;

Draws a sunken 3D pane.
Used for drawing the background of edit, combo or check boxes. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Background
The background color.
Flat
Specifies if the sunken pane should be flat or displayed as sunken deep into the ground.
FillBackground
Specifies if the background should be filled with the background color or not be drawn at all.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Public procedure Draw3DSunkenPane(Element: TGUIElement; Background: TARGBColor; Flat: Boolean; FillBackground: Boolean; const Pos: TRect); overload; inline;

Draws a sunken 3D pane.
Used for drawing the background of edit, combo or check boxes. It uses the colors dc3DDarkShadow, dcHighlight, dc3DShadow and dc3DFace for this. See TGUIDefaultColor for details.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Background
The background color.
Flat
Specifies if the sunken pane should be flat or displayed as sunken deep into the ground.
FillBackground
Specifies if the background should be filled with the background color or not be drawn at all.
Pos
Defining area where to draw.
Public procedure Draw3DTabBody(Element: TGUIElement; Border, Background: Boolean; const Pos, Clip: TRect; TabHeight: LongInt; Alignment: TGUIAlignment = alUpperLeft); overload; inline;

Draws a tab control body.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Border
Specifies if the border should be drawn
Background
The background color.
Pos
Defining area where to draw.
Clip
Clip rectangle.
TabHeight
Height of a tab.
Alignment
Alignment of GUI element.
Public procedure Draw3DTabBody(Element: TGUIElement; Border, Background: Boolean; const Pos: TRect); overload; inline;

Draws a tab control body.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Border
Specifies if the border should be drawn
Background
The background color.
Pos
Defining area where to draw.
Public procedure Draw3DTabButton(Element: TGUIElement; Active: Boolean; const Pos: TRect); overload; inline;

Draws a tab button.
Used for drawing the buttons on top of tab controls.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Active
Specifies if the tab is currently active.
Pos
Defining area where to draw.
Public procedure Draw3DTabButton(Element: TGUIElement; Active: Boolean; const Pos, Clip: TRect; Alignment: TGUIAlignment = alUpperLeft); overload; inline;

Draws a tab button.
Used for drawing the buttons on top of tab controls.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Active
Specifies if the tab is currently active.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Alignment
Alignment of GUI element.
Public procedure Draw3DToolBar(Element: TGUIElement; const Pos: TRect); overload; inline;

Draws a 3D toolbar or a menu.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Public procedure Draw3DToolBar(Element: TGUIElement; const Pos, Clip: TRect); overload; inline;

Draws a 3D toolbar or a menu.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Pos
Defining area where to draw.
Clip
Clip rectangle.
Public procedure DrawIcon(Element: TGUIElement; Icon: TGUIDefaultIcon; const Pos: TPoint; StartTime, CurrentTime: LongWord; Loop: Boolean; const Clip: TRect); overload; inline;

Draws an icon, usually form the skin's sprite bank.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Icon
Specifies the icon to be drawn.
Pos
The position to draw the icon
StartTime
The time at the start of the animation
CurrentTime
The present time, used to calculate the frame number
Loop
Whether the animation should loop or not
Clip
Clip rectangle.
Returns

Returns rect where it would be good to draw title bar text.

Public procedure DrawIcon(Element: TGUIElement; Icon: TGUIDefaultIcon; const Pos: TPoint; StartTime: LongWord = 0; CurrentTime: LongWord = 0; Loop: Boolean = False); overload; inline;

Draws an icon, usually form the skin's sprite bank.
Overloaded for default parameters.

Parameters
Element
The element which wishes to draw this. This parameter is usually not used by TGUISkin, but can be used for example by more complex implementations to find out how to draw the part exactly.
Icon
Specifies the icon to be drawn.
Pos
The position to draw the icon
StartTime
The time at the start of the animation
CurrentTime
The present time, used to calculate the frame number
Loop
Whether the animation should loop or not.
Returns

Returns rect where it would be good to draw title bar text.

Public procedure SetColor(Which: TGUIDefaultColor; NewColor: TARGBColor); inline;

Sets a default color.

Parameters
Which
The default color name to modify.
NewColor
The new color value.
Public procedure SetDefaultText(Which: TGUIDefaultText; const NewText: StringType); inline;

Sets a default text constant.

Parameters
Which
The default text name to modify.
NewColor
The new text.
Public procedure SetFont(Font: TGUIFont; Which: TGUIDefaultFont = dfDefault); inline;

Sets a default font.

Parameters
NewColor
The new font.
Which
The default font name to modify.
Public procedure SetIcon(Icon: TGUIDefaultIcon; Index: LongWord); inline;

Sets a default icon.

Parameters
Which
The default icon name to modify.
NewColor
The new icon.
Public procedure SetSize(Which: TGUIDefaultSize; Size: LongInt); inline;

Sets a default size constant.

Parameters
Which
The default size to modify.
NewColor
The new size value.
Public procedure SetSpriteBank(Bank: TGUISpriteBank); inline;

Sets a new sprite bank.

Properties

Public property SkinType: TGUISkinType read GetType;

The type of this skin.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22