Go to the source code of this file.
|
| enum | buttonRet_t { CANCEL =1,
ENTER,
BACK,
START
} |
| |
| enum | CONTROL_RET {
CONTROL_NOTHING,
CONTROL_CANCEL,
CONTROL_ENTER,
CONTROL_CHANGE,
CONTROL_EXIT,
CONTROL_ERROR
} |
| | Return values for a control. More...
|
| |
| enum | controlType_t {
CONTROL_TEXTLA,
CONTROL_BUTTON,
CONTROL_ENTERNUMBER,
CONTROL_REFRESH,
CONTROL_TERMINATOR
} |
| |
| enum | drawMode_t { CONTROL_DRAW_MODE_NORMAL,
CONTROL_DRAW_MODE_EDIT,
CONTROL_DRAW_MODE_SELECT
} |
| | mode for drawing controls More...
|
| |
◆ CONTROL_ENTER_NUMBER_MAX_SIZE
| #define CONTROL_ENTER_NUMBER_MAX_SIZE 7 |
Maximum size of enterNumber-string (including the 0-Terminator)
◆ enterNumberVariable_t
◆ ctlEnterNumber_t
parameter set for enterNumber()
◆ ctlButton_t
Variables for a button-control.
◆ ctlText_t
Variables for a text-control.
◆ ctlRefresh_t
Variables for an auto-refresh-control.
The structure provides a callback function which has to draw the value. It will be called in regular intervals to actualize its content.
◆ CONTROL_RET
Return values for a control.
| Enumerator |
|---|
| CONTROL_NOTHING | Nothing happened. Only used with enterNumber.
|
| CONTROL_CANCEL | User canceled the input. You should set it back to the value you saved before calling the control for the first time.
|
| CONTROL_ENTER | User completed the input. You can take its value for serious.
|
| CONTROL_CHANGE | The value has changed but neither Enter nor Cancel was pressed. Use it to update a DAC for example.
|
| CONTROL_EXIT | Nothing happened. This is only used with MODE_SELECT.
|
| CONTROL_ERROR | An error occurred. Do not use the input value.
|
◆ buttonRet_t
| Enumerator |
|---|
| CANCEL | |
| ENTER | |
| BACK | |
| START | |
◆ controlType_t
| Enumerator |
|---|
| CONTROL_TEXTLA | Left-adjusted Textvalue.
|
| CONTROL_BUTTON | A Button.
|
| CONTROL_ENTERNUMBER | An enterNumber-type.
|
| CONTROL_REFRESH | An Item that will be refreshed periodically (for displaying real-time-values)
|
| CONTROL_TERMINATOR | Indicating the end of the List.
|
◆ drawMode_t
mode for drawing controls
| Enumerator |
|---|
| CONTROL_DRAW_MODE_NORMAL | The control is drawn as static (not selected and not active)
|
| CONTROL_DRAW_MODE_EDIT | The control is in edit mode.
|
| CONTROL_DRAW_MODE_SELECT | The control is drawn as selected. Pressing enter will change to MODE_EDIT.
|
◆ EnterNumber()
Enter a Number via Keyboard and/or Encoder.
- Parameters
-
| val | Pointer to input data structure |
| mode | The draw mode |
- Returns
- see CONTROL_RET
The value-member must be set to a default value before calling this function. The value is a pattern consisting of digits and optionally a period. The length of the pattern is constant and the period cannot be moved. The period must not be the very first or last character! The user then may modify the value. If return is != CONTROL_ENTER the value should not be used since it may have been erroneously modified by the user.
If return is CONTROL_CHANGE you may process the change but should call the function again (with the same val) to allow the user to continue with his input.
To keep this function non-blocking it will return CONRTOL_NOTHING if no key- or encoder event is pending. Call it again as soon as you find time to until it returns CONTROL_ENTER or CONTROL_CANCEL. You can specify a change-callback function which is called every time the value is changed by the encoder.
◆ EnterNumberSetValue()
Sets the Value.
- Parameters
-
| ctl | The address of the EnterNumber struct |
| val | The desired Value |
◆ EnterNumberSaveValue()
Saves the Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel.
This function must be called when the user enters the control.
- Parameters
-
| val | Pointer to enterNumber-struct |
◆ EnterNumberRestoreValue()
Restores the old Value of the Input Field Purpose is to reset it to the original value when the user exits the control with cancel.
This function must be called when the user exits the control with the cancel key.
- Parameters
-
| val | Pointer to enterNumber-struct |
◆ cursorOn
True if the Cursor has to be displayed.
◆ cursorPos
Actual position of the Cursor (0=Left)