40 #include <nuttx/config.h> 45 #include <nuttx/nx/nx.h> 46 #include <nuttx/nx/nxglib.h> 58 #define BUTTONARRAY_NCOLUMNS 4 59 #define BUTTONARRAY_NROWS 7 67 static FAR
const char *
g_alphaLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = {
68 "=>",
"A",
"B",
"<DEL",
77 static FAR
const char *
g_numLabels[BUTTONARRAY_NCOLUMNS*BUTTONARRAY_NROWS] = {
78 "=>",
"0",
"1",
"<DEL",
106 nxgl_coord_t x, nxgl_coord_t y,
107 nxgl_coord_t width, nxgl_coord_t height,
109 :
CButtonArray(pWidgetControl, x, y, 4, 7, width / BUTTONARRAY_NCOLUMNS,
110 height / BUTTONARRAY_NROWS, style)
146 if (column == 0 && row == 0)
154 else if (column == 3 && row == 0)
156 ch = KEY_CODE_BACKSPACE;
163 int index = row * BUTTONARRAY_NCOLUMNS + column;
196 for (
int j = 0; j < BUTTONARRAY_NROWS; j++)
198 for (
int i = 0; i < BUTTONARRAY_NCOLUMNS; i++)
nxgl_coord_t m_buttonHeight
virtual bool isButtonClicked(int &column, int &row) const
nxgl_coord_t m_buttonWidth
void setKeypadMode(bool numeric)
virtual void onTextChange(void)
bool resize(nxgl_coord_t width, nxgl_coord_t height)
CWidgetControl * m_widgetControl
static FAR const char * g_alphaLabels[BUTTONARRAY_NCOLUMNS *BUTTONARRAY_NROWS]
void newCursorControlEvent(ECursorControl cursorControl)
void configureKeypadMode(void)
static FAR const char * g_numLabels[BUTTONARRAY_NCOLUMNS *BUTTONARRAY_NROWS]
virtual void onClick(nxgl_coord_t x, nxgl_coord_t y)
CKeypad(const CKeypad &keypad)
virtual void onClick(nxgl_coord_t x, nxgl_coord_t y)