|
CLI
2.9
|
Choice user interface class. More...
#include <ui_choice.h>

Public Member Functions | |
| Choice (const int I_DefaultChoice, const tk::Queue< ResourceString > &TK_Choices) | |
| Top execution context constructor. More... | |
| Choice (ExecutionContext &CLI_ParentContext, const int I_DefaultChoice, const tk::Queue< ResourceString > &TK_Choices) | |
| Child execution context constructor. More... | |
| virtual | ~Choice (void) |
| Destructor. More... | |
| const int | GetChoice (void) const |
| Choice retrieval. More... | |
| const ResourceString | GetstrChoice (void) const |
| Choice retrieval in its string form. More... | |
| virtual void | OnKey (const KEY E_KeyCode) |
| Handler called on character input. More... | |
Public Member Functions inherited from Line | |
| Line (const tk::String &TK_DefaultLine, const int I_MinLineLength, const int I_MaxLineLength) | |
| Top execution context constructor. More... | |
| Line (ExecutionContext &CLI_ParentContext, const tk::String &TK_DefaultLine, const int I_MinLineLength, const int I_MaxLineLength) | |
| Child execution context constructor. More... | |
| virtual | ~Line (void) |
| Destructor. More... | |
| const tk::String | GetLine (void) const |
| Line retrieval. More... | |
Public Member Functions inherited from UI | |
| virtual | ~UI (void) |
| Destructor. More... | |
| const bool | GetbExecResult (void) const |
| Execution result accessor. More... | |
Public Member Functions inherited from ExecutionContext | |
| virtual | ~ExecutionContext (void) |
| Destructor. More... | |
| ExecutionContextManager & | GetContextManager (void) |
| Execution context manager accessor. More... | |
| const IODevice & | GetInput (void) const |
| Input stream accessor. More... | |
| const OutputDevice & | GetStream (const STREAM_TYPE E_StreamType) const |
| Output stream accessor. More... | |
| const bool | SetStream (const STREAM_TYPE E_StreamType, OutputDevice &CLI_Stream) |
| Output stream positionning. More... | |
| const bool | StreamEnabled (const STREAM_TYPE E_StreamType) const |
| Enabled/disabled stream accessor. More... | |
| const bool | EnableStream (const STREAM_TYPE E_StreamType, const bool B_Enable) |
| Enable/disable stream. More... | |
| void | SetLang (const ResourceString::LANG E_Lang) |
| Language setting. More... | |
| const ResourceString::LANG | GetLang (void) const |
| Language access. More... | |
| void | SetBeep (const bool B_Enable) |
| Beep configuration setting. More... | |
| const bool | GetBeep (void) const |
| Beep configuration access. More... | |
| void | Beep (void) |
| Sends a beep signal. More... | |
| void | Run (IODevice &CLI_IODevice) |
| Runs the execution context onto the corresponding input/output device. More... | |
| void | Run (void) |
| Runs the execution context as a child context of the parent given by the construction. More... | |
| const bool | IsRunning (void) const |
| Tells whether this execution context is running or not. More... | |
| void | StopExecution (void) |
| Terminates this execution context's execution. More... | |
| void | StopAllExecutions (void) |
| Terminates execution for all execution contexts attached to the same top execution context. More... | |
Public Member Functions inherited from Object | |
| virtual | ~Object (void)=0 |
| Pure virtual destructor. More... | |
Protected Member Functions | |
| virtual void | ResetToDefault (void) |
| Handler called when default value is required to be restored. More... | |
Protected Member Functions inherited from Line | |
| void | SetLine (const tk::String &TK_Line, const bool B_NewLine, const bool B_CleanOnTyping) |
| Protected line setter for child classes. More... | |
| virtual void | Reset (void) |
| Handler called when data reset is required. More... | |
Protected Member Functions inherited from UI | |
| UI (void) | |
| Top execution context constructor. More... | |
| UI (ExecutionContext &CLI_ExecutionContext) | |
| Child execution context constructor. More... | |
| virtual const bool | OnStartExecution (void) |
| Beginning of execution handler. More... | |
| virtual const bool | OnStopExecution (void) |
| Execution termination handler. More... | |
| void | EndControl (const bool B_ExecResult) |
| Method to call by child classes in order to end the control execution. More... | |
Protected Member Functions inherited from ExecutionContext | |
| ExecutionContext (void) | |
| Top context constructor. More... | |
| ExecutionContext (ExecutionContext &CLI_ParentContext) | |
| Child context constructor. More... | |
Protected Member Functions inherited from Object | |
| Object (void) | |
| Default constructor only available to sub-classes. More... | |
Choice user interface class.
Definition at line 43 of file ui_choice.h.
|
explicit |
Top execution context constructor.
| I_DefaultChoice | Index in the input queue corresponding to the default answer. |
| TK_Choices | Input choice list. |
Definition at line 69 of file ui_choice.cpp.
References Choice().
Referenced by Choice().
|
explicit |
Child execution context constructor.
| CLI_ParentContext | Parent execution context. |
| I_DefaultChoice | Index in the input queue corresponding to the default answer. |
| TK_Choices | Input choice list. |
Definition at line 75 of file ui_choice.cpp.
References Choice().
|
virtual |
Destructor.
Definition at line 81 of file ui_choice.cpp.
| const int Choice::GetChoice | ( | void | ) | const |
Choice retrieval.
Definition at line 85 of file ui_choice.cpp.
References Line::GetLine().
Referenced by GetstrChoice(), YesNo::GetYesNo(), and OnKey().
| const ResourceString Choice::GetstrChoice | ( | void | ) | const |
Choice retrieval in its string form.
Definition at line 119 of file ui_choice.cpp.
References GetChoice().
Referenced by OnKey().
|
virtual |
Handler called on character input.
| E_KeyCode | Input key. |
Reimplemented from Line.
Reimplemented in YesNo.
Definition at line 142 of file ui_choice.cpp.
References ExecutionContext::Beep(), UI::EndControl(), ENTER, GetChoice(), GetstrChoice(), KEY_DOWN, KEY_UP, NULL_KEY, Line::OnKey(), PAGE_DOWN, PAGE_UP, and Line::SetLine().
Referenced by YesNo::OnKey().
|
protectedvirtual |
Handler called when default value is required to be restored.
Reimplemented from Line.
Definition at line 133 of file ui_choice.cpp.
References ExecutionContext::GetLang(), and Line::SetLine().