]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gui/guiSkin.h
add airjump and remove unused headers
[dragonfireclient.git] / src / gui / guiSkin.h
index 4937b1f9ab3c810d46816e08fe0c925761981a41..bbb900f9f5d80b6ede702916c8cd30377d24150c 100644 (file)
@@ -17,335 +17,350 @@ namespace irr
 {\r
 namespace video\r
 {\r
-class IVideoDriver;\r
+       class IVideoDriver;\r
 }\r
 namespace gui\r
 {\r
-class GUISkin : public IGUISkin\r
-{\r
-public:\r
-       GUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver *driver);\r
-\r
-       //! destructor\r
-       virtual ~GUISkin();\r
-\r
-       //! returns default color\r
-       virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const;\r
-\r
-       //! sets a default color\r
-       virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor);\r
-\r
-       //! returns size for the given size type\r
-       virtual s32 getSize(EGUI_DEFAULT_SIZE size) const;\r
-\r
-       //! sets a default size\r
-       virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size);\r
-\r
-       //! returns the default font\r
-       virtual IGUIFont *getFont(EGUI_DEFAULT_FONT which = EGDF_DEFAULT) const;\r
-\r
-       //! sets a default font\r
-       virtual void setFont(IGUIFont *font, EGUI_DEFAULT_FONT which = EGDF_DEFAULT);\r
-\r
-       //! sets the sprite bank used for drawing icons\r
-       virtual void setSpriteBank(IGUISpriteBank *bank);\r
-\r
-       //! gets the sprite bank used for drawing icons\r
-       virtual IGUISpriteBank *getSpriteBank() const;\r
-\r
-       //! Returns a default icon\r
-       /** Returns the sprite index within the sprite bank */\r
-       virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const;\r
-\r
-       //! Sets a default icon\r
-       /** Sets the sprite index used for drawing icons like arrows,\r
-       close buttons and ticks in checkboxes\r
-       \param icon: Enum specifying which icon to change\r
-       \param index: The sprite index used to draw this icon */\r
-       virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index);\r
-\r
-       //! Returns a default text.\r
-       /** For example for Message box button captions:\r
-       "OK", "Cancel", "Yes", "No" and so on. */\r
-       virtual const wchar_t *getDefaultText(EGUI_DEFAULT_TEXT text) const;\r
-\r
-       //! Sets a default text.\r
-       /** For example for Message box button captions:\r
-       "OK", "Cancel", "Yes", "No" and so on. */\r
-       virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t *newText);\r
-\r
-       //! draws a standard 3d button pane\r
-       /** Used for drawing for example buttons in normal state.\r
-       It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
-       EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly. */\r
-       virtual void draw3DButtonPaneStandard(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColored3DButtonPaneStandard(element, rect, clip);\r
-       }\r
-\r
-       virtual void drawColored3DButtonPaneStandard(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a pressed 3d button pane\r
-       /** Used for drawing for example buttons in pressed state.\r
-       It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
-       EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly. */\r
-       virtual void draw3DButtonPanePressed(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColored3DButtonPanePressed(element, rect, clip);\r
-       }\r
-\r
-       virtual void drawColored3DButtonPanePressed(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a sunken 3d pane\r
-       /** Used for drawing the background of edit, combo or check boxes.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly.\r
-       \param bgcolor: Background color.\r
-       \param flat: Specifies if the sunken pane should be flat or displayed as sunken\r
-       deep into the ground.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area. */\r
-       virtual void draw3DSunkenPane(IGUIElement *element, video::SColor bgcolor,\r
-                       bool flat, bool fillBackGround, const core::rect<s32> &rect,\r
-                       const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColored3DSunkenPane(\r
-                               element, bgcolor, flat, fillBackGround, rect, clip);\r
-       }\r
-\r
-       virtual void drawColored3DSunkenPane(IGUIElement *element, video::SColor bgcolor,\r
-                       bool flat, bool fillBackGround, const core::rect<s32> &rect,\r
-                       const core::rect<s32> *clip = 0, const video::SColor *colors = 0);\r
-\r
-       //! draws a window background\r
-       /** Used for drawing the background of dialogs and windows.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly.\r
-       \param titleBarColor: Title color.\r
-       \param drawTitleBar: True to enable title drawing.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area.\r
-       \param checkClientArea: When set to non-null the function will not draw anything,\r
-       but will instead return the clientArea which can be used for drawing by the\r
-       calling window. That is the area without borders and without titlebar. \return\r
-       Returns rect where it would be good to draw title bar text. This will work even\r
-       when checkClientArea is set to a non-null value.*/\r
-       virtual core::rect<s32> draw3DWindowBackground(IGUIElement *element,\r
-                       bool drawTitleBar, video::SColor titleBarColor,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip,\r
-                       core::rect<s32> *checkClientArea)\r
+       class GUISkin : public IGUISkin\r
        {\r
-               return drawColored3DWindowBackground(element, drawTitleBar, titleBarColor,\r
+       public:\r
+\r
+               GUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver);\r
+\r
+               //! destructor\r
+               virtual ~GUISkin();\r
+\r
+               //! returns default color\r
+               virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const;\r
+\r
+               //! sets a default color\r
+               virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor);\r
+\r
+               //! returns size for the given size type\r
+               virtual s32 getSize(EGUI_DEFAULT_SIZE size) const;\r
+\r
+               //! sets a default size\r
+               virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size);\r
+\r
+               //! returns the default font\r
+               virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const;\r
+\r
+               //! sets a default font\r
+               virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT);\r
+\r
+               //! sets the sprite bank used for drawing icons\r
+               virtual void setSpriteBank(IGUISpriteBank* bank);\r
+\r
+               //! gets the sprite bank used for drawing icons\r
+               virtual IGUISpriteBank* getSpriteBank() const;\r
+\r
+               //! Returns a default icon\r
+               /** Returns the sprite index within the sprite bank */\r
+               virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const;\r
+\r
+               //! Sets a default icon\r
+               /** Sets the sprite index used for drawing icons like arrows,\r
+               close buttons and ticks in checkboxes\r
+               \param icon: Enum specifying which icon to change\r
+               \param index: The sprite index used to draw this icon */\r
+               virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index);\r
+\r
+               //! Returns a default text.\r
+               /** For example for Message box button captions:\r
+               "OK", "Cancel", "Yes", "No" and so on. */\r
+               virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const;\r
+\r
+               //! Sets a default text.\r
+               /** For example for Message box button captions:\r
+               "OK", "Cancel", "Yes", "No" and so on. */\r
+               virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText);\r
+\r
+               //! draws a standard 3d button pane\r
+               /** Used for drawing for example buttons in normal state.\r
+               It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
+               EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly. */\r
+               virtual void draw3DButtonPaneStandard(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColored3DButtonPaneStandard(element, rect,clip);\r
+               }\r
+\r
+               virtual void drawColored3DButtonPaneStandard(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a pressed 3d button pane\r
+               /** Used for drawing for example buttons in pressed state.\r
+               It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
+               EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly. */\r
+               virtual void draw3DButtonPanePressed(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColored3DButtonPanePressed(element, rect, clip);\r
+               }\r
+\r
+               virtual void drawColored3DButtonPanePressed(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a sunken 3d pane\r
+               /** Used for drawing the background of edit, combo or check boxes.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param bgcolor: Background color.\r
+               \param flat: Specifies if the sunken pane should be flat or displayed as sunken\r
+               deep into the ground.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area. */\r
+               virtual void draw3DSunkenPane(IGUIElement* element,\r
+                               video::SColor bgcolor, bool flat,\r
+                               bool fillBackGround,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColored3DSunkenPane(element, bgcolor, flat, fillBackGround, rect, clip);\r
+               }\r
+\r
+               virtual void drawColored3DSunkenPane(IGUIElement* element,\r
+                               video::SColor bgcolor, bool flat,\r
+                               bool fillBackGround,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a window background\r
+               /** Used for drawing the background of dialogs and windows.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param titleBarColor: Title color.\r
+               \param drawTitleBar: True to enable title drawing.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area.\r
+               \param checkClientArea: When set to non-null the function will not draw anything,\r
+               but will instead return the clientArea which can be used for drawing by the calling window.\r
+               That is the area without borders and without titlebar.\r
+               \return Returns rect where it would be good to draw title bar text. This will\r
+               work even when checkClientArea is set to a non-null value.*/\r
+               virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element,\r
+                               bool drawTitleBar, video::SColor titleBarColor,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip,\r
+                               core::rect<s32>* checkClientArea)\r
+               {\r
+                       return drawColored3DWindowBackground(element, drawTitleBar, titleBarColor,\r
                                rect, clip, checkClientArea);\r
-       }\r
-\r
-       virtual core::rect<s32> drawColored3DWindowBackground(IGUIElement *element,\r
-                       bool drawTitleBar, video::SColor titleBarColor,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip,\r
-                       core::rect<s32> *checkClientArea,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a standard 3d menu pane\r
-       /** Used for drawing for menus and context menus.\r
-       It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
-       EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area. */\r
-       virtual void draw3DMenuPane(IGUIElement *element, const core::rect<s32> &rect,\r
-                       const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColored3DMenuPane(element, rect, clip);\r
-       }\r
-\r
-       virtual void drawColored3DMenuPane(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a standard 3d tool bar\r
-       /** Used for drawing for toolbars and menus.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area. */\r
-       virtual void draw3DToolBar(IGUIElement *element, const core::rect<s32> &rect,\r
-                       const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColored3DToolBar(element, rect, clip);\r
-       }\r
-\r
-       virtual void drawColored3DToolBar(IGUIElement *element,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a tab button\r
-       /** Used for drawing for tab buttons on top of tabs.\r
-       \param element: Pointer to the element which wishes to draw this. This parameter\r
-       is usually not used by ISkin, but can be used for example by more complex\r
-       implementations to find out how to draw the part exactly.\r
-       \param active: Specifies if the tab is currently active.\r
-       \param rect: Defining area where to draw.\r
-       \param clip: Clip area. */\r
-       virtual void draw3DTabButton(IGUIElement *element, bool active,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT)\r
-       {\r
-               drawColored3DTabButton(element, active, rect, clip, alignment);\r
-       }\r
-\r
-       virtual void drawColored3DTabButton(IGUIElement *element, bool active,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws a tab control body\r
-       /** \param element: Pointer to the element which wishes to draw this. This\r
-       parameter is usually not used by ISkin, but can be used for example by more\r
-       complex implementations to find out how to draw the part exactly. \param border:\r
-       Specifies if the border should be drawn. \param background: Specifies if the\r
-       background should be drawn. \param rect: Defining area where to draw.\r
-       \param clip: Clip area. */\r
-       virtual void draw3DTabBody(IGUIElement *element, bool border, bool background,\r
-                       const core::rect<s32> &rect, const core::rect<s32> *clip = 0,\r
-                       s32 tabHeight = -1, EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT)\r
-       {\r
-               drawColored3DTabBody(element, border, background, rect, clip, tabHeight,\r
-                               alignment);\r
-       }\r
-\r
-       virtual void drawColored3DTabBody(IGUIElement *element, bool border,\r
-                       bool background, const core::rect<s32> &rect,\r
-                       const core::rect<s32> *clip = 0, s32 tabHeight = -1,\r
-                       EGUI_ALIGNMENT alignment = EGUIA_UPPERLEFT,\r
-                       const video::SColor *colors = 0);\r
-\r
-       //! draws an icon, usually from the skin's sprite bank\r
-       /** \param element: Pointer to the element which wishes to draw this icon.\r
-       This parameter is usually not used by IGUISkin, but can be used for example\r
-       by more complex implementations to find out how to draw the part exactly.\r
-       \param icon: Specifies the icon to be drawn.\r
-       \param position: The position to draw the icon\r
-       \param starttime: The time at the start of the animation\r
-       \param currenttime: The present time, used to calculate the frame number\r
-       \param loop: Whether the animation should loop or not\r
-       \param clip: Clip area. */\r
-       virtual void drawIcon(IGUIElement *element, EGUI_DEFAULT_ICON icon,\r
-                       const core::position2di position, u32 starttime = 0,\r
-                       u32 currenttime = 0, bool loop = false,\r
-                       const core::rect<s32> *clip = 0)\r
-       {\r
-               drawColoredIcon(element, icon, position, starttime, currenttime, loop,\r
-                               clip);\r
-       }\r
-\r
-       virtual void drawColoredIcon(IGUIElement *element, EGUI_DEFAULT_ICON icon,\r
-                       const core::position2di position, u32 starttime = 0,\r
-                       u32 currenttime = 0, bool loop = false,\r
-                       const core::rect<s32> *clip = 0, const video::SColor *colors = 0);\r
-\r
-       //! draws a 2d rectangle.\r
-       /** \param element: Pointer to the element which wishes to draw this icon.\r
-       This parameter is usually not used by IGUISkin, but can be used for example\r
-       by more complex implementations to find out how to draw the part exactly.\r
-       \param color: Color of the rectangle to draw. The alpha component specifies how\r
-       transparent the rectangle will be.\r
-       \param pos: Position of the rectangle.\r
-       \param clip: Pointer to rectangle against which the rectangle will be clipped.\r
-       If the pointer is null, no clipping will be performed. */\r
-       virtual void draw2DRectangle(IGUIElement *element, const video::SColor &color,\r
-                       const core::rect<s32> &pos, const core::rect<s32> *clip = 0);\r
-\r
-       //! get the type of this skin\r
-       virtual EGUI_SKIN_TYPE getType() const;\r
-\r
-       //! Writes attributes of the object.\r
-       //! Implement this to expose the attributes of your scene node animator for\r
-       //! scripting languages, editors, debuggers or xml serialization purposes.\r
-       virtual void serializeAttributes(io::IAttributes *out,\r
-                       io::SAttributeReadWriteOptions *options = 0) const;\r
-\r
-       //! Reads attributes of the object.\r
-       //! Implement this to set the attributes of your scene node animator for\r
-       //! scripting languages, editors, debuggers or xml deserialization purposes.\r
-       virtual void deserializeAttributes(\r
-                       io::IAttributes *in, io::SAttributeReadWriteOptions *options = 0);\r
-\r
-       //! gets the colors\r
-       virtual void getColors(video::SColor *colors); // ::PATCH:\r
-\r
-private:\r
-       video::SColor Colors[EGDC_COUNT];\r
-       s32 Sizes[EGDS_COUNT];\r
-       u32 Icons[EGDI_COUNT];\r
-       IGUIFont *Fonts[EGDF_COUNT];\r
-       IGUISpriteBank *SpriteBank;\r
-       core::stringw Texts[EGDT_COUNT];\r
-       video::IVideoDriver *Driver;\r
-       bool UseGradient;\r
-\r
-       EGUI_SKIN_TYPE Type;\r
-};\r
-\r
-#define set3DSkinColors(skin, button_color)                                              \\r
-       {                                                                                \\r
-               skin->setColor(EGDC_3D_FACE, button_color);                              \\r
-               skin->setColor(EGDC_3D_DARK_SHADOW, button_color, 0.25f);                \\r
-               skin->setColor(EGDC_3D_SHADOW, button_color, 0.5f);                      \\r
-               skin->setColor(EGDC_3D_LIGHT, button_color);                             \\r
-               skin->setColor(EGDC_3D_HIGH_LIGHT, button_color, 1.5f);                  \\r
-       }\r
-\r
-#define getElementSkinColor(color)                                                       \\r
-       {                                                                                \\r
-               if (!Colors) {                                                           \\r
-                       IGUISkin *skin = Environment->getSkin();                         \\r
-                       if (skin)                                                        \\r
-                               return skin->getColor(color);                            \\r
-               }                                                                        \\r
-               return Colors[color];                                                    \\r
-       }\r
-\r
-#define setElementSkinColor(which, newColor, shading)                                    \\r
-       {                                                                                \\r
-               if (!Colors) {                                                           \\r
-                       Colors = new video::SColor[EGDC_COUNT];                          \\r
-                       GUISkin *skin = (GUISkin *)Environment->getSkin();               \\r
-                       if (skin)                                                        \\r
-                               skin->getColors(Colors);                                 \\r
-               }                                                                        \\r
-               Colors[which] = newColor;                                                \\r
-               setShading(Colors[which], shading);                                      \\r
-       }\r
+               }\r
+\r
+               virtual core::rect<s32> drawColored3DWindowBackground(IGUIElement* element,\r
+                               bool drawTitleBar, video::SColor titleBarColor,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip,\r
+                               core::rect<s32>* checkClientArea,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a standard 3d menu pane\r
+               /** Used for drawing for menus and context menus.\r
+               It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
+               EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area. */\r
+               virtual void draw3DMenuPane(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColored3DMenuPane(element, rect, clip);\r
+               }\r
+\r
+               virtual void drawColored3DMenuPane(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a standard 3d tool bar\r
+               /** Used for drawing for toolbars and menus.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area. */\r
+               virtual void draw3DToolBar(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColored3DToolBar(element, rect, clip);\r
+               }\r
+\r
+               virtual void drawColored3DToolBar(IGUIElement* element,\r
+                               const core::rect<s32>& rect,\r
+                               const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a tab button\r
+               /** Used for drawing for tab buttons on top of tabs.\r
+               \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param active: Specifies if the tab is currently active.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area. */\r
+               virtual void draw3DTabButton(IGUIElement* element, bool active,\r
+                       const core::rect<s32>& rect, const core::rect<s32>* clip=0, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT)\r
+               {\r
+                       drawColored3DTabButton(element, active, rect, clip, alignment);\r
+               }\r
+\r
+               virtual void drawColored3DTabButton(IGUIElement* element, bool active,\r
+                       const core::rect<s32>& rect, const core::rect<s32>* clip=0, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT,\r
+                       const video::SColor* colors=0);\r
+\r
+               //! draws a tab control body\r
+               /** \param element: Pointer to the element which wishes to draw this. This parameter\r
+               is usually not used by ISkin, but can be used for example by more complex\r
+               implementations to find out how to draw the part exactly.\r
+               \param border: Specifies if the border should be drawn.\r
+               \param background: Specifies if the background should be drawn.\r
+               \param rect: Defining area where to draw.\r
+               \param clip: Clip area. */\r
+               virtual void draw3DTabBody(IGUIElement* element, bool border, bool background,\r
+                       const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT)\r
+               {\r
+                       drawColored3DTabBody(element, border, background, rect, clip, tabHeight, alignment);\r
+               }\r
+\r
+               virtual void drawColored3DTabBody(IGUIElement* element, bool border, bool background,\r
+                       const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT,\r
+                       const video::SColor* colors=0);\r
+\r
+               //! draws an icon, usually from the skin's sprite bank\r
+               /** \param element: Pointer to the element which wishes to draw this icon.\r
+               This parameter is usually not used by IGUISkin, but can be used for example\r
+               by more complex implementations to find out how to draw the part exactly.\r
+               \param icon: Specifies the icon to be drawn.\r
+               \param position: The position to draw the icon\r
+               \param starttime: The time at the start of the animation\r
+               \param currenttime: The present time, used to calculate the frame number\r
+               \param loop: Whether the animation should loop or not\r
+               \param clip: Clip area. */\r
+               virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,\r
+                               const core::position2di position,\r
+                               u32 starttime=0, u32 currenttime=0,\r
+                               bool loop=false, const core::rect<s32>* clip=0)\r
+               {\r
+                       drawColoredIcon(element, icon, position, starttime, currenttime, loop, clip);\r
+               }\r
+\r
+               virtual void drawColoredIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,\r
+                               const core::position2di position,\r
+                               u32 starttime=0, u32 currenttime=0,\r
+                               bool loop=false, const core::rect<s32>* clip=0,\r
+                               const video::SColor* colors=0);\r
+\r
+               //! draws a 2d rectangle.\r
+               /** \param element: Pointer to the element which wishes to draw this icon.\r
+               This parameter is usually not used by IGUISkin, but can be used for example\r
+               by more complex implementations to find out how to draw the part exactly.\r
+               \param color: Color of the rectangle to draw. The alpha component specifies how\r
+               transparent the rectangle will be.\r
+               \param pos: Position of the rectangle.\r
+               \param clip: Pointer to rectangle against which the rectangle will be clipped.\r
+               If the pointer is null, no clipping will be performed. */\r
+               virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color,\r
+                               const core::rect<s32>& pos, const core::rect<s32>* clip = 0);\r
+\r
+\r
+               //! get the type of this skin\r
+               virtual EGUI_SKIN_TYPE getType() const;\r
+\r
+               //! Writes attributes of the object.\r
+               //! Implement this to expose the attributes of your scene node animator for\r
+               //! scripting languages, editors, debuggers or xml serialization purposes.\r
+               virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;\r
+\r
+               //! Reads attributes of the object.\r
+               //! Implement this to set the attributes of your scene node animator for\r
+               //! scripting languages, editors, debuggers or xml deserialization purposes.\r
+               virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);\r
+\r
+               //! gets the colors\r
+               virtual void getColors(video::SColor* colors); // ::PATCH:\r
+\r
+       private:\r
+\r
+               video::SColor Colors[EGDC_COUNT];\r
+               s32 Sizes[EGDS_COUNT];\r
+               u32 Icons[EGDI_COUNT];\r
+               IGUIFont* Fonts[EGDF_COUNT];\r
+               IGUISpriteBank* SpriteBank;\r
+               core::stringw Texts[EGDT_COUNT];\r
+               video::IVideoDriver* Driver;\r
+               bool UseGradient;\r
+\r
+               EGUI_SKIN_TYPE Type;\r
+       };\r
+\r
+       #define set3DSkinColors(skin, button_color) \\r
+               { \\r
+                       skin->setColor(EGDC_3D_FACE, button_color); \\r
+                       skin->setColor(EGDC_3D_DARK_SHADOW, button_color, 0.25f); \\r
+                       skin->setColor(EGDC_3D_SHADOW, button_color, 0.5f); \\r
+                       skin->setColor(EGDC_3D_LIGHT, button_color); \\r
+                       skin->setColor(EGDC_3D_HIGH_LIGHT, button_color, 1.5f); \\r
+               }\r
+\r
+       #define getElementSkinColor(color) \\r
+               { \\r
+                       if (!Colors) \\r
+                       { \\r
+                               IGUISkin* skin = Environment->getSkin(); \\r
+                               if (skin) \\r
+                                       return skin->getColor(color); \\r
+                       } \\r
+                       return Colors[color]; \\r
+               }\r
+\r
+       #define setElementSkinColor(which, newColor, shading) \\r
+               { \\r
+                       if (!Colors) \\r
+                       { \\r
+                               Colors = new video::SColor[EGDC_COUNT]; \\r
+                               GUISkin* skin = (GUISkin *)Environment->getSkin(); \\r
+                               if (skin) \\r
+                                       skin->getColors(Colors); \\r
+                       } \\r
+                       Colors[which] = newColor; \\r
+                       setShading(Colors[which],shading); \\r
+               }\r
 } // end namespace gui\r
 //! Sets the shading\r
-inline void setShading(video::SColor &color, f32 s) // :PATCH:\r
+inline void setShading(video::SColor &color,f32 s) // :PATCH:\r
 {\r
-       if (s < 1.0f) {\r
+       if (s < 1.0f)\r
+       {\r
                color.setRed(color.getRed() * s);\r
                color.setGreen(color.getGreen() * s);\r
                color.setBlue(color.getBlue() * s);\r
-       } else if (s > 1.0f) {\r
+       }\r
+       else if (s > 1.0f)\r
+       {\r
                s -= 1.0f;\r
 \r
                color.setRed(color.getRed() + (255 - color.getRed()) * s);\r
@@ -355,6 +370,7 @@ inline void setShading(video::SColor &color, f32 s) // :PATCH:
 }\r
 } // end namespace irr\r
 \r
+\r
 #endif // _IRR_COMPILE_WITH_GUI_\r
 \r
 #endif\r