Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
gva::WidgetTable Class Reference

A widget representing a table of elements. More...

#include <table.h>

Inheritance diagram for gva::WidgetTable:
Inheritance graph
Collaboration diagram for gva::WidgetTable:
Collaboration graph

Public Member Functions

 WidgetTable (const RendererGva &renderer, TouchGva *touch, uint32_t background_colour=0x000000)
 Construct a new Widget Table object.
 
 ~WidgetTable () override=default
 Destroy the Widget Keyboard object.
 
std::string GetWidgetName () const override
 Get the Widget Name attribute.
 
void Draw () override
 The base class override to draw the table once setup.
 
virtual void AddRow (uint32_t foreground_colour, uint32_t background_colour, uint32_t outline_colour, uint32_t highlight_colour, widget::WeightType font_weight)
 Add a row to the table.
 
virtual void AddRow ()
 Add a row to the table.
 
virtual void AddRow (widget::WeightType font_weight)
 Add a row to the table.
 
virtual void AddCell (const std::string text, uint32_t width)
 Add a basic cell.
 
virtual void AddCell (const std::string text, uint32_t width, uint32_t background_colour)
 Add a new cell with background colour.
 
virtual void AddCell (const std::string text, uint32_t width, widget::CellAlignType align)
 Add a new cell specifying alignment.
 
virtual void AddCell (const std::string text, uint32_t width, widget::CellAlignType align, uint32_t background_colour)
 Add a new cell specifying alignment.
 
void Reset ()
 Reset the table.
 
uint32_t GetBackgroundColour () const
 Get the Background Colour attribute.
 
void SetBackgroundColour (uint32_t background_colour)
 Set the Background Colour attribute.
 
void SetCurrentRow (uint32_t row)
 Set the Current selected row, will be highlighted in the theme colours.
 
void SetNextRow ()
 Set the Next Row attribute.
 
void SetPreviousRow ()
 Set the Previous Row attribute.
 
uint32_t GetCurrentRow () const
 Get the Current selected highlighted row.
 
std::vector< RowType > & GetRows ()
 Get the Rows vector.
 
void SetRows (const std::vector< RowType > &rows)
 Get the all the Rows in supplie vector.
 
- Public Member Functions inherited from gva::WidgetX
 WidgetX (const RendererGva &renderer, widget::WidgetEnum widget_type)
 Construct a new Widget X object.
 
virtual widget::WidgetEnum GetWidgetType () const
 Get the Widget Type attribute.
 
void SetVisible (bool visible)
 Set the Visible object.
 
bool GetVisible () const
 Get the Visible object.
 
virtual void SetX (uint32_t x)
 Set the X dimension.
 
uint32_t GetX () const
 Get the Y dimension.
 
virtual void SetY (uint32_t y)
 Set the Y dimension.
 
uint32_t GetY () const
 Get the Y dimension.
 
void SetWidth (uint32_t width)
 Set the Width.
 
uint32_t GetWidth () const
 Get the Width.
 
void SetHeight (uint32_t width)
 Set the Height.
 
uint32_t GetHeight () const
 Get the Height.
 
widget::WidgetEnum GetType () const
 Get the Type object.
 
RendererGvaGetRenderer () const
 Get the Renderer object.
 
void SetStateText (LabelStates state)
 Set the State Text of an on screen label.
 
void SetStateLabel (const LabelStates state)
 Set the State Label object.
 
uint32_t GetStateTextColour (LabelStates state) const
 Get the State Text Colour object.
 

Additional Inherited Members

- Data Fields inherited from gva::WidgetX
uint32_t x_ = 0
 The widget x location in pixels.
 
uint32_t y_ = 0
 The widget y location in pixels.
 
uint32_t width_ = 0
 The widget width in pixels.
 
uint32_t height_ = 0
 The widget height in pixels.
 

Detailed Description

A widget representing a table of elements.

Constructor & Destructor Documentation

◆ WidgetTable()

gva::WidgetTable::WidgetTable ( const RendererGva renderer,
TouchGva touch,
uint32_t  background_colour = 0x000000 
)
explicit

Construct a new Widget Table object.

Parameters
rendererthe renderer
touchthe touch object
background_colourthe background colour

Member Function Documentation

◆ AddCell() [1/4]

void gva::WidgetTable::AddCell ( const std::string  text,
uint32_t  width 
)
virtual

Add a basic cell.

widgets

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels

Reimplemented in gva::WidgetTableDynamic.

◆ AddCell() [2/4]

void gva::WidgetTable::AddCell ( const std::string  text,
uint32_t  width,
uint32_t  background_colour 
)
virtual

Add a new cell with background colour.

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels
background_colourCell background colour

Reimplemented in gva::WidgetTableDynamic.

◆ AddCell() [3/4]

void gva::WidgetTable::AddCell ( const std::string  text,
uint32_t  width,
widget::CellAlignType  align 
)
virtual

Add a new cell specifying alignment.

Parameters
textThe text to be contained in the cell
widthThe width of the ctable_
alignAlignment CellAlignType

Reimplemented in gva::WidgetTableDynamic.

◆ AddCell() [4/4]

void gva::WidgetTable::AddCell ( const std::string  text,
uint32_t  width,
widget::CellAlignType  align,
uint32_t  background_colour 
)
virtual

Add a new cell specifying alignment.

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels
alignAlignment CellAlignType::
background_colourCell background colour

Reimplemented in gva::WidgetTableDynamic.

◆ AddRow() [1/3]

void gva::WidgetTable::AddRow ( )
virtual

Add a row to the table.

Reimplemented in gva::WidgetTableDynamic.

◆ AddRow() [2/3]

void gva::WidgetTable::AddRow ( uint32_t  foreground_colour,
uint32_t  background_colour,
uint32_t  outline_colour,
uint32_t  highlight_colour,
widget::WeightType  font_weight 
)
virtual

Add a row to the table.

Parameters
foreground_colourForeground colour
background_colourBackground colour
outline_colourOutline colour
highlight_colourHighlight colour
font_weightThe font weight

Reimplemented in gva::WidgetTableDynamic.

◆ AddRow() [3/3]

void gva::WidgetTable::AddRow ( widget::WeightType  font_weight)
virtual

Add a row to the table.

Parameters
font_weightThe font weight

Reimplemented in gva::WidgetTableDynamic.

◆ Draw()

void gva::WidgetTable::Draw ( )
overridevirtual

The base class override to draw the table once setup.

Implements gva::WidgetX.

Reimplemented in gva::WidgetTableDynamic.

◆ GetBackgroundColour()

uint32_t gva::WidgetTable::GetBackgroundColour ( ) const

Get the Background Colour attribute.

Returns
uint32_t

◆ GetCurrentRow()

uint32_t gva::WidgetTable::GetCurrentRow ( ) const

Get the Current selected highlighted row.

Parameters
row
Returns
uint32_t

◆ GetRows()

std::vector< RowType > & gva::WidgetTable::GetRows ( )

Get the Rows vector.

Returns
std::vector<RowType>&

◆ GetWidgetName()

std::string gva::WidgetTable::GetWidgetName ( ) const
inlineoverridevirtual

Get the Widget Name attribute.

Returns
std::string

Implements gva::WidgetX.

Reimplemented in gva::WidgetTableDynamic.

◆ SetBackgroundColour()

void gva::WidgetTable::SetBackgroundColour ( uint32_t  background_colour)

Set the Background Colour attribute.

Parameters
background_colour

◆ SetCurrentRow()

void gva::WidgetTable::SetCurrentRow ( uint32_t  row)

Set the Current selected row, will be highlighted in the theme colours.

Parameters
row

◆ SetRows()

void gva::WidgetTable::SetRows ( const std::vector< RowType > &  rows)

Get the all the Rows in supplie vector.

Parameters
rows

The documentation for this class was generated from the following files: