6#ifndef EGT_VIRTUALKEYBOARD_H
7#define EGT_VIRTUALKEYBOARD_H
14#include <egt/button.h>
15#include <egt/detail/meta.h>
17#include <egt/keycode.h>
18#include <egt/notebook.h>
47 using PanelKeys = std::vector<std::vector<std::shared_ptr<Key>>>;
76 explicit Key(uint32_t unicode,
double length = 1.0) noexcept;
84 double length = 1.0) noexcept;
92 double length = 1.0) noexcept;
102 explicit
Key(const std::
string& label,
int link,
103 double length = 1.0) noexcept;
113 explicit
Key(const
Image& img,
int link,
double length = 1.0) noexcept;
121 explicit
Key(uint32_t unicode,
123 double length = 1.0) noexcept;
140 std::shared_ptr<
Button> m_button {
nullptr};
150 uint32_t m_unicode {0};
170 std::shared_ptr<Panel> m_multichoice_panel {
nullptr};
193 const Rect& rect = {});
225 void update_key_space(
unsigned key_space);
226 void update_key_size(
const Size& s);
258 std::shared_ptr<Popup> m_multichoice_popup {
nullptr};
278 unsigned m_max_rows {0};
283 unsigned m_max_cols {0};
288 unsigned m_key_space {2};
293 double m_key_size_multichoice_factor {1.2};
338 bool m_bottom_positionned {
true};
Manages a font and properties of a font.
Definition font.h:35
A Frame is a Widget that has children widgets.
Definition frame.h:45
HorizontalBoxSizer helper variation of BoxSizer.
Definition sizer.h:196
Raster image resource used for drawing or displaying.
Definition image.h:39
Allows a collection of NotebookTab widgets to be shown one at a time.
Definition notebook.h:103
Color palette that contains a 2 dimensional array of colors.
Definition palette.h:40
A Pattern which can store one or more colors at different offsets (steps) which can be used to create...
Definition pattern.h:55
std::list< std::tuple< std::string, std::string, Serializer::Attributes > > Properties
Definition serialize.h:47
VerticalBoxSizer helper variation of BoxSizer.
Definition sizer.h:239
Key widget for the Keyboard widget.
Definition virtualkeyboard.h:68
Key(uint32_t unicode, double length=1.0) noexcept
PanelKeys m_keys_multichoice
Keys for the multichoice panel.
Definition virtualkeyboard.h:165
double m_length
Length multiplicator of the panel default key size.
Definition virtualkeyboard.h:155
VirtualKeyboard class.
Definition virtualkeyboard.h:39
KeyboardInput m_in
The input dispatcher.
Definition virtualkeyboard.h:273
VirtualKeyboard(Serializer::Properties &props) noexcept
Definition virtualkeyboard.h:198
VirtualKeyboard(Serializer::Properties &props, bool is_derived) noexcept
void key_multichoice(const std::shared_ptr< Key > &k)
Create the multichoice panel and configure the keys.
void key_input_value(const std::shared_ptr< Key > &k)
Configure the Event data to be dispatched on a click event.
VirtualKeyboard(const std::vector< PanelKeys > &keys, const Rect &rect={})
A keyboard with a custom layout.
Notebook m_main_panel
A Notebook containing the main panels of the keyboard.
Definition virtualkeyboard.h:268
void resize(const Size &s) override
Resize the widget.
void key_space(unsigned key_space)
Set the space between keys.
std::vector< std::vector< std::shared_ptr< Key > > > PanelKeys
Type used for the 2D array of keys.
Definition virtualkeyboard.h:47
VirtualKeyboard(const Rect &rect={}) noexcept
A default keyboard with a Qwerty layout.
std::vector< std::shared_ptr< Panel > > m_main_panels
The main panels of the keyboard i.e.
Definition virtualkeyboard.h:263
void key_link(const std::shared_ptr< Key > &k)
Configure the key to select the appropriate panel on a click event.
void initialize(const std::vector< PanelKeys > &keys)
VirtualKeyboard::PanelKeys & multichoice_A()
Default panel defined for VirtualKeyboard.
KeyboardCode
Key codes that represent a physical key.
Definition keycode.h:26
@ EKEY_UNKNOWN
Definition keycode.h:27
VirtualKeyboard::PanelKeys & multichoice_Z()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_N()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_r()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_o()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_a()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_z()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_I()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_G()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_u()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_U()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_T()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_d()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_C()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_S()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_s()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_L()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & QwertySymbols1()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & QwertyLettersUpperCase()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_k()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_n()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_y()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_R()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_g()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_c()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_i()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_K()
Default panel defined for VirtualKeyboard.
PopupVirtualKeyboard *& popup_virtual_keyboard()
Get a pointer to the popup virtual keyboard.
VirtualKeyboard::PanelKeys & multichoice_O()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & QwertySymbols2()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_Y()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_E()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_e()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & QwertyLettersLowerCase()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_D()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_l()
Default panel defined for VirtualKeyboard.
VirtualKeyboard::PanelKeys & multichoice_t()
Default panel defined for VirtualKeyboard.
EGT framework namespace.
Definition animation.h:24