OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::ConfigWizardPage Struct Reference

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

Inheritance diagram for Slic3r::GUI::ConfigWizardPage:
Collaboration diagram for Slic3r::GUI::ConfigWizardPage:

Public Member Functions

 ConfigWizardPage (ConfigWizard *parent, wxString title, wxString shortname, unsigned indent=0)
virtual ~ConfigWizardPage ()
template<class T>
T * append (T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
wxStaticText * append_text (wxString text)
void append_spacer (int space)
ConfigWizard::priv * wizard_p () const
virtual void apply_custom_config (DynamicPrintConfig &config)
virtual void set_run_reason (ConfigWizard::RunReason run_reason)
virtual void on_activate ()

Public Attributes

ConfigWizard * parent
const wxString shortname
wxBoxSizer * content
const unsigned indent

Detailed Description

Constructor & Destructor Documentation

◆ ConfigWizardPage()

Slic3r::GUI::ConfigWizardPage::ConfigWizardPage ( ConfigWizard * parent,
wxString title,
wxString shortname,
unsigned indent = 0 )
478 : wxPanel(parent->p->hscroll)
479 , parent(parent)
480 , shortname(std::move(shortname))
481 , indent(indent)
482{
483 auto *sizer = new wxBoxSizer(wxVERTICAL);
484
485 auto *text = new wxStaticText(this, wxID_ANY, std::move(title), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
486 const auto font = GetFont().MakeBold().Scaled(1.5);
487 text->SetFont(font);
488 text->SetForegroundColour(*wxBLACK);
489 sizer->Add(text, 0, wxALIGN_LEFT, 0);
490 sizer->AddSpacer(10);
491
492 content = new wxBoxSizer(wxVERTICAL);
493 sizer->Add(content, 1, wxEXPAND);
494
495 SetSizer(sizer);
496
497 // There is strange layout on Linux with GTK3,
498 // So, non-active pages will be hidden later, on wxEVT_SHOW, after completed Layout() for all pages
499 if (!wxLinux_gtk3)
500 this->Hide();
501
502 Bind(wxEVT_SIZE, [this](wxSizeEvent &event) {
503 this->Layout();
504 event.Skip();
505 });
506
507 wxGetApp().UpdateDarkUI(this);
508}
#define wxLinux_gtk3
Definition ConfigWizard.cpp:91
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
const unsigned indent
Definition ConfigWizard_private.hpp:221
ConfigWizard * parent
Definition ConfigWizard_private.hpp:218
wxBoxSizer * content
Definition ConfigWizard_private.hpp:220
const wxString shortname
Definition ConfigWizard_private.hpp:219

References content, indent, parent, shortname, wxLinux_gtk3, and wxStaticText.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageMaterials::PageMaterials(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageTemperatures::PageTemperatures(), and Slic3r::GUI::PageWelcome::PageWelcome().

Here is the caller graph for this function:

◆ ~ConfigWizardPage()

Slic3r::GUI::ConfigWizardPage::~ConfigWizardPage ( )
virtual
510{}

Member Function Documentation

◆ append()

template<class T>
T * Slic3r::GUI::ConfigWizardPage::append ( T * thing,
int proportion = 0,
int flag = wxEXPAND|wxTOP|wxBOTTOM,
int border = 10 )
inline
228 {
229 content->Add(thing, proportion, flag, border);
230 return thing;
231 }

References content.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageMaterials::PageMaterials(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageTemperatures::PageTemperatures(), Slic3r::GUI::PageWelcome::PageWelcome(), and append_text().

Here is the caller graph for this function:

◆ append_spacer()

void Slic3r::GUI::ConfigWizardPage::append_spacer ( int space)
522{
523 // FIXME: scaling
524 content->AddSpacer(space);
525}

References content.

Referenced by Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageMaterials::PageMaterials(), and Slic3r::GUI::PageTemperatures::PageTemperatures().

Here is the caller graph for this function:

◆ append_text()

wxStaticText * Slic3r::GUI::ConfigWizardPage::append_text ( wxString text)
513{
514 auto *widget = new wxStaticText(this, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
515 widget->Wrap(WRAP_WIDTH);
516 widget->SetMinSize(wxSize(WRAP_WIDTH, -1));
517 append(widget);
518 return widget;
519}
@ WRAP_WIDTH
Definition ConfigWizard_private.hpp:50
T * append(T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
Definition ConfigWizard_private.hpp:227

References append(), Slic3r::GUI::WRAP_WIDTH, and wxStaticText.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageTemperatures::PageTemperatures(), and Slic3r::GUI::PageWelcome::PageWelcome().

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

◆ apply_custom_config()

virtual void Slic3r::GUI::ConfigWizardPage::apply_custom_config ( DynamicPrintConfig & config)
inlinevirtual

◆ on_activate()

virtual void Slic3r::GUI::ConfigWizardPage::on_activate ( )
inlinevirtual

Reimplemented in Slic3r::GUI::PageMaterials.

240{}

◆ set_run_reason()

virtual void Slic3r::GUI::ConfigWizardPage::set_run_reason ( ConfigWizard::RunReason run_reason)
inlinevirtual

◆ wizard_p()

ConfigWizard::priv * Slic3r::GUI::ConfigWizardPage::wizard_p ( ) const
inline
236{ return parent->p.get(); }

References parent.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageMaterials::on_activate(), Slic3r::GUI::PageMaterials::select_material(), and Slic3r::GUI::PageMaterials::update_lists().

Here is the caller graph for this function:

Member Data Documentation

◆ content

wxBoxSizer* Slic3r::GUI::ConfigWizardPage::content

◆ indent

const unsigned Slic3r::GUI::ConfigWizardPage::indent

◆ parent

◆ shortname


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