]> git.lizzy.rs Git - irrlicht.git/blob - include/IGUISkin.h
Support both OpenGL3 and GLES2 on SDL2
[irrlicht.git] / include / IGUISkin.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __I_GUI_SKIN_H_INCLUDED__\r
6 #define __I_GUI_SKIN_H_INCLUDED__\r
7 \r
8 #include "IReferenceCounted.h"\r
9 #include "EGUIAlignment.h"\r
10 #include "SColor.h"\r
11 #include "rect.h"\r
12 \r
13 namespace irr\r
14 {\r
15 namespace gui\r
16 {\r
17         class IGUIFont;\r
18         class IGUISpriteBank;\r
19         class IGUIElement;\r
20 \r
21         //! Enumeration of available default skins.\r
22         /** To set one of the skins, use the following code, for example to set\r
23         the Windows classic skin:\r
24         \code\r
25         gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);\r
26         environment->setSkin(newskin);\r
27         newskin->drop();\r
28         \endcode\r
29         */\r
30         enum EGUI_SKIN_TYPE\r
31         {\r
32                 //! Default windows look and feel\r
33                 EGST_WINDOWS_CLASSIC=0,\r
34 \r
35                 //! Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons\r
36                 EGST_WINDOWS_METALLIC,\r
37 \r
38                 //! Burning's skin\r
39                 EGST_BURNING_SKIN,\r
40 \r
41                 //! An unknown skin, not serializable at present\r
42                 EGST_UNKNOWN,\r
43 \r
44                 //! this value is not used, it only specifies the number of skin types\r
45                 EGST_COUNT\r
46         };\r
47 \r
48         //! Names for gui element types\r
49         const c8* const GUISkinTypeNames[EGST_COUNT+1] =\r
50         {\r
51                 "windowsClassic",\r
52                 "windowsMetallic",\r
53                 "burning",\r
54                 "unknown",\r
55                 0,\r
56         };\r
57 \r
58 \r
59         //! Enumeration for skin colors\r
60         enum EGUI_DEFAULT_COLOR\r
61         {\r
62                 //! Dark shadow for three-dimensional display elements.\r
63                 EGDC_3D_DARK_SHADOW = 0,\r
64                 //! Shadow color for three-dimensional display elements (for edges facing away from the light source).\r
65                 EGDC_3D_SHADOW,\r
66                 //! Face color for three-dimensional display elements and for dialog box backgrounds.\r
67                 EGDC_3D_FACE,\r
68                 //! Highlight color for three-dimensional display elements (for edges facing the light source.)\r
69                 EGDC_3D_HIGH_LIGHT,\r
70                 //! Light color for three-dimensional display elements (for edges facing the light source.)\r
71                 EGDC_3D_LIGHT,\r
72                 //! Active window border.\r
73                 EGDC_ACTIVE_BORDER,\r
74                 //! Active window title bar text.\r
75                 EGDC_ACTIVE_CAPTION,\r
76                 //! Background color of multiple document interface (MDI) applications.\r
77                 EGDC_APP_WORKSPACE,\r
78                 //! Text on a button\r
79                 EGDC_BUTTON_TEXT,\r
80                 //! Grayed (disabled) text.\r
81                 EGDC_GRAY_TEXT,\r
82                 //! Item(s) selected in a control.\r
83                 EGDC_HIGH_LIGHT,\r
84                 //! Text of item(s) selected in a control.\r
85                 EGDC_HIGH_LIGHT_TEXT,\r
86                 //! Inactive window border.\r
87                 EGDC_INACTIVE_BORDER,\r
88                 //! Inactive window caption.\r
89                 EGDC_INACTIVE_CAPTION,\r
90                 //! Tool tip text color\r
91                 EGDC_TOOLTIP,\r
92                 //! Tool tip background color\r
93                 EGDC_TOOLTIP_BACKGROUND,\r
94                 //! Scrollbar gray area\r
95                 EGDC_SCROLLBAR,\r
96                 //! Window background\r
97                 EGDC_WINDOW,\r
98                 //! Window symbols like on close buttons, scroll bars and check boxes\r
99                 EGDC_WINDOW_SYMBOL,\r
100                 //! Icons in a list or tree\r
101                 EGDC_ICON,\r
102                 //! Selected icons in a list or tree\r
103                 EGDC_ICON_HIGH_LIGHT,\r
104                 //! Grayed (disabled) window symbols like on close buttons, scroll bars and check boxes\r
105                 EGDC_GRAY_WINDOW_SYMBOL,\r
106                 //! Window background for editable field (editbox, checkbox-field)\r
107                 EGDC_EDITABLE,\r
108                 //! Grayed (disabled) window background for editable field (editbox, checkbox-field)\r
109                 EGDC_GRAY_EDITABLE,\r
110                 //! Show focus of window background for editable field (editbox or when checkbox-field is pressed)\r
111                 EGDC_FOCUSED_EDITABLE,\r
112 \r
113                 //! this value is not used, it only specifies the amount of default colors\r
114                 //! available.\r
115                 EGDC_COUNT\r
116         };\r
117 \r
118         //! Names for default skin colors\r
119         const c8* const GUISkinColorNames[EGDC_COUNT+1] =\r
120         {\r
121                 "3DDarkShadow",\r
122                 "3DShadow",\r
123                 "3DFace",\r
124                 "3DHighlight",\r
125                 "3DLight",\r
126                 "ActiveBorder",\r
127                 "ActiveCaption",\r
128                 "AppWorkspace",\r
129                 "ButtonText",\r
130                 "GrayText",\r
131                 "Highlight",\r
132                 "HighlightText",\r
133                 "InactiveBorder",\r
134                 "InactiveCaption",\r
135                 "ToolTip",\r
136                 "ToolTipBackground",\r
137                 "ScrollBar",\r
138                 "Window",\r
139                 "WindowSymbol",\r
140                 "Icon",\r
141                 "IconHighlight",\r
142                 "GrayWindowSymbol",\r
143                 "Editable",\r
144                 "GrayEditable",\r
145                 "FocusedEditable",\r
146                 0,\r
147         };\r
148 \r
149         //! Enumeration for default sizes.\r
150         enum EGUI_DEFAULT_SIZE\r
151         {\r
152                 //! default with / height of scrollbar. Also width of drop-down button in comboboxes.\r
153                 EGDS_SCROLLBAR_SIZE = 0,\r
154                 //! height of menu\r
155                 EGDS_MENU_HEIGHT,\r
156                 //! width and height of a window titlebar button (like minimize/maximize/close buttons). The titlebar height is also calculated from that.\r
157                 EGDS_WINDOW_BUTTON_WIDTH,\r
158                 //! width of a checkbox check\r
159                 EGDS_CHECK_BOX_WIDTH,\r
160                 //! \deprecated This may be removed by Irrlicht 1.9\r
161                 EGDS_MESSAGE_BOX_WIDTH,\r
162                 //! \deprecated This may be removed by Irrlicht 1.9\r
163                 EGDS_MESSAGE_BOX_HEIGHT,\r
164                 //! width of a default button\r
165                 EGDS_BUTTON_WIDTH,\r
166                 //! height of a default button (OK and cancel buttons)\r
167                 EGDS_BUTTON_HEIGHT,\r
168                 //! distance for text from background\r
169                 EGDS_TEXT_DISTANCE_X,\r
170                 //! distance for text from background\r
171                 EGDS_TEXT_DISTANCE_Y,\r
172                 //! distance for text in the title bar, from the left of the window rect\r
173                 EGDS_TITLEBARTEXT_DISTANCE_X,\r
174                 //! distance for text in the title bar, from the top of the window rect\r
175                 EGDS_TITLEBARTEXT_DISTANCE_Y,\r
176                 //! free space in a messagebox between borders and contents on all sides\r
177                 EGDS_MESSAGE_BOX_GAP_SPACE,\r
178                 //! minimal space to reserve for messagebox text-width\r
179                 EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH,\r
180                 //! maximal space to reserve for messagebox text-width\r
181                 EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH,\r
182                 //! minimal space to reserve for messagebox text-height\r
183                 EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT,\r
184                 //! maximal space to reserve for messagebox text-height\r
185                 EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT,\r
186                 //! pixels to move an unscaled button image to the right when a button is pressed and the unpressed image looks identical\r
187                 EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X,\r
188                 //! pixels to move an unscaled button image down when a button is pressed  and the unpressed image looks identical\r
189                 EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y,\r
190                 //! pixels to move the button text to the right when a button is pressed\r
191                 EGDS_BUTTON_PRESSED_TEXT_OFFSET_X,\r
192                 //! pixels to move the button text down when a button is pressed\r
193                 EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y,\r
194                 //! pixels to move an unscaled button sprite to the right when a button is pressed\r
195                 EGDS_BUTTON_PRESSED_SPRITE_OFFSET_X,\r
196                 //! pixels to move an unscaled button sprite down when a button is pressed\r
197                 EGDS_BUTTON_PRESSED_SPRITE_OFFSET_Y,\r
198 \r
199                 //! this value is not used, it only specifies the amount of default sizes\r
200                 //! available.\r
201                 EGDS_COUNT\r
202         };\r
203 \r
204 \r
205         //! Names for default skin sizes\r
206         const c8* const GUISkinSizeNames[EGDS_COUNT+1] =\r
207         {\r
208                 "ScrollBarSize",\r
209                 "MenuHeight",\r
210                 "WindowButtonWidth",\r
211                 "CheckBoxWidth",\r
212                 "MessageBoxWidth",\r
213                 "MessageBoxHeight",\r
214                 "ButtonWidth",\r
215                 "ButtonHeight",\r
216                 "TextDistanceX",\r
217                 "TextDistanceY",\r
218                 "TitleBarTextX",\r
219                 "TitleBarTextY",\r
220                 "MessageBoxGapSpace",\r
221                 "MessageBoxMinTextWidth",\r
222                 "MessageBoxMaxTextWidth",\r
223                 "MessageBoxMinTextHeight",\r
224                 "MessageBoxMaxTextHeight",\r
225                 "ButtonPressedImageOffsetX",\r
226                 "ButtonPressedImageOffsetY",\r
227                 "ButtonPressedTextOffsetX",\r
228                 "ButtonPressedTextOffsetY",\r
229                 "ButtonPressedSpriteOffsetX",\r
230                 "ButtonPressedSpriteOffsetY",\r
231                 0\r
232         };\r
233 \r
234 \r
235         enum EGUI_DEFAULT_TEXT\r
236         {\r
237                 //! Text for the OK button on a message box\r
238                 EGDT_MSG_BOX_OK = 0,\r
239                 //! Text for the Cancel button on a message box\r
240                 EGDT_MSG_BOX_CANCEL,\r
241                 //! Text for the Yes button on a message box\r
242                 EGDT_MSG_BOX_YES,\r
243                 //! Text for the No button on a message box\r
244                 EGDT_MSG_BOX_NO,\r
245                 //! Tooltip text for window close button\r
246                 EGDT_WINDOW_CLOSE,\r
247                 //! Tooltip text for window maximize button\r
248                 EGDT_WINDOW_MAXIMIZE,\r
249                 //! Tooltip text for window minimize button\r
250                 EGDT_WINDOW_MINIMIZE,\r
251                 //! Tooltip text for window restore button\r
252                 EGDT_WINDOW_RESTORE,\r
253 \r
254                 //! this value is not used, it only specifies the number of default texts\r
255                 EGDT_COUNT\r
256         };\r
257 \r
258         //! Names for default skin sizes\r
259         const c8* const GUISkinTextNames[EGDT_COUNT+1] =\r
260         {\r
261                 "MessageBoxOkay",\r
262                 "MessageBoxCancel",\r
263                 "MessageBoxYes",\r
264                 "MessageBoxNo",\r
265                 "WindowButtonClose",\r
266                 "WindowButtonMaximize",\r
267                 "WindowButtonMinimize",\r
268                 "WindowButtonRestore",\r
269                 0\r
270         };\r
271 \r
272         //! Customizable symbols for GUI\r
273         enum EGUI_DEFAULT_ICON\r
274         {\r
275                 //! maximize window button\r
276                 EGDI_WINDOW_MAXIMIZE = 0,\r
277                 //! restore window button\r
278                 EGDI_WINDOW_RESTORE,\r
279                 //! close window button\r
280                 EGDI_WINDOW_CLOSE,\r
281                 //! minimize window button\r
282                 EGDI_WINDOW_MINIMIZE,\r
283                 //! resize icon for bottom right corner of a window\r
284                 EGDI_WINDOW_RESIZE,\r
285                 //! scroll bar up button\r
286                 EGDI_CURSOR_UP,\r
287                 //! scroll bar down button\r
288                 EGDI_CURSOR_DOWN,\r
289                 //! scroll bar left button\r
290                 EGDI_CURSOR_LEFT,\r
291                 //! scroll bar right button\r
292                 EGDI_CURSOR_RIGHT,\r
293                 //! icon for menu children\r
294                 EGDI_MENU_MORE,\r
295                 //! tick for checkbox\r
296                 EGDI_CHECK_BOX_CHECKED,\r
297                 //! down arrow for dropdown menus\r
298                 EGDI_DROP_DOWN,\r
299                 //! smaller up arrow\r
300                 EGDI_SMALL_CURSOR_UP,\r
301                 //! smaller down arrow\r
302                 EGDI_SMALL_CURSOR_DOWN,\r
303                 //! selection dot in a radio button\r
304                 EGDI_RADIO_BUTTON_CHECKED,\r
305                 //! << icon indicating there is more content to the left\r
306                 EGDI_MORE_LEFT,\r
307                 //! >> icon indicating that there is more content to the right\r
308                 EGDI_MORE_RIGHT,\r
309                 //! icon indicating that there is more content above\r
310                 EGDI_MORE_UP,\r
311                 //! icon indicating that there is more content below\r
312                 EGDI_MORE_DOWN,\r
313                 //! plus icon for trees\r
314                 EGDI_EXPAND,\r
315 \r
316                 //! minus icon for trees\r
317                 EGDI_COLLAPSE,\r
318                 //! file icon for file selection\r
319                 EGDI_FILE,\r
320                 //! folder icon for file selection\r
321                 EGDI_DIRECTORY,\r
322 \r
323                 //! value not used, it only specifies the number of icons\r
324                 EGDI_COUNT\r
325         };\r
326 \r
327         const c8* const GUISkinIconNames[EGDI_COUNT+1] =\r
328         {\r
329                 "windowMaximize",\r
330                 "windowRestore",\r
331                 "windowClose",\r
332                 "windowMinimize",\r
333                 "windowResize",\r
334                 "cursorUp",\r
335                 "cursorDown",\r
336                 "cursorLeft",\r
337                 "cursorRight",\r
338                 "menuMore",\r
339                 "checkBoxChecked",\r
340                 "dropDown",\r
341                 "smallCursorUp",\r
342                 "smallCursorDown",\r
343                 "radioButtonChecked",\r
344                 "moreLeft",\r
345                 "moreRight",\r
346                 "moreUp",\r
347                 "moreDown",\r
348                 "expand",\r
349                 "collapse",\r
350                 "file",\r
351                 "directory",\r
352                 0\r
353         };\r
354 \r
355         // Customizable fonts\r
356         enum EGUI_DEFAULT_FONT\r
357         {\r
358                 //! For static text, edit boxes, lists and most other places\r
359                 EGDF_DEFAULT=0,\r
360                 //! Font for buttons\r
361                 EGDF_BUTTON,\r
362                 //! Font for window title bars\r
363                 EGDF_WINDOW,\r
364                 //! Font for menu items\r
365                 EGDF_MENU,\r
366                 //! Font for tooltips\r
367                 EGDF_TOOLTIP,\r
368                 //! this value is not used, it only specifies the amount of default fonts\r
369                 //! available.\r
370                 EGDF_COUNT\r
371         };\r
372 \r
373         const c8* const GUISkinFontNames[EGDF_COUNT+1] =\r
374         {\r
375                 "defaultFont",\r
376                 "buttonFont",\r
377                 "windowFont",\r
378                 "menuFont",\r
379                 "tooltipFont",\r
380                 0\r
381         };\r
382 \r
383         //! A skin modifies the look of the GUI elements.\r
384         class IGUISkin : virtual public IReferenceCounted\r
385         {\r
386         public:\r
387 \r
388                 //! returns default color\r
389                 virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0;\r
390 \r
391                 //! sets a default color\r
392                 virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0;\r
393 \r
394                 //! returns size for the given size type\r
395                 virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0;\r
396 \r
397                 //! Returns a default text.\r
398                 /** For example for Message box button captions:\r
399                 "OK", "Cancel", "Yes", "No" and so on. */\r
400                 virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0;\r
401 \r
402                 //! Sets a default text.\r
403                 /** For example for Message box button captions:\r
404                 "OK", "Cancel", "Yes", "No" and so on. */\r
405                 virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0;\r
406 \r
407                 //! sets a default size\r
408                 virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0;\r
409 \r
410                 //! returns the default font\r
411                 virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0;\r
412 \r
413                 //! sets a default font\r
414                 virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0;\r
415 \r
416                 //! returns the sprite bank\r
417                 virtual IGUISpriteBank* getSpriteBank() const = 0;\r
418 \r
419                 //! sets the sprite bank\r
420                 virtual void setSpriteBank(IGUISpriteBank* bank) = 0;\r
421 \r
422                 //! Returns a default icon\r
423                 /** Returns the sprite index within the sprite bank */\r
424                 virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0;\r
425 \r
426                 //! Sets a default icon\r
427                 /** Sets the sprite index used for drawing icons like arrows,\r
428                 close buttons and ticks in checkboxes\r
429                 \param icon: Enum specifying which icon to change\r
430                 \param index: The sprite index used to draw this icon */\r
431                 virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0;\r
432 \r
433                 //! draws a standard 3d button pane\r
434                 /** Used for drawing for example buttons in normal state.\r
435                 It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
436                 EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
437                 \param element: Pointer to the element which wishes to draw this. This parameter\r
438                 is usually not used by IGUISkin, but can be used for example by more complex\r
439                 implementations to find out how to draw the part exactly.\r
440                 \param rect: Defining area where to draw.\r
441                 \param clip: Clip area. */\r
442                 virtual void draw3DButtonPaneStandard(IGUIElement* element,\r
443                         const core::rect<s32>& rect,\r
444                         const core::rect<s32>* clip=0) = 0;\r
445 \r
446                 //! draws a pressed 3d button pane\r
447                 /** Used for drawing for example buttons in pressed state.\r
448                 It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
449                 EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
450                 \param element: Pointer to the element which wishes to draw this. This parameter\r
451                 is usually not used by IGUISkin, but can be used for example by more complex\r
452                 implementations to find out how to draw the part exactly.\r
453                 \param rect: Defining area where to draw.\r
454                 \param clip: Clip area. */\r
455                 virtual void draw3DButtonPanePressed(IGUIElement* element,\r
456                         const core::rect<s32>& rect,\r
457                         const core::rect<s32>* clip=0) = 0;\r
458 \r
459                 //! draws a sunken 3d pane\r
460                 /** Used for drawing the background of edit, combo or check boxes.\r
461                 \param element: Pointer to the element which wishes to draw this. This parameter\r
462                 is usually not used by IGUISkin, but can be used for example by more complex\r
463                 implementations to find out how to draw the part exactly.\r
464                 \param bgcolor: Background color.\r
465                 \param flat: Specifies if the sunken pane should be flat or displayed as sunken\r
466                 deep into the ground.\r
467                 \param fillBackGround: Specifies if the background should be filled with the background\r
468                 color or not be drawn at all.\r
469                 \param rect: Defining area where to draw.\r
470                 \param clip: Clip area. */\r
471                 virtual void draw3DSunkenPane(IGUIElement* element,\r
472                         video::SColor bgcolor, bool flat, bool fillBackGround,\r
473                         const core::rect<s32>& rect,\r
474                         const core::rect<s32>* clip=0) = 0;\r
475 \r
476                 //! draws a window background\r
477                 /** Used for drawing the background of dialogs and windows.\r
478                 \param element: Pointer to the element which wishes to draw this. This parameter\r
479                 is usually not used by IGUISkin, but can be used for example by more complex\r
480                 implementations to find out how to draw the part exactly.\r
481                 \param titleBarColor: Title color.\r
482                 \param drawTitleBar: True to enable title drawing.\r
483                 \param rect: Defining area where to draw.\r
484                 \param clip: Clip area.\r
485                 \param checkClientArea: When set to non-null the function will not draw anything,\r
486                 but will instead return the clientArea which can be used for drawing by the calling window.\r
487                 That is the area without borders and without titlebar.\r
488                 \return Returns rect where it would be good to draw title bar text. This will\r
489                 work even when checkClientArea is set to a non-null value.*/\r
490                 virtual core::rect<s32> draw3DWindowBackground(IGUIElement* element,\r
491                         bool drawTitleBar, video::SColor titleBarColor,\r
492                         const core::rect<s32>& rect,\r
493                         const core::rect<s32>* clip=0,\r
494                         core::rect<s32>* checkClientArea=0) = 0;\r
495 \r
496                 //! draws a standard 3d menu pane\r
497                 /** Used for drawing for menus and context menus.\r
498                 It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and\r
499                 EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.\r
500                 \param element: Pointer to the element which wishes to draw this. This parameter\r
501                 is usually not used by IGUISkin, but can be used for example by more complex\r
502                 implementations to find out how to draw the part exactly.\r
503                 \param rect: Defining area where to draw.\r
504                 \param clip: Clip area. */\r
505                 virtual void draw3DMenuPane(IGUIElement* element,\r
506                         const core::rect<s32>& rect,\r
507                         const core::rect<s32>* clip=0) = 0;\r
508 \r
509                 //! draws a standard 3d tool bar\r
510                 /** Used for drawing for toolbars and menus.\r
511                 \param element: Pointer to the element which wishes to draw this. This parameter\r
512                 is usually not used by IGUISkin, but can be used for example by more complex\r
513                 implementations to find out how to draw the part exactly.\r
514                 \param rect: Defining area where to draw.\r
515                 \param clip: Clip area. */\r
516                 virtual void draw3DToolBar(IGUIElement* element,\r
517                         const core::rect<s32>& rect,\r
518                         const core::rect<s32>* clip=0) = 0;\r
519 \r
520                 //! draws a tab button\r
521                 /** Used for drawing for tab buttons on top of tabs.\r
522                 \param element: Pointer to the element which wishes to draw this. This parameter\r
523                 is usually not used by IGUISkin, but can be used for example by more complex\r
524                 implementations to find out how to draw the part exactly.\r
525                 \param active: Specifies if the tab is currently active.\r
526                 \param rect: Defining area where to draw.\r
527                 \param clip: Clip area.\r
528                 \param alignment Alignment of GUI element. */\r
529                 virtual void draw3DTabButton(IGUIElement* element, bool active,\r
530                         const core::rect<s32>& rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0;\r
531 \r
532                 //! draws a tab control body\r
533                 /** \param element: Pointer to the element which wishes to draw this. This parameter\r
534                 is usually not used by IGUISkin, but can be used for example by more complex\r
535                 implementations to find out how to draw the part exactly.\r
536                 \param border: Specifies if the border should be drawn.\r
537                 \param background: Specifies if the background should be drawn.\r
538                 \param rect: Defining area where to draw.\r
539                 \param clip: Clip area.\r
540                 \param tabHeight Height of tab.\r
541                 \param alignment Alignment of GUI element. */\r
542                 virtual void draw3DTabBody(IGUIElement* element, bool border, bool background,\r
543                         const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0;\r
544 \r
545                 //! draws an icon, usually from the skin's sprite bank\r
546                 /** \param element: Pointer to the element which wishes to draw this icon.\r
547                 This parameter is usually not used by IGUISkin, but can be used for example\r
548                 by more complex implementations to find out how to draw the part exactly.\r
549                 \param icon: Specifies the icon to be drawn.\r
550                 \param position: The position to draw the icon\r
551                 \param starttime: The time at the start of the animation\r
552                 \param currenttime: The present time, used to calculate the frame number\r
553                 \param loop: Whether the animation should loop or not\r
554                 \param clip: Clip area. */\r
555                 virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,\r
556                         const core::position2di position, u32 starttime=0, u32 currenttime=0,\r
557                         bool loop=false, const core::rect<s32>* clip=0) = 0;\r
558 \r
559                 //! draws a 2d rectangle.\r
560                 /** \param element: Pointer to the element which wishes to draw this icon.\r
561                 This parameter is usually not used by IGUISkin, but can be used for example\r
562                 by more complex implementations to find out how to draw the part exactly.\r
563                 \param color: Color of the rectangle to draw. The alpha component specifies how\r
564                 transparent the rectangle will be.\r
565                 \param pos: Position of the rectangle.\r
566                 \param clip: Pointer to rectangle against which the rectangle will be clipped.\r
567                 If the pointer is null, no clipping will be performed. */\r
568                 virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color,\r
569                         const core::rect<s32>& pos, const core::rect<s32>* clip = 0) = 0;\r
570 \r
571                 //! get the type of this skin\r
572                 virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }\r
573         };\r
574 \r
575 \r
576 } // end namespace gui\r
577 } // end namespace irr\r
578 \r
579 #endif\r
580 \r