Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CInput.h
Show All 13 Lines | |||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_CINPUT | #ifndef INCLUDED_CINPUT | ||||
#define INCLUDED_CINPUT | #define INCLUDED_CINPUT | ||||
#include "gui/IGUIScrollBarOwner.h" | #include "gui/IGUIScrollBarOwner.h" | ||||
#include "gui/CGUISprite.h" | |||||
#include "lib/external_libraries/libsdl.h" | #include "lib/external_libraries/libsdl.h" | ||||
#include <vector> | #include <vector> | ||||
/** | /** | ||||
* Text field where you can input and edit the text. | * Text field where you can input and edit the text. | ||||
* | * | ||||
* It doesn't use IGUITextOwner, because we don't need | * It doesn't use IGUITextOwner, because we don't need | ||||
Show All 33 Lines | protected: | ||||
/** | /** | ||||
* Handle events manually to catch keyboard inputting. | * Handle events manually to catch keyboard inputting. | ||||
*/ | */ | ||||
virtual InReaction ManuallyHandleEvent(const SDL_Event_* ev); | virtual InReaction ManuallyHandleEvent(const SDL_Event_* ev); | ||||
/** | /** | ||||
* Handle events manually to catch keys which change the text. | * Handle events manually to catch keys which change the text. | ||||
*/ | */ | ||||
virtual void ManuallyMutableHandleKeyDownEvent(const SDL_Keycode keyCode, CStrW& pCaption); | virtual void ManuallyMutableHandleKeyDownEvent(const SDL_Keycode keyCode); | ||||
/** | /** | ||||
* Handle events manually to catch keys which don't change the text. | * Handle events manually to catch keys which don't change the text. | ||||
*/ | */ | ||||
virtual void ManuallyImmutableHandleKeyDownEvent(const SDL_Keycode keyCode, CStrW& pCaption); | virtual void ManuallyImmutableHandleKeyDownEvent(const SDL_Keycode keyCode); | ||||
/** | /** | ||||
* Handle hotkey events (called by ManuallyHandleEvent) | * Handle hotkey events (called by ManuallyHandleEvent) | ||||
*/ | */ | ||||
virtual InReaction ManuallyHandleHotkeyEvent(const SDL_Event_* ev); | virtual InReaction ManuallyHandleHotkeyEvent(const SDL_Event_* ev); | ||||
/** | /** | ||||
* @see IGUIObject#UpdateCachedSize() | * @see IGUIObject#UpdateCachedSize() | ||||
▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | protected: | ||||
double m_PrevTime; | double m_PrevTime; | ||||
/// Cursor blink rate in seconds, if greater than 0.0. | /// Cursor blink rate in seconds, if greater than 0.0. | ||||
double m_CursorBlinkRate; | double m_CursorBlinkRate; | ||||
/// If the cursor should be drawn or not. | /// If the cursor should be drawn or not. | ||||
bool m_CursorVisState; | bool m_CursorVisState; | ||||
/// If enabled, it is only allowed to select and copy text. | // Settings | ||||
i32 m_BufferPosition; | |||||
float m_BufferZone; | |||||
CStrW m_Caption; | |||||
i32 m_CellID; | |||||
CStrW m_Font; | |||||
CStrW m_MaskChar; | |||||
bool m_Mask; | |||||
i32 m_MaxLength; | |||||
bool m_MultiLine; | |||||
bool m_Readonly; | bool m_Readonly; | ||||
bool m_ScrollBar; | |||||
CStr m_ScrollBarStyle; | |||||
CGUISpriteInstance m_Sprite; | |||||
CGUISpriteInstance m_SpriteSelectArea; | |||||
CGUIColor m_TextColor; | |||||
CGUIColor m_TextColorSelected; | |||||
}; | }; | ||||
#endif // INCLUDED_CINPUT | #endif // INCLUDED_CINPUT |
Wildfire Games · Phabricator