CheeseBoard
A library for use with the CheeseBoard Cheddar platform
|
Public Member Functions | |
GfxSSIDListBox (uint16_t x=0, uint16_t y=0) | |
int16_t | add (const GfxNetInfo s) |
bool | remove (const uint8_t idx, bool compactAfter=true) |
void | draw (uint16_t xOffset=0, uint16_t yOffset=0) |
uint16_t | width () |
uint16_t | height () |
uint16_t | lineHeight () |
GfxNetInfo * | operator[] (int16_t idx) |
GfxNetInfo * | operator[] (const String &ssid) |
int16_t | find (const String &ssid, uint8_t n=1) |
bool | select (int16_t idx) |
int16_t | selected () |
uint8_t | scrollDown (uint8_t rows) |
uint8_t | scrollUp (uint8_t rows) |
bool | scrollTo (uint8_t idx) |
int16_t | update (String ssid, int8_t channel, uint8_t signal) |
int16_t | findNext (uint8_t from=0) |
int16_t | findPreceding (uint8_t from=MaxItems) |
uint8_t | count () |
Static Public Attributes | |
static const uint8_t | MaxItems = 32 |
Protected Member Functions | |
int16_t | findGap (uint8_t startAt=0) |
bool | isCompacted () |
Sort the items contained in the list box using quicksort. More... | |
void | compact () |
Make used items contiguous (remove gaps) More... | |
bool | isOnScreen (uint8_t idx) |
uint8_t | rowsFrom (uint8_t idx) |
Protected Attributes | |
GfxNetInfo * | _items [MaxItems] |
int16_t | _selected |
uint8_t | _screenLines |
uint8_t | _screenStart |
uint8_t | _lineHeight |
Definition at line 8 of file GfxSSIDListBox.h.
int16_t GfxSSIDListBox::add | ( | const GfxNetInfo | s | ) |
Adds a string item to the list box at the first free entry.
s | the string to add to the list box. |
Definition at line 33 of file GfxSSIDListBox.cpp.
|
protected |
Make used items contiguous (remove gaps)
Make used items contiguous (remove gaps).
Definition at line 188 of file GfxSSIDListBox.cpp.
uint8_t GfxSSIDListBox::count | ( | ) |
Get number of items in list.
Definition at line 146 of file GfxSSIDListBox.cpp.
|
virtual |
Draw the GfxSSIDListBox (do not send buffer to CbOledDisplay) Items contains NULL strings will not be displayed
Implements GfxItem.
Definition at line 65 of file GfxSSIDListBox.cpp.
int16_t GfxSSIDListBox::find | ( | const String & | ssid, |
uint8_t | n = 1 |
||
) |
ssid | the SSID of the object to find |
n | the nth instance to search for |
Definition at line 157 of file GfxSSIDListBox.cpp.
|
protected |
Find the next free slot.
startAt | index to start looking for gaps at. |
Definition at line 111 of file GfxSSIDListBox.cpp.
int16_t GfxSSIDListBox::findNext | ( | uint8_t | from = 0 | ) |
Find next.
from | the index to search from. |
Definition at line 122 of file GfxSSIDListBox.cpp.
int16_t GfxSSIDListBox::findPreceding | ( | uint8_t | from = MaxItems | ) |
Find preceeding.
from | the index to search from. |
Definition at line 132 of file GfxSSIDListBox.cpp.
|
virtual |
Get object height.
Implements GfxItem.
Definition at line 87 of file GfxSSIDListBox.cpp.
|
protected |
Sort the items contained in the list box using quicksort.
Sort the items contained in the list box using quicksort.
Discover compactedness state.
Definition at line 174 of file GfxSSIDListBox.cpp.
|
protected |
Find out if idx is currently visible on screen.
Definition at line 221 of file GfxSSIDListBox.cpp.
GfxNetInfo * GfxSSIDListBox::operator[] | ( | int16_t | idx | ) |
Get an GfxNetInfo pointer by index
idx | the index of the item to fetch |
Definition at line 92 of file GfxSSIDListBox.cpp.
GfxNetInfo * GfxSSIDListBox::operator[] | ( | const String & | ssid | ) |
Get in GfxNetInfo pointer by SSID
siid | the SSID of the item to fetch |
Definition at line 101 of file GfxSSIDListBox.cpp.
bool GfxSSIDListBox::remove | ( | const uint8_t | idx, |
bool | compactAfter = true |
||
) |
Remove item at index idx.
idx | the index of the item to remove |
compactAfter | if true, compact() will be called after the item is removed |
Definition at line 44 of file GfxSSIDListBox.cpp.
|
protected |
Find out how many rows after there from idx on (which are non-NULL).
Definition at line 235 of file GfxSSIDListBox.cpp.
uint8_t GfxSSIDListBox::scrollDown | ( | uint8_t | rows | ) |
Scroll down the display a number of rows
Definition at line 246 of file GfxSSIDListBox.cpp.
bool GfxSSIDListBox::scrollTo | ( | uint8_t | idx | ) |
Scrolls the displayed items until idx is displayed. Note: if idx is currently displayed, no scrolling is performed
Definition at line 280 of file GfxSSIDListBox.cpp.
uint8_t GfxSSIDListBox::scrollUp | ( | uint8_t | rows | ) |
Scroll up the display a number of rows
Definition at line 265 of file GfxSSIDListBox.cpp.
bool GfxSSIDListBox::select | ( | int16_t | idx | ) |
Select item at index idx
idx | the index of the item to select, or -1 to de-select |
Definition at line 204 of file GfxSSIDListBox.cpp.
int16_t GfxSSIDListBox::selected | ( | ) |
Definition at line 216 of file GfxSSIDListBox.cpp.
int16_t GfxSSIDListBox::update | ( | String | ssid, |
int8_t | channel, | ||
uint8_t | signal | ||
) |
Update the signal strength and channel for a specified ssid.
If the SSID doesn't exist, it will be added to the first available slot in the list.
ssid | The SSID of the network to update/add. |
channel | the channel of the network. |
signal | the signal strength expressed as a percentage. |
Definition at line 299 of file GfxSSIDListBox.cpp.
|
virtual |
Get object width.
Implements GfxItem.
Definition at line 82 of file GfxSSIDListBox.cpp.