ArduinoDumbDisplay v0.9.9-r41
DumbDisplay Arduino Library -- https://github.com/trevorwslee/Arduino-DumbDisplay
 
All Classes Functions Variables Pages
Loading...
Searching...
No Matches
SelectionListDDLayer Class Reference

Class for "selection list" layer, like SelectionDDLayer but "selections" can be added and removed dynamically; it can be created with DumbDisplay::createListSelectionLayer() Consider using SelectionListLayerHelper / SelectionListLayerWrapper for richer tracking of the "list". More...

#include <dumbdisplay.h>

Inheritance diagram for SelectionListDDLayer:
SelectionBaseDDLayer DDLayer DDObject

Public Member Functions

 SelectionListDDLayer (int8_t layerId)
 for internal use only
 
void add (int selectionIdx)
 
void remove (int selectionIdx)
 
void offset (int offset)
 set the offset to the "selection" unit start showing
 
void text (int selectionIdx, const String &text, int y=0, const String &align="L")
 
void textCentered (int selectionIdx, const String &text, int y=0)
 set a "selection" unit centered text (of y-th row)
 
void textRightAligned (int selectionIdx, const String &text, int y=0)
 set a "selection" unit right-aligned text (of y-th row)
 
void unselectedText (int selectionIdx, const String &text, int y=0, const String &align="L")
 
void unselectedTextCentered (int selectionIdx, const String &text, int y=0)
 set a "selection" unit centered text (of y-th row) when unselected (it defaults to the same text as selected)
 
void unselectedTextRightAligned (int selectionIdx, const String &text, int y=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 selectionIdx, bool deselectTheOthers=true)
 select a "selection" unit
 
void deselect (int selectionIdx, bool selectTheOthers=false)
 deselect a "selection" unit
 
void selected (int selectionIdx, bool selected, bool reverseTheOthers=false)
 set a "selection" unit selected or not (combination of select() and deselect())
 
- Public Member Functions inherited from SelectionBaseDDLayer
 SelectionBaseDDLayer (int8_t layerId)
 for internal use only
 
void pixelColor (const String &color)
 
void selectAll ()
 select all "selection" units
 
void deselectAll ()
 deselect all "selection" units
 
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 list" layer, like SelectionDDLayer but "selections" can be added and removed dynamically; it can be created with DumbDisplay::createListSelectionLayer() Consider using SelectionListLayerHelper / SelectionListLayerWrapper for richer tracking of the "list".

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

Member Function Documentation

◆ add()

void SelectionListDDLayer::add ( int  selectionIdx)

add (insert) a "selection" unit

Parameters
selectionIdxadd (insert) the selection to index

◆ remove()

void SelectionListDDLayer::remove ( int  selectionIdx)

remove a "selection" unit

Parameters
selectionIdxremove the selection at index

◆ text()

void SelectionListDDLayer::text ( int  selectionIdx,
const String &  text,
int  y = 0,
const String &  align = "L" 
)

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

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

◆ unselectedText()

void SelectionListDDLayer::unselectedText ( int  selectionIdx,
const String &  text,
int  y = 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'