#include <guiSkin.h>
Public Member Functions | |
GUISkin (EGUI_SKIN_TYPE type, video::IVideoDriver *driver) | |
virtual | ~GUISkin () |
destructor | |
virtual float | getScale () const |
returns display density scaling factor | |
virtual void | setScale (float scale) |
sets display density scaling factor | |
virtual video::SColor | getColor (EGUI_DEFAULT_COLOR color) const |
returns default color | |
virtual void | setColor (EGUI_DEFAULT_COLOR which, video::SColor newColor) |
sets a default color | |
virtual s32 | getSize (EGUI_DEFAULT_SIZE size) const |
returns size for the given size type | |
virtual void | setSize (EGUI_DEFAULT_SIZE which, s32 size) |
sets a default size | |
virtual IGUIFont * | getFont (EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const |
returns the default font | |
virtual void | setFont (IGUIFont *font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) |
sets a default font | |
virtual void | setSpriteBank (IGUISpriteBank *bank) |
sets the sprite bank used for drawing icons | |
virtual IGUISpriteBank * | getSpriteBank () const |
gets the sprite bank used for drawing icons | |
virtual u32 | getIcon (EGUI_DEFAULT_ICON icon) const |
Returns a default icon. | |
virtual void | setIcon (EGUI_DEFAULT_ICON icon, u32 index) |
Sets a default icon. | |
virtual const wchar_t * | getDefaultText (EGUI_DEFAULT_TEXT text) const |
Returns a default text. | |
virtual void | setDefaultText (EGUI_DEFAULT_TEXT which, const wchar_t *newText) |
Sets a default text. | |
virtual void | draw3DButtonPaneStandard (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0) |
draws a standard 3d button pane | |
virtual void | drawColored3DButtonPaneStandard (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws a standard 3d button pane | |
virtual void | draw3DButtonPanePressed (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0) |
draws a pressed 3d button pane | |
virtual void | drawColored3DButtonPanePressed (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws a pressed 3d button pane | |
virtual void | draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor, bool flat, bool fillBackGround, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0) |
draws a sunken 3d pane | |
virtual void | drawColored3DSunkenPane (IGUIElement *element, video::SColor bgcolor, bool flat, bool fillBackGround, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws a sunken 3d pane | |
virtual core::rect< s32 > | draw3DWindowBackground (IGUIElement *element, bool drawTitleBar, video::SColor titleBarColor, const core::rect< s32 > &rect, const core::rect< s32 > *clip, core::rect< s32 > *checkClientArea) |
draws a window background | |
virtual core::rect< s32 > | drawColored3DWindowBackground (IGUIElement *element, bool drawTitleBar, video::SColor titleBarColor, const core::rect< s32 > &rect, const core::rect< s32 > *clip, core::rect< s32 > *checkClientArea, const video::SColor *colors=0) |
draws a window background | |
virtual void | draw3DMenuPane (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0) |
draws a standard 3d menu pane | |
virtual void | drawColored3DMenuPane (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws a standard 3d menu pane | |
virtual void | draw3DToolBar (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0) |
draws a standard 3d tool bar | |
virtual void | drawColored3DToolBar (IGUIElement *element, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws a standard 3d tool bar | |
virtual void | draw3DTabButton (IGUIElement *element, bool active, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) |
draws a tab button | |
virtual void | drawColored3DTabButton (IGUIElement *element, bool active, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT, const video::SColor *colors=0) |
draws a tab button | |
virtual void | draw3DTabBody (IGUIElement *element, bool border, bool background, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, s32 tabHeight=-1, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) |
draws a tab control body | |
virtual void | drawColored3DTabBody (IGUIElement *element, bool border, bool background, const core::rect< s32 > &rect, const core::rect< s32 > *clip=0, s32 tabHeight=-1, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT, const video::SColor *colors=0) |
draws a tab control body | |
virtual void | drawIcon (IGUIElement *element, EGUI_DEFAULT_ICON icon, const core::position2di position, u32 starttime=0, u32 currenttime=0, bool loop=false, const core::rect< s32 > *clip=0) |
draws an icon, usually from the skin's sprite bank | |
virtual void | drawColoredIcon (IGUIElement *element, EGUI_DEFAULT_ICON icon, const core::position2di position, u32 starttime=0, u32 currenttime=0, bool loop=false, const core::rect< s32 > *clip=0, const video::SColor *colors=0) |
draws an icon, usually from the skin's sprite bank | |
virtual void | draw2DRectangle (IGUIElement *element, const video::SColor &color, const core::rect< s32 > &pos, const core::rect< s32 > *clip=0) |
draws a 2d rectangle. | |
virtual EGUI_SKIN_TYPE | getType () const |
get the type of this skin | |
virtual void | getColors (video::SColor *colors) |
gets the colors | |
Private Attributes | |
float | Scale = 1.0f |
video::SColor | Colors [EGDC_COUNT] |
s32 | Sizes [EGDS_COUNT] |
u32 | Icons [EGDI_COUNT] |
IGUIFont * | Fonts [EGDF_COUNT] |
IGUISpriteBank * | SpriteBank |
core::stringw | Texts [EGDT_COUNT] |
video::IVideoDriver * | Driver |
bool | UseGradient |
EGUI_SKIN_TYPE | Type |
irr::gui::GUISkin::GUISkin | ( | EGUI_SKIN_TYPE | type, |
video::IVideoDriver * | driver ) |
|
virtual |
destructor
References Fonts, and SpriteBank.
|
virtual |
draws a 2d rectangle.
element | Pointer to the element which wishes to draw this icon. This parameter is usually not used by IGUISkin, 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 | Pointer to rectangle against which the rectangle will be clipped. If the pointer is null, no clipping will be performed. |
References Driver.
|
inlinevirtual |
draws a pressed 3d button pane
Used for drawing for example buttons in pressed state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
rect | Defining area where to draw. |
clip | Clip area. |
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
References drawColored3DButtonPanePressed().
|
inlinevirtual |
draws a standard 3d button pane
Used for drawing for example buttons in normal state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
rect | Defining area where to draw. |
clip | Clip area. |
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
References drawColored3DButtonPaneStandard().
Referenced by drawColored3DMenuPane().
|
inlinevirtual |
draws a standard 3d menu pane
Used for drawing for menus and context menus. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
rect | Defining area where to draw. |
clip | Clip area. |
References drawColored3DMenuPane().
|
inlinevirtual |
draws a sunken 3d pane
Used for drawing the background of edit, combo or check boxes.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
bgcolor | Background color. |
flat | Specifies if the sunken pane should be flat or displayed as sunken deep into the ground. |
rect | Defining area where to draw. |
clip | Clip area. |
References drawColored3DSunkenPane().
Referenced by drawColored3DButtonPaneStandard().
|
inlinevirtual |
draws a tab control body
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, 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 | Specifies if the background should be drawn. |
rect | Defining area where to draw. |
clip | Clip area. |
References drawColored3DTabBody().
|
inlinevirtual |
draws a tab button
Used for drawing for tab buttons on top of tabs.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, 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. |
rect | Defining area where to draw. |
clip | Clip area. |
References drawColored3DTabButton().
|
inlinevirtual |
draws a standard 3d tool bar
Used for drawing for toolbars and menus.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
rect | Defining area where to draw. |
clip | Clip area. |
References drawColored3DToolBar().
|
inlinevirtual |
draws a window background
Used for drawing the background of dialogs and windows.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
titleBarColor | Title color. |
drawTitleBar | True to enable title drawing. |
rect | Defining area where to draw. |
clip | Clip area. |
checkClientArea | When set to non-null 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. |
References drawColored3DWindowBackground().
|
virtual |
draws a pressed 3d button pane
Used for drawing for example buttons in pressed state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
rect | Defining area where to draw. |
clip | Clip area. |
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
References Colors, Driver, and UseGradient.
Referenced by GUIButton::draw(), and draw3DButtonPanePressed().
|
virtual |
draws a standard 3d button pane
Used for drawing for example buttons in normal state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
rect | Defining area where to draw. |
clip | Clip area. |
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
References Colors, draw3DSunkenPane(), Driver, Type, and UseGradient.
Referenced by GUIButton::draw(), and draw3DButtonPaneStandard().
|
virtual |
draws a standard 3d menu pane
Used for drawing for menus and context menus. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
rect | Defining area where to draw. |
clip | Clip area. |
References Colors, draw3DButtonPaneStandard(), Driver, Type, and UseGradient.
Referenced by draw3DMenuPane().
|
virtual |
draws a sunken 3d pane
Used for drawing the background of edit, combo or check boxes.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
bgcolor | Background color. |
flat | Specifies if the sunken pane should be flat or displayed as sunken deep into the ground. |
rect | Defining area where to draw. |
clip | Clip area. |
References Colors, and Driver.
Referenced by draw3DSunkenPane().
|
virtual |
draws a tab control body
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, 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 | Specifies if the background should be drawn. |
rect | Defining area where to draw. |
clip | Clip area. |
References Colors, Driver, getSize(), and UseGradient.
Referenced by draw3DTabBody().
|
virtual |
draws a tab button
Used for drawing for tab buttons on top of tabs.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, 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. |
rect | Defining area where to draw. |
clip | Clip area. |
References Colors, and Driver.
Referenced by draw3DTabButton().
|
virtual |
draws a standard 3d tool bar
Used for drawing for toolbars and menus.
element | Pointer to the element which wishes to draw this. This parameter is usually not used by ISkin, but can be used for example by more complex implementations to find out how to draw the part exactly. |
rect | Defining area where to draw. |
clip | Clip area. |
References Colors, Driver, Type, and UseGradient.
Referenced by draw3DToolBar().
|
virtual |
draws a window background
References Colors, Driver, getSize(), Type, and UseGradient.
Referenced by draw3DWindowBackground().
|
virtual |
draws an icon, usually from the skin's sprite bank
parent | Pointer to the element which wishes to draw this icon. This parameter is usually not used by IGUISkin, 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. |
position | 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 area. |
References Colors, Icons, and SpriteBank.
Referenced by drawIcon().
|
inlinevirtual |
draws an icon, usually from the skin's sprite bank
element | Pointer to the element which wishes to draw this icon. This parameter is usually not used by IGUISkin, 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. |
position | 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 area. |
References drawColoredIcon().
|
virtual |
returns default color
References Colors.
|
virtual |
gets the colors
References Colors.
|
virtual |
Returns a default text.
For example for Message box button captions: "OK", "Cancel", "Yes", "No" and so on.
References Texts.
|
virtual |
returns the default font
References Fonts.
|
virtual |
|
inlinevirtual |
returns display density scaling factor
References Scale.
|
virtual |
returns size for the given size type
References Sizes.
Referenced by GUIButton::draw(), drawColored3DTabBody(), drawColored3DWindowBackground(), and GUIButton::setFromStyle().
|
virtual |
|
virtual |
get the type of this skin
References Type.
|
virtual |
sets a default color
References Colors.
|
virtual |
Sets a default text.
For example for Message box button captions: "OK", "Cancel", "Yes", "No" and so on.
References Texts.
|
virtual |
sets a default font
References Fonts.
|
virtual |
Sets a default icon.
Sets the sprite index used for drawing icons like arrows, close buttons and ticks in checkboxes
icon | Enum specifying which icon to change |
index | The sprite index used to draw this icon |
References Icons.
|
inlinevirtual |
sets display density scaling factor
References Scale.
|
virtual |
sets a default size
References Sizes.
|
virtual |
sets the sprite bank used for drawing icons
set a new sprite bank or remove one by passing 0
References SpriteBank.
|
private |
Referenced by GUISkin(), drawColored3DButtonPanePressed(), drawColored3DButtonPaneStandard(), drawColored3DMenuPane(), drawColored3DSunkenPane(), drawColored3DTabBody(), drawColored3DTabButton(), drawColored3DToolBar(), drawColored3DWindowBackground(), drawColoredIcon(), getColor(), getColors(), and setColor().
|
private |
|
private |
Referenced by GUISkin(), ~GUISkin(), getFont(), and setFont().
|
private |
Referenced by GUISkin(), drawColoredIcon(), getIcon(), and setIcon().
|
private |
Referenced by getScale(), and setScale().
|
private |
Referenced by ~GUISkin(), drawColoredIcon(), getSpriteBank(), and setSpriteBank().
|
private |
Referenced by GUISkin(), getDefaultText(), and setDefaultText().
|
private |
|
private |