Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
IGUISkin.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2010 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_GUI_SKIN_H_INCLUDED__
6 #define __I_GUI_SKIN_H_INCLUDED__
7 
9 #include "EGUIAlignment.h"
10 #include "SColor.h"
11 #include "rect.h"
12 
13 namespace irr
14 {
15 namespace gui
16 {
17  class IGUIFont;
18  class IGUISpriteBank;
19  class IGUIElement;
20 
22 
31  {
38 
41 
44  };
45 
47  const c8* const GUISkinTypeNames[EGST_COUNT+1] =
48  {
49  "windowsClassic",
50  "windowsMetallic",
51  "burning",
52  "unknown",
53  0,
54  };
55 
56 
59  {
105  };
106 
108  const c8* const GUISkinColorNames[EGDC_COUNT+1] =
109  {
110  "3DDarkShadow",
111  "3DShadow",
112  "3DFace",
113  "3DHighlight",
114  "3DLight",
115  "ActiveBorder",
116  "ActiveCaption",
117  "AppWorkspace",
118  "ButtonText",
119  "GrayText",
120  "Highlight",
121  "HighlightText",
122  "InactiveBorder",
123  "InactiveCaption",
124  "ToolTip",
125  "ToolTipBackground",
126  "ScrollBar",
127  "Window",
128  "WindowSymbol",
129  "Icon",
130  "IconHighlight",
131  0,
132  };
133 
136  {
173 
177  };
178 
179 
181  const c8* const GUISkinSizeNames[EGDS_COUNT+1] =
182  {
183  "ScrollBarSize",
184  "MenuHeight",
185  "WindowButtonWidth",
186  "CheckBoxWidth",
187  "MessageBoxWidth",
188  "MessageBoxHeight",
189  "ButtonWidth",
190  "ButtonHeight",
191  "TextDistanceX",
192  "TextDistanceY",
193  "TitleBarTextX",
194  "TitleBarTextY",
195  "MessageBoxGapSpace",
196  "MessageBoxMinTextWidth",
197  "MessageBoxMaxTextWidth",
198  "MessageBoxMinTextHeight",
199  "MessageBoxMaxTextHeight",
200  0
201  };
202 
203 
205  {
222 
225  };
226 
228  const c8* const GUISkinTextNames[EGDT_COUNT+1] =
229  {
230  "MessageBoxOkay",
231  "MessageBoxCancel",
232  "MessageBoxYes",
233  "MessageBoxNo",
234  "WindowButtonClose",
235  "WindowButtonMaximize",
236  "WindowButtonMinimize",
237  "WindowButtonRestore",
238  0
239  };
240 
243  {
290 
293  };
294 
295  const c8* const GUISkinIconNames[EGDI_COUNT+1] =
296  {
297  "windowMaximize",
298  "windowRestore",
299  "windowClose",
300  "windowMinimize",
301  "windowResize",
302  "cursorUp",
303  "cursorDown",
304  "cursorLeft",
305  "cursorRight",
306  "menuMore",
307  "checkBoxChecked",
308  "dropDown",
309  "smallCursorUp",
310  "smallCursorDown",
311  "radioButtonChecked",
312  "moreLeft",
313  "moreRight",
314  "moreUp",
315  "moreDown",
316  "expand",
317  "collapse",
318  "file",
319  "directory",
320  0
321  };
322 
323  // Customizable fonts
325  {
339  };
340 
341  const c8* const GUISkinFontNames[EGDF_COUNT+1] =
342  {
343  "defaultFont",
344  "buttonFont",
345  "windowFont",
346  "menuFont",
347  "tooltipFont",
348  0
349  };
350 
353  {
354  public:
355 
357  virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0;
358 
360  virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0;
361 
363  virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0;
364 
366 
368  virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0;
369 
371 
373  virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0;
374 
376  virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0;
377 
379  virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0;
380 
382  virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0;
383 
385  virtual IGUISpriteBank* getSpriteBank() const = 0;
386 
388  virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
389 
391 
392  virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0;
393 
395 
399  virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0;
400 
402 
410  virtual void draw3DButtonPaneStandard(IGUIElement* element,
411  const core::rect<s32>& rect,
412  const core::rect<s32>* clip=0) = 0;
413 
415 
423  virtual void draw3DButtonPanePressed(IGUIElement* element,
424  const core::rect<s32>& rect,
425  const core::rect<s32>* clip=0) = 0;
426 
428 
439  virtual void draw3DSunkenPane(IGUIElement* element,
440  video::SColor bgcolor, bool flat, bool fillBackGround,
441  const core::rect<s32>& rect,
442  const core::rect<s32>* clip=0) = 0;
443 
445 
459  bool drawTitleBar, video::SColor titleBarColor,
460  const core::rect<s32>& rect,
461  const core::rect<s32>* clip=0,
462  core::rect<s32>* checkClientArea=0) = 0;
463 
465 
473  virtual void draw3DMenuPane(IGUIElement* element,
474  const core::rect<s32>& rect,
475  const core::rect<s32>* clip=0) = 0;
476 
478 
484  virtual void draw3DToolBar(IGUIElement* element,
485  const core::rect<s32>& rect,
486  const core::rect<s32>* clip=0) = 0;
487 
489 
497  virtual void draw3DTabButton(IGUIElement* element, bool active,
498  const core::rect<s32>& rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0;
499 
501 
510  virtual void draw3DTabBody(IGUIElement* element, bool border, bool background,
511  const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0;
512 
514 
523  virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,
524  const core::position2di position, u32 starttime=0, u32 currenttime=0,
525  bool loop=false, const core::rect<s32>* clip=0) = 0;
526 
528 
536  virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color,
537  const core::rect<s32>& pos, const core::rect<s32>* clip = 0) = 0;
538 
540  virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }
541  };
542 
543 
544 } // end namespace gui
545 } // end namespace irr
546 
547 #endif
548 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Fri Mar 21 2014 04:40:16 by Doxygen (1.8.1.2)