![]() |
Prusa Slicer 2.6.0
|
#include <src/slic3r/GUI/Field.hpp>
Inheritance diagram for Slic3r::GUI::Field:
Collaboration diagram for Slic3r::GUI::Field:Classes | |
| class | EnterPressed |
Public Member Functions | |
| void | on_back_to_initial_value () |
| Call the attached m_back_to_initial_value method. | |
| void | on_back_to_sys_value () |
| Call the attached m_back_to_sys_value method. | |
| virtual void | set_value (const boost::any &value, bool change_event)=0 |
| Sets a value for this control. subclasses should overload with a specific version Postcondition: Method does not fire the on_change event. | |
| virtual void | set_last_meaningful_value () |
| virtual void | set_na_value () |
| virtual boost::any & | get_value ()=0 |
| Gets a boost::any representing this control. subclasses should overload with a specific version. | |
| virtual void | enable ()=0 |
| virtual void | disable ()=0 |
| void | toggle (bool en) |
| Fires the enable or disable function, based on the input. | |
| virtual wxString | get_tooltip_text (const wxString &default_string) |
| void | field_changed () |
| Field (const ConfigOptionDef &opt, const t_config_option_key &id) | |
| Field (wxWindow *parent, const ConfigOptionDef &opt, const t_config_option_key &id) | |
| virtual | ~Field () |
| virtual wxSizer * | getSizer () |
| If you don't know what you are getting back, check both methods for nullptr. | |
| virtual wxWindow * | getWindow () |
| bool | is_matched (const std::string &string, const std::string &pattern) |
| void | get_value_by_opt_type (wxString &str, const bool check_value=true) |
| virtual void | msw_rescale () |
| virtual void | sys_color_changed () |
| bool | get_enter_pressed () const |
| void | set_enter_pressed (bool pressed) |
| bool | set_undo_bitmap (const ScalableBitmap *bmp) |
| bool | set_undo_to_sys_bitmap (const ScalableBitmap *bmp) |
| bool | set_label_colour (const wxColour *clr) |
| bool | set_undo_tooltip (const wxString *tip) |
| bool | set_undo_to_sys_tooltip (const wxString *tip) |
| bool | has_undo_ui () const |
| const wxBitmapBundle & | undo_bitmap () const |
| const wxString * | undo_tooltip () const |
| const wxBitmapBundle & | undo_to_sys_bitmap () const |
| const wxString * | undo_to_sys_tooltip () const |
| const wxColour * | label_color () const |
| const bool | blink () const |
| bool * | get_blink_ptr () |
Static Public Member Functions | |
| template<class T > | |
| static t_field | Create (wxWindow *parent, const ConfigOptionDef &opt, const t_config_option_key &id) |
| Factory method for generating new derived classes. | |
| static int | def_width () |
| static int | def_width_wider () |
| static int | def_width_thinner () |
Public Attributes | |
| wxWindow * | m_parent {nullptr} |
| parent wx item, opportunity to refactor (probably not necessary - data duplication) | |
| t_kill_focus | m_on_kill_focus {nullptr} |
| Function object to store callback passed in from owning object. | |
| t_change | m_on_change {nullptr} |
| Function object to store callback passed in from owning object. | |
| t_back_to_init | m_back_to_initial_value { nullptr } |
| Function object to store callback passed in from owning object. | |
| t_back_to_init | m_back_to_sys_value { nullptr } |
| bool | m_disable_change_event {false} |
| bool | m_is_modified_value {false} |
| bool | m_is_nonsys_value {true} |
| const ConfigOptionDef | m_opt {ConfigOptionDef()} |
| Copy of ConfigOption for deduction purposes. | |
| const t_config_option_key | m_opt_id |
| int | m_opt_idx = 0 |
| {""}; | |
| double | opt_height { 0.0 } |
| bool | parent_is_custom_ctrl { false } |
Protected Member Functions | |
| virtual void | PostInitialize () |
| virtual void | BUILD ()=0 |
| Finish constructing the Field's wxWidget-related properties, including setting its own sizer, etc. | |
| void | on_kill_focus () |
| Call the attached on_kill_focus method. It's important to use wxEvent instead of wxFocusEvent, in another case we can't unfocused control at all. | |
| void | on_change_field () |
| Call the attached on_change method. | |
Protected Attributes | |
| boost::any | m_value |
| boost::any | m_last_meaningful_value |
| int | m_em_unit |
| bool | bEnterPressed = false |
Private Attributes | |
| UndoValueUI | m_undo_ui |
Friends | |
| class | OptionsGroup |
|
inline |
|
inline |
|
virtual |
References getWindow(), m_back_to_initial_value, m_back_to_sys_value, m_on_change, and m_on_kill_focus.
Here is the call graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::UndoValueUI::blink, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().
Here is the caller graph for this function:
|
protectedpure virtual |
Finish constructing the Field's wxWidget-related properties, including setting its own sizer, etc.
Implemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
Referenced by PostInitialize().
Here is the caller graph for this function:
|
inlinestatic |
Factory method for generating new derived classes.
p;
|
static |
|
static |
Referenced by Slic3r::GUI::DiamTextCtrl::DiamTextCtrl(), and Slic3r::GUI::OptionsGroup::activate_line().
Here is the caller graph for this function:
|
static |
Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
Referenced by toggle(), and Slic3r::GUI::PhysicalPrinterDialog::update_printers().
Here is the caller graph for this function:
|
pure virtual |
Implemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
Referenced by toggle(), and Slic3r::GUI::PhysicalPrinterDialog::update_printers().
Here is the caller graph for this function:
|
inline |
References on_change_field().
Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::UndoValueUI::blink, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.
Referenced by Slic3r::GUI::ConfigOptionsGroup::get_custom_ctrl_with_blinking_ptr().
Here is the caller graph for this function:
|
inline |
References bEnterPressed.
|
virtual |
References _L, and Slic3r::GUI::from_u8().
Here is the call graph for this function:
|
pure virtual |
Gets a boost::any representing this control. subclasses should overload with a specific version.
Implemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
References _, _L, Slic3r::coFloat, Slic3r::coFloatOrPercent, Slic3r::coFloats, Slic3r::coFloatsOrPercents, Slic3r::coInt, Slic3r::coPercent, Slic3r::coPercents, Slic3r::coPoints, Slic3r::coString, Slic3r::coStrings, Slic3r::GUI::double_to_string(), Slic3r::GUI::format_wxstr(), Slic3r::GUI::from_u8(), Slic3r::GUI::get_thumbnails_string(), Slic3r::GUI::into_u8(), Slic3r::is_decimal_separator_point(), L, Slic3r::GUI::na_value(), Slic3r::ConfigOptionFloatsTempl< NULLABLE >::nil_value(), and Slic3r::GUI::show_error().
Here is the call graph for this function:
|
inlinevirtual |
If you don't know what you are getting back, check both methods for nullptr.
Reimplemented in Slic3r::GUI::PointCtrl, and Slic3r::GUI::SliderCtrl.
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::correct_items_positions(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::render(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::update_visibility().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
Referenced by ~Field(), Slic3r::GUI::Tab::activate_option(), Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::correct_items_positions(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::get_max_win_width(), Slic3r::GUI::OG_CustomCtrl::get_pos(), PostInitialize(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::render(), Slic3r::GUI::OptionsGroup::show_field(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::update_visibility().
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_bitmap.
Referenced by Slic3r::GUI::OG_CustomCtrl::get_pos(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::UndoValueUI::label_color, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().
Here is the caller graph for this function:
|
virtual |
Reimplemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, and Slic3r::GUI::StaticText.
References em_unit().
Here is the call graph for this function:| void Slic3r::GUI::Field::on_back_to_initial_value | ( | ) |
Call the attached m_back_to_initial_value method.
| void Slic3r::GUI::Field::on_back_to_sys_value | ( | ) |
Call the attached m_back_to_sys_value method.
|
protected |
Call the attached on_change method.
Referenced by field_changed().
Here is the caller graph for this function:
|
protected |
Call the attached on_kill_focus method. It's important to use wxEvent instead of wxFocusEvent, in another case we can't unfocused control at all.
|
protectedvirtual |
References BUILD(), Slic3r::coBools, Slic3r::coFloats, Slic3r::coInts, Slic3r::coPercents, Slic3r::coStrings, em_unit(), getWindow(), if(), m_em_unit, m_opt, m_opt_id, m_opt_idx, m_parent, parent_is_custom_ctrl, and Slic3r::ConfigOptionDef::type.
Here is the call graph for this function:
|
inline |
References bEnterPressed.
Referenced by Slic3r::GUI::Field::EnterPressed::EnterPressed(), and Slic3r::GUI::Field::EnterPressed::~EnterPressed().
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_label_colour().
Referenced by Slic3r::GUI::Tab::create_line_with_widget(), Slic3r::GUI::Tab::decorate(), and Slic3r::GUI::Tab::update_label_colours().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, and Slic3r::GUI::SpinCtrl.
|
inlinevirtual |
Reimplemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, and Slic3r::GUI::SpinCtrl.
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_bitmap().
Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_to_sys_bitmap().
Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_to_sys_tooltip().
Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_tooltip().
Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Sets a value for this control. subclasses should overload with a specific version Postcondition: Method does not fire the on_change event.
Implemented in Slic3r::GUI::TextCtrl, Slic3r::GUI::CheckBox, Slic3r::GUI::SpinCtrl, Slic3r::GUI::Choice, Slic3r::GUI::ColourPicker, Slic3r::GUI::PointCtrl, Slic3r::GUI::StaticText, and Slic3r::GUI::SliderCtrl.
Referenced by Slic3r::GUI::Tab::on_value_change().
Here is the caller graph for this function:
|
virtual |
Reimplemented in Slic3r::GUI::ColourPicker, and Slic3r::GUI::PointCtrl.
|
inline |
Fires the enable or disable function, based on the input.
References disable(), and enable().
Referenced by Slic3r::GUI::Tab::compatible_widget_reload(), Slic3r::GUI::Tab::toggle_option(), Slic3r::GUI::ObjectSettings::update_config_values(), and Slic3r::GUI::TabFilament::update_line_with_near_label_widget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References ScalableBitmap::bmp(), Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_bitmap.
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References ScalableBitmap::bmp(), Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_to_sys_bitmap.
Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_to_sys_tooltip.
|
inlineinherited |
References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_tooltip.
|
friend |
|
protected |
Referenced by get_enter_pressed(), and set_enter_pressed().
| t_back_to_init Slic3r::GUI::Field::m_back_to_initial_value { nullptr } |
Function object to store callback passed in from owning object.
Referenced by ~Field().
| t_back_to_init Slic3r::GUI::Field::m_back_to_sys_value { nullptr } |
Referenced by ~Field().
| bool Slic3r::GUI::Field::m_disable_change_event {false} |
|
protected |
Referenced by PostInitialize().
| bool Slic3r::GUI::Field::m_is_modified_value {false} |
Referenced by Slic3r::GUI::Tab::decorate().
| bool Slic3r::GUI::Field::m_is_nonsys_value {true} |
Referenced by Slic3r::GUI::Tab::decorate().
|
protected |
| t_change Slic3r::GUI::Field::m_on_change {nullptr} |
Function object to store callback passed in from owning object.
Referenced by ~Field().
| t_kill_focus Slic3r::GUI::Field::m_on_kill_focus {nullptr} |
Function object to store callback passed in from owning object.
Referenced by ~Field().
| const ConfigOptionDef Slic3r::GUI::Field::m_opt {ConfigOptionDef()} |
Copy of ConfigOption for deduction purposes.
Referenced by PostInitialize(), and Slic3r::GUI::PhysicalPrinterDialog::update_host_type().
| const t_config_option_key Slic3r::GUI::Field::m_opt_id |
Referenced by PostInitialize().
| int Slic3r::GUI::Field::m_opt_idx = 0 |
{""};
Referenced by PostInitialize().
| wxWindow* Slic3r::GUI::Field::m_parent {nullptr} |
parent wx item, opportunity to refactor (probably not necessary - data duplication)
Referenced by PostInitialize().
|
privateinherited |
Referenced by Slic3r::GUI::UndoValueUIManager::blink(), Slic3r::GUI::UndoValueUIManager::get_blink_ptr(), Slic3r::GUI::UndoValueUIManager::has_undo_ui(), Slic3r::GUI::UndoValueUIManager::label_color(), Slic3r::GUI::UndoValueUIManager::set_label_colour(), Slic3r::GUI::UndoValueUIManager::set_undo_bitmap(), Slic3r::GUI::UndoValueUIManager::set_undo_to_sys_bitmap(), Slic3r::GUI::UndoValueUIManager::set_undo_to_sys_tooltip(), Slic3r::GUI::UndoValueUIManager::set_undo_tooltip(), Slic3r::GUI::UndoValueUIManager::undo_bitmap(), Slic3r::GUI::UndoValueUIManager::undo_to_sys_bitmap(), Slic3r::GUI::UndoValueUIManager::undo_to_sys_tooltip(), and Slic3r::GUI::UndoValueUIManager::undo_tooltip().
|
protected |
Referenced by Slic3r::GUI::StaticText::get_value().
| double Slic3r::GUI::Field::opt_height { 0.0 } |
| bool Slic3r::GUI::Field::parent_is_custom_ctrl { false } |
Referenced by PostInitialize().