#include <DataGrid.h>
Description
Built-in Entity for drawing a grid of values.
Functions | |
void | AddColumn (const std::string &title, int width, const Color &color=Color("#EFEFEF")) |
void | SetColumnWidth (uint32_t column, uint32_t width) |
void | AddRow () |
void | RemoveRow (uint32_t) |
void | SetRowsVisible (uint32_t) |
uint32_t | GetRowCount () |
void | Clear () |
std::string & | Get (uint32_t x, uint32_t y) |
std::string & | GetTooltip (uint32_t y) |
void | SetViewPosition (uint32_t i) |
uint32_t | GetViewPosition () |
uint32_t | GetMaxViewPosition () |
uint32_t | GetRowsVisible () |
uint32_t | Width () |
uint32_t | RowHeight () |
![]() | |
const std::vector< Entity::ID > & | GetChildren () const |
std::vector< Entity::ID > | GetAllSubEntities () const |
bool | Contains (Entity::ID) |
std::vector< Entity::ID > | FindChildByName (const std::string &) |
void | Step () |
void | Draw () |
void | Attach (Entity::ID) |
void | Detach (Entity::ID) |
template<typename T > | |
T * | CreateChild () |
int | GetNumChildren () |
double | StepDuration () |
double | DrawDuration () |
void | SetPriority (Priority p) |
void | SetPriorityLast () |
void | SetPriorityFirst () |
Priority | GetPriority () |
Entity & | GetParent () |
bool | HasParent () |
void | Remove () |
void | SetName (const std::string &name) |
ID | GetID () |
std::string | GetName () |
void | Watch (Variable v) |
Variable | GetWatched (const std::string &name) |
std::vector< Variable > | GetWatchedVars () |
void | Unwatch (const std::string &varName) |
template<typename T > | |
T * | AddComponent (UpdateClass when=UpdateClass::Before) |
template<typename T > | |
T * | QueryComponent () |
const std::vector< Component * > & | GetComponents () const |
void | RemoveComponent (const std::string &tag) |
void | RemoveComponent (const Component *) |
bool | IsStepping () |
bool | IsDrawing () |
Properties | |
Color | backgroundEvenColor |
Color | backgroundOddColor |
Color | titleColor |
Component::EventHandler | clickCallback |
![]() | |
bool | step |
bool | draw |
Additional Inherited Members | |
![]() | |
enum | UpdateClass { Before, After } |
![]() | |
template<typename T > | |
static Entity::ID | Create () |
static Entity::ID | Create () |
template<typename T > | |
static T * | CreateReference () |
static std::vector< Entity::ID > | GetAll () |
![]() | |
virtual void | OnEnter () |
virtual void | OnDepart () |
virtual void | OnRemove () |
virtual void | OnPreStep () |
virtual void | OnPreDraw () |
virtual void | OnDraw () |
Member Function Documentation
Adds a new column with a title, a specified width, and an optional color for the text.
void SetColumnWidth | ( | uint32_t | column, |
uint32_t | width | ||
) |
Sets the width in pixels for the specified column.
void AddRow | ( | ) |
Appends a new row to the grid.
void RemoveRow | ( | uint32_t | ) |
removes the specified row by index.
void SetRowsVisible | ( | uint32_t | ) |
Will only draw display up to the given number of rows.
uint32_t GetRowCount | ( | ) |
Returns the number of rows.
void Clear | ( | ) |
Clears all rows.
std::string& Get | ( | uint32_t | x, |
uint32_t | y | ||
) |
Returns the string @ the column and row given.
std::string& GetTooltip | ( | uint32_t | y | ) |
Returns the tooltip string @ the row given.
Tooltips are messages that hover over the mouse when the pointer is at the specific row.
void SetViewPosition | ( | uint32_t | i | ) |
Sets the initial viewing row.
uint32_t GetViewPosition | ( | ) |
Returns the current viewing index at the top. 0 is the default (aka the first row)
uint32_t GetMaxViewPosition | ( | ) |
Returns the maximum currently allowable viewing position based on the current DataGrid parameters.
uint32_t GetRowsVisible | ( | ) |
Returns the currently viewable number of rows at a time.
uint32_t Width | ( | ) |
Returns the row in pixels.
uint32_t RowHeight | ( | ) |
Returns the height of a row.
Field Documentation
Color backgroundEvenColor |
Background color for even-count cells.
Color backgroundOddColor |
Background color for odd-count cells.
Component::EventHandler clickCallback |
Callback called when a cell is clicked.
The first member of args is the row clicked as an integer.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/BuiltIn/DataGrid.h