#include <guiTable.h>
|
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 |
|
◆ TableColumns
◆ TableOptions
◆ ColumnType
Enumerator |
---|
COLUMN_TYPE_TEXT | |
COLUMN_TYPE_IMAGE | |
COLUMN_TYPE_COLOR | |
COLUMN_TYPE_INDENT | |
COLUMN_TYPE_TREE | |
◆ GUITable()
GUITable::GUITable |
( |
gui::IGUIEnvironment * | env, |
|
|
gui::IGUIElement * | parent, |
|
|
s32 | id, |
|
|
core::rect< s32 > | rectangle, |
|
|
ISimpleTextureSource * | tsrc ) |
◆ ~GUITable()
◆ alignContent()
void GUITable::alignContent |
( |
Cell * | cell, |
|
|
s32 | xmax, |
|
|
s32 | content_width, |
|
|
s32 | align ) |
|
staticprotected |
◆ allocationComplete()
void GUITable::allocationComplete |
( |
| ) |
|
|
protected |
◆ allocImage()
s32 GUITable::allocImage |
( |
const std::string & | imagename | ) |
|
|
protected |
◆ allocString()
s32 GUITable::allocString |
( |
const std::string & | text | ) |
|
|
protected |
◆ autoScroll()
void GUITable::autoScroll |
( |
| ) |
|
|
protected |
◆ checkEvent()
std::string GUITable::checkEvent |
( |
| ) |
|
◆ 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().
◆ closeTree()
void GUITable::closeTree |
( |
s32 | to_close | ) |
|
|
protected |
◆ doesRowStartWith()
bool GUITable::doesRowStartWith |
( |
const Row * | row, |
|
|
const core::stringw & | str ) const |
|
protected |
◆ draw()
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.
◆ drawCell()
void GUITable::drawCell |
( |
const Cell * | cell, |
|
|
video::SColor | color, |
|
|
const core::rect< s32 > & | rowrect, |
|
|
const core::rect< s32 > & | client_clip ) |
|
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().
◆ getCellAt()
s32 GUITable::getCellAt |
( |
s32 | x, |
|
|
s32 | row_i ) const |
|
protected |
◆ getDynamicData()
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.
◆ getOpenedTrees()
void GUITable::getOpenedTrees |
( |
std::set< s32 > & | opened_trees | ) |
const |
|
protected |
◆ getOverrideFont()
IGUIFont * GUITable::getOverrideFont |
( |
| ) |
const |
|
virtual |
Gets the override font (if any)
References m_font.
◆ getRow()
◆ getRowAt()
s32 GUITable::getRowAt |
( |
s32 | y, |
|
|
bool & | really_hovering ) const |
|
protected |
◆ getSelected()
s32 GUITable::getSelected |
( |
| ) |
const |
◆ getTypeName()
const c8 * GUITable::getTypeName |
( |
| ) |
const |
|
virtual |
◆ OnEvent()
bool GUITable::OnEvent |
( |
const SEvent & | event | ) |
|
|
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.
◆ openTree()
void GUITable::openTree |
( |
s32 | to_open | ) |
|
|
protected |
◆ sendTableEvent()
void GUITable::sendTableEvent |
( |
s32 | column, |
|
|
bool | doubleclick ) |
|
protected |
◆ setDynamicData()
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().
◆ setOpenedTrees()
void GUITable::setOpenedTrees |
( |
const std::set< s32 > & | opened_trees | ) |
|
|
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().
◆ setOverrideFont()
void GUITable::setOverrideFont |
( |
gui::IGUIFont * | font = nullptr | ) |
|
|
virtual |
◆ setSelected()
void GUITable::setSelected |
( |
s32 | index | ) |
|
◆ setTable()
void GUITable::setTable |
( |
const TableOptions & | options, |
|
|
const TableColumns & | columns, |
|
|
std::vector< std::string > & | content ) |
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, irr::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, GUITable::Cell::xmax, GUITable::Cell::xmin, and GUITable::Cell::xpos.
Referenced by GUIFormSpecMenu::parseTable(), and setTable().
◆ setTextList()
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().
◆ splitOption()
◆ toggleVisibleTree()
void GUITable::toggleVisibleTree |
( |
s32 | row_i, |
|
|
int | dir, |
|
|
bool | move_selection ) |
|
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().
◆ updateAbsolutePosition()
void GUITable::updateAbsolutePosition |
( |
| ) |
|
|
virtual |
◆ updateScrollBar()
void GUITable::updateScrollBar |
( |
| ) |
|
|
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().
◆ m_alloc_images
std::map<std::string, s32> GUITable::m_alloc_images |
|
protected |
◆ m_alloc_strings
std::map<std::string, s32> GUITable::m_alloc_strings |
|
protected |
◆ m_background
video::SColor GUITable::m_background = video::SColor(255, 0, 0, 0) |
|
protected |
◆ m_border
bool GUITable::m_border = true |
|
protected |
◆ m_color
video::SColor GUITable::m_color = video::SColor(255, 255, 255, 255) |
|
protected |
◆ m_font
gui::IGUIFont* GUITable::m_font = nullptr |
|
protected |
◆ m_has_tree_column
bool GUITable::m_has_tree_column = false |
|
protected |
◆ m_highlight
video::SColor GUITable::m_highlight = video::SColor(255, 70, 100, 50) |
|
protected |
◆ m_highlight_text
video::SColor GUITable::m_highlight_text = video::SColor(255, 255, 255, 255) |
|
protected |
◆ m_images
std::vector<video::ITexture*> GUITable::m_images |
|
protected |
◆ m_is_textlist
bool GUITable::m_is_textlist = false |
|
protected |
◆ m_keynav_buffer
core::stringw GUITable::m_keynav_buffer = L"" |
|
protected |
◆ m_keynav_time
u64 GUITable::m_keynav_time = 0 |
|
protected |
◆ m_rowheight
s32 GUITable::m_rowheight = 1 |
|
protected |
◆ m_rows
std::vector<Row> GUITable::m_rows |
|
protected |
◆ m_scrollbar
◆ m_sel_column
s32 GUITable::m_sel_column = 0 |
|
protected |
◆ m_sel_doubleclick
bool GUITable::m_sel_doubleclick = false |
|
protected |
◆ m_selected
s32 GUITable::m_selected = -1 |
|
protected |
◆ m_strings
std::vector<core::stringw> GUITable::m_strings |
|
protected |
◆ m_tsrc
◆ m_visible_rows
std::vector<s32> GUITable::m_visible_rows |
|
protected |
Referenced by clear(), draw(), getRow(), getRowAt(), getSelected(), OnEvent(), setOpenedTrees(), setSelected(), setTable(), setTextList(), toggleVisibleTree(), and updateScrollBar().
The documentation for this class was generated from the following files: