#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/SpinInput.hpp>
Public Member Functions | |
| SpinInput () | |
| SpinInput (wxWindow *parent, wxString text, wxString label="", const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, int min=0, int max=100, int initial=0, const int &step=1) | |
| void | Create (wxWindow *parent, wxString text, wxString label="", const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, int min=0, int max=100, int initial=0, int step=1) |
| void | SetCornerRadius (double radius) |
| void | SetLabel (const wxString &label) wxOVERRIDE |
| void | SetLabelColor (StateColor const &color) |
| void | SetTextColor (StateColor const &color) |
| void | SetSize (wxSize const &size) |
| void | Rescale () |
| virtual bool | Enable (bool enable=true) wxOVERRIDE |
| wxTextCtrl * | GetTextCtrl () |
| void | SetValue (const wxString &text) |
| void | SetValue (int value) |
| int | GetValue () const |
| void | SetStep (int value) |
| int | GetStep () |
| void | SetRange (int min, int max) |
| int | GetMin () const |
| int | GetMax () const |
Protected Member Functions | |
| void | DoSetToolTipText (wxString const &tip) override |
Private Member Functions | |
| void | paintEvent (wxPaintEvent &evt) |
| void | render (wxDC &dc) |
| void | messureSize () |
| Button * | createButton (bool inc) |
| void | mouseWheelMoved (wxMouseEvent &event) |
| void | keyPressed (wxKeyEvent &event) |
| void | onTimer (wxTimerEvent &evnet) |
| void | onTextLostFocus (wxEvent &event) |
| void | onTextChanged (wxCommandEvent &event) |
| void | onTextEnter (wxCommandEvent &event) |
| void | sendSpinEvent () |
Private Attributes | |
| wxSize | labelSize |
| StateColor | label_color |
| StateColor | text_color |
| wxTextCtrl * | text_ctrl |
| Button * | button_inc |
| Button * | button_dec |
| wxTimer | timer |
| int | val |
| int | min |
| int | max |
| int | delta |
| int | step |
Static Private Attributes | |
| static const int | SpinInputWidth = 200 |
| static const int | SpinInputHeight = 50 |
| SpinInput::SpinInput | ( | ) |
References SpinInput(), StateColor::Disabled, StateColor::Hovered, label_color, StateColor::Normal, and text_color.
Referenced by SpinInput(), and SpinInput().
| SpinInput::SpinInput | ( | wxWindow * | parent, |
| wxString | text, | ||
| wxString | label = "", | ||
| const wxPoint & | pos = wxDefaultPosition, | ||
| const wxSize & | size = wxDefaultSize, | ||
| long | style = 0, | ||
| int | min = 0, | ||
| int | max = 100, | ||
| int | initial = 0, | ||
| const int & | step = 1 ) |
References SpinInput(), Create(), max, min, step, and style.
| void SpinInput::Create | ( | wxWindow * | parent, |
| wxString | text, | ||
| wxString | label = "", | ||
| const wxPoint & | pos = wxDefaultPosition, | ||
| const wxSize & | size = wxDefaultSize, | ||
| long | style = 0, | ||
| int | min = 0, | ||
| int | max = 100, | ||
| int | initial = 0, | ||
| int | step = 1 ) |
References Label::Body_12, Label::Body_14, button_dec, button_inc, StaticBox::Create(), createButton(), delta, keyPressed(), label_color, max, messureSize(), min, onTextChanged(), onTextEnter(), onTextLostFocus(), onTimer(), SetRange(), SetStep(), SetValue(), step, style, text_color, text_ctrl, and timer.
Referenced by SpinInput().
|
private |
References delta, sendSpinEvent(), SetValue(), step, text_ctrl, timer, and val.
Referenced by Create().
|
overrideprotected |
|
virtual |
References button_dec, button_inc, text_color, and text_ctrl.
|
inline |
|
inline |
|
inline |
References GetTextCtrl(), and text_ctrl.
Referenced by GetTextCtrl(), Slic3r::GUI::SpinCtrl::msw_rescale(), and Slic3r::GUI::TextureImportDialog::preview_spin_text_value().
| int SpinInput::GetValue | ( | ) | const |
References val.
Referenced by Slic3r::GUI::AMSCountPopupWindow::AMSCountPopupWindow().
|
private |
References max, min, sendSpinEvent(), SetValue(), step, text_ctrl, and val.
Referenced by Create(), and wxDEFINE_EVENT().
|
private |
References button_dec, button_inc, labelSize, and text_ctrl.
Referenced by Create(), Rescale(), and SetLabel().
|
private |
References delta, sendSpinEvent(), SetValue(), step, text_ctrl, and val.
|
private |
References text_ctrl.
Referenced by Create().
|
private |
References sendSpinEvent(), SetValue(), text_ctrl, and val.
Referenced by Create(), and onTextLostFocus().
|
private |
References onTextEnter(), and timer.
Referenced by Create().
|
private |
References delta, sendSpinEvent(), SetValue(), step, and val.
Referenced by Create().
|
private |
References render().
Referenced by wxDEFINE_EVENT().
|
private |
References button_inc, label_color, labelSize, and StaticBox::render().
Referenced by paintEvent().
| void SpinInput::Rescale | ( | ) |
References button_dec, button_inc, and messureSize().
Referenced by Slic3r::GUI::SpinCtrl::msw_rescale(), and SetSize().
|
private |
Referenced by createButton(), keyPressed(), mouseWheelMoved(), onTextEnter(), and onTimer().
| void SpinInput::SetCornerRadius | ( | double | radius | ) |
| void SpinInput::SetLabel | ( | const wxString & | label | ) |
| void SpinInput::SetLabelColor | ( | StateColor const & | color | ) |
References label_color.
| void SpinInput::SetRange | ( | int | min, |
| int | max ) |
| void SpinInput::SetSize | ( | wxSize const & | size | ) |
References Rescale().
Referenced by Slic3r::GUI::SpinCtrl::msw_rescale().
|
inline |
| void SpinInput::SetTextColor | ( | StateColor const & | color | ) |
References text_color.
| void SpinInput::SetValue | ( | const wxString & | text | ) |
References SetValue().
Referenced by Create(), createButton(), keyPressed(), mouseWheelMoved(), onTextEnter(), onTimer(), Slic3r::GUI::SpinCtrl::set_value(), and SetValue().
| void SpinInput::SetValue | ( | int | value | ) |
|
private |
Referenced by Create(), Enable(), messureSize(), and Rescale().
|
private |
Referenced by Create(), Enable(), messureSize(), render(), and Rescale().
|
private |
Referenced by Create(), createButton(), mouseWheelMoved(), and onTimer().
|
private |
Referenced by SpinInput(), Create(), render(), and SetLabelColor().
|
private |
Referenced by messureSize(), and render().
|
private |
Referenced by SpinInput(), Create(), keyPressed(), SetRange(), and SetValue().
|
private |
Referenced by SpinInput(), Create(), keyPressed(), SetRange(), and SetValue().
|
staticprivate |
|
staticprivate |
|
private |
Referenced by SpinInput(), Create(), createButton(), GetStep(), keyPressed(), mouseWheelMoved(), onTimer(), and SetStep().
|
private |
Referenced by SpinInput(), Create(), Enable(), and SetTextColor().
|
private |
Referenced by Create(), createButton(), DoSetToolTipText(), Enable(), GetTextCtrl(), keyPressed(), messureSize(), mouseWheelMoved(), onTextChanged(), onTextEnter(), and SetValue().
|
private |
Referenced by Create(), createButton(), and onTextLostFocus().
|
private |
Referenced by createButton(), GetValue(), keyPressed(), mouseWheelMoved(), onTextEnter(), onTimer(), and SetValue().