ArduinoDumbDisplay v0.9.9-r34
DumbDisplay Arduino Library -- https://github.com/trevorwslee/Arduino-DumbDisplay
 
Loading...
Searching...
No Matches
SelectionDDLayer Class Reference

Class for "selection" layer of multiple LCD-like "selection" units; created with DumbDisplay::createSelectionLayer() More...

#include <dumbdisplay.h>

Inheritance diagram for SelectionDDLayer:
DDLayer DDObject

Public Member Functions

 SelectionDDLayer (int8_t layerId)
 for internal use only
 
void pixelColor (const String &color)
 
void text (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0, const String &align="L")
 
void textCentered (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0)
 set a "selection" unit centered text (of y-th row)
 
void textRightAligned (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0)
 set a "selection" unit right-aligned text (of y-th row)
 
void unselectedText (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0, const String &align="L")
 
void unselectedTextCentered (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0)
 set a "selection" unit centered text (of y-th row) when unselected (it defaults to the same text as selected)
 
void unselectedTextRightAligned (const String &text, int y=0, int horiSelectionIdx=0, int vertSelectionIdx=0)
 set a "selection" unit right-aligned text (of y-th row) when unselected (it defaults to the same text as selected)
 
void select (int horiSelectionIdx=0, int vertSelectionIdx=0, bool deselectTheOthers=true)
 select a "selection" unit
 
void deselect (int horiSelectionIdx=0, int vertSelectionIdx=0, bool selectTheOthers=false)
 deselect a "selection" unit
 
void selectAll ()
 select all "selection" units
 
void deselectAll ()
 deselect all "selection" units
 
void selected (bool selected, int horiSelectionIdx=0, int vertSelectionIdx=0, bool reverseTheOthers=false)
 set a "selection" unit selected or not
 
void highlightBorder (bool forSelected, const String &borderColor="", const String &borderShape="")
 
- Public Member Functions inherited from DDLayer
void border (float size, const String &color, const String &shape="flat", float extraSize=0)
 
void noBorder ()
 
void padding (float size)
 
void padding (float left, float top, float right, float bottom)
 
void noPadding ()
 
void margin (float size)
 
void margin (float left, float top, float right, float bottom)
 
void noMargin ()
 
void backgroundColor (const String &color, int opacity=100)
 
void noBackgroundColor ()
 
void visible (bool visible)
 
void transparent (bool transparent)
 
void disabled (bool disabled=true)
 
void opacity (int opacity)
 
void alpha (int alpha)
 
void blend (const String &color, int alpha=255, const String &mode="darken")
 
void noblend ()
 
void clear ()
 clear the layer
 
void flash ()
 normally used for "feedback" – flash the default way (layer + border)
 
void flashArea (int x, int y)
 normally used for "feedback" – flash the area (x, y) where the layer is clicked
 
void explicitFeedback (int16_t x=0, int16_t y=0, const String &text="", DDFeedbackType type=CLICK, const String &option="")
 
const String & getLayerId () const
 
void setFeedbackHandler (DDFeedbackHandler handler, const String &autoFeedbackMethod="", const String &allowFeedbackTypes="")
 
void enableFeedback (const String &autoFeedbackMethod="", const String &allowFeedbackTypes="")
 
void disableFeedback ()
 disable "feedback"
 
const DDFeedbackgetFeedback ()
 
void debugOnly (int i)
 for debug use
 
DDFeedbackManager * getFeedbackManager () const
 
DDFeedbackHandler getFeedbackHandler () const
 

Additional Inherited Members

- Public Attributes inherited from DDObject
int8_t objectType
 object type – DD_OBJECT_TYPE_LAYER or DD_OBJECT_TYPE_TUNNEL
 
String customData
 custom data
 
- Protected Member Functions inherited from DDLayer
 DDLayer (int8_t layerId)
 
void _enableFeedback ()
 
- Protected Attributes inherited from DDLayer
String layerId
 
DDFeedbackManager * pFeedbackManager
 
DDFeedbackHandler feedbackHandler
 

Detailed Description

Class for "selection" layer of multiple LCD-like "selection" units; created with DumbDisplay::createSelectionLayer()

Note
by default, it has "feedback" enabled to indicate which "selection" unit is clicked
Since
v0.9.9-r10

Member Function Documentation

◆ highlightBorder()

void SelectionDDLayer::highlightBorder ( bool  forSelected,
const String &  borderColor = "",
const String &  borderShape = "" 
)

set selected / unselected "selection" unit border characteristics

Parameters
borderColorDD_COLOR_XXX; DD_RGB_COLOR(...); can also be common "color name"; "" means default
borderShapecan be "flat", "hair", "round", "raised" or "sunken"; "" means default

◆ pixelColor()

void SelectionDDLayer::pixelColor ( const String &  color)

set pixel color

Parameters
colorDD_RGB_COLOR(...) or common color name

◆ text()

void SelectionDDLayer::text ( const String &  text,
int  y = 0,
int  horiSelectionIdx = 0,
int  vertSelectionIdx = 0,
const String &  align = "L" 
)

set a "selection" unit text (of y-th row)

Parameters
align'L', 'C', or 'R'

◆ unselectedText()

void SelectionDDLayer::unselectedText ( const String &  text,
int  y = 0,
int  horiSelectionIdx = 0,
int  vertSelectionIdx = 0,
const String &  align = "L" 
)

set a "selection" unit text (of y-th row) when unselected (it defaults to the same text as selected)

Parameters
align'L', 'C', or 'R'