#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/OptionsGroup.hpp>
Public Member Functions | |
| wxWindow * | parent () const |
| Returns a copy of the pointer of the parent wxWindow. Accessor function is because users are not allowed to change the parent but defining it as const means a lot of const_casts to deal with wx functions. | |
| wxWindow * | ctrl_parent () const |
| void | append_line (const Line &line) |
| void | activate_line (Line &line) |
| Line * | get_line (const std::string &opt_key) |
| bool | activate (std::function< void()> throw_if_canceled=[](){}, int horiz_alignment=wxALIGN_LEFT) |
| void | clear (bool destroy_custom_ctrl=false) |
| Line | create_single_option_line (const Option &option, const std::string &path=std::string()) const |
| void | append_single_option_line (const Option &option, const std::string &path=std::string()) |
| void | append_separator () |
| Field * | get_field (const t_config_option_key &id) const |
| bool | set_value (const t_config_option_key &id, const boost::any &value, bool change_event=false) |
| boost::any | get_value (const t_config_option_key &id) |
| void | show_field (const t_config_option_key &opt_key, bool show=true) |
| void | hide_field (const t_config_option_key &opt_key) |
| void | enable_field (const t_config_option_key &opt_key, bool enable=true) |
| void | disable_field (const t_config_option_key &opt_key) |
| void | set_name (const wxString &new_name) |
| void | enable () |
| void | disable () |
| void | set_grid_vgap (int gap) |
| void | clear_fields_except_of (const std::vector< std::string > left_fields) |
| void | hide_labels () |
| OptionsGroup (wxWindow *_parent, const wxString &title, const wxString &icon, bool is_tab_opt=false, column_t extra_clmn=nullptr) | |
| virtual | ~OptionsGroup () |
| wxGridSizer * | get_grid_sizer () |
| const std::vector< Line > & | get_lines () |
| bool | is_legend_line () |
| void | set_max_win_width (int max_win_width) |
| bool | is_activated () |
| void | remove_option_if (std::function< bool(std::string const &)> const &comp) |
Static Public Member Functions | |
| static wxString | get_url (const std::string &path_end) |
| static bool | launch_browser (const std::string &path_end) |
Public Attributes | |
| const bool | staticbox {true} |
| bool | split_multi_line {false} |
| bool | option_label_at_right {false} |
| wxWindow * | stb { nullptr } |
| const wxString | icon |
| const wxString | title |
| bool | m_labels_hidden {false} |
| size_t | label_width = 20 |
| wxSizer * | sizer {nullptr} |
| OG_CustomCtrl * | custom_ctrl { nullptr } |
| int | ctrl_horiz_alignment { wxALIGN_LEFT} |
| column_t | extra_column {nullptr} |
| t_change | m_on_change { nullptr } |
| t_kill_focus | m_fill_empty_value { nullptr } |
| std::function< DynamicPrintConfig()> | m_get_initial_config { nullptr } |
| std::function< DynamicPrintConfig()> | m_get_sys_config { nullptr } |
| std::function< bool()> | have_sys_config { nullptr } |
| std::function< void(wxWindow *win)> | rescale_extra_column_item { nullptr } |
| std::function< void(wxWindow *win)> | rescale_near_label_widget { nullptr } |
| std::function< void(const t_config_option_key &opt_key)> | edit_custom_gcode { nullptr } |
| wxFont | sidetext_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) } |
| wxFont | label_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) } |
| int | sidetext_width { -1 } |
| int | sublabel_width { -1 } |
| bool | draw_multi_extruder { false } |
Protected Member Functions | |
| const t_field & | build_field (const t_config_option_key &id, const ConfigOptionDef &opt) |
| Generate a wxSizer or wxWindow from a configuration option Precondition: opt resolves to a known ConfigOption Postcondition: fields contains a wx gui object. | |
| const t_field & | build_field (const t_config_option_key &id) |
| const t_field & | build_field (const Option &opt) |
| virtual void | on_kill_focus (const std::string &opt_key) |
| virtual void | on_change_OG (const t_config_option_key &opt_id, const boost::any &value) |
| virtual void | back_to_initial_value (const std::string &opt_key) |
| virtual void | back_to_sys_value (const std::string &opt_key) |
| virtual int | config_type () const |
| std::string | pick_plugin (const ConfigOptionDef &opt) |
Protected Attributes | |
| std::map< t_config_option_key, Option > | m_options |
| wxWindow * | m_parent {nullptr} |
| std::vector< ConfigOptionMode > | m_options_mode |
| std::vector< wxWindow * > | m_extra_column_item_ptrs |
| std::vector< Line > | m_lines |
| t_optionfield_map | m_fields |
| Field list, contains unique_ptrs of the derived type. using types that need to know what it is beyond the public interface need to cast based on the related ConfigOptionDef. | |
| bool | m_disabled {false} |
| wxGridSizer * | m_grid_sizer {nullptr} |
| bool | m_use_custom_ctrl { false } |
| bool | m_use_custom_ctrl_as_parent { false } |
| Slic3r::GUI::OptionsGroup::OptionsGroup | ( | wxWindow * | _parent, |
| const wxString & | title, | ||
| const wxString & | icon, | ||
| bool | is_tab_opt = false, | ||
| column_t | extra_clmn = nullptr ) |
References extra_column, icon, m_parent, m_use_custom_ctrl, staticbox, and title.
Referenced by Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), and Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup().
|
inlinevirtual |
References clear().
| bool Slic3r::GUI::OptionsGroup::activate | ( | std::function< void()> | throw_if_canceled = [](){}, |
| int | horiz_alignment = wxALIGN_LEFT ) |
References _, activate_line(), clear(), ctrl_horiz_alignment, custom_ctrl, extra_column, Label::Head_14, icon, label_width, m_grid_sizer, m_lines, m_parent, sizer, staticbox, stb, and title.
| void Slic3r::GUI::OptionsGroup::activate_line | ( | Line & | line | ) |
To correct translation by context have to use wxGETTEXT_IN_CONTEXT macro from wxWidget 3.1.1
.target<wxWindow>()
requires verification
istead of (opt != option_set.back())
requires verification
References _, _L_CONTEXT, build_field(), ctrl_parent(), custom_ctrl, Slic3r::GUI::Field::def_width(), Slic3r::GUI::Field::def_width_thinner(), em_unit(), extra_column, Slic3r::GUI::Line::extra_widget_sizer, Slic3r::GUI::Line::full_width, Slic3r::GUI::Line::get_extra_widgets(), Slic3r::GUI::Line::get_options(), is_legend_line(), Slic3r::GUI::Line::is_separator(), Slic3r::GUI::is_sizer_field(), Slic3r::GUI::is_window_field(), L_CONTEXT, Slic3r::ConfigOptionDef::label, Slic3r::GUI::Line::label, Slic3r::GUI::Line::label_tooltip, Slic3r::GUI::Line::label_widget, label_width, Slic3r::ConfigOptionDef::legend, m_extra_column_item_ptrs, m_grid_sizer, m_labels_hidden, m_use_custom_ctrl, m_use_custom_ctrl_as_parent, Slic3r::GUI::Line::near_label_widget, Slic3r::GUI::Line::near_label_widget_win, parent(), Slic3r::ConfigOptionDef::sidetext, sidetext_width, sizer, staticbox, stb, sublabel_width, Slic3r::GUI::titleWidth, Slic3r::GUI::Line::widget, Slic3r::GUI::Line::widget_sizer, wxOSX, and wxStaticText.
Referenced by activate().
| void Slic3r::GUI::OptionsGroup::append_line | ( | const Line & | line | ) |
References _, _L_CONTEXT, Slic3r::Search::compose_display_label(), config_type(), Slic3r::GUI::from_u8(), Slic3r::GUI::Line::full_width, Slic3r::GUI::Line::get_extra_widgets(), Slic3r::GUI::Line::get_options(), L_CONTEXT, Slic3r::GUI::Line::label, Slic3r::GUI::Line::label_en, Slic3r::GUI::Line::label_path, m_lines, m_options, m_options_mode, m_use_custom_ctrl, Slic3r::Search::SettingsIndex::set_line_label(), Slic3r::Search::SettingsIndex::set_path(), and Slic3r::GUI::Line::widget.
Referenced by append_single_option_line(), Slic3r::GUI::Tab::build_preset_description_line(), and Slic3r::GUI::Tab::create_line_with_widget().
| void Slic3r::GUI::OptionsGroup::append_separator | ( | ) |
|
inline |
References append_line(), and create_single_option_line().
Referenced by Slic3r::GUI::ConfigOptionsGroup::append_single_option_line().
|
inlineprotectedvirtual |
Reimplemented in Slic3r::GUI::ConfigOptionsGroup.
Referenced by build_field().
|
inlineprotectedvirtual |
Reimplemented in Slic3r::GUI::ConfigOptionsGroup.
Referenced by build_field().
|
protected |
|
protected |
Generate a wxSizer or wxWindow from a configuration option Precondition: opt resolves to a known ConfigOption Postcondition: fields contains a wx gui object.
This function will be called from Field. Call OptionGroup._on_change(...)
This function will be called from Field.
References _L, back_to_initial_value(), back_to_sys_value(), Slic3r::coBool, Slic3r::coBools, Slic3r::coEnum, Slic3r::coEnums, Slic3r::coFloat, Slic3r::coFloatOrPercent, Slic3r::coFloats, Slic3r::coFloatsOrPercents, Slic3r::coInt, Slic3r::coInts, Slic3r::ConfigOptionDef::color, Slic3r::coNone, Slic3r::coPercent, Slic3r::coPercents, Slic3r::coPoint, Slic3r::coPoints, Slic3r::coString, Slic3r::coStrings, Slic3r::GUI::Field::Create(), ctrl_parent(), edit_custom_gcode, Slic3r::ConfigOptionDef::f_enum_open, Slic3r::ConfigOptionDef::i_enum_open, Slic3r::ConfigOptionDef::legend, m_disabled, m_fields, on_change_OG(), on_kill_focus(), Slic3r::ConfigOptionDef::one_string, parent(), pick_plugin(), Slic3r::ConfigOptionDef::plugin_config, Slic3r::ConfigOptionDef::plugin_picker, Slic3r::ConfigOptionDef::printer_agent_select, Slic3r::ConfigOptionDef::select_open, and Slic3r::ConfigOptionDef::slider.
Referenced by activate_line(), build_field(), and build_field().
| void Slic3r::GUI::OptionsGroup::clear | ( | bool | destroy_custom_ctrl = false | ) |
References custom_ctrl, Slic3r::GUI::free_window(), m_extra_column_item_ptrs, m_fields, m_grid_sizer, m_lines, sizer, and stb.
Referenced by ~OptionsGroup(), and activate().
| void Slic3r::GUI::OptionsGroup::clear_fields_except_of | ( | const std::vector< std::string > | left_fields | ) |
|
inlineprotectedvirtual |
Reimplemented in Slic3r::GUI::ConfigOptionsGroup.
Referenced by append_line().
| Line Slic3r::GUI::OptionsGroup::create_single_option_line | ( | const Option & | option, |
| const std::string & | path = std::string() ) const |
References _, Slic3r::GUI::Line::append_option(), Slic3r::GUI::from_u8(), Slic3r::GUI::get_formatted_tooltip_text(), Slic3r::ConfigOptionDef::label, Slic3r::GUI::Line::label_path, Slic3r::GUI::Option::opt, and Slic3r::GUI::Option::opt_id.
Referenced by append_single_option_line(), Slic3r::GUI::ConfigOptionsGroup::create_single_option_line(), and Slic3r::GUI::ConfigOptionsGroup::create_single_option_line().
| wxWindow * Slic3r::GUI::OptionsGroup::ctrl_parent | ( | ) | const |
References custom_ctrl, m_use_custom_ctrl_as_parent, parent(), staticbox, and stb.
Referenced by activate_line(), and build_field().
|
inline |
|
inline |
References enable_field().
|
inline |
| void Slic3r::GUI::OptionsGroup::enable_field | ( | const t_config_option_key & | opt_key, |
| bool | enable = true ) |
References enable(), Slic3r::f(), and get_field().
Referenced by disable_field().
|
inline |
References m_fields.
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_config_value(), enable_field(), Slic3r::GUI::ConfigOptionsGroup::get_fieldc(), and show_field().
|
inline |
References m_grid_sizer.
Referenced by Slic3r::GUI::ObjectTableSettings::update_extra_column_visible_status().
| Line * Slic3r::GUI::OptionsGroup::get_line | ( | const std::string & | opt_key | ) |
References m_lines.
Referenced by Slic3r::GUI::ObjectTableSettings::update_extra_column_visible_status().
|
inline |
|
static |
References Slic3r::GUI::from_u8(), and L.
Referenced by launch_browser(), Slic3r::GUI::ActionRegistry::materialize_setting_actions(), Slic3r::GUI::OG_CustomCtrl::OnMotion(), and Slic3r::GUI::ogStaticText::SetPathEnd().
|
inline |
References m_fields.
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_config_value().
|
inline |
References show_field().
|
inline |
References label_width, and m_labels_hidden.
|
inline |
| bool Slic3r::GUI::OptionsGroup::is_legend_line | ( | ) |
References Slic3r::ConfigOptionDef::legend, and m_lines.
Referenced by activate_line().
|
static |
References get_url().
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::launch_browser().
|
protectedvirtual |
Reimplemented in Slic3r::GUI::ConfigOptionsGroup, and Slic3r::GUI::ExtruderOptionsGroup.
References m_on_change.
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_config_value(), build_field(), Slic3r::GUI::ConfigOptionsGroup::on_change_OG(), and Slic3r::GUI::ExtruderOptionsGroup::on_change_OG().
|
inlineprotectedvirtual |
Reimplemented in Slic3r::GUI::ConfigOptionsGroup.
Referenced by build_field().
|
inline |
Returns a copy of the pointer of the parent wxWindow. Accessor function is because users are not allowed to change the parent but defining it as const means a lot of const_casts to deal with wx functions.
References m_parent.
Referenced by Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ExtruderOptionsGroup::ExtruderOptionsGroup(), activate_line(), build_field(), and ctrl_parent().
|
protected |
References _L, Slic3r::GUI::from_u8(), Slic3r::PluginManager::get_plugin_capabilities(), Slic3r::PluginManager::instance(), m_parent, Slic3r::PluginDescriptor::name, Slic3r::plugin_capability_type_from_string(), Slic3r::GUI::PluginPickerDialog::selected_capability(), Slic3r::GUI::DPIAware< P >::ShowModal(), Slic3r::PluginManager::try_get_plugin_descriptor(), and Slic3r::Unknown.
Referenced by build_field().
| void Slic3r::GUI::OptionsGroup::remove_option_if | ( | std::function< bool(std::string const &)> const & | comp | ) |
References Slic3r::empty(), m_lines, and m_options_mode.
|
inline |
References m_grid_sizer.
| void Slic3r::GUI::OptionsGroup::set_max_win_width | ( | int | max_win_width | ) |
References custom_ctrl.
| void Slic3r::GUI::OptionsGroup::set_name | ( | const wxString & | new_name | ) |
|
inline |
References m_fields.
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_config_value(), Slic3r::GUI::Tab::on_value_change(), and Slic3r::GUI::ConfigOptionsGroup::reload_config().
| void Slic3r::GUI::OptionsGroup::show_field | ( | const t_config_option_key & | opt_key, |
| bool | show = true ) |
References get_field(), Slic3r::GUI::Field::getWindow(), and m_grid_sizer.
Referenced by hide_field().
| int Slic3r::GUI::OptionsGroup::ctrl_horiz_alignment { wxALIGN_LEFT} |
Referenced by activate().
| OG_CustomCtrl* Slic3r::GUI::OptionsGroup::custom_ctrl { nullptr } |
Referenced by activate(), activate_line(), clear(), ctrl_parent(), Slic3r::GUI::ConfigOptionsGroup::get_custom_ctrl_with_blinking_ptr(), Slic3r::GUI::ConfigOptionsGroup::msw_rescale(), Slic3r::GUI::ConfigOptionsGroup::refresh(), set_max_win_width(), Slic3r::GUI::ConfigOptionsGroup::sys_color_changed(), and Slic3r::GUI::ConfigOptionsGroup::update_visibility().
| bool Slic3r::GUI::OptionsGroup::draw_multi_extruder { false } |
| std::function<void(const t_config_option_key& opt_key)> Slic3r::GUI::OptionsGroup::edit_custom_gcode { nullptr } |
Referenced by build_field().
Referenced by OptionsGroup(), activate(), and activate_line().
| std::function<bool()> Slic3r::GUI::OptionsGroup::have_sys_config { nullptr } |
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_sys_value().
| const wxString Slic3r::GUI::OptionsGroup::icon |
| wxFont Slic3r::GUI::OptionsGroup::label_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) } |
| size_t Slic3r::GUI::OptionsGroup::label_width = 20 |
Referenced by activate(), activate_line(), and hide_labels().
|
protected |
Referenced by build_field().
|
protected |
|
protected |
Field list, contains unique_ptrs of the derived type. using types that need to know what it is beyond the public interface need to cast based on the related ConfigOptionDef.
Referenced by build_field(), clear(), clear_fields_except_of(), disable(), enable(), get_field(), get_value(), Slic3r::GUI::ConfigOptionsGroup::msw_rescale(), set_value(), and Slic3r::GUI::ConfigOptionsGroup::sys_color_changed().
| t_kill_focus Slic3r::GUI::OptionsGroup::m_fill_empty_value { nullptr } |
Referenced by Slic3r::GUI::ConfigOptionsGroup::on_kill_focus().
| std::function<DynamicPrintConfig()> Slic3r::GUI::OptionsGroup::m_get_initial_config { nullptr } |
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_initial_value().
| std::function<DynamicPrintConfig()> Slic3r::GUI::OptionsGroup::m_get_sys_config { nullptr } |
Referenced by Slic3r::GUI::ConfigOptionsGroup::back_to_sys_value().
|
protected |
Referenced by activate(), activate_line(), clear(), get_grid_sizer(), set_grid_vgap(), Slic3r::GUI::ConfigOptionsGroup::Show(), show_field(), and Slic3r::GUI::ConfigOptionsGroup::update_visibility().
| bool Slic3r::GUI::OptionsGroup::m_labels_hidden {false} |
Referenced by activate_line(), and hide_labels().
|
protected |
Referenced by activate(), append_line(), append_separator(), clear(), Slic3r::GUI::ConfigOptionsGroup::get_custom_ctrl_with_blinking_ptr(), get_line(), get_lines(), is_legend_line(), Slic3r::GUI::ConfigOptionsGroup::msw_rescale(), remove_option_if(), Slic3r::GUI::ConfigOptionsGroup::sys_color_changed(), and Slic3r::GUI::ConfigOptionsGroup::update_visibility().
Referenced by on_change_OG().
|
protected |
Referenced by append_line(), build_field(), and Slic3r::GUI::ConfigOptionsGroup::reload_config().
|
protected |
|
protected |
Referenced by OptionsGroup(), activate(), parent(), and pick_plugin().
|
protected |
Referenced by OptionsGroup(), activate_line(), append_line(), and Slic3r::GUI::ConfigOptionsGroup::get_option().
|
protected |
Referenced by activate_line(), and ctrl_parent().
| bool Slic3r::GUI::OptionsGroup::option_label_at_right {false} |
| std::function<void(wxWindow* win)> Slic3r::GUI::OptionsGroup::rescale_extra_column_item { nullptr } |
Referenced by Slic3r::GUI::ConfigOptionsGroup::msw_rescale().
| std::function<void(wxWindow* win)> Slic3r::GUI::OptionsGroup::rescale_near_label_widget { nullptr } |
| wxFont Slic3r::GUI::OptionsGroup::sidetext_font {wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) } |
| int Slic3r::GUI::OptionsGroup::sidetext_width { -1 } |
Referenced by activate_line().
| wxSizer* Slic3r::GUI::OptionsGroup::sizer {nullptr} |
| bool Slic3r::GUI::OptionsGroup::split_multi_line {false} |
| const bool Slic3r::GUI::OptionsGroup::staticbox {true} |
Referenced by OptionsGroup(), activate(), activate_line(), ctrl_parent(), and Slic3r::GUI::ConfigOptionsGroup::sys_color_changed().
| wxWindow* Slic3r::GUI::OptionsGroup::stb { nullptr } |
Referenced by activate(), activate_line(), clear(), ctrl_parent(), Slic3r::GUI::ConfigOptionsGroup::msw_rescale(), set_name(), and Slic3r::GUI::ConfigOptionsGroup::sys_color_changed().
| int Slic3r::GUI::OptionsGroup::sublabel_width { -1 } |
Referenced by activate_line().
| const wxString Slic3r::GUI::OptionsGroup::title |
Referenced by Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ConfigOptionsGroup::ConfigOptionsGroup(), Slic3r::GUI::ExtruderOptionsGroup::ExtruderOptionsGroup(), OptionsGroup(), activate(), Slic3r::GUI::ConfigOptionsGroup::append_single_option_line(), Slic3r::GUI::ConfigOptionsGroup::create_single_option_line(), Slic3r::GUI::ConfigOptionsGroup::get_option(), and Slic3r::GUI::validate_custom_gcode_cb().