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-2012 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  {
34 
37 
40 
43 
46  };
47 
49  const c8* const GUISkinTypeNames[EGST_COUNT+1] =
50  {
51  "windowsClassic",
52  "windowsMetallic",
53  "burning",
54  "unknown",
55  0,
56  };
57 
58 
61  {
112 
116  };
117 
119  const c8* const GUISkinColorNames[EGDC_COUNT+1] =
120  {
121  "3DDarkShadow",
122  "3DShadow",
123  "3DFace",
124  "3DHighlight",
125  "3DLight",
126  "ActiveBorder",
127  "ActiveCaption",
128  "AppWorkspace",
129  "ButtonText",
130  "GrayText",
131  "Highlight",
132  "HighlightText",
133  "InactiveBorder",
134  "InactiveCaption",
135  "ToolTip",
136  "ToolTipBackground",
137  "ScrollBar",
138  "Window",
139  "WindowSymbol",
140  "Icon",
141  "IconHighlight",
142  "GrayWindowSymbol",
143  "Editable",
144  "GrayEditable",
145  "FocusedEditable",
146  0,
147  };
148 
151  {
194 
198  };
199 
200 
202  const c8* const GUISkinSizeNames[EGDS_COUNT+1] =
203  {
204  "ScrollBarSize",
205  "MenuHeight",
206  "WindowButtonWidth",
207  "CheckBoxWidth",
208  "MessageBoxWidth",
209  "MessageBoxHeight",
210  "ButtonWidth",
211  "ButtonHeight",
212  "TextDistanceX",
213  "TextDistanceY",
214  "TitleBarTextX",
215  "TitleBarTextY",
216  "MessageBoxGapSpace",
217  "MessageBoxMinTextWidth",
218  "MessageBoxMaxTextWidth",
219  "MessageBoxMinTextHeight",
220  "MessageBoxMaxTextHeight",
221  "ButtonPressedImageOffsetX",
222  "ButtonPressedImageOffsetY"
223  "ButtonPressedTextOffsetX",
224  "ButtonPressedTextOffsetY",
225  0
226  };
227 
228 
230  {
247 
250  };
251 
253  const c8* const GUISkinTextNames[EGDT_COUNT+1] =
254  {
255  "MessageBoxOkay",
256  "MessageBoxCancel",
257  "MessageBoxYes",
258  "MessageBoxNo",
259  "WindowButtonClose",
260  "WindowButtonMaximize",
261  "WindowButtonMinimize",
262  "WindowButtonRestore",
263  0
264  };
265 
268  {
309 
316 
319  };
320 
321  const c8* const GUISkinIconNames[EGDI_COUNT+1] =
322  {
323  "windowMaximize",
324  "windowRestore",
325  "windowClose",
326  "windowMinimize",
327  "windowResize",
328  "cursorUp",
329  "cursorDown",
330  "cursorLeft",
331  "cursorRight",
332  "menuMore",
333  "checkBoxChecked",
334  "dropDown",
335  "smallCursorUp",
336  "smallCursorDown",
337  "radioButtonChecked",
338  "moreLeft",
339  "moreRight",
340  "moreUp",
341  "moreDown",
342  "expand",
343  "collapse",
344  "file",
345  "directory",
346  0
347  };
348 
349  // Customizable fonts
351  {
365  };
366 
367  const c8* const GUISkinFontNames[EGDF_COUNT+1] =
368  {
369  "defaultFont",
370  "buttonFont",
371  "windowFont",
372  "menuFont",
373  "tooltipFont",
374  0
375  };
376 
379  {
380  public:
381 
383  virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0;
384 
386  virtual void setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor) = 0;
387 
389  virtual s32 getSize(EGUI_DEFAULT_SIZE size) const = 0;
390 
392 
394  virtual const wchar_t* getDefaultText(EGUI_DEFAULT_TEXT text) const = 0;
395 
397 
399  virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText) = 0;
400 
402  virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0;
403 
405  virtual IGUIFont* getFont(EGUI_DEFAULT_FONT which=EGDF_DEFAULT) const = 0;
406 
408  virtual void setFont(IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT) = 0;
409 
411  virtual IGUISpriteBank* getSpriteBank() const = 0;
412 
414  virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
415 
417 
418  virtual u32 getIcon(EGUI_DEFAULT_ICON icon) const = 0;
419 
421 
425  virtual void setIcon(EGUI_DEFAULT_ICON icon, u32 index) = 0;
426 
428 
436  virtual void draw3DButtonPaneStandard(IGUIElement* element,
437  const core::rect<s32>& rect,
438  const core::rect<s32>* clip=0) = 0;
439 
441 
449  virtual void draw3DButtonPanePressed(IGUIElement* element,
450  const core::rect<s32>& rect,
451  const core::rect<s32>* clip=0) = 0;
452 
454 
465  virtual void draw3DSunkenPane(IGUIElement* element,
466  video::SColor bgcolor, bool flat, bool fillBackGround,
467  const core::rect<s32>& rect,
468  const core::rect<s32>* clip=0) = 0;
469 
471 
485  bool drawTitleBar, video::SColor titleBarColor,
486  const core::rect<s32>& rect,
487  const core::rect<s32>* clip=0,
488  core::rect<s32>* checkClientArea=0) = 0;
489 
491 
499  virtual void draw3DMenuPane(IGUIElement* element,
500  const core::rect<s32>& rect,
501  const core::rect<s32>* clip=0) = 0;
502 
504 
510  virtual void draw3DToolBar(IGUIElement* element,
511  const core::rect<s32>& rect,
512  const core::rect<s32>* clip=0) = 0;
513 
515 
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;
525 
527 
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;
538 
540 
549  virtual void drawIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,
550  const core::position2di position, u32 starttime=0, u32 currenttime=0,
551  bool loop=false, const core::rect<s32>* clip=0) = 0;
552 
554 
562  virtual void draw2DRectangle(IGUIElement* element, const video::SColor &color,
563  const core::rect<s32>& pos, const core::rect<s32>* clip = 0) = 0;
564 
566  virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }
567  };
568 
569 
570 } // end namespace gui
571 } // end namespace irr
572 
573 #endif
574 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Mon May 6 2013 07:45:59 by Doxygen (1.8.1.2)