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