Preferences Highlighter

This commit is contained in:
David Kocik 2021-10-13 16:45:05 +02:00
parent aecd7e2b93
commit ffc29a2536
6 changed files with 92 additions and 6 deletions

View file

@ -20,6 +20,7 @@ namespace Slic3r {
namespace GUI {
class ConfigOptionsGroup;
class OG_CustomCtrl;
class PreferencesDialog : public DPIDialog
{
@ -39,7 +40,7 @@ class PreferencesDialog : public DPIDialog
bool m_recreate_GUI{false};
public:
explicit PreferencesDialog(wxWindow* parent, int selected_tab = 0);
explicit PreferencesDialog(wxWindow* parent, int selected_tab = 0, const std::string& highlight_opt_key = std::string());
~PreferencesDialog() = default;
bool settings_layout_changed() const { return m_settings_layout_changed; }
@ -55,6 +56,22 @@ protected:
void create_icon_size_slider();
void create_settings_mode_widget();
void create_settings_text_color_widget();
void init_highlighter(const t_config_option_key& opt_key);
struct PreferencesHighlighter
{
void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY);
void init(std::pair<OG_CustomCtrl*, bool*>);
void blink();
void invalidate();
private:
OG_CustomCtrl* m_custom_ctrl{ nullptr };
bool* m_show_blink_ptr{ nullptr };
int m_blink_counter{ 0 };
wxTimer m_timer;
}
m_highlighter;
};
} // GUI