mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Imgui: Implement keyboard input, fix #1797
This commit is contained in:
parent
3901ac47d1
commit
2de814d478
5 changed files with 128 additions and 10 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
class wxString;
|
||||
class wxMouseEvent;
|
||||
class wxKeyEvent;
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -37,6 +38,7 @@ public:
|
|||
void set_display_size(float w, float h);
|
||||
void set_style_scaling(float scaling);
|
||||
bool update_mouse_data(wxMouseEvent &evt);
|
||||
bool update_key_data(wxKeyEvent &evt);
|
||||
|
||||
void new_frame();
|
||||
void render();
|
||||
|
@ -65,12 +67,18 @@ public:
|
|||
bool want_any_input() const;
|
||||
|
||||
private:
|
||||
std::string clipboard_text;
|
||||
|
||||
void init_default_font(float scaling);
|
||||
void create_device_objects();
|
||||
void create_fonts_texture();
|
||||
void init_input();
|
||||
void render_draw_data(ImDrawData *draw_data);
|
||||
void destroy_device_objects();
|
||||
void destroy_fonts_texture();
|
||||
|
||||
static const char* clipboard_get(void* user_data);
|
||||
static void clipboard_set(void* user_data, const char* text);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue