AllegroFlare/SoftwareKeyboard/SoftwareKeyboard
view source (cpp, hpp, quintessence) • view tests (test file)
Properties
event_emitter | AllegroFlare::EventEmitter* |
font_bin | AllegroFlare::FontBin* |
font_name | std::string |
font_size | int |
keys | tsl::ordered_map<std::string, AllegroFlare::SoftwareKeyboard::KeyboardKey> |
cursor_pos | int |
cursor_destination | AllegroFlare::Vec2D |
cursor_size_destination | AllegroFlare::Vec2D |
cursor_reposition_multiplier | float |
show_rectangle_outline_on_keys | bool |
keyboard_placement | AllegroFlare::Placement2D |
prompt_text | std::string |
result_string | std::string |
num_permitted_chars | std::size_t |
event_to_emit_on_pressing_submit_key | std::string |
on_submit_callback_func | std::function<void(AllegroFlare::SoftwareKeyboard::SoftwareKeyboard*, void*)> |
on_submit_callback_func_user_data | void* |
cursor_location | AllegroFlare::Vec2D |
cursor_size | AllegroFlare::Vec2D |
showing_input_error_frame | bool |
input_error_frame_error_messages | std::vector<std::string> |
bonk_sound_effect_identifier | std::string |
key_click_sound_effect_identifier | std::string |
erase_sound_effect_identifier | std::string |
initialized | bool |
DEFAULT_EVENT_TO_EMIT_ON_PRESSING_SUBMIT_KEY | const char* |
DEFAULT_BONK_SOUND_EFFECT_IDENTIFIER | const char* |
DEFAULT_KEY_CLICK_SOUND_EFFECT_IDENTIFIER | const char* |
DEFAULT_ERASE_SOUND_EFFECT_IDENTIFIER | const char* |
DEFAULT_FONT_NAME | const char* |
DEFAULT_CURSOR_REPOSITION_MULTIPLIER | float |
Methods
set_font_bin(AllegroFlare::FontBin* font_bin=nullptr) |
reset() |
set_cursor_reposition_multiplier(float cursor_reposition_multiplier=DEFAULT_CURSOR_REPOSITION_MULTIPLIER) |
set_keys(tsl::ordered_map<std::string, AllegroFlare::SoftwareKeyboard::KeyboardKey> keys={}) |
set_keyboard_dimentions(float width=1, float height=1) |
set_keyboard_position(float x=0, float y=0) |
initialize() |
press_key_under_cursor() |
press_key_by_name(std::string name="[unset-name]") |
show_input_error_frame(std::vector<std::string> input_error_frame_error_messages={}) |
clear_input_error_frame() |
clear_input_error_frame_error_messages() |
has_input_error_frame_error_messages() |
validate_and_submit_form() |
update_cursor_destination() |
infer_current_key_name() |
jump_cursor_pos_to_index_of_key_name(std::string name="[unset-name]") |
increment_cursor_pos() |
decrement_cursor_pos() |
draw_result_string_and_boxes() |
build_cursor_color() |
build_input_error_frame_color() |
draw_cursor_rectangle(float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f) |
draw_cursor_underline(float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f) |
draw_input_error_frame(float x=0.0f, float y=0.0f, float w=0.0f, float h=0.0f) |
draw_cursor() |
render() |
draw_keyboard_backfill_and_frame() |
key_exists(std::string identifier="[unset-identifier]") |
emit_bonk_sound_effect() |
emit_key_click_sound_effect() |
emit_erase_sound_effect() |
obtain_keyboard_font() |
obtain_prompt_text_font() |
obtain_result_text_font() |
obtain_error_messages_font() |
calculate_boilerplate_keyboard_dimentions() |
move_cursor_down() |
move_cursor_up() |
build_boilerplate_keyboard_keys() |
calculate_spaced_elements_width(int num_elements=0, float element_width=0.0f, float element_spacing=0.0f) |
join(std::vector<std::string> tokens={}, std::string delimiter=", ") |
Dependencies
{"symbol"=>"tsl::ordered_map", "headers"=>["lib/tsl/ordered_map.h"]} |
{"symbol"=>"AllegroFlare::SoftwareKeyboard::KeyboardKey", "headers"=>["AllegroFlare/SoftwareKeyboard/KeyboardKey.hpp"]} |
{"symbol"=>"AllegroFlare::Vec2D", "headers"=>["AllegroFlare/Vec2D.hpp"]} |
{"symbol"=>"AllegroFlare::FontBin", "headers"=>["AllegroFlare/FontBin.hpp"]} |
{"symbol"=>"al_is_system_installed", "headers"=>["allegro5/allegro.h"]} |
{"symbol"=>"al_is_primitives_addon_initialized", "headers"=>["allegro5/allegro_primitives.h"]} |
{"symbol"=>"al_is_font_addon_initialized", "headers"=>["allegro5/allegro_font.h"]} |
{"symbol"=>"ALLEGRO_FONT", "headers"=>["allegro5/allegro_font.h"]} |
{"symbol"=>"AllegroFlare::Placement2D", "headers"=>["AllegroFlare/Placement2D.hpp"]} |
{"symbol"=>"AllegroFlare::Color", "headers"=>["AllegroFlare/Color.hpp"]} |
{"symbol"=>"fmod", "headers"=>["cmath"]} |
{"symbol"=>"AllegroFlare::interpolator", "headers"=>["AllegroFlare/Interpolators.hpp"]} |
{"symbol"=>"AllegroFlare::EventEmitter", "headers"=>["AllegroFlare/EventEmitter.hpp"]} |
{"symbol"=>"std::size_t", "headers"=>["cstddef"]} |
{"symbol"=>"AllegroFlare::php::trim", "headers"=>["AllegroFlare/UsefulPHP.hpp"]} |
{"symbol"=>"ALLEGRO_COLOR", "headers"=>["allegro5/allegro.h"]} |
{"symbol"=>"AllegroFlare::SoftwareKeyboard::SoftwareKeyboard", "headers"=>["AllegroFlare/SoftwareKeyboard/SoftwareKeyboard.hpp"]} |
{"symbol"=>"al_draw_rounded_rectangle", "headers"=>["allegro5/allegro_primitives.h"]} |
Sponsor
Look no further than CLUBCATT for cat shirts, cat mugs, and all kinds of cat-fancy stuff.