Loading...
Searching...
No Matches
IGUITable.h
Go to the documentation of this file.
// Copyright (C) 2003-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_GUI_TABLE_H_INCLUDED__
#define __I_GUI_TABLE_H_INCLUDED__
#include "IGUIElement.h"
#include "irrTypes.h"
#include "SColor.h"
#include "IGUISkin.h"
namespace irr
{
namespace gui
{
enum EGUI_COLUMN_ORDERING
{
EGCO_NONE,
EGCO_CUSTOM,
EGCO_ASCENDING,
EGCO_DESCENDING,
EGCO_FLIP_ASCENDING_DESCENDING,
EGCO_COUNT
};
const c8* const GUIColumnOrderingNames[] =
{
"none",
"custom",
"ascend",
"descend",
"ascend_descend",
0,
};
enum EGUI_ORDERING_MODE
{
EGOM_NONE,
EGOM_ASCENDING,
EGOM_DESCENDING,
EGOM_COUNT
};
const c8* const GUIOrderingModeNames[] =
{
"none",
"ascending",
"descending",
0
};
enum EGUI_TABLE_DRAW_FLAGS
{
EGTDF_ROWS = 1,
EGTDF_COLUMNS = 2,
EGTDF_ACTIVE_ROW = 4,
EGTDF_COUNT
};
class IGUITable : public IGUIElement
{
public:
IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
virtual void removeColumn(u32 columnIndex) = 0;
virtual s32 getColumnCount() const = 0;
virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
virtual s32 getActiveColumn() const = 0;
virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
virtual u32 getColumnWidth(u32 columnIndex) const = 0;
virtual void setResizableColumns(bool resizable) = 0;
virtual bool hasResizableColumns() const = 0;
virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
virtual s32 getSelected() const = 0;
virtual void setSelected( s32 index ) = 0;
virtual s32 getRowCount() const = 0;
virtual u32 addRow(u32 rowIndex) = 0;
virtual void removeRow(u32 rowIndex) = 0;
virtual void clearRows() = 0;
virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
virtual void clear() = 0;
virtual void setDrawFlags(s32 flags) = 0;
virtual s32 getDrawFlags() const = 0;
};
} // end namespace gui
} // end namespace irr
#endif
IGUIElement.h
IGUISkin.h
SColor.h
irr::core::rect
Rectangle template.
Definition rect.h:27
irr::gui::IGUIElement::IGUIElement
IGUIElement(EGUI_ELEMENT_TYPE type, IGUIEnvironment *environment, IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle)
Constructor.
Definition IGUIElement.h:30
irr::gui::IGUIEnvironment
GUI Environment. Used as factory and manager of all other GUI elements.
Definition IGUIEnvironment.h:71
irr::gui::IGUITable::getActiveColumnOrdering
virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const =0
Returns the ordering used by the currently active column.
irr::gui::IGUITable::orderRows
virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE)=0
This tells the table to start ordering all the rows.
irr::gui::IGUITable::getRowCount
virtual s32 getRowCount() const =0
Get amount of rows in the tabcontrol.
irr::gui::IGUITable::addRow
virtual u32 addRow(u32 rowIndex)=0
adds a row to the table
irr::gui::IGUITable::removeColumn
virtual void removeColumn(u32 columnIndex)=0
remove a column from the table
irr::gui::IGUITable::clearRows
virtual void clearRows()=0
clears the table rows, but keeps the columns intact
irr::gui::IGUITable::setCellText
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw &text)=0
Set the text of a cell.
irr::gui::IGUITable::IGUITable
IGUITable(IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle)
constructor
Definition IGUITable.h:93
irr::gui::IGUITable::getCellText
virtual const wchar_t * getCellText(u32 rowIndex, u32 columnIndex) const =0
Get the text of a cell.
irr::gui::IGUITable::setResizableColumns
virtual void setResizableColumns(bool resizable)=0
columns can be resized by drag 'n drop
irr::gui::IGUITable::addColumn
virtual void addColumn(const wchar_t *caption, s32 columnIndex=-1)=0
Adds a column.
irr::gui::IGUITable::hasResizableColumns
virtual bool hasResizableColumns() const =0
can columns be resized by dran 'n drop?
irr::gui::IGUITable::setColumnOrdering
virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode)=0
This tells the table control which ordering mode should be used when a column header is clicked.
irr::gui::IGUITable::setCellData
virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data)=0
Set the data of a cell.
irr::gui::IGUITable::swapRows
virtual void swapRows(u32 rowIndexA, u32 rowIndexB)=0
Swap two row positions.
irr::gui::IGUITable::setColumnWidth
virtual void setColumnWidth(u32 columnIndex, u32 width)=0
Set the width of a column.
irr::gui::IGUITable::getCellData
virtual void * getCellData(u32 rowIndex, u32 columnIndex) const =0
Get the data of a cell.
irr::gui::IGUITable::setCellText
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw &text, video::SColor color)=0
Set the text of a cell, and set a color of this cell.
irr::gui::IGUITable::getColumnWidth
virtual u32 getColumnWidth(u32 columnIndex) const =0
Get the width of a column.
irr::gui::IGUITable::setSelected
virtual void setSelected(s32 index)=0
set wich row is currently selected
irr::gui::IGUITable::setCellColor
virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color)=0
Set the color of a cell text.
irr::gui::IGUITable::removeRow
virtual void removeRow(u32 rowIndex)=0
Remove a row from the table.
irr::gui::IGUITable::getActiveColumn
virtual s32 getActiveColumn() const =0
Returns which header is currently active.
irr::gui::IGUITable::getColumnCount
virtual s32 getColumnCount() const =0
Returns the number of columns in the table control.
irr::gui::IGUITable::getSelected
virtual s32 getSelected() const =0
Returns which row is currently selected.
irr::gui::IGUITable::clear
virtual void clear()=0
clears the table, deletes all items in the table
irr::gui::IGUITable::setActiveColumn
virtual bool setActiveColumn(s32 idx, bool doOrder=false)=0
Makes a column active. This will trigger an ordering process.
irr::gui::IGUITable::setDrawFlags
virtual void setDrawFlags(s32 flags)=0
Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout.
irr::gui::IGUITable::getDrawFlags
virtual s32 getDrawFlags() const =0
Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout.
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition SColor.h:202
irrTypes.h
irr::core::stringw
string< wchar_t > stringw
Typedef for wide character strings.
Definition irrString.h:1361
irr::gui
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition EGUIAlignment.h:11
irr::gui::EGUI_TABLE_DRAW_FLAGS
EGUI_TABLE_DRAW_FLAGS
Definition IGUITable.h:76
irr::gui::EGTDF_ACTIVE_ROW
@ EGTDF_ACTIVE_ROW
Definition IGUITable.h:79
irr::gui::EGTDF_COLUMNS
@ EGTDF_COLUMNS
Definition IGUITable.h:78
irr::gui::EGTDF_COUNT
@ EGTDF_COUNT
Definition IGUITable.h:80
irr::gui::EGTDF_ROWS
@ EGTDF_ROWS
Definition IGUITable.h:77
irr::gui::GUIOrderingModeNames
const c8 *const GUIOrderingModeNames[]
Definition IGUITable.h:67
irr::gui::EGUI_COLUMN_ORDERING
EGUI_COLUMN_ORDERING
modes for ordering used when a column header is clicked
Definition IGUITable.h:20
irr::gui::EGCO_DESCENDING
@ EGCO_DESCENDING
Sort it descending by it's ascii value like: z,x,y,...
Definition IGUITable.h:31
irr::gui::EGCO_ASCENDING
@ EGCO_ASCENDING
Sort it ascending by it's ascii value like: a,b,c,...
Definition IGUITable.h:28
irr::gui::EGCO_CUSTOM
@ EGCO_CUSTOM
Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.
Definition IGUITable.h:25
irr::gui::EGCO_COUNT
@ EGCO_COUNT
Not used as mode, only to get maximum value for this enum.
Definition IGUITable.h:37
irr::gui::EGCO_NONE
@ EGCO_NONE
Do not use ordering.
Definition IGUITable.h:22
irr::gui::EGCO_FLIP_ASCENDING_DESCENDING
@ EGCO_FLIP_ASCENDING_DESCENDING
Sort it ascending on first click, descending on next, etc.
Definition IGUITable.h:34
irr::gui::EGUI_ORDERING_MODE
EGUI_ORDERING_MODE
Definition IGUITable.h:52
irr::gui::EGOM_NONE
@ EGOM_NONE
No element ordering.
Definition IGUITable.h:54
irr::gui::EGOM_COUNT
@ EGOM_COUNT
Definition IGUITable.h:64
irr::gui::EGOM_DESCENDING
@ EGOM_DESCENDING
Elements are ordered from the largest to the smallest.
Definition IGUITable.h:60
irr::gui::EGOM_ASCENDING
@ EGOM_ASCENDING
Elements are ordered from the smallest to the largest.
Definition IGUITable.h:57
irr::gui::EGUIET_TABLE
@ EGUIET_TABLE
A Table.
Definition EGUIElementTypes.h:77
irr::gui::GUIColumnOrderingNames
const c8 *const GUIColumnOrderingNames[]
Names for EGUI_COLUMN_ORDERING types.
Definition IGUITable.h:41
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::c8
char c8
8 bit character variable.
Definition irrTypes.h:31
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0