19#ifndef HEADER_SCREEN_KEYBOARD_HPP
20#define HEADER_SCREEN_KEYBOARD_HPP
22#include <IGUIButton.h>
23#include <IGUIWindow.h>
25#include "guiengine/abstract_top_level_container.hpp"
26#include "guiengine/skin.hpp"
27#include "input/input_manager.hpp"
28#include "utils/leak_check.hpp"
51 typedef std::vector<std::vector<std::string> > KeyboardLayout;
52 typedef std::vector<std::vector<int> > KeyboardLayoutProportions;
106 core::stringw getKeyName(std::string key_id);
117 virtual EventPropagation
processEvent(const std::
string& eventSource);
134 bool onEvent(
const SEvent &event);
155 virtual KeyboardLayoutProportions getKeyboardLayoutProportions()
const;
157 virtual KeyboardLayout* getKeyboardLayout(ButtonsType bt)
const;
159 virtual ButtonsType getDefaultButtonsType()
const
161 return BUTTONS_LOWER;
Definition: CGUIEditBox.hpp:32
Represents a GUI widgets container.
Definition: abstract_top_level_container.hpp:43
Class representing a screen keyboard.
Definition: screen_keyboard.hpp:49
ButtonsType m_buttons_type
Remembers currently selected button type.
Definition: screen_keyboard.hpp:90
static bool isActive()
Returns true if keyboard is created.
Definition: screen_keyboard.hpp:126
virtual void onUpdate(float dt)
Override to be notified of updates.
Definition: screen_keyboard.cpp:338
bool m_back_button_pressed
True if backspace button was pressed.
Definition: screen_keyboard.hpp:78
InputManager::InputDriverMode m_previous_mode
Remembered input mode that was used before keyboard creation.
Definition: screen_keyboard.hpp:102
void createButtons()
Creates all button widgets.
Definition: screen_keyboard.cpp:199
static bool shouldUseScreenKeyboard()
A function that determines if (native) screen keyboard should be activated.
Definition: screen_keyboard.cpp:534
CGUIEditBox * m_edit_box
The edit box that is assigned to the keyboard.
Definition: screen_keyboard.hpp:84
static ScreenKeyboard * getCurrent()
Returns pointer to the created keyboard or NULL if keyboard was not created.
Definition: screen_keyboard.hpp:123
unsigned int m_repeat_time
A time for repeat key feature.
Definition: screen_keyboard.hpp:75
static bool hasSystemScreenKeyboard()
Returns true if system screen keyboard is available.
Definition: screen_keyboard.cpp:542
std::vector< ButtonWidget * > m_buttons
Contans the pointers to all button widgets.
Definition: screen_keyboard.hpp:99
float m_percent_width
A value in range of 0.0 to 1.0 that determines width of the screen that is used by the keyboard.
Definition: screen_keyboard.hpp:68
irr::gui::IGUIButton * m_back_button
A button that is used as backspace key.
Definition: screen_keyboard.hpp:87
static bool onEscapePressed()
A function that handles escape pressed event.
Definition: screen_keyboard.cpp:525
irr::gui::IGUIWindow * m_irrlicht_window
Irrlicht window used by the keyboard widget.
Definition: screen_keyboard.hpp:93
irr::core::rect< irr::s32 > m_area
Contains position and dimensions of the keyboard.
Definition: screen_keyboard.hpp:96
bool isMyIrrChild(irr::gui::IGUIElement *widget) const
Checks if the screen keyboard is a parent of the selected item.
Definition: screen_keyboard.hpp:143
static void dismiss()
A function that closes the keyboard.
Definition: screen_keyboard.cpp:516
irr::gui::IGUIWindow * getIrrlichtElement()
Get irrlicht window used by the keyboard widget.
Definition: screen_keyboard.hpp:137
int getHeight()
Returns height of the screen keyboard.
Definition: screen_keyboard.hpp:150
int getWidth()
Returns width of the screen keyboard.
Definition: screen_keyboard.hpp:147
CGUIEditBox * getEditBox()
Returns assigned edit box.
Definition: screen_keyboard.hpp:153
float m_percent_height
A value in range of 0.0 to 1.0 that determines height of the screen that is used by the keyboard.
Definition: screen_keyboard.hpp:72
virtual EventPropagation processEvent(const std::string &eventSource)
A function that handles buttons events.
Definition: screen_keyboard.cpp:426
bool m_schedule_close
True if screen keyboard is going to be closed.
Definition: screen_keyboard.hpp:81
void assignButtons(ButtonsType buttons_type)
A function that allows to select one of the available buttons layout.
Definition: screen_keyboard.cpp:298
void init()
Screen keyboard initialization, needs to be called after new to take into account for runtime polymor...
Definition: screen_keyboard.cpp:153
static ScreenKeyboard * m_screen_keyboard
Global instance of the current screen keyboard.
Definition: screen_keyboard.hpp:64
bool onEvent(const SEvent &event)
A function that handles irrlicht events.
Definition: screen_keyboard.cpp:379
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33