#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/ImageSwitchButton.hpp>
Public Member Functions | |
| ImageSwitchButton (wxWindow *parent, ScalableBitmap &img_on, ScalableBitmap &img_off, long style=0) | |
| void | SetLabels (wxString const &lbl_on, wxString const &lbl_off) |
| void | SetImages (ScalableBitmap &img_on, ScalableBitmap &img_off) |
| void | SetTextColor (StateColor const &color) |
| void | SetValue (bool value) |
| void | SetPadding (int padding) |
| bool | GetValue () |
| void | Rescale () |
| bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0) |
| void | SetCornerRadius (double radius) |
| void | SetBorderWidth (int width) |
| void | SetTopMargin (int margin) |
| void | SetBorderColor (StateColor const &color) |
| void | SetBorderColorNormal (wxColor const &color) |
| void | SetBorderStyle (wxPenStyle style) |
| void | SetBackgroundColor (StateColor const &color) |
| void | SetBackgroundColorNormal (wxColor const &color) |
| void | SetBackgroundColor2 (StateColor const &color) |
| void | ShowBadge (bool show) |
Static Public Member Functions | |
| static wxColor | GetParentBackgroundColor (wxWindow *parent) |
Protected Member Functions | |
| void | eraseEvent (wxEraseEvent &evt) |
| void | sizeEvent (wxSizeEvent &evt) |
| virtual void | doRender (wxDC &dc) |
Protected Attributes | |
| double | radius |
| int | border_width = 1 |
| int | top_margin = 0 |
| wxPenStyle | border_style = wxPENSTYLE_SOLID |
| StateHandler | state_handler |
| StateColor | border_color |
| StateColor | background_color |
| StateColor | background_color2 |
| ScalableBitmap | badge |
Private Member Functions | |
| void | messureSize () |
| void | paintEvent (wxPaintEvent &evt) |
| void | render (wxDC &dc) |
| void | mouseDown (wxMouseEvent &event) |
| void | mouseReleased (wxMouseEvent &event) |
| void | mouseEnterWindow (wxMouseEvent &event) |
| void | mouseLeaveWindow (wxMouseEvent &event) |
| void | sendButtonEvent () |
Private Attributes | |
| ScalableBitmap | m_on |
| ScalableBitmap | m_off |
| bool | m_on_off |
| int | m_padding |
| bool | pressedDown = false |
| bool | hover = false |
| wxSize | textSize |
| wxSize | minSize |
| wxString | labels [2] |
| StateColor | text_color |
| ImageSwitchButton::ImageSwitchButton | ( | wxWindow * | parent, |
| ScalableBitmap & | img_on, | ||
| ScalableBitmap & | img_off, | ||
| long | style = 0 ) |
References ImageSwitchButton(), StaticBox::background_color, StaticBox::border_color, StaticBox::Create(), DEFAULT_HOVER_COL, DEFAULT_PRESS_COL, StateColor::Disabled, StateColor::Focused, StateColor::Hovered, m_off, m_on, m_padding, messureSize(), StateColor::Normal, StateColor::Pressed, StaticBox::radius, style, and text_color.
Referenced by ImageSwitchButton().
|
inherited |
References background_color, background_color2, border_color, border_width, GetParentBackgroundColor(), state_handler, and style.
Referenced by FanSwitchButton::FanSwitchButton(), ImageSwitchButton::ImageSwitchButton(), ModeSwitchButton::ModeSwitchButton(), StaticBox(), Button::Create(), SpinInput::Create(), TabButton::Create(), TempInput::Create(), and TextInput::Create().
|
protectedvirtualinherited |
Reimplemented in FilamentStepIndicator, ModeSwitchButton, StepCtrl, StepIndicator, and TabCtrl.
References background_color, background_color2, badge, border_color, border_style, border_width, radius, scale(), state_handler, and top_margin.
Referenced by FilamentStepIndicator::doRender(), StepCtrl::doRender(), StepIndicator::doRender(), and render().
|
protectedinherited |
|
staticinherited |
References StaticBox().
Referenced by Label::Label(), ModeSwitchButton::ModeSwitchButton(), ScalableButton::ScalableButton(), SwitchButton::SwitchButton(), Create(), and SwitchButton::Rescale().
|
inline |
References m_on_off.
Referenced by messureSize(), render(), and SetLabels().
|
private |
References GetValue(), labels, and textSize.
Referenced by ImageSwitchButton(), Rescale(), SetImages(), SetLabels(), SetPadding(), SetTextColor(), and SetValue().
|
private |
References pressedDown.
|
private |
References hover.
|
private |
|
private |
References m_on_off, pressedDown, and sendButtonEvent().
|
private |
|
private |
References ScalableBitmap::bmp(), StateColor::Disabled, ScalableBitmap::GetBmpHeight(), ScalableBitmap::GetBmpWidth(), GetValue(), labels, m_off, m_on, m_padding, StaticBox::render(), StaticBox::state_handler, text_color, and textSize.
Referenced by paintEvent().
| void ImageSwitchButton::Rescale | ( | ) |
|
private |
Referenced by mouseReleased().
|
inherited |
References background_color, and state_handler.
Referenced by Slic3r::GUI::CaliPageButton::CaliPageButton(), TabCtrl::AppendItem(), MultiSwitchButton::AppendOption(), Slic3r::GUI::KBShortcutsDialog::create_page(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::CreateGui(), Slic3r::GUI::wgtDeviceNozzleRackArea::CreateNozzleBox(), Slic3r::GUI::DeviceErrorDialog::init_button(), ButtonsListCtrl::InsertPage(), TabButtonsListCtrl::InsertPage(), ButtonsListCtrl::OnPaint(), TabButtonsListCtrl::OnPaint(), Slic3r::GUI::s_set_bg_style(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::SetDisable(), Button::SetStyle(), and Slic3r::GUI::style_sidebar_icon_btn().
|
inherited |
References background_color2, and state_handler.
|
inherited |
References background_color.
Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().
|
inherited |
References border_color, and state_handler.
Referenced by Slic3r::GUI::CaliPageButton::CaliPageButton(), Slic3r::GUI::ExtruderGroup::ExtruderGroup(), TabCtrl::TabCtrl(), Slic3r::GUI::wgtDeviceNozzleRackTitle::wgtDeviceNozzleRackTitle(), MultiSwitchButton::AppendOption(), Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::CreateGui(), Slic3r::GUI::wgtDeviceNozzleRackArea::CreateNozzleBox(), Slic3r::GUI::DeviceErrorDialog::init_button(), Slic3r::GUI::s_set_bg_style(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::SetSelected(), Button::SetStyle(), and Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::UpdateColourStyle().
|
inherited |
References border_color.
Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().
|
inherited |
References border_style, and style.
|
inherited |
References border_width.
Referenced by MultiSwitchButton::MultiSwitchButton(), Slic3r::GUI::KBShortcutsDialog::create_page(), and Button::SetStyle().
|
inherited |
References radius.
Referenced by Slic3r::GUI::CaliPageButton::CaliPageButton(), Slic3r::GUI::ExtruderGroup::ExtruderGroup(), MultiSwitchButton::MultiSwitchButton(), Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), Slic3r::GUI::wgtDeviceNozzleRackTitle::wgtDeviceNozzleRackTitle(), TabCtrl::AppendItem(), MultiSwitchButton::AppendOption(), Slic3r::GUI::KBShortcutsDialog::create_page(), Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::CreateGui(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::CreateGui(), Slic3r::GUI::HotEndTable::CreateNozzleBox(), Slic3r::GUI::wgtDeviceNozzleRackArea::CreateNozzleBox(), Slic3r::GUI::DeviceErrorDialog::init_button(), ButtonsListCtrl::InsertPage(), TabButtonsListCtrl::InsertPage(), Slic3r::GUI::CaliPageButton::msw_rescale(), ModeSwitchButton::Rescale(), MultiSwitchButton::SetButtonCornerRadius(), Button::SetStyle(), and Slic3r::GUI::style_sidebar_icon_btn().
| void ImageSwitchButton::SetImages | ( | ScalableBitmap & | img_on, |
| ScalableBitmap & | img_off ) |
| void ImageSwitchButton::SetLabels | ( | wxString const & | lbl_on, |
| wxString const & | lbl_off ) |
References GetValue(), labels, and messureSize().
| void ImageSwitchButton::SetPadding | ( | int | padding | ) |
| void ImageSwitchButton::SetTextColor | ( | StateColor const & | color | ) |
References messureSize(), StaticBox::state_handler, and text_color.
|
inherited |
References top_margin.
Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().
| void ImageSwitchButton::SetValue | ( | bool | value | ) |
|
inherited |
References badge.
Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().
|
protectedinherited |
|
protectedinherited |
Referenced by Button::Button(), FanSwitchButton::FanSwitchButton(), ImageSwitchButton::ImageSwitchButton(), ModeSwitchButton::ModeSwitchButton(), TabButton::TabButton(), Create(), ModeSwitchButton::doRender(), doRender(), SetBackgroundColor(), SetBackgroundColorNormal(), and TabButton::SetBGColor().
|
protectedinherited |
Referenced by Create(), doRender(), and SetBackgroundColor2().
|
protectedinherited |
Referenced by doRender(), and ShowBadge().
|
protectedinherited |
Referenced by FanSwitchButton::FanSwitchButton(), ImageSwitchButton::ImageSwitchButton(), ModeSwitchButton::ModeSwitchButton(), StaticBox(), StepCtrlBase::StepCtrlBase(), Create(), ModeSwitchButton::doRender(), doRender(), TabCtrl::doRender(), SetBorderColor(), SetBorderColorNormal(), and Button::SetStyle().
|
protectedinherited |
Referenced by doRender(), and SetBorderStyle().
|
protectedinherited |
|
private |
Referenced by mouseEnterWindow(), and mouseLeaveWindow().
|
private |
Referenced by messureSize(), render(), and SetLabels().
|
private |
Referenced by ImageSwitchButton(), render(), and SetImages().
|
private |
Referenced by ImageSwitchButton(), render(), and SetImages().
|
private |
Referenced by GetValue(), mouseReleased(), and SetValue().
|
private |
Referenced by ImageSwitchButton(), render(), and SetPadding().
|
private |
|
private |
Referenced by mouseDown(), and mouseReleased().
|
protectedinherited |
|
protectedinherited |
Referenced by ModeSwitchButton::ModeSwitchButton(), StaticBox(), Button::Create(), Create(), TabButton::Create(), FilamentStepIndicator::doRender(), ModeSwitchButton::doRender(), doRender(), StepCtrl::doRender(), StepIndicator::doRender(), TabCtrl::doRender(), Button::GetValue(), Button::render(), FanSwitchButton::render(), ImageSwitchButton::render(), TabButton::render(), SetBackgroundColor(), SetBackgroundColor2(), TabButton::SetBGColor(), SetBorderColor(), TabButton::SetBorderColor(), Button::SetTextColor(), FanSwitchButton::SetTextColor(), ImageSwitchButton::SetTextColor(), TabButton::SetTextColor(), and Button::SetValue().
|
private |
Referenced by ImageSwitchButton(), render(), and SetTextColor().
|
private |
Referenced by messureSize(), and render().
|
protectedinherited |
Referenced by doRender(), and SetTopMargin().