#include <guiTable.h>
Inheritance diagram for GUITable:
Collaboration diagram for GUITable:Classes | |
| struct | Cell |
| struct | DynamicData |
| struct | Option |
| struct | Row |
| struct | TableColumn |
Public Types | |
| typedef std::vector< Option > | TableOptions |
| typedef std::vector< TableColumn > | TableColumns |
Public Member Functions | |
| GUITable (gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, core::rect< s32 > rectangle, ISimpleTextureSource *tsrc) | |
| virtual | ~GUITable () |
| void | setTextList (const std::vector< std::string > &content, bool transparent) |
| void | setTable (const TableOptions &options, const TableColumns &columns, std::vector< std::string > &content) |
| Set generic table options, columns and content, calculate cell sizes. | |
| void | clear () |
| std::string | checkEvent () |
| s32 | getSelected () const |
| void | setSelected (s32 index) |
| virtual void | setOverrideFont (gui::IGUIFont *font=nullptr) |
| Sets another skin independent font. If this is set to zero, the button uses the font of the skin. | |
| virtual gui::IGUIFont * | getOverrideFont () const |
| Gets the override font (if any) | |
| DynamicData | getDynamicData () const |
| void | setDynamicData (const DynamicData &dyndata) |
| virtual void | updateAbsolutePosition () |
| virtual void | draw () |
| virtual bool | OnEvent (const SEvent &event) |
Static Public Member Functions | |
| static Option | splitOption (const std::string &str) |
Protected Types | |
| enum | ColumnType { COLUMN_TYPE_TEXT , COLUMN_TYPE_IMAGE , COLUMN_TYPE_COLOR , COLUMN_TYPE_INDENT , COLUMN_TYPE_TREE } |
Protected Member Functions | |
| s32 | allocString (const std::string &text) |
| s32 | allocImage (const std::string &imagename) |
| void | allocationComplete () |
| void | drawCell (const Cell *cell, video::SColor color, const core::rect< s32 > &rowrect, const core::rect< s32 > &client_clip) |
| const Row * | getRow (s32 i) const |
| bool | doesRowStartWith (const Row *row, const core::stringw &str) const |
| s32 | getRowAt (s32 y, bool &really_hovering) const |
| s32 | getCellAt (s32 x, s32 row_i) const |
| void | autoScroll () |
| void | updateScrollBar () |
| void | sendTableEvent (s32 column, bool doubleclick) |
| void | getOpenedTrees (std::set< s32 > &opened_trees) const |
| void | setOpenedTrees (const std::set< s32 > &opened_trees) |
| void | openTree (s32 to_open) |
| void | closeTree (s32 to_close) |
| void | toggleVisibleTree (s32 row_i, int dir, bool move_selection) |
Static Protected Member Functions | |
| static void | alignContent (Cell *cell, s32 xmax, s32 content_width, s32 align) |
Protected Attributes | |
| ISimpleTextureSource * | m_tsrc |
| std::vector< Row > | m_rows |
| std::vector< s32 > | m_visible_rows |
| bool | m_is_textlist = false |
| bool | m_has_tree_column = false |
| s32 | m_selected = -1 |
| s32 | m_sel_column = 0 |
| bool | m_sel_doubleclick = false |
| u64 | m_keynav_time = 0 |
| core::stringw | m_keynav_buffer = L"" |
| bool | m_border = true |
| video::SColor | m_color = video::SColor(255, 255, 255, 255) |
| video::SColor | m_background = video::SColor(255, 0, 0, 0) |
| video::SColor | m_highlight = video::SColor(255, 70, 100, 50) |
| video::SColor | m_highlight_text = video::SColor(255, 255, 255, 255) |
| s32 | m_rowheight = 1 |
| gui::IGUIFont * | m_font = nullptr |
| GUIScrollBar * | m_scrollbar = nullptr |
| std::vector< core::stringw > | m_strings |
| std::vector< video::ITexture * > | m_images |
| std::map< std::string, s32 > | m_alloc_strings |
| std::map< std::string, s32 > | m_alloc_images |
| typedef std::vector<TableColumn> GUITable::TableColumns |
| typedef std::vector<Option> GUITable::TableOptions |
|
protected |
| GUITable::GUITable | ( | gui::IGUIEnvironment * | env, |
| gui::IGUIElement * | parent, | ||
| s32 | id, | ||
| core::rect< s32 > | rectangle, | ||
| ISimpleTextureSource * | tsrc ) |
References m_font, m_rowheight, m_scrollbar, MYMAX, GUIScrollBar::setPos(), and updateAbsolutePosition().
Here is the call graph for this function:
|
virtual |
References m_font, m_rows, and m_scrollbar.
|
staticprotected |
References GUITable::Cell::xmax, GUITable::Cell::xmin, and GUITable::Cell::xpos.
Referenced by setTable().
Here is the caller graph for this function:
|
protected |
References m_alloc_images, and m_alloc_strings.
Referenced by setTable(), and setTextList().
Here is the caller graph for this function:
|
protected |
References ISimpleTextureSource::getTexture(), m_alloc_images, m_images, and m_tsrc.
Referenced by setTable().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References m_alloc_strings, m_strings, and utf8_to_wide().
Referenced by setTable(), and setTextList().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References GUIScrollBar::getPos(), m_rowheight, m_scrollbar, m_selected, and GUIScrollBar::setPos().
Referenced by OnEvent(), setSelected(), and toggleVisibleTree().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string GUITable::checkEvent | ( | ) |
References getSelected(), m_is_textlist, m_sel_column, and m_sel_doubleclick.
Here is the call graph for this function:| void GUITable::clear | ( | ) |
References m_alloc_images, m_alloc_strings, m_background, m_border, m_color, m_has_tree_column, m_highlight, m_highlight_text, m_images, m_is_textlist, m_keynav_buffer, m_keynav_time, m_rows, m_sel_column, m_sel_doubleclick, m_selected, m_strings, and m_visible_rows.
Referenced by setTable(), and setTextList().
Here is the caller graph for this function:
|
protected |
References getOpenedTrees(), and setOpenedTrees().
Referenced by toggleVisibleTree().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References GUITable::Row::cellcount, GUITable::Row::cells, COLUMN_TYPE_TEXT, GUITable::Cell::content_index, GUITable::Cell::content_type, and m_strings.
Referenced by OnEvent().
Here is the caller graph for this function:
|
virtual |
References GUITable::Row::cellcount, GUITable::Row::cells, drawCell(), GUIScrollBar::getPos(), m_background, m_border, m_color, m_highlight, m_highlight_text, m_rowheight, m_rows, m_scrollbar, m_selected, m_visible_rows, and MYMIN.
Here is the call graph for this function:
|
protected |
References GUITable::Cell::color, GUITable::Cell::color_defined, COLUMN_TYPE_IMAGE, COLUMN_TYPE_TEXT, COLUMN_TYPE_TREE, GUITable::Cell::content_index, GUITable::Cell::content_type, GUITable::Cell::image_scale, m_font, m_images, m_strings, GUITable::Cell::xmax, and GUITable::Cell::xpos.
Referenced by draw().
Here is the caller graph for this function:
|
protected |
References GUITable::Row::cellcount, GUITable::Row::cells, getRow(), x, and GUITable::Cell::xmin.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| GUITable::DynamicData GUITable::getDynamicData | ( | ) | const |
References getOpenedTrees(), GUIScrollBar::getPos(), getSelected(), GUITable::DynamicData::keynav_buffer, GUITable::DynamicData::keynav_time, m_has_tree_column, m_keynav_buffer, m_keynav_time, m_scrollbar, GUITable::DynamicData::opened_trees, GUITable::DynamicData::scrollpos, and GUITable::DynamicData::selected.
Here is the call graph for this function:
|
protected |
References m_rows.
Referenced by closeTree(), getDynamicData(), openTree(), and setSelected().
Here is the caller graph for this function:
|
virtual |
Gets the override font (if any)
References m_font.
|
protected |
References m_rows, and m_visible_rows.
Referenced by getCellAt(), OnEvent(), and toggleVisibleTree().
Here is the caller graph for this function:
|
protected |
References GUIScrollBar::getPos(), m_rowheight, m_scrollbar, m_visible_rows, and y.
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:| s32 GUITable::getSelected | ( | ) | const |
References m_selected, and m_visible_rows.
Referenced by checkEvent(), and getDynamicData().
Here is the caller graph for this function:
|
virtual |
References autoScroll(), GUITable::Row::cells, COLUMN_TYPE_TREE, GUITable::Cell::content_type, dir(), doesRowStartWith(), getCellAt(), getRow(), getRowAt(), GUIScrollBar::getTargetPos(), porting::getTimeMs(), m_has_tree_column, m_keynav_buffer, m_keynav_time, m_rowheight, m_scrollbar, m_selected, m_strings, m_visible_rows, MYMAX, p(), rangelim(), GUITable::Cell::reported_column, sendTableEvent(), GUIScrollBar::setPosInterpolated(), toggleVisibleTree(), and GUITable::Cell::tooltip_index.
Here is the call graph for this function:
|
protected |
References getOpenedTrees(), and setOpenedTrees().
Referenced by toggleVisibleTree().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References m_sel_column, and m_sel_doubleclick.
Referenced by OnEvent(), and toggleVisibleTree().
Here is the caller graph for this function:| void GUITable::setDynamicData | ( | const DynamicData & | dyndata | ) |
References GUITable::DynamicData::keynav_buffer, GUITable::DynamicData::keynav_time, m_has_tree_column, m_keynav_buffer, m_keynav_time, m_scrollbar, m_sel_column, m_sel_doubleclick, GUITable::DynamicData::opened_trees, GUITable::DynamicData::scrollpos, GUITable::DynamicData::selected, setOpenedTrees(), GUIScrollBar::setPos(), and setSelected().
Referenced by GUIFormSpecMenu::parseTable(), and GUIFormSpecMenu::parseTextList().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References GUITable::Row::cellcount, GUITable::Row::cells, COLUMN_TYPE_TREE, GUITable::Cell::content_index, GUITable::Cell::content_type, GUITable::Row::indent, m_rows, m_selected, m_visible_rows, updateScrollBar(), and GUITable::Row::visible_index.
Referenced by closeTree(), openTree(), setDynamicData(), setSelected(), and setTable().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Sets another skin independent font. If this is set to zero, the button uses the font of the skin.
References m_font, m_rowheight, MYMAX, and updateScrollBar().
Referenced by GUIFormSpecMenu::parseTable(), and GUIFormSpecMenu::parseTextList().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUITable::setSelected | ( | s32 | index | ) |
References autoScroll(), getOpenedTrees(), m_rows, m_sel_column, m_sel_doubleclick, m_selected, m_visible_rows, and setOpenedTrees().
Referenced by GUIFormSpecMenu::parseTable(), GUIFormSpecMenu::parseTextList(), and setDynamicData().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUITable::setTable | ( | const TableOptions & | options, |
| const TableColumns & | columns, | ||
| std::vector< std::string > & | content ) |
Set generic table options, columns and content, calculate cell sizes.
References alignContent(), allocationComplete(), allocImage(), allocString(), GUITable::Row::cellcount, GUITable::Row::cells, clear(), GUITable::Cell::color, GUITable::Cell::color_defined, COLUMN_TYPE_COLOR, COLUMN_TYPE_IMAGE, COLUMN_TYPE_INDENT, COLUMN_TYPE_TEXT, COLUMN_TYPE_TREE, GUITable::Cell::content_index, GUITable::Cell::content_type, errorstream, gui::CGUITTFont::getFontSize(), GUITable::Cell::image_scale, GUITable::Row::indent, is_yes(), m_background, m_border, m_color, m_font, m_has_tree_column, m_highlight, m_highlight_text, m_images, m_rowheight, m_rows, m_strings, m_visible_rows, MYMAX, myround(), parseColorString(), GUITable::Cell::reported_column, S32_MAX, setOpenedTrees(), setTable(), stof, stoi, string_allowed(), GUITable::Cell::tooltip_index, GUITable::TableColumn::type, updateScrollBar(), GUITable::Row::visible_index, x, GUITable::Cell::xmax, GUITable::Cell::xmin, and GUITable::Cell::xpos.
Referenced by GUIFormSpecMenu::parseTable(), and setTable().
Here is the call graph for this function:
Here is the caller graph for this function:| void GUITable::setTextList | ( | const std::vector< std::string > & | content, |
| bool | transparent ) |
References allocationComplete(), allocString(), GUITable::Row::cellcount, GUITable::Row::cells, clear(), GUITable::Cell::color, GUITable::Cell::color_defined, COLUMN_TYPE_TEXT, GUITable::Cell::content_index, GUITable::Cell::content_type, GUITable::Row::indent, m_background, m_border, m_is_textlist, m_rows, m_visible_rows, parseColorString(), GUITable::Cell::reported_column, GUITable::Cell::tooltip_index, updateScrollBar(), GUITable::Row::visible_index, GUITable::Cell::xmax, GUITable::Cell::xmin, and GUITable::Cell::xpos.
Referenced by GUIFormSpecMenu::parseTextList().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Referenced by GUIFormSpecMenu::parseTableColumns(), and GUIFormSpecMenu::parseTableOptions().
Here is the caller graph for this function:
|
protected |
References autoScroll(), GUITable::Row::cellcount, GUITable::Row::cells, closeTree(), COLUMN_TYPE_TREE, GUITable::Cell::content_index, GUITable::Cell::content_type, dir(), getRow(), GUITable::Row::indent, m_selected, m_visible_rows, openTree(), and sendTableEvent().
Referenced by OnEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
References updateScrollBar().
Referenced by GUITable().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References m_rowheight, m_scrollbar, m_visible_rows, MYMAX, GUIScrollBar::setLargeStep(), GUIScrollBar::setMax(), GUIScrollBar::setPageSize(), and GUIScrollBar::setSmallStep().
Referenced by setOpenedTrees(), setOverrideFont(), setTable(), setTextList(), and updateAbsolutePosition().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Referenced by allocationComplete(), allocImage(), and clear().
|
protected |
Referenced by allocationComplete(), allocString(), and clear().
|
protected |
Referenced by clear(), draw(), setTable(), and setTextList().
|
protected |
Referenced by clear(), draw(), setTable(), and setTextList().
|
protected |
Referenced by clear(), draw(), and setTable().
|
protected |
Referenced by GUITable(), ~GUITable(), drawCell(), getOverrideFont(), setOverrideFont(), and setTable().
|
protected |
Referenced by clear(), getDynamicData(), OnEvent(), setDynamicData(), and setTable().
|
protected |
Referenced by clear(), draw(), and setTable().
|
protected |
Referenced by clear(), draw(), and setTable().
|
protected |
Referenced by allocImage(), clear(), drawCell(), and setTable().
|
protected |
Referenced by checkEvent(), clear(), and setTextList().
|
protected |
Referenced by clear(), getDynamicData(), OnEvent(), and setDynamicData().
|
protected |
Referenced by clear(), getDynamicData(), OnEvent(), and setDynamicData().
|
protected |
Referenced by GUITable(), autoScroll(), draw(), getRowAt(), OnEvent(), setOverrideFont(), setTable(), and updateScrollBar().
|
protected |
Referenced by ~GUITable(), clear(), draw(), getOpenedTrees(), getRow(), setOpenedTrees(), setSelected(), setTable(), and setTextList().
|
protected |
Referenced by GUITable(), ~GUITable(), autoScroll(), draw(), getDynamicData(), getRowAt(), OnEvent(), setDynamicData(), and updateScrollBar().
|
protected |
Referenced by checkEvent(), clear(), sendTableEvent(), setDynamicData(), and setSelected().
|
protected |
Referenced by checkEvent(), clear(), sendTableEvent(), setDynamicData(), and setSelected().
|
protected |
Referenced by autoScroll(), clear(), draw(), getSelected(), OnEvent(), setOpenedTrees(), setSelected(), and toggleVisibleTree().
|
protected |
Referenced by allocString(), clear(), doesRowStartWith(), drawCell(), OnEvent(), and setTable().
|
protected |
Referenced by allocImage().
|
protected |
Referenced by clear(), draw(), getRow(), getRowAt(), getSelected(), OnEvent(), setOpenedTrees(), setSelected(), setTable(), setTextList(), toggleVisibleTree(), and updateScrollBar().