JM9 XRCU Board 0.1.3a
Libraries API Reference
Loading...
Searching...
No Matches
dsgc::Component Class Reference
Inheritance diagram for dsgc::Component:
dsgc::Dimensions dsgc::Checkbox dsgc::Label dsgc::PortSelector dsgc::RadioButton dsgc::Scrollbar dsgc::HorizontalScrollbar dsgc::VerticalScrollbar

Public Member Functions

virtual void setEnabled (bool enabled)
 Sets whether this component is enabled.
 
virtual bool isEnabled ()
 Checks whether this component is enabled.
 
virtual void setFocused (bool focused)
 
virtual bool isFocused ()
 Checks whether this component has focus.
 
virtual Color getBackgroundColor ()
 Gets the background color when enabled but not focused.
 
virtual Color getForegroundColor ()
 Gets the foreground color when enabled but not focused.
 
virtual Color getBorderColor ()
 Gets the border color when enabled but not focused.
 
virtual Color getDisabledBackgroundColor ()
 Gets the background color when disabled.
 
virtual Color getDisabledForegroundColor ()
 Gets the foreground color when disabled.
 
virtual Color getDisabledBorderColor ()
 Gets the border color when disabled.
 
virtual Color getFocusedBackgroundColor ()
 Gets the background color when enabled and focused.
 
virtual Color getFocusedForegroundColor ()
 Gets the foreground color when enabled and focused.
 
virtual Color getFocusedBorderColor ()
 Gets the border color when enabled and focused.
 
virtual void setBackgroundColor (Color color)
 
virtual void setForegroundColor (Color color)
 
virtual void setBorderColor (Color color)
 
virtual void setDisabledBackgroundColor (Color color)
 
virtual void setDisabledForegroundColor (Color color)
 
virtual void setDisabledBorderColor (Color color)
 
virtual void setFocusedBackgroundColor (Color color)
 
virtual void setFocusedForegroundColor (Color color)
 
virtual void setFocusedBorderColor (Color color)
 
virtual void paint ()
 Paints this component.
 
virtual void repaint ()
 Repaints this component.
 
- Public Member Functions inherited from dsgc::Dimensions
unsigned int getX ()
 
unsigned int getY ()
 
unsigned int getWidth ()
 
unsigned int getHeight ()
 

Protected Member Functions

 Component (Adafruit_GFX &graphics, unsigned int x, unsigned int y, unsigned int width, unsigned int height)
 
virtual Adafruit_GFXgetGraphics ()
 
virtual Color getCurrentBackgroundColor ()
 
virtual Color getCurrentForegroundColor ()
 
virtual Color getCurrentBorderColor ()
 
- Protected Member Functions inherited from dsgc::Dimensions
 Dimensions (unsigned int x, unsigned int y, unsigned int width, unsigned int height)
 

Member Function Documentation

◆ getBackgroundColor()

dsgc::Color dsgc::Component::getBackgroundColor ( )
virtual

Gets the background color when enabled but not focused.

Returns
The background color.

◆ getBorderColor()

dsgc::Color dsgc::Component::getBorderColor ( )
virtual

Gets the border color when enabled but not focused.

Returns
The border color.

◆ getDisabledBackgroundColor()

dsgc::Color dsgc::Component::getDisabledBackgroundColor ( )
virtual

Gets the background color when disabled.

Returns
The background color when disabled.

◆ getDisabledBorderColor()

dsgc::Color dsgc::Component::getDisabledBorderColor ( )
virtual

Gets the border color when disabled.

Returns
The border color when disabled.

◆ getDisabledForegroundColor()

dsgc::Color dsgc::Component::getDisabledForegroundColor ( )
virtual

Gets the foreground color when disabled.

Returns
The foreground color when disabled.

◆ getFocusedBackgroundColor()

dsgc::Color dsgc::Component::getFocusedBackgroundColor ( )
virtual

Gets the background color when enabled and focused.

Returns
The background color when enabled and focused.

◆ getFocusedBorderColor()

dsgc::Color dsgc::Component::getFocusedBorderColor ( )
virtual

Gets the border color when enabled and focused.

Returns
The border color when enabled and focused.

◆ getFocusedForegroundColor()

dsgc::Color dsgc::Component::getFocusedForegroundColor ( )
virtual

Gets the foreground color when enabled and focused.

Returns
The foreground color when enabled and focused.

◆ getForegroundColor()

dsgc::Color dsgc::Component::getForegroundColor ( )
virtual

Gets the foreground color when enabled but not focused.

Returns
The foreground color.

◆ isEnabled()

bool dsgc::Component::isEnabled ( )
virtual

Checks whether this component is enabled.

Returns
true if this component is enabled, false otherwise.

◆ isFocused()

bool dsgc::Component::isFocused ( )
virtual

Checks whether this component has focus.

Returns
true if this component is focused, false otherwise.
Note
Focus is lost when disabled.

◆ paint()

void dsgc::Component::paint ( )
virtual

Paints this component.

Override this function to implement the specifics of the actual component. In the overriding function, it is a must to call this parent function.

Reimplemented in dsgc::Checkbox, dsgc::Label, dsgc::PortSelector, dsgc::RadioButton, and dsgc::Scrollbar.

◆ repaint()

void dsgc::Component::repaint ( )
virtual

Repaints this component.

This function will only paint after paint() is called.

See also
paint()

◆ setEnabled()

void dsgc::Component::setEnabled ( bool enabled)
virtual

Sets whether this component is enabled.

Parameters
enabledtrue to enable this component, false to disable.

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