Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# IGUITable.h

Go to the documentation of this file.

    00001 // Copyright (C) 2003-2010 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_GUI_TABLE_H_INCLUDED__
    00006 #define __I_GUI_TABLE_H_INCLUDED__
    00007
    00008 #include "IGUIElement.h"
    00009 #include "irrTypes.h"
    00010 #include "SColor.h"
    00011 #include "IGUISkin.h"
    00012
    00013 namespace irr
    00014 {
    00015 namespace gui
    00016 {
    00017
    00019         enum EGUI_COLUMN_ORDERING
    00020         {
    00022                 EGCO_NONE,
    00023
    00025                 EGCO_CUSTOM,
    00026
    00028                 EGCO_ASCENDING,
    00029
    00031                 EGCO_DESCENDING,
    00032
    00034                 EGCO_FLIP_ASCENDING_DESCENDING,
    00035
    00037                 EGCO_COUNT
    00038         };
    00039
    00041         const c8* const GUIColumnOrderingNames[] =
    00042         {
    00043                 "none",
    00044                 "custom",
    00045                 "ascend",
    00046                 "descend",
    00047                 "ascend_descend",
    00048                 0,
    00049         };
    00050
    00051         enum EGUI_ORDERING_MODE
    00052         {
    00054                 EGOM_NONE,
    00055
    00057                 EGOM_ASCENDING,
    00058
    00060                 EGOM_DESCENDING,
    00061
    00064                 EGOM_COUNT
    00065         };
    00066
    00067         const c8* const GUIOrderingModeNames[] =
    00068         {
    00069                 "none",
    00070                 "ascending",
    00071                 "descending",
    00072                 0
    00073         };
    00074
    00075         enum EGUI_TABLE_DRAW_FLAGS
    00076         {
    00077                 EGTDF_ROWS = 1,
    00078                 EGTDF_COLUMNS = 2,
    00079                 EGTDF_ACTIVE_ROW = 4,
    00080                 EGTDF_COUNT
    00081         };
    00082
    00084         class IGUITable : public IGUIElement
    00085         {
    00086         public:
    00088                 IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
    00089                         : IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
    00090
    00092
    00093                 virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
    00094
    00096                 virtual void removeColumn(u32 columnIndex) = 0;
    00097
    00099                 virtual s32 getColumnCount() const = 0;
    00100
    00102
    00105                 virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
    00106
    00108                 virtual s32 getActiveColumn() const = 0;
    00109
    00111                 virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
    00112
    00114                 virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
    00115
    00117                 virtual void setResizableColumns(bool resizable) = 0;
    00118
    00120                 virtual bool hasResizableColumns() const = 0;
    00121
    00123
    00125                 virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
    00126
    00128                 virtual s32 getSelected() const = 0;
    00129
    00131                 virtual void setSelected( s32 index ) = 0;
    00132
    00134                 virtual s32 getRowCount() const = 0;
    00135
    00137
    00144                 virtual u32 addRow(u32 rowIndex) = 0;
    00145
    00147                 virtual void removeRow(u32 rowIndex) = 0;
    00148
    00150                 virtual void clearRows() = 0;
    00151
    00153                 virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
    00154
    00156
    00162                 virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
    00163
    00165                 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
    00166
    00168                 virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
    00169
    00171                 virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
    00172
    00174                 virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
    00175
    00177                 virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
    00178
    00180                 virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
    00181
    00183                 virtual void clear() = 0;
    00184
    00186                 virtual void setDrawFlags(s32 flags) = 0;
    00187
    00189                 virtual s32 getDrawFlags() const = 0;
    00190         };
    00191
    00192
    00193 } // end namespace gui
    00194 } // end namespace irr
    00195
    00196 #endif
    00197

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Oct 24 12:41:56 2010 by Doxygen (1.6.2)