OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::CheckboxFileDialog::ExtraPanel Struct Reference
Inheritance diagram for Slic3r::GUI::CheckboxFileDialog::ExtraPanel:
Collaboration diagram for Slic3r::GUI::CheckboxFileDialog::ExtraPanel:

Public Member Functions

 ExtraPanel (wxWindow *parent)

Static Public Member Functions

static wxWindow * ctor (wxWindow *parent)

Public Attributes

wxCheckBox * cbox

Detailed Description

Constructor & Destructor Documentation

◆ ExtraPanel()

Slic3r::GUI::CheckboxFileDialog::ExtraPanel::ExtraPanel ( wxWindow * parent)
347 : wxPanel(parent, wxID_ANY)
348{
349 // WARN: wxMSW does some extra shenanigans to calc the extra control size.
350 // It first calls the create function with a dummy empty wxDialog parent and saves its size.
351 // Afterwards, the create function is called again with the real parent.
352 // Additionally there's no way to pass any extra data to the create function (no closure),
353 // which is why we have to this stuff here. Grrr!
354 auto *dlg = dynamic_cast<CheckboxFileDialog*>(parent);
355 const wxString checkbox_label(dlg != nullptr ? dlg->checkbox_label : wxString("String long enough to contain dlg->checkbox_label"));
356
357 auto* sizer = new wxBoxSizer(wxHORIZONTAL);
358 cbox = new wxCheckBox(this, wxID_ANY, checkbox_label);
359 cbox->SetValue(true);
360 sizer->AddSpacer(5);
361 sizer->Add(this->cbox, 0, wxEXPAND | wxALL, 5);
362 SetSizer(sizer);
363 sizer->SetSizeHints(this);
364}
CheckboxFileDialog(wxWindow *parent, const wxString &checkbox_label, bool checkbox_value, const wxString &message=wxFileSelectorPromptStr, const wxString &default_dir=wxEmptyString, const wxString &default_file=wxEmptyString, const wxString &wildcard=wxFileSelectorDefaultWildcardStr, long style=wxFD_DEFAULT_STYLE, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, const wxString &name=wxFileDialogNameStr)
Definition GUI_Utils.cpp:370
wxString checkbox_label
Definition GUI_Utils.hpp:427
wxCheckBox * cbox
Definition GUI_Utils.hpp:421

References Slic3r::GUI::CheckboxFileDialog::CheckboxFileDialog(), cbox, and Slic3r::GUI::CheckboxFileDialog::checkbox_label.

Referenced by ctor().

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

Member Function Documentation

◆ ctor()

wxWindow * Slic3r::GUI::CheckboxFileDialog::ExtraPanel::ctor ( wxWindow * parent)
static
366 {
367 return new ExtraPanel(parent);
368}
ExtraPanel(wxWindow *parent)
Definition GUI_Utils.cpp:346

References ExtraPanel().

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

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

Member Data Documentation

◆ cbox

wxCheckBox* Slic3r::GUI::CheckboxFileDialog::ExtraPanel::cbox

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