OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::PrinterInfoBox Class Reference

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

Inheritance diagram for Slic3r::GUI::PrinterInfoBox:
Collaboration diagram for Slic3r::GUI::PrinterInfoBox:

Public Member Functions

 PrinterInfoBox (wxWindow *parent, SelectMachineDialog *select_dialog)
void UpdatePlate (const std::string &plate_name)
ComboBox * GetPrinterComboBox () const
void SetPrinterName (const wxString &printer_name)
void SetPrinters (const std::vector< MachineObject * > &sorted_printers)
void EnableEditing (bool enable)
void EnableRefreshButton (bool enable)
void SetDefault (bool from_sd)
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)
void paintEvent (wxPaintEvent &evt)
void render (wxDC &dc)
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 Create ()
void OnBtnQuestionClicked (wxCommandEvent &event)

Private Attributes

SelectMachineDialog * m_select_dialog
Label * m_stext_printer_title { nullptr }
ComboBox * m_comboBox_printer { nullptr }
ScalableButton * m_button_refresh { nullptr }
ScalableButton * m_button_question { nullptr }
wxStaticBitmap * m_bed_image { nullptr }

Detailed Description

Constructor & Destructor Documentation

◆ PrinterInfoBox()

Slic3r::GUI::PrinterInfoBox::PrinterInfoBox ( wxWindow * parent,
SelectMachineDialog * select_dialog )
6990 : StaticBox(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER), m_select_dialog(select_dialog)
6991{
6992 Create();
6993}
SelectMachineDialog * m_select_dialog
Definition SelectMachine.hpp:673
void Create()
Definition SelectMachine.cpp:7128
StaticBox()
Definition StaticBox.cpp:33

References StaticBox::StaticBox(), Create(), and m_select_dialog.

Here is the call graph for this function:

Member Function Documentation

◆ Create() [1/2]

void Slic3r::GUI::PrinterInfoBox::Create ( )
private
7129{
7130 /*printer combobox*/
7131 wxBoxSizer* sizer_split_printer = new wxBoxSizer(wxHORIZONTAL);
7132 m_stext_printer_title = new Label(this, _L("Printer"), wxALIGN_TOP);
7134 m_stext_printer_title->SetForegroundColour(0x909090);
7135
7136 m_button_question = new ScalableButton(this, wxID_ANY, "icon_qusetion", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true);
7137 m_button_question->Bind(wxEVT_BUTTON, &PrinterInfoBox::OnBtnQuestionClicked, this);
7138 m_button_question->SetToolTip(_L("Click here if you can't connect to the printer"));
7139 m_button_question->SetMinSize(wxSize(FromDIP(18), FromDIP(18)));
7140 m_button_question->SetMaxSize(wxSize(FromDIP(18), FromDIP(18)));
7141
7142 auto m_split_line = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
7143 m_split_line->SetBackgroundColour(0xeeeeee);
7144 m_split_line->SetMinSize(wxSize(-1, 1));
7145 m_split_line->SetMaxSize(wxSize(-1, 1));
7146 sizer_split_printer->Add(0, 0, 0, wxEXPAND, 0);
7147 sizer_split_printer->Add(m_stext_printer_title, 0, wxALIGN_CENTER_VERTICAL, 0);
7148 sizer_split_printer->AddSpacer(FromDIP(5));
7149 sizer_split_printer->Add(m_button_question, 0, wxALIGN_CENTER_VERTICAL, 0);
7150 sizer_split_printer->Add(m_split_line, 1, wxALIGN_CENTER_VERTICAL, 0);
7151
7152 wxBoxSizer* sizer_printer_area = new wxBoxSizer(wxHORIZONTAL);
7153 wxBoxSizer* sizer_bed_staticbox = new wxBoxSizer(wxVERTICAL);
7154 wxBoxSizer* sizer_printer_staticbox = new wxBoxSizer(wxHORIZONTAL);
7155
7156 /*printer area*/
7157 auto printer_staticbox = new StaticBox(this);
7158 printer_staticbox->SetMinSize(wxSize(FromDIP(338), FromDIP(68)));
7159 printer_staticbox->SetMaxSize(wxSize(FromDIP(338), FromDIP(68)));
7160 printer_staticbox->SetBorderColor(wxColour("#CECECE"));
7161
7162 m_comboBox_printer = new ComboBox(printer_staticbox, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
7163 m_comboBox_printer->SetBorderWidth(0);
7164 m_comboBox_printer->SetMinSize(wxSize(FromDIP(300), FromDIP(60)));
7165 m_comboBox_printer->SetMaxSize(wxSize(FromDIP(300), FromDIP(60)));
7166 m_comboBox_printer->SetBackgroundColor(*wxWHITE);
7168
7169 m_button_refresh = new ScalableButton(printer_staticbox, wxID_ANY, "refresh_printer", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, true);
7171
7172 sizer_printer_staticbox->Add(0, 0, 0, wxLEFT, FromDIP(7));
7173 sizer_printer_staticbox->Add(m_comboBox_printer, 0, wxALIGN_CENTER, 0);
7174 sizer_printer_staticbox->Add(m_button_refresh, 0, wxALIGN_CENTER, 0);
7175
7176 printer_staticbox->SetSizer(sizer_printer_staticbox);
7177 printer_staticbox->Layout();
7178 printer_staticbox->Fit();
7179
7180 /*bed area*/
7181 auto bed_staticbox = new StaticBox(this);
7182 bed_staticbox->SetMinSize(wxSize(FromDIP(68), FromDIP(68)));
7183 bed_staticbox->SetMaxSize(wxSize(FromDIP(68), FromDIP(68)));
7184 bed_staticbox->SetBorderColor(wxColour("#EEEEEE"));
7185
7186 m_bed_image = new wxStaticBitmap(bed_staticbox, wxID_ANY, create_scaled_bitmap("bed_cool", this, 40));
7187 m_bed_image->SetBackgroundColour(*wxWHITE);
7188 m_bed_image->SetMinSize(wxSize(FromDIP(40), FromDIP(40)));
7189 m_bed_image->SetMaxSize(wxSize(FromDIP(40), FromDIP(40)));
7190
7191 //m_text_bed_type = new Label(bed_staticbox);
7192 //m_text_bed_type->SetForegroundColour(wxColour(144, 144, 144));
7193 //m_text_bed_type->SetMaxSize(wxSize(FromDIP(80), FromDIP(24)));
7194 //m_text_bed_type->SetFont(Label::Body_13);
7195
7196 //sizer_bed_staticbox->Add(0, 0, 0, wxTOP, FromDIP(10));
7197 sizer_bed_staticbox->AddStretchSpacer();
7198 sizer_bed_staticbox->Add(m_bed_image, 0, wxALIGN_CENTER, 0);
7199 sizer_bed_staticbox->AddStretchSpacer();
7200 //sizer_bed_staticbox->AddSpacer(FromDIP(6));
7201 //sizer_bed_staticbox->Add(m_text_bed_type, 0, wxALIGN_CENTER, 0);
7202
7203 bed_staticbox->SetSizer(sizer_bed_staticbox);
7204 bed_staticbox->Layout();
7205 bed_staticbox->Fit();
7206
7207 sizer_printer_area->Add(printer_staticbox, 0, wxALIGN_CENTER, 0);
7208 sizer_printer_area->Add(0, 0, 0, wxLEFT, FromDIP(4));
7209 sizer_printer_area->Add(bed_staticbox, 0, wxALIGN_CENTER, 0);
7210
7211
7212 wxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
7213 //main_sizer->Add(m_text_bed_type, 0, wxTOP, 0);
7214 main_sizer->Add(0, 0, 0, wxTOP, FromDIP(15));
7215 main_sizer->Add(sizer_split_printer, 1, wxEXPAND, 0);
7216 main_sizer->Add(0, 0, 0, wxTOP, FromDIP(8));
7217 main_sizer->Add(sizer_printer_area, 0, wxTOP, 0);
7218 SetSizer(main_sizer);
7219}
#define _L(s)
Definition OBJ.cpp:34
static wxFont Head_13
Definition Label.hpp:46
ScalableButton * m_button_question
Definition SelectMachine.hpp:678
void OnBtnQuestionClicked(wxCommandEvent &event)
Definition SelectMachine.cpp:7221
wxStaticBitmap * m_bed_image
Definition SelectMachine.hpp:680
ScalableButton * m_button_refresh
Definition SelectMachine.hpp:677
ComboBox * m_comboBox_printer
Definition SelectMachine.hpp:676
Label * m_stext_printer_title
Definition SelectMachine.hpp:675
void on_selection_changed(wxCommandEvent &event)
Definition SelectMachine.cpp:4234
void on_refresh(wxCommandEvent &event)
Definition SelectMachine.cpp:3858
wxBitmap create_scaled_bitmap(const std::string &bmp_name_in, wxWindow *win, const int px_cnt, const bool grayscale, const std::string &new_color, const bool menu_bitmap, const bool resize, const bool bitmap2, const std::vector< std::string > &array_new_color)
Definition wxExtensions.cpp:448

References StaticBox::StaticBox(), _L, create_scaled_bitmap(), Label::Head_13, m_bed_image, m_button_question, m_button_refresh, m_comboBox_printer, m_select_dialog, m_stext_printer_title, Slic3r::GUI::SelectMachineDialog::on_refresh(), Slic3r::GUI::SelectMachineDialog::on_selection_changed(), and OnBtnQuestionClicked().

Referenced by PrinterInfoBox().

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

◆ Create() [2/2]

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
StateColor border_color
Definition StaticBox.hpp:72
int border_width
Definition StaticBox.hpp:68
static wxColor GetParentBackgroundColor(wxWindow *parent)
Definition StaticBox.cpp:122
StateHandler state_handler
Definition StaticBox.hpp:71
StateColor background_color
Definition StaticBox.hpp:73
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 StaticBox::doRender ( wxDC & dc)
protectedvirtualinherited

Reimplemented in FilamentStepIndicator, ModeSwitchButton, StepCtrl, StepIndicator, and TabCtrl.

215{
216 wxSize size = GetSize();
217 int states = state_handler.states();
218 if (background_color2.count() == 0) {
219 if ((border_width && border_color.count() > 0) || background_color.count() > 0) {
220 int topM = top_margin > 0 ? top_margin : 0;
221 wxRect rc(0, topM, size.x, size.y - topM);
222 if (border_width && border_color.count() > 0) {
223 const double scale = dc.GetContentScaleFactor();
224
225 // Snap rect edges to physical pixel boundaries so the 1px pen doesn't straddle a pixel boundary
226 auto snap = [&](int logical) -> int {
227 return (int)(ceil(logical * scale) / scale);
228 };
229
230 int deflate = snap(border_width / 2.0); // at 175%: snap(0.5) = snap→1/1.75 ≈ 1
231 rc.x += deflate;
232 rc.y += deflate;
233 rc.width -= deflate * 2;
234 rc.height -= deflate * 2;
235 dc.SetPen(wxPen(border_color.colorForStates(states), border_width, border_style));
236 } else {
237 dc.SetPen(wxPen(background_color.colorForStates(states)));
238 }
239 if (background_color.count() > 0)
240 dc.SetBrush(wxBrush(background_color.colorForStates(states)));
241 else
242 dc.SetBrush(wxBrush(GetBackgroundColour()));
243 if (radius == 0) {
244 dc.DrawRectangle(rc);
245 }
246 else {
247 dc.DrawRoundedRectangle(rc, radius - border_width);
248 }
249 }
250 }
251 else {
252 wxColor start = background_color.colorForStates(states);
253 wxColor stop = background_color2.colorForStates(states);
254 int r = start.Red(), g = start.Green(), b = start.Blue();
255 int dr = (int) stop.Red() - r, dg = (int) stop.Green() - g, db = (int) stop.Blue() - b;
256 int lr = 0, lg = 0, lb = 0;
257 for (int y = 0; y < size.y; ++y) {
258 dc.SetPen(wxPen(wxColor(r, g, b)));
259 dc.DrawLine(0, y, size.x, y);
260 lr += dr; while (lr >= size.y) { ++r, lr -= size.y; } while (lr <= -size.y) { --r, lr += size.y; }
261 lg += dg; while (lg >= size.y) { ++g, lg -= size.y; } while (lg <= -size.y) { --g, lg += size.y; }
262 lb += db; while (lb >= size.y) { ++b, lb -= size.y; } while (lb <= -size.y) { --b, lb += size.y; }
263 }
264 }
265
266 if (badge.bmp().IsOk()) {
267 auto s = badge.bmp().GetScaledSize();
268 dc.DrawBitmap(badge.bmp(), size.x - s.x, top_margin > 0 ? top_margin : 0);
269 }
270}
int scale(const int val)
Definition WipeTowerDialog.cpp:58
ScalableBitmap badge
Definition StaticBox.hpp:75
int top_margin
Definition StaticBox.hpp:69
double radius
Definition StaticBox.hpp:67
wxPenStyle border_style
Definition StaticBox.hpp:70

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

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

◆ EnableEditing()

void Slic3r::GUI::PrinterInfoBox::EnableEditing ( bool enable)
7098{
7099 m_comboBox_printer->Enable(enable);
7100 m_button_refresh->Enable(enable);
7101}

References m_button_refresh, and m_comboBox_printer.

◆ EnableRefreshButton()

void Slic3r::GUI::PrinterInfoBox::EnableRefreshButton ( bool enable)
7104{
7105 if (m_button_refresh->IsEnabled() != enable) {
7106 m_button_refresh->Enable(enable);
7107 }
7108}

References m_button_refresh.

◆ 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}

◆ 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}

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:

◆ GetPrinterComboBox()

ComboBox * Slic3r::GUI::PrinterInfoBox::GetPrinterComboBox ( ) const
inline
657{ return m_comboBox_printer; }

References m_comboBox_printer.

◆ OnBtnQuestionClicked()

void Slic3r::GUI::PrinterInfoBox::OnBtnQuestionClicked ( wxCommandEvent & event)
private
7222{
7223 wxLaunchDefaultBrowser(wxT("https://www.orcaslicer.com/wiki/")); // Orca: neutral wiki link (vendor URL removed)
7224}

Referenced by Create().

Here is the caller 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

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:

◆ 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}

References border_style, and style.

◆ SetBorderWidth()

void StaticBox::SetBorderWidth ( int width)
inherited
82{
84 Refresh();
85}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

References border_width.

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

Here is the caller graph for this function:

◆ SetCornerRadius()

◆ SetDefault()

void Slic3r::GUI::PrinterInfoBox::SetDefault ( bool from_sd)
7111{
7112 if (!from_sd)
7113 {
7114 m_comboBox_printer->Show(true);
7115 m_button_refresh->Show(true);
7116 }
7117 else
7118 {
7119 m_comboBox_printer->Show(true);
7120 m_button_refresh->Show(false);
7121 }
7122
7123 m_comboBox_printer->Clear();
7124 m_comboBox_printer->SetValue(wxEmptyString);
7125 m_comboBox_printer->Enable();
7126}

References m_button_refresh, and m_comboBox_printer.

◆ SetPrinterName()

void Slic3r::GUI::PrinterInfoBox::SetPrinterName ( const wxString & printer_name)
inline
658{ m_comboBox_printer->SetValue(printer_name); };

References m_comboBox_printer.

◆ SetPrinters()

void Slic3r::GUI::PrinterInfoBox::SetPrinters ( const std::vector< MachineObject * > & sorted_printers)
7063{
7064 m_comboBox_printer->Clear();
7065
7066 std::vector<DropDown::Item> drop_items;
7067 for (MachineObject* obj : sorted_printers)
7068 {
7069 wxString shown_dev_name = wxString::FromUTF8(obj->get_dev_name());
7070 if (obj->is_lan_mode_printer()) {
7071 shown_dev_name += _L("(LAN)");
7072 }
7073
7074 DropDown::Item drop_item;
7075 drop_item.text = shown_dev_name;
7076 drop_item.text_static_tips = _get_tips(obj);
7077
7078 // update image
7079 try
7080 {
7081 drop_item.icon = create_scaled_bitmap("printer_preview_" + obj->printer_type, this, 32);
7082 drop_item.icon_textctrl = create_scaled_bitmap("printer_preview_" + obj->printer_type, this, 52);
7083 }
7084 catch (const std::exception&)
7085 {
7086 drop_item.icon = create_scaled_bitmap("printer_preview_BL-P001", this, 32);
7087 drop_item.icon_textctrl = create_scaled_bitmap("printer_preview_BL-P001", this, 52);
7088 }
7089
7090 drop_item.tip = obj->get_printer_type_display_str();
7091 drop_items.emplace_back(drop_item);
7092 }
7093
7094 m_comboBox_printer->SetItems(drop_items);
7095}
wxString text_static_tips
Definition DropDown.hpp:39
wxBitmap icon_textctrl
Definition DropDown.hpp:41
wxString text
Definition DropDown.hpp:38
wxString tip
Definition DropDown.hpp:47
wxBitmap icon
Definition DropDown.hpp:40
static wxString _get_tips(MachineObject *obj_)
Definition SelectMachine.cpp:7038

References Slic3r::GUI::_get_tips(), _L, create_scaled_bitmap(), DropDown::Item::icon, DropDown::Item::icon_textctrl, m_comboBox_printer, DropDown::Item::text, DropDown::Item::text_static_tips, and DropDown::Item::tip.

Here is the call graph for this function:

◆ SetTopMargin()

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

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}

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}

◆ UpdatePlate()

void Slic3r::GUI::PrinterInfoBox::UpdatePlate ( const std::string & plate_name)
6996{
6997 if (plate_name.empty())
6998 {
6999 //m_text_bed_type->Hide();
7000 }
7001 else
7002 {
7003 wxString name;
7004 if (plate_name == "Cool Plate") {
7005 name = _L("Smooth Cool Plate");
7006 m_bed_image->SetBitmap(create_scaled_bitmap("bed_cool", this, 40));
7007 }
7008 else if (plate_name == "Engineering Plate") {
7009 name = _L("Engineering Plate");
7010 m_bed_image->SetBitmap(create_scaled_bitmap("bed_engineering", this, 40));
7011 }
7012 else if (plate_name == "High Temp Plate") {
7013 name = _L("Smooth High Temp Plate");
7014 m_bed_image->SetBitmap(create_scaled_bitmap("bed_high_templ", this, 40));
7015 }
7016 else if (plate_name == "Textured PEI Plate") {
7017 name = _L("Textured PEI Plate");
7018 m_bed_image->SetBitmap(create_scaled_bitmap("bed_pei", this, 40));
7019 }
7020 else if (plate_name == "Supertack Plate" || plate_name == "SuperTack Plate") {
7021 name = _L("Cool Plate (SuperTack)");
7022 m_bed_image->SetBitmap(create_scaled_bitmap("bed_cool_supertack", this, 40));
7023 }
7024
7025 m_bed_image->SetToolTip(name);
7026
7027 //if (name.length() > 8) {
7028 // m_text_bed_type->SetFont(Label::Body_9);
7029 //}
7030 //else{
7031 // m_text_bed_type->SetFont(Label::Body_12);
7032 //}
7033 //m_text_bed_type->SetLabelText(name);
7034 //m_text_bed_type->Show();
7035 }
7036}

References _L, create_scaled_bitmap(), and m_bed_image.

Here is the call 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

◆ m_bed_image

wxStaticBitmap* Slic3r::GUI::PrinterInfoBox::m_bed_image { nullptr }
private
680{ nullptr };

Referenced by Create(), and UpdatePlate().

◆ m_button_question

ScalableButton* Slic3r::GUI::PrinterInfoBox::m_button_question { nullptr }
private
678{ nullptr };

Referenced by Create().

◆ m_button_refresh

ScalableButton* Slic3r::GUI::PrinterInfoBox::m_button_refresh { nullptr }
private
677{ nullptr };

Referenced by Create(), EnableEditing(), EnableRefreshButton(), and SetDefault().

◆ m_comboBox_printer

ComboBox* Slic3r::GUI::PrinterInfoBox::m_comboBox_printer { nullptr }
private

◆ m_select_dialog

SelectMachineDialog* Slic3r::GUI::PrinterInfoBox::m_select_dialog
private

Referenced by PrinterInfoBox(), and Create().

◆ m_stext_printer_title

Label* Slic3r::GUI::PrinterInfoBox::m_stext_printer_title { nullptr }
private
675{ nullptr };

Referenced by Create().

◆ radius

◆ state_handler

◆ top_margin

int StaticBox::top_margin = 0
protectedinherited

Referenced by doRender(), and SetTopMargin().


The documentation for this class was generated from the following files: