OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
ModeSwitchButton Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/SwitchButton.hpp>

Inheritance diagram for ModeSwitchButton:
Collaboration diagram for ModeSwitchButton:

Public Member Functions

 ModeSwitchButton (wxWindow *parent=nullptr, wxWindowID id=wxID_ANY)
int GetSelection () const
void SetSelection (int selection)
void SelectAndNotify (int selection)
void Rescale ()
void msw_rescale ()
bool Enable (bool enable=true) override
void SetDevMode (bool enable=true)
bool GetDevMode () const
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 doRender (wxDC &dc) override
void eraseEvent (wxEraseEvent &evt)
void sizeEvent (wxSizeEvent &evt)
void paintEvent (wxPaintEvent &evt)
void render (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 mouseDown (wxMouseEvent &event)
void mouseReleased (wxMouseEvent &event)
void mouseCaptureLost (wxMouseCaptureLostEvent &event)
int hit_test_selection (const wxPoint &point) const
wxRect thumb_rect_for (int selection) const
void update_tooltip ()

Private Attributes

int m_selection { 0 }
bool m_pressed { false }
bool m_enabled { true }
bool m_dev_mode { false }
wxString m_tooltips [4]
StateColor dot_active
StateColor dot_dimmed
StateColor text_color
StateColor track_background
StateColor track_border

Detailed Description

Constructor & Destructor Documentation

◆ ModeSwitchButton()

ModeSwitchButton::ModeSwitchButton ( wxWindow * parent = nullptr,
wxWindowID id = wxID_ANY )
239{
240 background_color = StateColor(
241 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Disabled),
242 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Normal)
243 );
244 border_color = StateColor(
245 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Disabled),
246 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Hovered | ~StateColor::Focused),
247 std::make_pair(wxColour("#26A69A"), (int) StateColor::Focused),
248 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Normal)
249 );
250 track_background = StateColor(
251 std::make_pair(wxColour("#009688"), (int) StateColor::Disabled),
252 std::make_pair(wxColour("#009688"), (int) StateColor::Normal)
253 );
254 track_border = StateColor(
255 std::make_pair(wxColour("#D9D9D9"), (int) StateColor::Disabled),
256 std::make_pair(wxColour("#009688"), (int) StateColor::Hovered | ~StateColor::Focused),
257 std::make_pair(wxColour("#26A69A"), (int) StateColor::Focused),
258 std::make_pair(wxColour("#009688"), (int) StateColor::Normal)
259 );
260 dot_active = StateColor(
261 std::make_pair(wxColour("#FFFEFE"), (int) StateColor::Disabled),
262 std::make_pair(wxColour("#FFFEFE"), (int) StateColor::Normal)
263 );
264 dot_dimmed = StateColor(
265 std::make_pair(wxColour("#EEEEEE"), (int) StateColor::Disabled),
266 std::make_pair(wxColour("#EEEEEE"), (int) StateColor::Normal)
267 );
268 text_color = StateColor(
269 std::make_pair(wxColour("#6B6B6B"), (int) StateColor::Disabled),
270 std::make_pair(wxColour("#6B6B6B"), (int) StateColor::Normal)
271 );
272
273 state_handler.attach(std::vector<StateColor const*>{&dot_active, &dot_dimmed, &text_color});
274 state_handler.update_binds();
275
276 StaticBox::Create(parent, id, wxDefaultPosition, wxDefaultSize, 0);
277 SetBackgroundColour(StaticBox::GetParentBackgroundColor(parent));
278 SetCursor(wxCursor(wxCURSOR_HAND));
279 SetFont(Label::Body_12);
280
281 m_tooltips[0] = _L("Simple settings");
282 m_tooltips[1] = _L("Advanced settings");
283 m_tooltips[2] = _L("Expert settings");
284 m_tooltips[3] = _L("Developer mode") + "\n" + _L("Launch troubleshoot center") + "...";
285
286 Bind(wxEVT_LEFT_DOWN, &ModeSwitchButton::mouseDown, this);
287 Bind(wxEVT_LEFT_UP, &ModeSwitchButton::mouseReleased, this);
288 Bind(wxEVT_LEFT_DCLICK, &ModeSwitchButton::mouseDown, this);
289 Bind(wxEVT_MOUSE_CAPTURE_LOST, &ModeSwitchButton::mouseCaptureLost, this);
290
291 Rescale();
292}
#define _L(s)
Definition OBJ.cpp:34
static wxFont Body_12
Definition Label.hpp:55
void mouseDown(wxMouseEvent &event)
Definition SwitchButton.cpp:415
StateColor track_border
Definition SwitchButton.hpp:98
wxString m_tooltips[4]
Definition SwitchButton.hpp:93
void mouseCaptureLost(wxMouseCaptureLostEvent &event)
Definition SwitchButton.cpp:452
StateColor dot_active
Definition SwitchButton.hpp:94
void mouseReleased(wxMouseEvent &event)
Definition SwitchButton.cpp:436
StateColor track_background
Definition SwitchButton.hpp:97
StateColor text_color
Definition SwitchButton.hpp:96
void Rescale()
Definition SwitchButton.cpp:310
StateColor dot_dimmed
Definition SwitchButton.hpp:95
@ Hovered
Definition StateColor.hpp:20
@ Normal
Definition StateColor.hpp:16
@ Disabled
Definition StateColor.hpp:22
@ Focused
Definition StateColor.hpp:19
StateColor border_color
Definition StaticBox.hpp:72
static wxColor GetParentBackgroundColor(wxWindow *parent)
Definition StaticBox.cpp:122
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
Definition StaticBox.cpp:51
StateHandler state_handler
Definition StaticBox.hpp:71
StateColor background_color
Definition StaticBox.hpp:73

References _L, StaticBox::background_color, Label::Body_12, StaticBox::border_color, StaticBox::Create(), StateColor::Disabled, dot_active, dot_dimmed, StateColor::Focused, StaticBox::GetParentBackgroundColor(), StateColor::Hovered, m_tooltips, mouseCaptureLost(), mouseDown(), mouseReleased(), StateColor::Normal, Rescale(), StaticBox::state_handler, text_color, track_background, and track_border.

Here is the call graph for this function:

Member Function Documentation

◆ Create()

bool StaticBox::Create ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = 0 )
inherited
52{
53 if (style & wxBORDER_NONE)
54 border_width = 0;
55 wxWindow::Create(parent, id, pos, size, style);
57 state_handler.update_binds();
58 SetBackgroundColour(GetParentBackgroundColor(parent));
59 return true;
60}
#define style
Definition WipeTowerDialog.cpp:101
int border_width
Definition StaticBox.hpp:68
StateColor background_color2
Definition StaticBox.hpp:74

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doRender()

void ModeSwitchButton::doRender ( wxDC & dc)
overrideprotectedvirtual

Reimplemented from StaticBox.

343{
344 const wxRect bounds = GetClientRect();
345 if (bounds.width <= 0 || bounds.height <= 0)
346 return;
347
348 dc.SetPen(*wxTRANSPARENT_PEN);
349 dc.SetBrush(wxBrush(GetBackgroundColour()));
350 dc.DrawRectangle(bounds);
351
352 int states = state_handler.states();
353 double v_center = bounds.height / 2.0;
354
355 // Background
356 dc.SetPen(wxPen(border_color.colorForStates(states), 1));
357 dc.SetBrush(wxBrush(background_color.colorForStates(states)));
358 dc.DrawRoundedRectangle(bounds, v_center);
359
360 if (!m_dev_mode) {
361 double dot_dist = (bounds.width - bounds.height) * 0.50;
362
363 // Track
364 dc.SetPen(wxPen(track_border.colorForStates(states), 1));
365 dc.SetBrush(wxBrush(track_background.colorForStates(states)));
366 wxRect track_rc = bounds;
367 track_rc.width = int(v_center * 2.0 + dot_dist * m_selection);
368 dc.DrawRoundedRectangle(track_rc, v_center);
369
370 // Dots
371 dc.SetPen(*wxTRANSPARENT_PEN);
372 for (int idx = 0; idx < 3; ++idx) {
373 dc.SetBrush(wxBrush((idx <= m_selection ? dot_active : dot_dimmed).colorForStates(states)));
374 dc.DrawCircle(wxPoint(v_center + dot_dist * idx, v_center), track_rc.height * (double)(idx == m_selection ? 0.32 : 0.16));
375 }
376 }
377 else { // Developer mode
378 double scale = 1.00;
379#ifdef __WXOSX__
381 dc.SetFont(dc.GetFont().Scaled(scale));
382#elif defined(__WXMSW__)
383 scale = m_parent->GetDPIScaleFactor();
384 dc.SetFont(dc.GetFont().Scaled(scale));
385#endif
386 wxString str = "DEV";
387 int kerning = 3; // pixels between chars
388 dc.SetTextForeground(text_color.colorForStates(states));
389
390 wxCoord totalWidth = 0;
391 for (char c : str)
392 totalWidth += dc.GetTextExtent(wxString(c)).x + kerning;
393 totalWidth -= kerning;
394
395 wxCoord x = bounds.x + (bounds.width - totalWidth) * 0.50;
396
397 wxFontMetrics fm = dc.GetFontMetrics();
398 int lineHeight = fm.ascent + fm.descent + fm.internalLeading;
399
400 double y_offset = scale;
401#if defined(__WXGTK__)
402 y_offset = 0;
403#endif
404
405 wxCoord y = std::floor(v_center - lineHeight * 0.50 - y_offset);
406
407 for (char c : str) {
408 wxString ch(c);
409 dc.DrawText(ch, x, y);
410 x += dc.GetTextExtent(ch).x + kerning;
411 }
412 }
413}
int scale(const int val)
Definition WipeTowerDialog.cpp:58
int m_selection
Definition SwitchButton.hpp:89
bool m_dev_mode
Definition SwitchButton.hpp:92
double mac_max_scaling_factor()
Definition MacDarkMode.mm:35
void bounds(const NSVGimage &image, Vec2f &min, Vec2f &max)
Definition NSVGUtils.cpp:91

References StaticBox::background_color, StaticBox::border_color, dot_active, dot_dimmed, m_dev_mode, m_selection, Slic3r::GUI::mac_max_scaling_factor(), scale(), StaticBox::state_handler, text_color, track_background, and track_border.

Here is the call graph for this function:

◆ Enable()

bool ModeSwitchButton::Enable ( bool enable = true)
override
321{
322 const bool changed = StaticBox::Enable(enable);
323 if (changed){
324 wxCommandEvent e(EVT_ENABLE_CHANGED);
325 e.SetEventObject(this);
326 GetEventHandler()->ProcessEvent(e);
327 m_enabled = enable; // IsEnabled() not works because variable changes after paint event
328 Refresh();
329 }
330 return changed;
331}
bool m_enabled
Definition SwitchButton.hpp:91

References m_enabled.

◆ eraseEvent()

void StaticBox::eraseEvent ( wxEraseEvent & evt)
protectedinherited
153{
154 // for transparent background, but not work
155#ifdef __WXMSW__
156 wxDC *dc = evt.GetDC();
157 wxSize size = GetSize();
158 wxClientDC dc2(GetParent());
159 dc->Blit({0, 0}, size, &dc2, GetPosition());
160#endif
161}

◆ GetDevMode()

bool ModeSwitchButton::GetDevMode ( ) const
inline
75{return m_dev_mode;};

References m_dev_mode.

◆ GetParentBackgroundColor()

wxColor StaticBox::GetParentBackgroundColor ( wxWindow * parent)
staticinherited
123{
124 if (auto box = dynamic_cast<StaticBox*>(parent)) {
125 if (box->background_color.count() > 0) {
126 if (box->background_color2.count() == 0)
127 return box->background_color.defaultColor();
128 auto s = box->background_color.defaultColor();
129 auto e = box->background_color2.defaultColor();
130 int r = (s.Red() + e.Red()) / 2;
131 int g = (s.Green() + e.Green()) / 2;
132 int b = (s.Blue() + e.Blue()) / 2;
133 return wxColor(r, g, b);
134 }
135 }
136 if (parent)
137 return parent->GetBackgroundColour();
138 return *wxWHITE;
139}
StaticBox()
Definition StaticBox.cpp:33

References StaticBox().

Referenced by Label::Label(), ModeSwitchButton::ModeSwitchButton(), ScalableButton::ScalableButton(), SwitchButton::SwitchButton(), Create(), and SwitchButton::Rescale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSelection()

int ModeSwitchButton::GetSelection ( ) const
inline
66{ return m_selection; }

References m_selection.

◆ hit_test_selection()

int ModeSwitchButton::hit_test_selection ( const wxPoint & point) const
private
460{
461 const int width = std::max(1, GetClientSize().x);
462 const int x = std::clamp(point.x, 0, width - 1);
463 return std::clamp((x * 3) / width, 0, 2);
464}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

Referenced by mouseReleased().

Here is the caller graph for this function:

◆ mouseCaptureLost()

void ModeSwitchButton::mouseCaptureLost ( wxMouseCaptureLostEvent & event)
private
453{
454 m_pressed = false;
455 Refresh();
456 event.Skip();
457}
bool m_pressed
Definition SwitchButton.hpp:90

References m_pressed.

Referenced by ModeSwitchButton().

Here is the caller graph for this function:

◆ mouseDown()

void ModeSwitchButton::mouseDown ( wxMouseEvent & event)
private
416{
417 if (m_dev_mode){
418 Slic3r::GUI::wxGetApp().troubleshoot();
419 return;
420 }
421
422 if (!IsEnabled()) {
423 event.Skip();
424 return;
425 }
426
427 m_pressed = true;
428 if (!HasCapture())
429 CaptureMouse();
430
431 Refresh();
432
433 event.Skip();
434}
bool IsEnabled()
Definition dark_mode.cpp:32

References m_dev_mode, and m_pressed.

Referenced by ModeSwitchButton().

Here is the caller graph for this function:

◆ mouseReleased()

void ModeSwitchButton::mouseReleased ( wxMouseEvent & event)
private
437{
438 if (m_pressed) {
439 m_pressed = false;
440 if (HasCapture())
441 ReleaseMouse();
442
443 if (GetClientRect().Contains(event.GetPosition()))
444 SelectAndNotify(hit_test_selection(event.GetPosition()));
445
446 Refresh();
447 }
448
449 event.Skip();
450}
int hit_test_selection(const wxPoint &point) const
Definition SwitchButton.cpp:459
void SelectAndNotify(int selection)
Definition SwitchButton.cpp:301

References hit_test_selection(), m_pressed, and SelectAndNotify().

Referenced by ModeSwitchButton().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ msw_rescale()

void ModeSwitchButton::msw_rescale ( )
inline
71{ Rescale(); }

References Rescale().

Here is the call graph for this function:

◆ paintEvent()

void StaticBox::paintEvent ( wxPaintEvent & evt)
protectedinherited
170{
171 // depending on your system you may need to look at double-buffered dcs
172 wxPaintDC dc(this);
173 render(dc);
174}
void render(wxDC &dc)
Definition StaticBox.cpp:181

References render().

Here is the call graph for this function:

◆ render()

void StaticBox::render ( wxDC & dc)
protectedinherited
182{
183#ifdef __WXMSW__
184 if (radius == 0) {
185 doRender(dc);
186 return;
187 }
188
189 wxSize size = GetSize();
190 if (size.x <= 0 || size.y <= 0)
191 return;
192 wxMemoryDC memdc(&dc);
193 if (!memdc.IsOk()) {
194 doRender(dc);
195 return;
196 }
197 wxBitmap bmp(size.x, size.y);
198 memdc.SelectObject(bmp);
199 //memdc.Blit({0, 0}, size, &dc, {0, 0});
200 memdc.SetBackground(wxBrush(GetBackgroundColour()));
201 memdc.Clear();
202 {
203 wxGCDC dc2(memdc);
204 doRender(dc2);
205 }
206
207 memdc.SelectObject(wxNullBitmap);
208 dc.DrawBitmap(bmp, 0, 0);
209#else
210 doRender(dc);
211#endif
212}
virtual void doRender(wxDC &dc)
Definition StaticBox.cpp:214
double radius
Definition StaticBox.hpp:67

References doRender(), and radius.

Referenced by paintEvent(), Button::render(), FanSwitchButton::render(), ImageSwitchButton::render(), SpinInput::render(), TabButton::render(), TempInput::render(), and TextInput::render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Rescale()

void ModeSwitchButton::Rescale ( )
311{
312 const wxSize button_size = FromDIP(wxSize(48, 18));
313 SetMinSize(button_size);
314 SetMaxSize(button_size);
315 SetSize(button_size);
316 SetCornerRadius(button_size.y / 2.0);
317 Refresh();
318}
void SetCornerRadius(double radius)
Definition StaticBox.cpp:62

References StaticBox::SetCornerRadius().

Referenced by ModeSwitchButton(), and msw_rescale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectAndNotify()

void ModeSwitchButton::SelectAndNotify ( int selection)
302{
303 if (m_dev_mode || !IsEnabled())
304 return;
305
306 SetSelection(selection);
307 Slic3r::GUI::wxGetApp().save_mode(m_selection);
308}
void SetSelection(int selection)
Definition SwitchButton.cpp:294

References m_dev_mode, m_selection, and SetSelection().

Referenced by mouseReleased().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBackgroundColor()

◆ SetBackgroundColor2()

void StaticBox::SetBackgroundColor2 ( StateColor const & color)
inherited
116{
117 background_color2 = color;
118 state_handler.update_binds();
119 Refresh();
120}

References background_color2, and state_handler.

◆ SetBackgroundColorNormal()

void StaticBox::SetBackgroundColorNormal ( wxColor const & color)
inherited
110{
111 background_color.setColorForStates(color, 0);
112 Refresh();
113}

References background_color.

Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().

Here is the caller graph for this function:

◆ SetBorderColor()

◆ SetBorderColorNormal()

void StaticBox::SetBorderColorNormal ( wxColor const & color)
inherited
97{
98 border_color.setColorForStates(color, 0);
99 Refresh();
100}

References border_color.

Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().

Here is the caller graph for this function:

◆ SetBorderStyle()

void StaticBox::SetBorderStyle ( wxPenStyle style)
inherited
76{
78 Refresh();
79}
wxPenStyle border_style
Definition StaticBox.hpp:70

References border_style, and style.

◆ SetBorderWidth()

void StaticBox::SetBorderWidth ( int width)
inherited
82{
84 Refresh();
85}

References border_width.

Referenced by MultiSwitchButton::MultiSwitchButton(), Slic3r::GUI::KBShortcutsDialog::create_page(), and Button::SetStyle().

Here is the caller graph for this function:

◆ SetCornerRadius()

◆ SetDevMode()

void ModeSwitchButton::SetDevMode ( bool enable = true)
334{
335 if (enable != m_dev_mode){
336 m_dev_mode = enable;
338 Refresh();
339 }
340}
void update_tooltip()
Definition SwitchButton.cpp:477

References m_dev_mode, and update_tooltip().

Here is the call graph for this function:

◆ SetSelection()

void ModeSwitchButton::SetSelection ( int selection)
295{
296 m_selection = std::clamp(selection, 0, 2);
298 Refresh();
299}

References m_selection, and update_tooltip().

Referenced by SelectAndNotify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTopMargin()

void StaticBox::SetTopMargin ( int margin)
inherited
70{
71 this->top_margin = margin;
72 Refresh();
73}
int top_margin
Definition StaticBox.hpp:69

References top_margin.

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().

Here is the caller graph for this function:

◆ ShowBadge()

void StaticBox::ShowBadge ( bool show)
inherited
142{
143 if (show && badge.name() != "badge") {
144 badge = ScalableBitmap(this, "badge", 18);
145 Refresh();
146 } else if (!show && !badge.name().empty()) {
147 badge = ScalableBitmap {};
148 Refresh();
149 }
150}
ScalableBitmap badge
Definition StaticBox.hpp:75

References badge.

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().

Here is the caller graph for this function:

◆ sizeEvent()

void StaticBox::sizeEvent ( wxSizeEvent & evt)
protectedinherited
164{
165 Refresh();
166 evt.Skip();
167}

◆ thumb_rect_for()

wxRect ModeSwitchButton::thumb_rect_for ( int selection) const
private
467{
468 const wxRect bounds = GetClientRect().Deflate(3);
469 const int thumb_diameter = std::max(FromDIP(10), bounds.height - FromDIP(2));
470 const int y = bounds.y + (bounds.height - thumb_diameter) / 2;
471
472 const int travel = std::max(0, bounds.width - thumb_diameter);
473 const int x = bounds.x + (travel * std::clamp(selection, 0, 2)) / 2;
474 return wxRect(x, y, thumb_diameter, thumb_diameter);
475}

◆ update_tooltip()

void ModeSwitchButton::update_tooltip ( )
private
478{
479 if (m_dev_mode)
480 SetToolTip(m_tooltips[3]);
481 else
482 SetToolTip(m_tooltips[m_selection]);
483}

References m_dev_mode, m_selection, and m_tooltips.

Referenced by SetDevMode(), and SetSelection().

Here is the caller graph for this function:

Member Data Documentation

◆ background_color

◆ background_color2

StateColor StaticBox::background_color2
protectedinherited

◆ badge

ScalableBitmap StaticBox::badge
protectedinherited

Referenced by doRender(), and ShowBadge().

◆ border_color

◆ border_style

wxPenStyle StaticBox::border_style = wxPENSTYLE_SOLID
protectedinherited

Referenced by doRender(), and SetBorderStyle().

◆ border_width

◆ dot_active

StateColor ModeSwitchButton::dot_active
private

Referenced by ModeSwitchButton(), and doRender().

◆ dot_dimmed

StateColor ModeSwitchButton::dot_dimmed
private

Referenced by ModeSwitchButton(), and doRender().

◆ m_dev_mode

bool ModeSwitchButton::m_dev_mode { false }
private

◆ m_enabled

bool ModeSwitchButton::m_enabled { true }
private
91{ true };

Referenced by Enable().

◆ m_pressed

bool ModeSwitchButton::m_pressed { false }
private
90{ false };

Referenced by mouseCaptureLost(), mouseDown(), and mouseReleased().

◆ m_selection

int ModeSwitchButton::m_selection { 0 }
private

◆ m_tooltips

wxString ModeSwitchButton::m_tooltips[4]
private

Referenced by ModeSwitchButton(), and update_tooltip().

◆ radius

◆ state_handler

◆ text_color

StateColor ModeSwitchButton::text_color
private

Referenced by ModeSwitchButton(), and doRender().

◆ top_margin

int StaticBox::top_margin = 0
protectedinherited

Referenced by doRender(), and SetTopMargin().

◆ track_background

StateColor ModeSwitchButton::track_background
private

Referenced by ModeSwitchButton(), and doRender().

◆ track_border

StateColor ModeSwitchButton::track_border
private

Referenced by ModeSwitchButton(), and doRender().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/SwitchButton.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/SwitchButton.cpp