Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
IGUITable.h
Go to the documentation of this file.
1 // Copyright (C) 2003-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_TABLE_H_INCLUDED__
6 #define __I_GUI_TABLE_H_INCLUDED__
7 
8 #include "IGUIElement.h"
9 #include "irrTypes.h"
10 #include "SColor.h"
11 #include "IGUISkin.h"
12 
13 namespace irr
14 {
15 namespace gui
16 {
17 
20  {
23 
26 
29 
32 
35 
38  };
39 
41  const c8* const GUIColumnOrderingNames[] =
42  {
43  "none",
44  "custom",
45  "ascend",
46  "descend",
47  "ascend_descend",
48  0,
49  };
50 
52  {
55 
58 
61 
65  };
66 
67  const c8* const GUIOrderingModeNames[] =
68  {
69  "none",
70  "ascending",
71  "descending",
72  0
73  };
74 
76  {
81  };
82 
84 
89  class IGUITable : public IGUIElement
90  {
91  public:
93  IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
94  : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
95 
97 
98  virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
99 
101  virtual void removeColumn(u32 columnIndex) = 0;
102 
104  virtual s32 getColumnCount() const = 0;
105 
107 
110  virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
111 
113  virtual s32 getActiveColumn() const = 0;
114 
116  virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
117 
119  virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
120 
122  virtual u32 getColumnWidth(u32 columnIndex) const = 0;
123 
125  virtual void setResizableColumns(bool resizable) = 0;
126 
128  virtual bool hasResizableColumns() const = 0;
129 
131 
133  virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
134 
136  virtual s32 getSelected() const = 0;
137 
139  virtual void setSelected( s32 index ) = 0;
140 
142  virtual s32 getRowCount() const = 0;
143 
145 
152  virtual u32 addRow(u32 rowIndex) = 0;
153 
155  virtual void removeRow(u32 rowIndex) = 0;
156 
158  virtual void clearRows() = 0;
159 
161  virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
162 
164 
170  virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
171 
173  virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
174 
176  virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
177 
179  virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
180 
182  virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
183 
185  virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
186 
188  virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
189 
191  virtual void clear() = 0;
192 
194  virtual void setDrawFlags(s32 flags) = 0;
195 
197  virtual s32 getDrawFlags() const = 0;
198  };
199 
200 
201 } // end namespace gui
202 } // end namespace irr
203 
204 #endif
205 

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)