#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/AMSItem.hpp>
◆ AMSExtImage()
| Slic3r::GUI::AMSExtImage::AMSExtImage |
( |
wxWindow * | parent, |
|
|
AMSPanelPos | ext_pos, |
|
|
int | total_ext_num, |
|
|
bool | over_ext, |
|
|
wxWindowID | id = wxID_ANY, |
|
|
const wxPoint & | pos = wxDefaultPosition ) |
664{
665 if (over_ext)
666 {
667 wxWindow::Create(parent, id, pos);
671 }
672 else
673 {
674 wxWindow::Create(parent, id, pos);
675 SetMinSize(wxSize(FromDIP(98), FromDIP(99)));
676 SetMaxSize(wxSize(FromDIP(98), FromDIP(99)));
677
679 }
680
684
686}
#define AMS_CONTROL_DEF_LIB_BK_COLOUR
Definition AMSItem.hpp:45
#define AMS_HUMIDITY_SIZE
Definition AMSItem.hpp:188
bool m_show_ams_ext
Definition AMSItem.hpp:410
bool m_show_ext
Definition AMSItem.hpp:411
void paintEvent(wxPaintEvent &evt)
Definition AMSItem.cpp:736
AMSPanelPos m_ext_pos
Definition AMSItem.hpp:413
int m_ext_num
Definition AMSItem.hpp:414
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
References AMS_CONTROL_DEF_LIB_BK_COLOUR, AMS_HUMIDITY_SIZE, StateColor::darkModeColorFor(), m_ext_num, m_ext_pos, m_show_ams_ext, m_show_ext, and paintEvent().
◆ ~AMSExtImage()
| Slic3r::GUI::AMSExtImage::~AMSExtImage |
( |
| ) |
|
◆ doRender()
| void Slic3r::GUI::AMSExtImage::doRender |
( |
wxDC & | dc | ) |
|
|
private |
764{
765 auto size = GetSize();
766 dc.SetPen(*wxTRANSPARENT_PEN);
767
769 {
772
773 Layout();
774 return;
775 }
776
778 {
781 dc.DrawBitmap(bmp, wxPoint((size.x - bmp_size.x) / 2, (size.y - bmp_size.GetHeight())));
782
783 Layout();
784 return;
785 }
786}
wxSize GetBmpSize() const
Definition wxExtensions.cpp:959
std::string m_printer_type_name
Definition AMSItem.hpp:408
const wxBitmap & get_bmp(const std::string &printer_type, bool is_ams_ext, AMSPanelPos pos)
Definition AMSItem.cpp:690
References get_bmp(), ScalableBitmap::GetBmpSize(), m_ext_pos, m_printer_type_name, m_show_ams_ext, and m_show_ext.
Referenced by render().
◆ get_bmp()
| const wxBitmap & Slic3r::GUI::AMSExtImage::get_bmp |
( |
const std::string & | printer_type, |
|
|
bool | is_ams_ext, |
|
|
AMSPanelPos | pos ) |
|
private |
691{
692 int pos_id = 0;
695 if (image_name.empty()) { return wxNullBitmap; }
696
697 int image_size = is_ams_ext ? 25 : 98;
699 m_ext_image = ScalableBitmap(
this, image_name, image_size);
700 }
701
703}
static std::string get_printer_ext_img(const std::string &type_str, int pos)
Definition DevConfigUtil.cpp:141
ScalableBitmap m_ext_image
Definition AMSItem.hpp:416
@ LEFT_PANEL
Definition AMSItem.hpp:89
References Slic3r::DevPrinterConfigUtil::get_printer_ext_img(), Slic3r::GUI::LEFT_PANEL, and m_ext_image.
Referenced by doRender().
◆ msw_rescale()
| void Slic3r::GUI::AMSExtImage::msw_rescale |
( |
| ) |
|
706{
709 }
710
711 Layout();
712 Fit();
713 Refresh();
714}
References m_ext_image.
◆ paintEvent()
| void Slic3r::GUI::AMSExtImage::paintEvent |
( |
wxPaintEvent & | evt | ) |
|
|
private |
737{
738 wxPaintDC dc(this);
740}
void render(wxDC &dc)
Definition AMSItem.cpp:742
References render().
Referenced by AMSExtImage().
◆ render()
| void Slic3r::GUI::AMSExtImage::render |
( |
wxDC & | dc | ) |
|
|
private |
743{
744#ifdef __WXMSW__
745 wxSize size = GetSize();
746 wxMemoryDC memdc;
747 wxBitmap bmp(size.x, size.y);
748 memdc.SelectObject(bmp);
749 memdc.Blit({ 0, 0 }, size, &dc, { 0, 0 });
750
751 {
752 wxGCDC dc2(memdc);
754 }
755
756 memdc.SelectObject(wxNullBitmap);
757 dc.DrawBitmap(bmp, 0, 0);
758#else
760#endif
761}
void doRender(wxDC &dc)
Definition AMSItem.cpp:763
References doRender().
Referenced by paintEvent().
◆ setShowAmsExt()
| void Slic3r::GUI::AMSExtImage::setShowAmsExt |
( |
bool | show | ) |
|
◆ setTotalExtNum()
| void Slic3r::GUI::AMSExtImage::setTotalExtNum |
( |
const std::string & | series_name, |
|
|
const std::string & | printer_type, |
|
|
int | num ) |
◆ m_ext_image
◆ m_ext_num
| int Slic3r::GUI::AMSExtImage::m_ext_num = 1 |
|
private |
◆ m_ext_pos
◆ m_printer_type_name
| std::string Slic3r::GUI::AMSExtImage::m_printer_type_name |
|
private |
◆ m_series_name
| std::string Slic3r::GUI::AMSExtImage::m_series_name |
|
private |
◆ m_show_ams_ext
| bool Slic3r::GUI::AMSExtImage::m_show_ams_ext = false |
|
private |
◆ m_show_ext
| bool Slic3r::GUI::AMSExtImage::m_show_ext = false |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/AMSItem.hpp
- /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/AMSItem.cpp