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

Public Member Functions

 VerticalScrollbar (Adafruit_GFX &graphics, unsigned int x, unsigned int y, unsigned int trackLength, double knobRelativeSize)
 
- Public Member Functions inherited from dsgc::Scrollbar
virtual void paint () override
 Paints this component.
 
void setKnobRelativePosition (float relativePosition)
 Sets the relative position of the knob in this scrollbar.
 
float getKnobRelativePosition ()
 Gets the relative position of the knob in this scrollbar.
 
- Public Member Functions inherited from dsgc::Component
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 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

virtual unsigned int getKnobY () override
 Gets the y-coordinate of the top-left corner of the knob.
 
virtual unsigned int getKnobHeight () override
 Gets the height of the knob.
 
- Protected Member Functions inherited from dsgc::Scrollbar
 Scrollbar (Adafruit_GFX &graphics, unsigned int x, unsigned int y, unsigned int width, unsigned int height, unsigned int trackLength, double knobRelativeSize)
 
unsigned int getKnobLength ()
 
unsigned int getKnobPositionOffset ()
 
virtual unsigned int getKnobX ()
 Gets the x-coordinate of the top-left corner of the knob.
 
virtual unsigned int getKnobWidth ()
 Gets the width of the knob.
 
- Protected Member Functions inherited from dsgc::Component
 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)
 

Additional Inherited Members

- Static Protected Attributes inherited from dsgc::Scrollbar
static const unsigned int KNOB_RADIUS = 2
 
static const unsigned int KNOB_WIDTH = KNOB_RADIUS * 2 + 1
 
static const unsigned int BORDER_RADIUS = KNOB_RADIUS + 2
 
static const unsigned int BORDER_WIDTH = BORDER_RADIUS * 2 + 1
 

Member Function Documentation

◆ getKnobHeight()

unsigned int dsgc::VerticalScrollbar::getKnobHeight ( )
overrideprotectedvirtual

Gets the height of the knob.

This implementation gives the fixed knob width by default. Override this function in subclass to give the knob length.

Returns
The height of the knob.

Reimplemented from dsgc::Scrollbar.

◆ getKnobY()

unsigned int dsgc::VerticalScrollbar::getKnobY ( )
overrideprotectedvirtual

Gets the y-coordinate of the top-left corner of the knob.

This implementation does not account for the position offset. Override this function in subclass to account for the position offset if needed.

Reimplemented from dsgc::Scrollbar.


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