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

Class defining the base widget. More...

#include <widget.h>

Inheritance diagram for gva::WidgetX:
Inheritance graph
Collaboration diagram for gva::WidgetX:
Collaboration graph

Public Member Functions

 WidgetX (const RendererGva &renderer, widget::WidgetEnum widget_type)
 Construct a new Widget X object.
 
virtual std::string GetWidgetName () const =0
 Get the Widget Name attribute.
 
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.
 
virtual void Draw ()=0
 Draw the widget.
 
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.
 

Data Fields

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

Class defining the base widget.

Constructor & Destructor Documentation

◆ WidgetX()

gva::WidgetX::WidgetX ( const RendererGva renderer,
widget::WidgetEnum  widget_type 
)
explicit

Construct a new Widget X object.

Parameters
rendererThe underlying renderer, should be cairo
widget_typeThe type of widget

Member Function Documentation

◆ Draw()

◆ GetHeight()

uint32_t gva::WidgetX::GetHeight ( ) const

Get the Height.

Returns
uint32_t

◆ GetRenderer()

RendererGva * gva::WidgetX::GetRenderer ( ) const

Get the Renderer object.

Returns
RendererGva&

◆ GetStateTextColour()

uint32_t gva::WidgetX::GetStateTextColour ( LabelStates  state) const

Get the State Text Colour object.

Parameters
state
Returns
uint32_t

◆ GetType()

widget::WidgetEnum gva::WidgetX::GetType ( ) const

Get the Type object.

Returns
WidgetEnum

◆ GetVisible()

bool gva::WidgetX::GetVisible ( ) const

Get the Visible object.

Returns
true
false

◆ GetWidgetName()

◆ GetWidgetType()

widget::WidgetEnum gva::WidgetX::GetWidgetType ( ) const
virtual

Get the Widget Type attribute.

Returns
std::string

◆ GetWidth()

uint32_t gva::WidgetX::GetWidth ( ) const

Get the Width.

Returns
uint32_t

◆ GetX()

uint32_t gva::WidgetX::GetX ( ) const

Get the Y dimension.

Returns
uint32_t

◆ GetY()

uint32_t gva::WidgetX::GetY ( ) const

Get the Y dimension.

Returns
uint32_t

◆ SetHeight()

void gva::WidgetX::SetHeight ( uint32_t  width)

Set the Height.

Parameters
width

◆ SetStateLabel()

void gva::WidgetX::SetStateLabel ( const LabelStates  state)

Set the State Label object.

Parameters
state

◆ SetStateText()

void gva::WidgetX::SetStateText ( LabelStates  state)

Set the State Text of an on screen label.

Parameters
state

◆ SetVisible()

void gva::WidgetX::SetVisible ( bool  visible)

Set the Visible object.

Parameters
visible

◆ SetWidth()

void gva::WidgetX::SetWidth ( uint32_t  width)

Set the Width.

Parameters
width

◆ SetX()

void gva::WidgetX::SetX ( uint32_t  x)
virtual

Set the X dimension.

Parameters
x

◆ SetY()

void gva::WidgetX::SetY ( uint32_t  y)
virtual

Set the Y dimension.

Parameters
y

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