Detect up-arrow and down-arrow key strokes via the Printer
.
More...
#include <arrowcontrol.h>
Detect up-arrow and down-arrow key strokes via the Printer
.
Definition at line 22 of file arrowcontrol.h.
◆ ErrorCode
Error codes for this class. Error ID identify a unique error() / onError call (excluding transferring).
Enumerator |
---|
Start_IsBusy | |
OnSecondChar_UnexpectedChar | |
OnThirdChar_UnexpectedChar | |
Definition at line 28 of file arrowcontrol.h.
◆ ArrowControl() [1/2]
semf::esh::ArrowControl::ArrowControl |
( |
Printer & |
printer, |
|
|
const int & |
count, |
|
|
bool |
echo |
|
) |
| |
Constructor.
- Parameters
-
printer | Printer to read from |
count | Reference on a variable holding the currently available char. Necessarry for cleanup. |
echo | Indicated wether the shell echos its input. |
Definition at line 14 of file arrowcontrol.cpp.
◆ ArrowControl() [2/2]
semf::esh::ArrowControl::ArrowControl |
( |
const ArrowControl & |
other | ) |
|
|
delete |
◆ ~ArrowControl()
virtual semf::esh::ArrowControl::~ArrowControl |
( |
| ) |
|
|
virtualdefault |
◆ SEMF_SIGNAL() [1/3]
semf::esh::ArrowControl::SEMF_SIGNAL |
( |
down |
| ) |
|
Emitted after down-error was pressed.
◆ SEMF_SIGNAL() [2/3]
semf::esh::ArrowControl::SEMF_SIGNAL |
( |
error |
, |
|
|
Error |
|
|
) |
| |
◆ SEMF_SIGNAL() [3/3]
semf::esh::ArrowControl::SEMF_SIGNAL |
( |
up |
| ) |
|
Emitted after up-arrow was pressed.
◆ start()
void semf::esh::ArrowControl::start |
( |
| ) |
|
Starts the reading process.
- Note
- This implementation expects that this function is called after receiving an ESC charcter (
'\33'
).
- Exceptions
-
Start_IsBusy | If object is busy |
OnSecondChar_UnexpectedChar | If second received character is not ’[’ |
OnThirdChar_UnexpectedChar | If third received character is not 'A' nor 'B'. |
Definition at line 21 of file arrowcontrol.cpp.