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

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

Inheritance diagram for Slic3r::GUI::AddMachinePanel:
Collaboration diagram for Slic3r::GUI::AddMachinePanel:

Public Member Functions

 AddMachinePanel (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 ~AddMachinePanel ()
void msw_rescale ()

Protected Member Functions

void on_add_machine (wxCommandEvent &event)

Protected Attributes

Button * m_button_add_machine
wxStaticText * m_staticText_add_machine
wxStaticBitmap * m_bitmap_empty

Detailed Description

Constructor & Destructor Documentation

◆ AddMachinePanel()

Slic3r::GUI::AddMachinePanel::AddMachinePanel ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxString & name = wxEmptyString )
67 : wxPanel(parent, id, pos, size, style)
68{
69 this->SetBackgroundColour(0xEEEEEE);
70
71 wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
72
73 topsizer->AddStretchSpacer();
74
75 m_bitmap_empty = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
76 m_bitmap_empty->SetBitmap(create_scaled_bitmap("monitor_status_empty", nullptr, 250));
77 topsizer->Add(m_bitmap_empty, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 0);
78 topsizer->AddSpacer(46);
79
80 wxBoxSizer* horiz_sizer = new wxBoxSizer(wxHORIZONTAL);
81 horiz_sizer->Add(0, 0, 538, 0, 0);
82
83 wxBoxSizer* btn_sizer = new wxBoxSizer(wxVERTICAL);
84 m_button_add_machine = new Button(this, "", "monitor_add_machine", FromDIP(24));
85 m_button_add_machine->SetCornerRadius(FromDIP(12));
86 StateColor button_bg(
87 std::pair<wxColour, int>(0xCECECE, StateColor::Pressed),
88 std::pair<wxColour, int>(0xCECECE, StateColor::Hovered),
89 std::pair<wxColour, int>(this->GetBackgroundColour(), StateColor::Normal)
90 );
91 m_button_add_machine->SetBackgroundColor(button_bg);
92 m_button_add_machine->SetBorderColor(0x909090);
93 m_button_add_machine->SetMinSize(wxSize(96, 39));
94 btn_sizer->Add(m_button_add_machine, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 5);
95 m_staticText_add_machine = new wxStaticText(this, wxID_ANY, _L("click to add machine"), wxDefaultPosition, wxDefaultSize, 0);
97 m_staticText_add_machine->SetForegroundColour(0x909090);
98 btn_sizer->Add(m_staticText_add_machine, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, 5);
99
100 horiz_sizer->Add(btn_sizer);
101 horiz_sizer->Add(0, 0, 624, 0, 0);
102
103 topsizer->Add(horiz_sizer, 0, wxEXPAND, 0);
104
105 topsizer->AddStretchSpacer();
106
107 this->SetSizer(topsizer);
108 this->Layout();
109
110 // Connect Events
111 m_button_add_machine->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddMachinePanel::on_add_machine), NULL, this);
112}
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
#define style
Definition WipeTowerDialog.cpp:101
wxStaticText * m_staticText_add_machine
Definition Monitor.hpp:66
void on_add_machine(wxCommandEvent &event)
Definition Monitor.cpp:118
Button * m_button_add_machine
Definition Monitor.hpp:65
wxStaticBitmap * m_bitmap_empty
Definition Monitor.hpp:67
@ Hovered
Definition StateColor.hpp:20
@ Normal
Definition StateColor.hpp:16
@ Pressed
Definition StateColor.hpp:21
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 _L, create_scaled_bitmap(), StateColor::Hovered, m_bitmap_empty, m_button_add_machine, m_staticText_add_machine, StateColor::Normal, on_add_machine(), StateColor::Pressed, style, and wxStaticText.

Here is the call graph for this function:

◆ ~AddMachinePanel()

Slic3r::GUI::AddMachinePanel::~AddMachinePanel ( )
122 {
123 m_button_add_machine->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AddMachinePanel::on_add_machine), NULL, this);
124}

References m_button_add_machine, and on_add_machine().

Here is the call graph for this function:

Member Function Documentation

◆ msw_rescale()

void Slic3r::GUI::AddMachinePanel::msw_rescale ( )
114 {
115
116}

◆ on_add_machine()

void Slic3r::GUI::AddMachinePanel::on_add_machine ( wxCommandEvent & event)
protected
118 {
119 // load a url
120}

Referenced by AddMachinePanel(), and ~AddMachinePanel().

Here is the caller graph for this function:

Member Data Documentation

◆ m_bitmap_empty

wxStaticBitmap* Slic3r::GUI::AddMachinePanel::m_bitmap_empty
protected

Referenced by AddMachinePanel().

◆ m_button_add_machine

Button* Slic3r::GUI::AddMachinePanel::m_button_add_machine
protected

◆ m_staticText_add_machine

wxStaticText* Slic3r::GUI::AddMachinePanel::m_staticText_add_machine
protected

Referenced by AddMachinePanel().


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