Project Alice
Loading...
Searching...
No Matches
ui::console_edit Class Reference

#include <gui_console.hpp>

Inheritance diagram for ui::console_edit:
Collaboration diagram for ui::console_edit:

Public Member Functions

void render (sys::state &state, int32_t x, int32_t y) noexcept override
 
void edit_box_update (sys::state &state, std::string_view s) noexcept override
 
void edit_box_tab (sys::state &state, std::string_view s) noexcept override
 
void edit_box_enter (sys::state &state, std::string_view s) noexcept override
 
void edit_box_esc (sys::state &state) noexcept override
 
void edit_box_backtick (sys::state &state) noexcept override
 
void edit_box_back_slash (sys::state &state) noexcept override
 
void edit_box_up (sys::state &state) noexcept override
 
void edit_box_down (sys::state &state) noexcept override
 
void add_to_history (sys::state &state, std::string s) noexcept
 
std::string navigate_history (int16_t step) noexcept
 
std::string down_history () noexcept
 
std::string up_history () noexcept
 
- Public Member Functions inherited from ui::edit_box_element_base
virtual void edit_box_tab (sys::state &state, std::string_view s) noexcept
 
virtual void edit_box_enter (sys::state &state, std::string_view s) noexcept
 
virtual void edit_box_update (sys::state &state, std::string_view s) noexcept
 
virtual void edit_box_up (sys::state &state) noexcept
 
virtual void edit_box_down (sys::state &state) noexcept
 
virtual void edit_box_esc (sys::state &state) noexcept
 
virtual void edit_box_backtick (sys::state &state) noexcept
 
virtual void edit_box_back_slash (sys::state &state) noexcept
 
virtual void edit_index_position (sys::state &state, int32_t index) noexcept
 
void on_reset_text (sys::state &state) noexcept override
 
void on_create (sys::state &state) noexcept override
 
message_result test_mouse (sys::state &state, int32_t x, int32_t y, mouse_probe_type type) noexcept override
 
message_result on_lbutton_down (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept override
 
message_result on_key_down (sys::state &state, sys::virtual_key key, sys::key_modifiers mods) noexcept override
 
void on_text (sys::state &state, char32_t ch) noexcept override
 
void render (sys::state &state, int32_t x, int32_t y) noexcept override
 
- Public Member Functions inherited from ui::simple_text_element_base
void set_text (sys::state &state, std::string const &new_text)
 
void on_reset_text (sys::state &state) noexcept override
 
void on_create (sys::state &state) noexcept override
 
void render (sys::state &state, int32_t x, int32_t y) noexcept override
 
void format_text (sys::state &state)
 
std::string_view get_text (sys::state &state) const
 
message_result test_mouse (sys::state &state, int32_t x, int32_t y, mouse_probe_type type) noexcept override
 
- Public Member Functions inherited from ui::element_base
bool is_visible () const
 
void set_visible (sys::state &state, bool vis)
 
 element_base ()
 
virtual mouse_probe impl_probe_mouse (sys::state &state, int32_t x, int32_t y, mouse_probe_type type) noexcept
 
virtual message_result impl_on_lbutton_down (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual message_result impl_on_lbutton_up (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods, bool under_mouse) noexcept
 
virtual message_result impl_on_rbutton_down (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual message_result impl_on_key_down (sys::state &state, sys::virtual_key key, sys::key_modifiers mods) noexcept
 
virtual message_result impl_on_scroll (sys::state &state, int32_t x, int32_t y, float amount, sys::key_modifiers mods) noexcept
 
virtual message_result impl_on_mouse_move (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual void impl_on_update (sys::state &state) noexcept
 
message_result impl_get (sys::state &state, Cyto::Any &payload) noexcept
 
virtual message_result impl_set (sys::state &state, Cyto::Any &payload) noexcept
 
virtual void impl_render (sys::state &state, int32_t x, int32_t y) noexcept
 
virtual void impl_on_reset_text (sys::state &state) noexcept
 
virtual void impl_on_drag_finish (sys::state &state) noexcept
 
virtual tooltip_behavior has_tooltip (sys::state &state) noexcept
 
virtual void update_tooltip (sys::state &state, int32_t x, int32_t y, text::columnar_layout &contents) noexcept
 
virtual std::unique_ptr< element_baseremove_child (element_base *child) noexcept
 
virtual void move_child_to_front (element_base *child) noexcept
 
virtual void move_child_to_back (element_base *child) noexcept
 
virtual void add_child_to_front (std::unique_ptr< element_base > child) noexcept
 
virtual void add_child_to_back (std::unique_ptr< element_base > child) noexcept
 
virtual element_baseget_child_by_name (sys::state const &state, std::string_view name) noexcept
 
virtual element_baseget_child_by_index (sys::state const &state, int32_t index) noexcept
 
virtual ~element_base ()
 

Protected Attributes

std::vector< std::string > command_history
 
int history_index = 0
 
- Protected Attributes inherited from ui::edit_box_element_base
int32_t edit_index = 0
 
- Protected Attributes inherited from ui::simple_text_element_base
std::string cached_text
 
text::layout internal_layout
 

Additional Inherited Members

- Public Attributes inherited from ui::simple_text_element_base
bool black_text = true
 
int32_t data = 0
 
int32_t casualties = 0
 
- Public Attributes inherited from ui::element_base
element_data base_data
 
element_baseparent = nullptr
 
uint8_t flags = 0
 
- Static Public Attributes inherited from ui::element_base
static constexpr uint8_t is_invisible_mask = 0x01
 
- Protected Member Functions inherited from ui::element_base
virtual message_result test_mouse (sys::state &state, int32_t x, int32_t y, mouse_probe_type type) noexcept
 
virtual message_result on_lbutton_down (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual message_result on_lbutton_up (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods, bool under_mouse) noexcept
 
virtual message_result on_rbutton_down (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual message_result on_key_down (sys::state &state, sys::virtual_key key, sys::key_modifiers mods) noexcept
 
virtual message_result on_scroll (sys::state &state, int32_t x, int32_t y, float amount, sys::key_modifiers mods) noexcept
 
virtual message_result on_mouse_move (sys::state &state, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual message_result get (sys::state &state, Cyto::Any &payload) noexcept
 
virtual message_result set (sys::state &state, Cyto::Any &payload) noexcept
 
virtual void render (sys::state &state, int32_t x, int32_t y) noexcept
 
virtual void on_update (sys::state &state) noexcept
 
virtual void on_create (sys::state &state) noexcept
 
virtual void on_drag (sys::state &state, int32_t oldx, int32_t oldy, int32_t x, int32_t y, sys::key_modifiers mods) noexcept
 
virtual void on_text (sys::state &state, char32_t ch) noexcept
 
virtual void on_visible (sys::state &state) noexcept
 
virtual void on_hide (sys::state &state) noexcept
 
virtual void on_reset_text (sys::state &state) noexcept
 
virtual focus_result on_get_focus (sys::state &state) noexcept
 
virtual void on_lose_focus (sys::state &state) noexcept
 
virtual void on_drag_finish (sys::state &state) noexcept
 

Detailed Description

Definition at line 8 of file gui_console.hpp.

Member Function Documentation

◆ add_to_history()

void ui::console_edit::add_to_history ( sys::state state,
std::string  s 
)
inlinenoexcept

Definition at line 25 of file gui_console.hpp.

◆ down_history()

std::string ui::console_edit::down_history ( )
inlinenoexcept

Definition at line 46 of file gui_console.hpp.

Here is the call graph for this function:

◆ edit_box_back_slash()

void ui::console_edit::edit_box_back_slash ( sys::state state)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 1498 of file gui_console.cpp.

Here is the call graph for this function:

◆ edit_box_backtick()

void ui::console_edit::edit_box_backtick ( sys::state state)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 1495 of file gui_console.cpp.

Here is the call graph for this function:

◆ edit_box_down()

void ui::console_edit::edit_box_down ( sys::state state)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 38 of file gui_console.cpp.

◆ edit_box_enter()

void ui::console_edit::edit_box_enter ( sys::state state,
std::string_view  s 
)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 1468 of file gui_console.cpp.

Here is the call graph for this function:

◆ edit_box_esc()

void ui::console_edit::edit_box_esc ( sys::state state)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 1492 of file gui_console.cpp.

Here is the call graph for this function:

◆ edit_box_tab()

void ui::console_edit::edit_box_tab ( sys::state state,
std::string_view  s 
)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 27 of file gui_console.cpp.

◆ edit_box_up()

void ui::console_edit::edit_box_up ( sys::state state)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 30 of file gui_console.cpp.

◆ edit_box_update()

void ui::console_edit::edit_box_update ( sys::state state,
std::string_view  s 
)
overridevirtualnoexcept

Reimplemented from ui::edit_box_element_base.

Definition at line 24 of file gui_console.cpp.

◆ navigate_history()

std::string ui::console_edit::navigate_history ( int16_t  step)
inlinenoexcept

Definition at line 31 of file gui_console.hpp.

Here is the caller graph for this function:

◆ render()

void ui::console_edit::render ( sys::state state,
int32_t  x,
int32_t  y 
)
overridevirtualnoexcept

Reimplemented from ui::element_base.

Definition at line 20 of file gui_console.cpp.

Here is the call graph for this function:

◆ up_history()

std::string ui::console_edit::up_history ( )
inlinenoexcept

Definition at line 49 of file gui_console.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ command_history

std::vector<std::string> ui::console_edit::command_history
protected

Definition at line 11 of file gui_console.hpp.

◆ history_index

int ui::console_edit::history_index = 0
protected

Definition at line 13 of file gui_console.hpp.


The documentation for this class was generated from the following files: