aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IGUITreeView.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/IGUITreeView.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/include/IGUITreeView.h')
-rw-r--r--libraries/irrlicht-1.8/include/IGUITreeView.h556
1 files changed, 278 insertions, 278 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUITreeView.h b/libraries/irrlicht-1.8/include/IGUITreeView.h
index 4552b29..5f21022 100644
--- a/libraries/irrlicht-1.8/include/IGUITreeView.h
+++ b/libraries/irrlicht-1.8/include/IGUITreeView.h
@@ -1,278 +1,278 @@
1// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de 1// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
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_TREE_VIEW_H_INCLUDED__ 5#ifndef __I_GUI_TREE_VIEW_H_INCLUDED__
6#define __I_GUI_TREE_VIEW_H_INCLUDED__ 6#define __I_GUI_TREE_VIEW_H_INCLUDED__
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "IGUIImageList.h" 9#include "IGUIImageList.h"
10#include "irrTypes.h" 10#include "irrTypes.h"
11 11
12namespace irr 12namespace irr
13{ 13{
14namespace gui 14namespace gui
15{ 15{
16 class IGUIFont; 16 class IGUIFont;
17 class IGUITreeView; 17 class IGUITreeView;
18 18
19 19
20 //! Node for gui tree view 20 //! Node for gui tree view
21 /** \par This element can create the following events of type EGUI_EVENT_TYPE: 21 /** \par This element can create the following events of type EGUI_EVENT_TYPE:
22 \li EGET_TREEVIEW_NODE_EXPAND 22 \li EGET_TREEVIEW_NODE_EXPAND
23 \li EGET_TREEVIEW_NODE_COLLAPS 23 \li EGET_TREEVIEW_NODE_COLLAPS
24 \li EGET_TREEVIEW_NODE_DESELECT 24 \li EGET_TREEVIEW_NODE_DESELECT
25 \li EGET_TREEVIEW_NODE_SELECT 25 \li EGET_TREEVIEW_NODE_SELECT
26 */ 26 */
27 class IGUITreeViewNode : public IReferenceCounted 27 class IGUITreeViewNode : public IReferenceCounted
28 { 28 {
29 public: 29 public:
30 //! returns the owner (tree view) of this node 30 //! returns the owner (tree view) of this node
31 virtual IGUITreeView* getOwner() const = 0; 31 virtual IGUITreeView* getOwner() const = 0;
32 32
33 //! Returns the parent node of this node. 33 //! Returns the parent node of this node.
34 /** For the root node this will return 0. */ 34 /** For the root node this will return 0. */
35 virtual IGUITreeViewNode* getParent() const = 0; 35 virtual IGUITreeViewNode* getParent() const = 0;
36 36
37 //! returns the text of the node 37 //! returns the text of the node
38 virtual const wchar_t* getText() const = 0; 38 virtual const wchar_t* getText() const = 0;
39 39
40 //! sets the text of the node 40 //! sets the text of the node
41 virtual void setText( const wchar_t* text ) = 0; 41 virtual void setText( const wchar_t* text ) = 0;
42 42
43 //! returns the icon text of the node 43 //! returns the icon text of the node
44 virtual const wchar_t* getIcon() const = 0; 44 virtual const wchar_t* getIcon() const = 0;
45 45
46 //! sets the icon text of the node 46 //! sets the icon text of the node
47 virtual void setIcon( const wchar_t* icon ) = 0; 47 virtual void setIcon( const wchar_t* icon ) = 0;
48 48
49 //! returns the image index of the node 49 //! returns the image index of the node
50 virtual u32 getImageIndex() const = 0; 50 virtual u32 getImageIndex() const = 0;
51 51
52 //! sets the image index of the node 52 //! sets the image index of the node
53 virtual void setImageIndex( u32 imageIndex ) = 0; 53 virtual void setImageIndex( u32 imageIndex ) = 0;
54 54
55 //! returns the image index of the node 55 //! returns the image index of the node
56 virtual u32 getSelectedImageIndex() const = 0; 56 virtual u32 getSelectedImageIndex() const = 0;
57 57
58 //! sets the image index of the node 58 //! sets the image index of the node
59 virtual void setSelectedImageIndex( u32 imageIndex ) = 0; 59 virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
60 60
61 //! returns the user data (void*) of this node 61 //! returns the user data (void*) of this node
62 virtual void* getData() const = 0; 62 virtual void* getData() const = 0;
63 63
64 //! sets the user data (void*) of this node 64 //! sets the user data (void*) of this node
65 virtual void setData( void* data ) = 0; 65 virtual void setData( void* data ) = 0;
66 66
67 //! returns the user data2 (IReferenceCounted) of this node 67 //! returns the user data2 (IReferenceCounted) of this node
68 virtual IReferenceCounted* getData2() const = 0; 68 virtual IReferenceCounted* getData2() const = 0;
69 69
70 //! sets the user data2 (IReferenceCounted) of this node 70 //! sets the user data2 (IReferenceCounted) of this node
71 virtual void setData2( IReferenceCounted* data ) = 0; 71 virtual void setData2( IReferenceCounted* data ) = 0;
72 72
73 //! returns the child item count 73 //! returns the child item count
74 virtual u32 getChildCount() const = 0; 74 virtual u32 getChildCount() const = 0;
75 75
76 //! removes all children (recursive) from this node 76 //! removes all children (recursive) from this node
77 virtual void clearChildren() = 0; 77 virtual void clearChildren() = 0;
78 78
79 //! removes all children (recursive) from this node 79 //! removes all children (recursive) from this node
80 /** \deprecated Deprecated in 1.8, use clearChildren() instead. 80 /** \deprecated Deprecated in 1.8, use clearChildren() instead.
81 This method may be removed by Irrlicht 1.9 */ 81 This method may be removed by Irrlicht 1.9 */
82 _IRR_DEPRECATED_ void clearChilds() 82 _IRR_DEPRECATED_ void clearChilds()
83 { 83 {
84 return clearChildren(); 84 return clearChildren();
85 } 85 }
86 86
87 //! returns true if this node has child nodes 87 //! returns true if this node has child nodes
88 virtual bool hasChildren() const = 0; 88 virtual bool hasChildren() const = 0;
89 89
90 //! returns true if this node has child nodes 90 //! returns true if this node has child nodes
91 /** \deprecated Deprecated in 1.8, use hasChildren() instead. 91 /** \deprecated Deprecated in 1.8, use hasChildren() instead.
92 This method may be removed by Irrlicht 1.9 */ 92 This method may be removed by Irrlicht 1.9 */
93 _IRR_DEPRECATED_ bool hasChilds() const 93 _IRR_DEPRECATED_ bool hasChilds() const
94 { 94 {
95 return hasChildren(); 95 return hasChildren();
96 } 96 }
97 97
98 //! Adds a new node behind the last child node. 98 //! Adds a new node behind the last child node.
99 /** \param text text of the new node 99 /** \param text text of the new node
100 \param icon icon text of the new node 100 \param icon icon text of the new node
101 \param imageIndex index of the image for the new node (-1 = none) 101 \param imageIndex index of the image for the new node (-1 = none)
102 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) 102 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
103 \param data user data (void*) of the new node 103 \param data user data (void*) of the new node
104 \param data2 user data2 (IReferenceCounted*) of the new node 104 \param data2 user data2 (IReferenceCounted*) of the new node
105 \return The new node 105 \return The new node
106 */ 106 */
107 virtual IGUITreeViewNode* addChildBack( 107 virtual IGUITreeViewNode* addChildBack(
108 const wchar_t* text, const wchar_t* icon = 0, 108 const wchar_t* text, const wchar_t* icon = 0,
109 s32 imageIndex=-1, s32 selectedImageIndex=-1, 109 s32 imageIndex=-1, s32 selectedImageIndex=-1,
110 void* data=0, IReferenceCounted* data2=0) =0; 110 void* data=0, IReferenceCounted* data2=0) =0;
111 111
112 //! Adds a new node before the first child node. 112 //! Adds a new node before the first child node.
113 /** \param text text of the new node 113 /** \param text text of the new node
114 \param icon icon text of the new node 114 \param icon icon text of the new node
115 \param imageIndex index of the image for the new node (-1 = none) 115 \param imageIndex index of the image for the new node (-1 = none)
116 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) 116 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
117 \param data user data (void*) of the new node 117 \param data user data (void*) of the new node
118 \param data2 user data2 (IReferenceCounted*) of the new node 118 \param data2 user data2 (IReferenceCounted*) of the new node
119 \return The new node 119 \return The new node
120 */ 120 */
121 virtual IGUITreeViewNode* addChildFront( 121 virtual IGUITreeViewNode* addChildFront(
122 const wchar_t* text, const wchar_t* icon = 0, 122 const wchar_t* text, const wchar_t* icon = 0,
123 s32 imageIndex=-1, s32 selectedImageIndex=-1, 123 s32 imageIndex=-1, s32 selectedImageIndex=-1,
124 void* data=0, IReferenceCounted* data2=0 ) =0; 124 void* data=0, IReferenceCounted* data2=0 ) =0;
125 125
126 //! Adds a new node behind the other node. 126 //! Adds a new node behind the other node.
127 /** The other node has also te be a child node from this node. 127 /** The other node has also te be a child node from this node.
128 \param other Node to insert after 128 \param other Node to insert after
129 \param text text of the new node 129 \param text text of the new node
130 \param icon icon text of the new node 130 \param icon icon text of the new node
131 \param imageIndex index of the image for the new node (-1 = none) 131 \param imageIndex index of the image for the new node (-1 = none)
132 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) 132 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
133 \param data user data (void*) of the new node 133 \param data user data (void*) of the new node
134 \param data2 user data2 (IReferenceCounted*) of the new node 134 \param data2 user data2 (IReferenceCounted*) of the new node
135 \return The new node or 0 if other is no child node from this 135 \return The new node or 0 if other is no child node from this
136 */ 136 */
137 virtual IGUITreeViewNode* insertChildAfter( 137 virtual IGUITreeViewNode* insertChildAfter(
138 IGUITreeViewNode* other, 138 IGUITreeViewNode* other,
139 const wchar_t* text, const wchar_t* icon = 0, 139 const wchar_t* text, const wchar_t* icon = 0,
140 s32 imageIndex=-1, s32 selectedImageIndex=-1, 140 s32 imageIndex=-1, s32 selectedImageIndex=-1,
141 void* data=0, IReferenceCounted* data2=0) =0; 141 void* data=0, IReferenceCounted* data2=0) =0;
142 142
143 //! Adds a new node before the other node. 143 //! Adds a new node before the other node.
144 /** The other node has also te be a child node from this node. 144 /** The other node has also te be a child node from this node.
145 \param other Node to insert before 145 \param other Node to insert before
146 \param text text of the new node 146 \param text text of the new node
147 \param icon icon text of the new node 147 \param icon icon text of the new node
148 \param imageIndex index of the image for the new node (-1 = none) 148 \param imageIndex index of the image for the new node (-1 = none)
149 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex) 149 \param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
150 \param data user data (void*) of the new node 150 \param data user data (void*) of the new node
151 \param data2 user data2 (IReferenceCounted*) of the new node 151 \param data2 user data2 (IReferenceCounted*) of the new node
152 \return The new node or 0 if other is no child node from this 152 \return The new node or 0 if other is no child node from this
153 */ 153 */
154 virtual IGUITreeViewNode* insertChildBefore( 154 virtual IGUITreeViewNode* insertChildBefore(
155 IGUITreeViewNode* other, 155 IGUITreeViewNode* other,
156 const wchar_t* text, const wchar_t* icon = 0, 156 const wchar_t* text, const wchar_t* icon = 0,
157 s32 imageIndex=-1, s32 selectedImageIndex=-1, 157 s32 imageIndex=-1, s32 selectedImageIndex=-1,
158 void* data=0, IReferenceCounted* data2=0) = 0; 158 void* data=0, IReferenceCounted* data2=0) = 0;
159 159
160 //! Return the first child node from this node. 160 //! Return the first child node from this node.
161 /** \return The first child node or 0 if this node has no children. */ 161 /** \return The first child node or 0 if this node has no children. */
162 virtual IGUITreeViewNode* getFirstChild() const = 0; 162 virtual IGUITreeViewNode* getFirstChild() const = 0;
163 163
164 //! Return the last child node from this node. 164 //! Return the last child node from this node.
165 /** \return The last child node or 0 if this node has no children. */ 165 /** \return The last child node or 0 if this node has no children. */
166 virtual IGUITreeViewNode* getLastChild() const = 0; 166 virtual IGUITreeViewNode* getLastChild() const = 0;
167 167
168 //! Returns the previous sibling node from this node. 168 //! Returns the previous sibling node from this node.
169 /** \return The previous sibling node from this node or 0 if this is 169 /** \return The previous sibling node from this node or 0 if this is
170 the first node from the parent node. 170 the first node from the parent node.
171 */ 171 */
172 virtual IGUITreeViewNode* getPrevSibling() const = 0; 172 virtual IGUITreeViewNode* getPrevSibling() const = 0;
173 173
174 //! Returns the next sibling node from this node. 174 //! Returns the next sibling node from this node.
175 /** \return The next sibling node from this node or 0 if this is 175 /** \return The next sibling node from this node or 0 if this is
176 the last node from the parent node. 176 the last node from the parent node.
177 */ 177 */
178 virtual IGUITreeViewNode* getNextSibling() const = 0; 178 virtual IGUITreeViewNode* getNextSibling() const = 0;
179 179
180 //! Returns the next visible (expanded, may be out of scrolling) node from this node. 180 //! Returns the next visible (expanded, may be out of scrolling) node from this node.
181 /** \return The next visible node from this node or 0 if this is 181 /** \return The next visible node from this node or 0 if this is
182 the last visible node. */ 182 the last visible node. */
183 virtual IGUITreeViewNode* getNextVisible() const = 0; 183 virtual IGUITreeViewNode* getNextVisible() const = 0;
184 184
185 //! Deletes a child node. 185 //! Deletes a child node.
186 /** \return Returns true if the node was found as a child and is deleted. */ 186 /** \return Returns true if the node was found as a child and is deleted. */
187 virtual bool deleteChild( IGUITreeViewNode* child ) = 0; 187 virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
188 188
189 //! Moves a child node one position up. 189 //! Moves a child node one position up.
190 /** \return True if the node was found as achild node and was not already the first child. */ 190 /** \return True if the node was found as achild node and was not already the first child. */
191 virtual bool moveChildUp( IGUITreeViewNode* child ) = 0; 191 virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
192 192
193 //! Moves a child node one position down. 193 //! Moves a child node one position down.
194 /** \return True if the node was found as achild node and was not already the last child. */ 194 /** \return True if the node was found as achild node and was not already the last child. */
195 virtual bool moveChildDown( IGUITreeViewNode* child ) = 0; 195 virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
196 196
197 //! Returns true if the node is expanded (children are visible). 197 //! Returns true if the node is expanded (children are visible).
198 virtual bool getExpanded() const = 0; 198 virtual bool getExpanded() const = 0;
199 199
200 //! Sets if the node is expanded. 200 //! Sets if the node is expanded.
201 virtual void setExpanded( bool expanded ) = 0; 201 virtual void setExpanded( bool expanded ) = 0;
202 202
203 //! Returns true if the node is currently selected. 203 //! Returns true if the node is currently selected.
204 virtual bool getSelected() const = 0; 204 virtual bool getSelected() const = 0;
205 205
206 //! Sets this node as selected. 206 //! Sets this node as selected.
207 virtual void setSelected( bool selected ) = 0; 207 virtual void setSelected( bool selected ) = 0;
208 208
209 //! Returns true if this node is the root node. 209 //! Returns true if this node is the root node.
210 virtual bool isRoot() const = 0; 210 virtual bool isRoot() const = 0;
211 211
212 //! Returns the level of this node. 212 //! Returns the level of this node.
213 /** The root node has level 0. Direct children of the root has level 1 ... */ 213 /** The root node has level 0. Direct children of the root has level 1 ... */
214 virtual s32 getLevel() const = 0; 214 virtual s32 getLevel() const = 0;
215 215
216 //! Returns true if this node is visible (all parents are expanded). 216 //! Returns true if this node is visible (all parents are expanded).
217 virtual bool isVisible() const = 0; 217 virtual bool isVisible() const = 0;
218 }; 218 };
219 219
220 220
221 //! Default tree view GUI element. 221 //! Default tree view GUI element.
222 /** Displays a windows like tree buttons to expand/collaps the child 222 /** Displays a windows like tree buttons to expand/collaps the child
223 nodes of an node and optional tree lines. Each node consits of an 223 nodes of an node and optional tree lines. Each node consits of an
224 text, an icon text and a void pointer for user data. */ 224 text, an icon text and a void pointer for user data. */
225 class IGUITreeView : public IGUIElement 225 class IGUITreeView : public IGUIElement
226 { 226 {
227 public: 227 public:
228 //! constructor 228 //! constructor
229 IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent, 229 IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent,
230 s32 id, core::rect<s32> rectangle) 230 s32 id, core::rect<s32> rectangle)
231 : IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {} 231 : IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {}
232 232
233 //! returns the root node (not visible) from the tree. 233 //! returns the root node (not visible) from the tree.
234 virtual IGUITreeViewNode* getRoot() const = 0; 234 virtual IGUITreeViewNode* getRoot() const = 0;
235 235
236 //! returns the selected node of the tree or 0 if none is selected 236 //! returns the selected node of the tree or 0 if none is selected
237 virtual IGUITreeViewNode* getSelected() const = 0; 237 virtual IGUITreeViewNode* getSelected() const = 0;
238 238
239 //! returns true if the tree lines are visible 239 //! returns true if the tree lines are visible
240 virtual bool getLinesVisible() const = 0; 240 virtual bool getLinesVisible() const = 0;
241 241
242 //! sets if the tree lines are visible 242 //! sets if the tree lines are visible
243 /** \param visible true for visible, false for invisible */ 243 /** \param visible true for visible, false for invisible */
244 virtual void setLinesVisible( bool visible ) = 0; 244 virtual void setLinesVisible( bool visible ) = 0;
245 245
246 //! Sets the font which should be used as icon font. 246 //! Sets the font which should be used as icon font.
247 /** This font is set to the Irrlicht engine built-in-font by 247 /** This font is set to the Irrlicht engine built-in-font by
248 default. Icons can be displayed in front of every list item. 248 default. Icons can be displayed in front of every list item.
249 An icon is a string, displayed with the icon font. When using 249 An icon is a string, displayed with the icon font. When using
250 the build-in-font of the Irrlicht engine as icon font, the icon 250 the build-in-font of the Irrlicht engine as icon font, the icon
251 strings defined in GUIIcons.h can be used. 251 strings defined in GUIIcons.h can be used.
252 */ 252 */
253 virtual void setIconFont( IGUIFont* font ) = 0; 253 virtual void setIconFont( IGUIFont* font ) = 0;
254 254
255 //! Sets the image list which should be used for the image and selected image of every node. 255 //! Sets the image list which should be used for the image and selected image of every node.
256 /** The default is 0 (no images). */ 256 /** The default is 0 (no images). */
257 virtual void setImageList( IGUIImageList* imageList ) = 0; 257 virtual void setImageList( IGUIImageList* imageList ) = 0;
258 258
259 //! Returns the image list which is used for the nodes. 259 //! Returns the image list which is used for the nodes.
260 virtual IGUIImageList* getImageList() const = 0; 260 virtual IGUIImageList* getImageList() const = 0;
261 261
262 //! Sets if the image is left of the icon. Default is true. 262 //! Sets if the image is left of the icon. Default is true.
263 virtual void setImageLeftOfIcon( bool bLeftOf ) = 0; 263 virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
264 264
265 //! Returns if the Image is left of the icon. Default is true. 265 //! Returns if the Image is left of the icon. Default is true.
266 virtual bool getImageLeftOfIcon() const = 0; 266 virtual bool getImageLeftOfIcon() const = 0;
267 267
268 //! Returns the node which is associated to the last event. 268 //! Returns the node which is associated to the last event.
269 /** This pointer is only valid inside the OnEvent call! */ 269 /** This pointer is only valid inside the OnEvent call! */
270 virtual IGUITreeViewNode* getLastEventNode() const = 0; 270 virtual IGUITreeViewNode* getLastEventNode() const = 0;
271 }; 271 };
272 272
273 273
274} // end namespace gui 274} // end namespace gui
275} // end namespace irr 275} // end namespace irr
276 276
277#endif 277#endif
278 278