aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h')
-rw-r--r--libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h256
1 files changed, 128 insertions, 128 deletions
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
index cb6f79a..87609c9 100644
--- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
+++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h
@@ -1,128 +1,128 @@
1// Copyright 2006-2012 Asger Feldthaus 1// Copyright 2006-2012 Asger Feldthaus
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 _C_GUI_PANEL_H_ 5#ifndef _C_GUI_PANEL_H_
6#define _C_GUI_PANEL_H_ 6#define _C_GUI_PANEL_H_
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "EGUIEditTypes.h" 9#include "EGUIEditTypes.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace gui 13namespace gui
14{ 14{
15 15
16class IGUIScrollBar; 16class IGUIScrollBar;
17class IGUITab; 17class IGUITab;
18 18
19enum E_SCROLL_BAR_MODE 19enum E_SCROLL_BAR_MODE
20{ 20{
21 //! The scrollbar will only show up when needed. 21 //! The scrollbar will only show up when needed.
22 ESBM_AUTOMATIC = 0, 22 ESBM_AUTOMATIC = 0,
23 23
24 //! The scrollbar will never be visible. 24 //! The scrollbar will never be visible.
25 ESBM_ALWAYS_INVISIBLE, 25 ESBM_ALWAYS_INVISIBLE,
26 26
27 //! The scrollbar will always the visible. 27 //! The scrollbar will always the visible.
28 ESBM_ALWAYS_VISIBLE, 28 ESBM_ALWAYS_VISIBLE,
29 29
30 //! just a count of how many are in this enum 30 //! just a count of how many are in this enum
31 ESBM_COUNT 31 ESBM_COUNT
32}; 32};
33 33
34const c8* const GUIScrollBarModeNames[] = 34const c8* const GUIScrollBarModeNames[] =
35{ 35{
36 "automatic", 36 "automatic",
37 "alwaysInvisible", 37 "alwaysInvisible",
38 "alwaysVisible", 38 "alwaysVisible",
39 0 39 0
40}; 40};
41 41
42class CGUIPanel : public IGUIElement 42class CGUIPanel : public IGUIElement
43{ 43{
44public: 44public:
45 CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1, 45 CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1,
46 const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100), 46 const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100),
47 bool border=false, 47 bool border=false,
48 E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC, 48 E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC,
49 E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE ); 49 E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE );
50 50
51 virtual ~CGUIPanel(); 51 virtual ~CGUIPanel();
52 52
53 //! draws the panel and its children 53 //! draws the panel and its children
54 virtual void draw(); 54 virtual void draw();
55 55
56 //! returns true if it has a border, false if not 56 //! returns true if it has a border, false if not
57 bool hasBorder() const; 57 bool hasBorder() const;
58 58
59 //! sets whether the element draws a border 59 //! sets whether the element draws a border
60 void setBorder(bool enabled); 60 void setBorder(bool enabled);
61 61
62 //! returns a pointer to the vertical scrollbar 62 //! returns a pointer to the vertical scrollbar
63 IGUIScrollBar* getVScrollBar() const; 63 IGUIScrollBar* getVScrollBar() const;
64 64
65 //! returns a pointer to the horizontal scrollbar 65 //! returns a pointer to the horizontal scrollbar
66 IGUIScrollBar* getHScrollBar() const; 66 IGUIScrollBar* getHScrollBar() const;
67 67
68 //! returns the vertical scrollbar visibility rule 68 //! returns the vertical scrollbar visibility rule
69 E_SCROLL_BAR_MODE getVScrollBarMode() const; 69 E_SCROLL_BAR_MODE getVScrollBarMode() const;
70 70
71 //! sets the vertical scrollbar visibility rule 71 //! sets the vertical scrollbar visibility rule
72 void setVScrollBarMode(E_SCROLL_BAR_MODE mode); 72 void setVScrollBarMode(E_SCROLL_BAR_MODE mode);
73 73
74 //! returns the horizontal scrollbar visibility rule 74 //! returns the horizontal scrollbar visibility rule
75 E_SCROLL_BAR_MODE getHScrollBarMode() const; 75 E_SCROLL_BAR_MODE getHScrollBarMode() const;
76 76
77 //! sets the horizontal scrollbar visibility rule 77 //! sets the horizontal scrollbar visibility rule
78 void setHScrollBarMode(E_SCROLL_BAR_MODE mode); 78 void setHScrollBarMode(E_SCROLL_BAR_MODE mode);
79 79
80 //! returns the visible area inside the panel, excluding scrollbar and border 80 //! returns the visible area inside the panel, excluding scrollbar and border
81 core::rect<s32> getClientArea() const; 81 core::rect<s32> getClientArea() const;
82 82
83 virtual bool OnEvent(const SEvent &event); 83 virtual bool OnEvent(const SEvent &event);
84 84
85 //! adds a child to the panel 85 //! adds a child to the panel
86 virtual void addChild(IGUIElement* child); 86 virtual void addChild(IGUIElement* child);
87 87
88 //! removes a child from the panel 88 //! removes a child from the panel
89 virtual void removeChild(IGUIElement* child); 89 virtual void removeChild(IGUIElement* child);
90 90
91 //! updates the absolute position 91 //! updates the absolute position
92 virtual void updateAbsolutePosition(); 92 virtual void updateAbsolutePosition();
93 93
94 //! returns children of the inner pane 94 //! returns children of the inner pane
95 virtual const core::list<IGUIElement*>& getChildren(); 95 virtual const core::list<IGUIElement*>& getChildren();
96 96
97 //! Returns the type name of the gui element. 97 //! Returns the type name of the gui element.
98 virtual const c8* getTypeName() const 98 virtual const c8* getTypeName() const
99 { 99 {
100 return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]; 100 return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL];
101 } 101 }
102 102
103 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); 103 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0);
104 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 104 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
105 105
106protected: 106protected:
107 void moveInnerPane(); 107 void moveInnerPane();
108 void resizeInnerPane(); 108 void resizeInnerPane();
109 void calculateClientArea(); 109 void calculateClientArea();
110 110
111private: 111private:
112 112
113 IGUIScrollBar* VScrollBar; 113 IGUIScrollBar* VScrollBar;
114 IGUIScrollBar* HScrollBar; 114 IGUIScrollBar* HScrollBar;
115 IGUITab* ClipPane; 115 IGUITab* ClipPane;
116 IGUITab* InnerPane; 116 IGUITab* InnerPane;
117 117
118 E_SCROLL_BAR_MODE VScrollBarMode; 118 E_SCROLL_BAR_MODE VScrollBarMode;
119 E_SCROLL_BAR_MODE HScrollBarMode; 119 E_SCROLL_BAR_MODE HScrollBarMode;
120 120
121 bool NeedsUpdate; 121 bool NeedsUpdate;
122 bool Border; 122 bool Border;
123}; 123};
124 124
125} // namespace gui 125} // namespace gui
126} // namespace irr 126} // namespace irr
127 127
128#endif 128#endif