aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IGUITable.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/IGUITable.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/IGUITable.h')
-rw-r--r--libraries/irrlicht-1.8/include/IGUITable.h410
1 files changed, 205 insertions, 205 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUITable.h b/libraries/irrlicht-1.8/include/IGUITable.h
index 4f271a9..219d28d 100644
--- a/libraries/irrlicht-1.8/include/IGUITable.h
+++ b/libraries/irrlicht-1.8/include/IGUITable.h
@@ -1,205 +1,205 @@
1// Copyright (C) 2003-2012 Nikolaus Gebhardt 1// Copyright (C) 2003-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_TABLE_H_INCLUDED__ 5#ifndef __I_GUI_TABLE_H_INCLUDED__
6#define __I_GUI_TABLE_H_INCLUDED__ 6#define __I_GUI_TABLE_H_INCLUDED__
7 7
8#include "IGUIElement.h" 8#include "IGUIElement.h"
9#include "irrTypes.h" 9#include "irrTypes.h"
10#include "SColor.h" 10#include "SColor.h"
11#include "IGUISkin.h" 11#include "IGUISkin.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15namespace gui 15namespace gui
16{ 16{
17 17
18 //! modes for ordering used when a column header is clicked 18 //! modes for ordering used when a column header is clicked
19 enum EGUI_COLUMN_ORDERING 19 enum EGUI_COLUMN_ORDERING
20 { 20 {
21 //! Do not use ordering 21 //! Do not use ordering
22 EGCO_NONE, 22 EGCO_NONE,
23 23
24 //! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked. 24 //! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.
25 EGCO_CUSTOM, 25 EGCO_CUSTOM,
26 26
27 //! Sort it ascending by it's ascii value like: a,b,c,... 27 //! Sort it ascending by it's ascii value like: a,b,c,...
28 EGCO_ASCENDING, 28 EGCO_ASCENDING,
29 29
30 //! Sort it descending by it's ascii value like: z,x,y,... 30 //! Sort it descending by it's ascii value like: z,x,y,...
31 EGCO_DESCENDING, 31 EGCO_DESCENDING,
32 32
33 //! Sort it ascending on first click, descending on next, etc 33 //! Sort it ascending on first click, descending on next, etc
34 EGCO_FLIP_ASCENDING_DESCENDING, 34 EGCO_FLIP_ASCENDING_DESCENDING,
35 35
36 //! Not used as mode, only to get maximum value for this enum 36 //! Not used as mode, only to get maximum value for this enum
37 EGCO_COUNT 37 EGCO_COUNT
38 }; 38 };
39 39
40 //! Names for EGUI_COLUMN_ORDERING types 40 //! Names for EGUI_COLUMN_ORDERING types
41 const c8* const GUIColumnOrderingNames[] = 41 const c8* const GUIColumnOrderingNames[] =
42 { 42 {
43 "none", 43 "none",
44 "custom", 44 "custom",
45 "ascend", 45 "ascend",
46 "descend", 46 "descend",
47 "ascend_descend", 47 "ascend_descend",
48 0, 48 0,
49 }; 49 };
50 50
51 enum EGUI_ORDERING_MODE 51 enum EGUI_ORDERING_MODE
52 { 52 {
53 //! No element ordering 53 //! No element ordering
54 EGOM_NONE, 54 EGOM_NONE,
55 55
56 //! Elements are ordered from the smallest to the largest. 56 //! Elements are ordered from the smallest to the largest.
57 EGOM_ASCENDING, 57 EGOM_ASCENDING,
58 58
59 //! Elements are ordered from the largest to the smallest. 59 //! Elements are ordered from the largest to the smallest.
60 EGOM_DESCENDING, 60 EGOM_DESCENDING,
61 61
62 //! this value is not used, it only specifies the amount of default ordering types 62 //! this value is not used, it only specifies the amount of default ordering types
63 //! available. 63 //! available.
64 EGOM_COUNT 64 EGOM_COUNT
65 }; 65 };
66 66
67 const c8* const GUIOrderingModeNames[] = 67 const c8* const GUIOrderingModeNames[] =
68 { 68 {
69 "none", 69 "none",
70 "ascending", 70 "ascending",
71 "descending", 71 "descending",
72 0 72 0
73 }; 73 };
74 74
75 enum EGUI_TABLE_DRAW_FLAGS 75 enum EGUI_TABLE_DRAW_FLAGS
76 { 76 {
77 EGTDF_ROWS = 1, 77 EGTDF_ROWS = 1,
78 EGTDF_COLUMNS = 2, 78 EGTDF_COLUMNS = 2,
79 EGTDF_ACTIVE_ROW = 4, 79 EGTDF_ACTIVE_ROW = 4,
80 EGTDF_COUNT 80 EGTDF_COUNT
81 }; 81 };
82 82
83 //! Default list box GUI element. 83 //! Default list box GUI element.
84 /** \par This element can create the following events of type EGUI_EVENT_TYPE: 84 /** \par This element can create the following events of type EGUI_EVENT_TYPE:
85 \li EGET_TABLE_CHANGED 85 \li EGET_TABLE_CHANGED
86 \li EGET_TABLE_SELECTED_AGAIN 86 \li EGET_TABLE_SELECTED_AGAIN
87 \li EGET_TABLE_HEADER_CHANGED 87 \li EGET_TABLE_HEADER_CHANGED
88 */ 88 */
89 class IGUITable : public IGUIElement 89 class IGUITable : public IGUIElement
90 { 90 {
91 public: 91 public:
92 //! constructor 92 //! constructor
93 IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle) 93 IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
94 : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {} 94 : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
95 95
96 //! Adds a column 96 //! Adds a column
97 /** If columnIndex is outside the current range, do push new colum at the end */ 97 /** If columnIndex is outside the current range, do push new colum at the end */
98 virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0; 98 virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
99 99
100 //! remove a column from the table 100 //! remove a column from the table
101 virtual void removeColumn(u32 columnIndex) = 0; 101 virtual void removeColumn(u32 columnIndex) = 0;
102 102
103 //! Returns the number of columns in the table control 103 //! Returns the number of columns in the table control
104 virtual s32 getColumnCount() const = 0; 104 virtual s32 getColumnCount() const = 0;
105 105
106 //! Makes a column active. This will trigger an ordering process. 106 //! Makes a column active. This will trigger an ordering process.
107 /** \param idx: The id of the column to make active. 107 /** \param idx: The id of the column to make active.
108 \param doOrder: Do also the ordering which depending on mode for active column 108 \param doOrder: Do also the ordering which depending on mode for active column
109 \return True if successful. */ 109 \return True if successful. */
110 virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0; 110 virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
111 111
112 //! Returns which header is currently active 112 //! Returns which header is currently active
113 virtual s32 getActiveColumn() const = 0; 113 virtual s32 getActiveColumn() const = 0;
114 114
115 //! Returns the ordering used by the currently active column 115 //! Returns the ordering used by the currently active column
116 virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0; 116 virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
117 117
118 //! Set the width of a column 118 //! Set the width of a column
119 virtual void setColumnWidth(u32 columnIndex, u32 width) = 0; 119 virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
120 120
121 //! Get the width of a column 121 //! Get the width of a column
122 virtual u32 getColumnWidth(u32 columnIndex) const = 0; 122 virtual u32 getColumnWidth(u32 columnIndex) const = 0;
123 123
124 //! columns can be resized by drag 'n drop 124 //! columns can be resized by drag 'n drop
125 virtual void setResizableColumns(bool resizable) = 0; 125 virtual void setResizableColumns(bool resizable) = 0;
126 126
127 //! can columns be resized by dran 'n drop? 127 //! can columns be resized by dran 'n drop?
128 virtual bool hasResizableColumns() const = 0; 128 virtual bool hasResizableColumns() const = 0;
129 129
130 //! This tells the table control which ordering mode should be used when a column header is clicked. 130 //! This tells the table control which ordering mode should be used when a column header is clicked.
131 /** \param columnIndex The index of the column header. 131 /** \param columnIndex The index of the column header.
132 \param mode: One of the modes defined in EGUI_COLUMN_ORDERING */ 132 \param mode: One of the modes defined in EGUI_COLUMN_ORDERING */
133 virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0; 133 virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
134 134
135 //! Returns which row is currently selected 135 //! Returns which row is currently selected
136 virtual s32 getSelected() const = 0; 136 virtual s32 getSelected() const = 0;
137 137
138 //! set wich row is currently selected 138 //! set wich row is currently selected
139 virtual void setSelected( s32 index ) = 0; 139 virtual void setSelected( s32 index ) = 0;
140 140
141 //! Get amount of rows in the tabcontrol 141 //! Get amount of rows in the tabcontrol
142 virtual s32 getRowCount() const = 0; 142 virtual s32 getRowCount() const = 0;
143 143
144 //! adds a row to the table 144 //! adds a row to the table
145 /** \param rowIndex Zero based index of rows. The row will be 145 /** \param rowIndex Zero based index of rows. The row will be
146 inserted at this position, if a row already exist there, it 146 inserted at this position, if a row already exist there, it
147 will be placed after it. If the row is larger than the actual 147 will be placed after it. If the row is larger than the actual
148 number of row by more than one, it won't be created. Note that 148 number of row by more than one, it won't be created. Note that
149 if you create a row that's not at the end, there might be 149 if you create a row that's not at the end, there might be
150 performance issues. 150 performance issues.
151 \return index of inserted row. */ 151 \return index of inserted row. */
152 virtual u32 addRow(u32 rowIndex) = 0; 152 virtual u32 addRow(u32 rowIndex) = 0;
153 153
154 //! Remove a row from the table 154 //! Remove a row from the table
155 virtual void removeRow(u32 rowIndex) = 0; 155 virtual void removeRow(u32 rowIndex) = 0;
156 156
157 //! clears the table rows, but keeps the columns intact 157 //! clears the table rows, but keeps the columns intact
158 virtual void clearRows() = 0; 158 virtual void clearRows() = 0;
159 159
160 //! Swap two row positions. 160 //! Swap two row positions.
161 virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0; 161 virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
162 162
163 //! This tells the table to start ordering all the rows. 163 //! This tells the table to start ordering all the rows.
164 /** You need to explicitly tell the table to re order the rows 164 /** You need to explicitly tell the table to re order the rows
165 when a new row is added or the cells data is changed. This 165 when a new row is added or the cells data is changed. This
166 makes the system more flexible and doesn't make you pay the 166 makes the system more flexible and doesn't make you pay the
167 cost of ordering when adding a lot of rows. 167 cost of ordering when adding a lot of rows.
168 \param columnIndex: When set to -1 the active column is used. 168 \param columnIndex: When set to -1 the active column is used.
169 \param mode Ordering mode of the rows. */ 169 \param mode Ordering mode of the rows. */
170 virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0; 170 virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
171 171
172 //! Set the text of a cell 172 //! Set the text of a cell
173 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0; 173 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
174 174
175 //! Set the text of a cell, and set a color of this cell. 175 //! Set the text of a cell, and set a color of this cell.
176 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0; 176 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
177 177
178 //! Set the data of a cell 178 //! Set the data of a cell
179 virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0; 179 virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
180 180
181 //! Set the color of a cell text 181 //! Set the color of a cell text
182 virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0; 182 virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
183 183
184 //! Get the text of a cell 184 //! Get the text of a cell
185 virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0; 185 virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
186 186
187 //! Get the data of a cell 187 //! Get the data of a cell
188 virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0; 188 virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
189 189
190 //! clears the table, deletes all items in the table 190 //! clears the table, deletes all items in the table
191 virtual void clear() = 0; 191 virtual void clear() = 0;
192 192
193 //! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout 193 //! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout
194 virtual void setDrawFlags(s32 flags) = 0; 194 virtual void setDrawFlags(s32 flags) = 0;
195 195
196 //! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout 196 //! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout
197 virtual s32 getDrawFlags() const = 0; 197 virtual s32 getDrawFlags() const = 0;
198 }; 198 };
199 199
200 200
201} // end namespace gui 201} // end namespace gui
202} // end namespace irr 202} // end namespace irr
203 203
204#endif 204#endif
205 205