|
FIFE
|
A Command line widget. More...
#include <commandline.h>
Inherits TextField.
Collaboration diagram for FIFE::CommandLine:Public Types | |
| typedef boost::function1< void, std::string > | type_callback |
Public Member Functions | |
| CommandLine () | |
| Constructor. More... | |
| ~CommandLine () | |
| Destructor. More... | |
| void | keyPressed (fcn::KeyEvent &keyEvent) |
| virtual void | drawCaret (fcn::Graphics *graphics, int32_t x) |
| void | setCallback (const type_callback &cb) |
| Set callback on pressing the ENTER key. More... | |
| void | toggleCaretVisible () |
| Toggle the caret visibility. More... | |
| void | startBlinking () |
| Start blinking the caret. More... | |
| void | stopBlinking () |
| Stop blinking the caret for a few seconds. More... | |
Private Attributes | |
| type_callback | m_callback |
| std::vector< std::string > | m_history |
| size_t | m_history_position |
| std::string | m_cmdline |
| bool | m_caretVisible |
| Timer | m_blinkTimer |
| Timer | m_suppressBlinkTimer |
A Command line widget.
Definition at line 43 of file commandline.h.
| typedef boost::function1<void,std::string> FIFE::CommandLine::type_callback |
Definition at line 45 of file commandline.h.
| FIFE::CommandLine::CommandLine | ( | ) |
Constructor.
Definition at line 41 of file commandline.cpp.
References m_blinkTimer, m_suppressBlinkTimer, FIFE::Timer::setCallback(), FIFE::Timer::setInterval(), FIFE::Timer::start(), startBlinking(), and toggleCaretVisible().
| FIFE::CommandLine::~CommandLine | ( | ) |
Destructor.
Definition at line 52 of file commandline.cpp.
|
virtual |
Definition at line 138 of file commandline.cpp.
References m_caretVisible.
| void FIFE::CommandLine::keyPressed | ( | fcn::KeyEvent & | keyEvent | ) |
Definition at line 70 of file commandline.cpp.
References m_callback, m_cmdline, m_history, m_history_position, and stopBlinking().
| void FIFE::CommandLine::setCallback | ( | const type_callback & | cb | ) |
Set callback on pressing the ENTER key.
Definition at line 148 of file commandline.cpp.
References m_callback.
Referenced by FIFE::Console::Console().
Here is the caller graph for this function:| void FIFE::CommandLine::startBlinking | ( | ) |
Start blinking the caret.
Definition at line 65 of file commandline.cpp.
References m_blinkTimer, m_suppressBlinkTimer, FIFE::Timer::start(), and FIFE::Timer::stop().
Referenced by CommandLine().
Here is the caller graph for this function:| void FIFE::CommandLine::stopBlinking | ( | ) |
Stop blinking the caret for a few seconds.
Definition at line 59 of file commandline.cpp.
References m_blinkTimer, m_caretVisible, m_suppressBlinkTimer, FIFE::Timer::start(), and FIFE::Timer::stop().
Referenced by keyPressed().
Here is the caller graph for this function:| void FIFE::CommandLine::toggleCaretVisible | ( | ) |
Toggle the caret visibility.
Definition at line 55 of file commandline.cpp.
References m_caretVisible.
Referenced by CommandLine().
Here is the caller graph for this function:
|
private |
Definition at line 79 of file commandline.h.
Referenced by CommandLine(), startBlinking(), and stopBlinking().
|
private |
Definition at line 74 of file commandline.h.
Referenced by keyPressed(), and setCallback().
|
private |
Definition at line 78 of file commandline.h.
Referenced by drawCaret(), stopBlinking(), and toggleCaretVisible().
|
private |
Definition at line 77 of file commandline.h.
Referenced by keyPressed().
|
private |
Definition at line 75 of file commandline.h.
Referenced by keyPressed().
|
private |
Definition at line 76 of file commandline.h.
Referenced by keyPressed().
|
private |
Definition at line 80 of file commandline.h.
Referenced by CommandLine(), startBlinking(), and stopBlinking().