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-2010 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  class IGUITable : public IGUIElement
85  {
86  public:
88  IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
89  : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
90 
92 
93  virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
94 
96  virtual void removeColumn(u32 columnIndex) = 0;
97 
99  virtual s32 getColumnCount() const = 0;
100 
102 
105  virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
106 
108  virtual s32 getActiveColumn() const = 0;
109 
111  virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
112 
114  virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
115 
117  virtual void setResizableColumns(bool resizable) = 0;
118 
120  virtual bool hasResizableColumns() const = 0;
121 
123 
125  virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
126 
128  virtual s32 getSelected() const = 0;
129 
131  virtual void setSelected( s32 index ) = 0;
132 
134  virtual s32 getRowCount() const = 0;
135 
137 
144  virtual u32 addRow(u32 rowIndex) = 0;
145 
147  virtual void removeRow(u32 rowIndex) = 0;
148 
150  virtual void clearRows() = 0;
151 
153  virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
154 
156 
162  virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
163 
165  virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
166 
168  virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
169 
171  virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
172 
174  virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
175 
177  virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
178 
180  virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
181 
183  virtual void clear() = 0;
184 
186  virtual void setDrawFlags(s32 flags) = 0;
187 
189  virtual s32 getDrawFlags() const = 0;
190  };
191 
192 
193 } // end namespace gui
194 } // end namespace irr
195 
196 #endif
197 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Tue Jun 5 2012 17:57:12 by Doxygen (1.8.1)