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

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

Inheritance diagram for Slic3r::GUI::BaseTransparentDPIFrame:
Collaboration diagram for Slic3r::GUI::BaseTransparentDPIFrame:

Public Types

enum  DisappearanceMode { None , TimedDisappearance }

Public Member Functions

 BaseTransparentDPIFrame (wxWindow *parent, int win_width, wxPoint dialog_pos, int ok_button_width, wxString win_text, wxString ok_text, wxString cancel_text="", DisappearanceMode disappearance_mode=DisappearanceMode::None)
 ~BaseTransparentDPIFrame () override
void on_dpi_changed (const wxRect &suggested_rect) override
void on_show ()
void on_hide ()
void clear_timer_count ()
bool Show (bool show=true) override
void on_full_screen (IntEvent &)
virtual void deal_ok ()
virtual void deal_cancel ()
virtual void on_timer (wxTimerEvent &event)
void set_target_pos_and_gradual_disappearance (wxPoint pos)
void call_start_gradual_disappearance ()
void restart ()
float scale_factor () const
float prev_scale_factor () const
void set_scale_factor (float v)
void set_prev_scale_factor (float v)
void set_em_unit (int v)
bool force_rescale () const
int em_unit () const
const wxFont & normal_font () const
void enable_force_rescale ()
int ShowModal ()

Protected Member Functions

virtual void on_sys_color_changed ()

Protected Attributes

Button * m_button_ok = nullptr
Button * m_button_cancel = nullptr
Label * m_finish_text = nullptr
DisappearanceMode m_timed_disappearance_mode
float m_timer_count = 0
wxTimer * m_refresh_timer {nullptr}
int m_disappearance_second = 2500
bool m_move_to_target_gradual_disappearance = false
wxPoint m_target_pos

Private Member Functions

void start_gradual_disappearance ()
void init_timer ()
void calc_step_transparent ()
void on_close ()
void show_sizer (wxSizer *sizer, bool show)
void hide_all ()
void begin_gradual_disappearance ()
void begin_move_to_target_and_gradual_disappearance ()
void update_em_unit ()
bool is_new_scale_factor () const
void rescale (const wxRect &suggested_rect)

Private Attributes

wxBoxSizer * m_sizer_main {nullptr}
wxSize m_max_size
wxSize m_step_size
wxPoint m_step_pos
wxPoint m_start_pos
float m_time_move {6.0f}
float m_time_gradual_and_scale {100.0f}
int m_init_transparent {220}
int m_step_transparent
int m_display_stage = 0
bool m_enter_window_valid {true}
float m_scale_factor
int m_em_unit
wxFont m_normal_font
float m_prev_scale_factor
bool m_can_rescale
bool m_force_rescale
int m_new_font_point_size

Detailed Description

Member Enumeration Documentation

◆ DisappearanceMode

Enumerator
None 
TimedDisappearance 
27 {
28 None,
29 TimedDisappearance // unit: second
30 };
@ TimedDisappearance
Definition BaseTransparentDPIFrame.hpp:29
@ None
Definition BaseTransparentDPIFrame.hpp:28

Constructor & Destructor Documentation

◆ BaseTransparentDPIFrame()

Slic3r::GUI::BaseTransparentDPIFrame::BaseTransparentDPIFrame ( wxWindow * parent,
int win_width,
wxPoint dialog_pos,
int ok_button_width,
wxString win_text,
wxString ok_text,
wxString cancel_text = "",
DisappearanceMode disappearance_mode = DisappearanceMode::None )
29 : DPIFrame(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, "", wxDefaultPosition, wxDefaultSize, !wxCAPTION | !wxCLOSE_BOX | wxBORDER_NONE)
30 , m_timed_disappearance_mode(disappearance_mode)
31{
32 // SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
33 SetTransparent(m_init_transparent);
34 SetBackgroundColour(wxColour(23, 25, 22, 128));
35
36 // ORCA add border
37 Bind(wxEVT_PAINT, [this](wxPaintEvent& evt) {
38 wxPaintDC dc(this);
39 dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#009688")), FromDIP(2)));
40 dc.SetBrush(*wxTRANSPARENT_BRUSH);
41 dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
42 });
43
44 int window_padding = 15;
45 auto imgsize = 32;
46 auto imgright = 10;
47
48 //Adaptive Frame Width
49 wxClientDC dc(parent);
50 wxSize msg_sz = dc.GetMultiLineTextExtent(ok_text);
51 auto ratio = msg_sz.GetX() / (float) win_width;
52 if (ratio > 0.75f) {
53 win_width += msg_sz.GetX() / 2.0f;
54 }
55
56 SetMinSize(wxSize(FromDIP(win_width), -1));
57 SetMaxSize(wxSize(FromDIP(win_width), -1));
58 SetPosition(dialog_pos);
59
60 m_sizer_main = new wxBoxSizer(wxVERTICAL);
61 wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
62
63 auto completedimg = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("completed", this, imgsize), wxDefaultPosition, FromDIP(wxSize(imgsize, imgsize)), 0);
64
65 text_sizer->Add(completedimg, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(imgright));
66 m_finish_text = new Label(this, win_text, LB_AUTO_WRAP);
67 m_finish_text->SetMinSize(wxSize(FromDIP(win_width - (window_padding * 2 + imgright + imgsize)), -1));
68 m_finish_text->SetMaxSize(wxSize(FromDIP(win_width - (window_padding * 2 + imgright + imgsize)), -1));
69 m_finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
70 text_sizer->Add(m_finish_text, 0, wxALIGN_CENTER_VERTICAL);
71 m_sizer_main->Add(text_sizer, 0, wxALL, FromDIP(15));
72
73 wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
74 bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
75 /* m_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
76 bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT);*/
77 bSizer_button->AddStretchSpacer(1);
78 m_button_ok = new Button(this, ok_text);
80 bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
81
82 m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_ok(); });
83
84 m_button_cancel = new Button(this, cancel_text);
86 bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
87
88 m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_cancel(); });
89
90 m_sizer_main->Add(bSizer_button, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(window_padding));
91
92 Bind(wxEVT_CLOSE_WINDOW, [this](auto &e) {
93 on_hide();
94 });
95 SetSizer(m_sizer_main);
96 Layout();
97 Fit();
98
100 init_timer();
101 Bind(wxEVT_TIMER, &BaseTransparentDPIFrame::on_timer, this);
102 Bind(wxEVT_ENTER_WINDOW, [this](auto &e) {
105 m_display_stage = 0;
106 m_refresh_timer->Stop();
107 SetTransparent(m_init_transparent);
108 }
109 });
110 Bind(wxEVT_LEAVE_WINDOW, [this](auto &e) {
111 auto x = e.GetX();
112 auto y = e.GetY();
113 auto size = this->GetClientSize();
114 if (x >= 0 && y >= 0 && x <= size.x && y <= size.y) { return; }
117 }
118 });
119 }
120}
#define ANIMATION_REFRESH_INTERVAL
Definition BaseTransparentDPIFrame.cpp:26
@ Confirm
Definition Button.hpp:25
@ Regular
Definition Button.hpp:24
@ Choice
Definition Button.hpp:33
#define LB_AUTO_WRAP
Definition Label.hpp:12
DisappearanceMode m_timed_disappearance_mode
Definition BaseTransparentDPIFrame.hpp:58
Button * m_button_ok
Definition BaseTransparentDPIFrame.hpp:55
Button * m_button_cancel
Definition BaseTransparentDPIFrame.hpp:56
virtual void on_timer(wxTimerEvent &event)
Definition BaseTransparentDPIFrame.cpp:195
virtual void deal_ok()
Definition BaseTransparentDPIFrame.cpp:303
void init_timer()
Definition BaseTransparentDPIFrame.cpp:178
void on_hide()
Definition BaseTransparentDPIFrame.cpp:159
int m_init_transparent
Definition BaseTransparentDPIFrame.hpp:73
int m_display_stage
Definition BaseTransparentDPIFrame.hpp:75
bool m_enter_window_valid
Definition BaseTransparentDPIFrame.hpp:76
void clear_timer_count()
Definition BaseTransparentDPIFrame.cpp:174
wxTimer * m_refresh_timer
Definition BaseTransparentDPIFrame.hpp:60
Label * m_finish_text
Definition BaseTransparentDPIFrame.hpp:57
wxBoxSizer * m_sizer_main
Definition BaseTransparentDPIFrame.hpp:66
virtual void deal_cancel()
Definition BaseTransparentDPIFrame.cpp:305
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
DPIAware< wxFrame > DPIFrame
Definition GUI_Utils.hpp:298
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 ANIMATION_REFRESH_INTERVAL, Choice, clear_timer_count(), Confirm, create_scaled_bitmap(), StateColor::darkModeColorFor(), deal_cancel(), deal_ok(), init_timer(), LB_AUTO_WRAP, m_button_cancel, m_button_ok, m_display_stage, m_enter_window_valid, m_finish_text, m_init_transparent, m_refresh_timer, m_sizer_main, m_timed_disappearance_mode, None, on_hide(), on_timer(), and Regular.

Referenced by Slic3r::GUI::FinishSyncAmsDialog::FinishSyncAmsDialog(), and Slic3r::GUI::SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog().

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

◆ ~BaseTransparentDPIFrame()

Slic3r::GUI::BaseTransparentDPIFrame::~BaseTransparentDPIFrame ( )
override
122 {
123
124}

Member Function Documentation

◆ begin_gradual_disappearance()

void Slic3r::GUI::BaseTransparentDPIFrame::begin_gradual_disappearance ( )
private
250{
253 SetTransparent(transparent < 0 ? 0 : transparent);
254 } else {
255 on_hide();
256 return;
257 }
259}
int m_step_transparent
Definition BaseTransparentDPIFrame.hpp:74
float m_timer_count
Definition BaseTransparentDPIFrame.hpp:59
float m_time_gradual_and_scale
Definition BaseTransparentDPIFrame.hpp:72

References m_init_transparent, m_step_transparent, m_time_gradual_and_scale, m_timer_count, and on_hide().

Referenced by on_timer().

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

◆ begin_move_to_target_and_gradual_disappearance()

void Slic3r::GUI::BaseTransparentDPIFrame::begin_move_to_target_and_gradual_disappearance ( )
private
262{
263 if (m_timer_count <= m_time_move) {
264 if (m_timer_count <= m_time_move - 1) {
266 SetPosition(pos);
267 } else {
268 SetPosition(m_target_pos);
269 }
270 Refresh();
271 } else {
272 SetPosition(m_target_pos);
274 auto size = wxSize(m_max_size.x - m_timer_count * m_step_size.x, m_max_size.y - m_timer_count * m_step_size.y);
275 SetSize(size);
277 } else {
278 on_hide();
279 return;
280 }
281 }
283}
wxSize m_step_size
Definition BaseTransparentDPIFrame.hpp:68
wxPoint m_start_pos
Definition BaseTransparentDPIFrame.hpp:70
float m_time_move
Definition BaseTransparentDPIFrame.hpp:71
wxSize m_max_size
Definition BaseTransparentDPIFrame.hpp:67
wxPoint m_step_pos
Definition BaseTransparentDPIFrame.hpp:69
wxPoint m_target_pos
Definition BaseTransparentDPIFrame.hpp:63
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16

References m_init_transparent, m_max_size, m_start_pos, m_step_pos, m_step_size, m_step_transparent, m_target_pos, m_time_gradual_and_scale, m_time_move, m_timer_count, and on_hide().

Referenced by on_timer().

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

◆ calc_step_transparent()

void Slic3r::GUI::BaseTransparentDPIFrame::calc_step_transparent ( )
private

References m_init_transparent, m_max_size, m_step_size, m_step_transparent, and m_time_gradual_and_scale.

Referenced by start_gradual_disappearance().

Here is the caller graph for this function:

◆ call_start_gradual_disappearance()

void Slic3r::GUI::BaseTransparentDPIFrame::call_start_gradual_disappearance ( )
216{
218 m_enter_window_valid = false;
219 m_display_stage = 1;
222 }
223}
void start_gradual_disappearance()
Definition BaseTransparentDPIFrame.cpp:234

References ANIMATION_REFRESH_INTERVAL, m_display_stage, m_enter_window_valid, m_refresh_timer, and start_gradual_disappearance().

Here is the call graph for this function:

◆ clear_timer_count()

void Slic3r::GUI::BaseTransparentDPIFrame::clear_timer_count ( )
174 {
175 m_timer_count = 0;
176}

References m_timer_count.

Referenced by BaseTransparentDPIFrame(), restart(), and start_gradual_disappearance().

Here is the caller graph for this function:

◆ deal_cancel()

void Slic3r::GUI::BaseTransparentDPIFrame::deal_cancel ( )
virtual

Reimplemented in Slic3r::GUI::SyncNozzleAndAmsDialog.

305{}

Referenced by BaseTransparentDPIFrame().

Here is the caller graph for this function:

◆ deal_ok()

void Slic3r::GUI::BaseTransparentDPIFrame::deal_ok ( )
virtual

Reimplemented in Slic3r::GUI::FinishSyncAmsDialog, and Slic3r::GUI::SyncNozzleAndAmsDialog.

303{}

Referenced by BaseTransparentDPIFrame().

Here is the caller graph for this function:

◆ em_unit()

int Slic3r::GUI::DPIAware< wxFrame >::em_unit ( ) const
inlineinherited
203{ return m_em_unit; }
Definition GUI_Utils.hpp:107

References m_em_unit.

Referenced by Slic3r::GUI::MainFrame::create_side_tools(), and Slic3r::GUI::MainFrame::update_side_button_style().

Here is the caller graph for this function:

◆ enable_force_rescale()

void Slic3r::GUI::DPIAware< wxFrame >::enable_force_rescale ( )
inlineinherited
206{ m_force_rescale = true; }

References m_force_rescale.

◆ force_rescale()

bool Slic3r::GUI::DPIAware< wxFrame >::force_rescale ( ) const
inlineinherited
201{ return m_force_rescale; }

References m_force_rescale.

◆ hide_all()

void Slic3r::GUI::BaseTransparentDPIFrame::hide_all ( )
private
299 {
300 show_sizer(m_sizer_main, false);
301}
void show_sizer(wxSizer *sizer, bool show)
Definition BaseTransparentDPIFrame.cpp:285

References m_sizer_main, and show_sizer().

Here is the call graph for this function:

◆ init_timer()

void Slic3r::GUI::BaseTransparentDPIFrame::init_timer ( )
private
179{
180 m_refresh_timer = new wxTimer();
181 m_refresh_timer->SetOwner(this);
182}

References m_refresh_timer.

Referenced by BaseTransparentDPIFrame().

Here is the caller graph for this function:

◆ is_new_scale_factor()

bool Slic3r::GUI::DPIAware< wxFrame >::is_new_scale_factor ( ) const
inlineprivateinherited
262{ return fabs(m_scale_factor - m_prev_scale_factor) > 0.001; }

References m_prev_scale_factor, and m_scale_factor.

◆ normal_font()

const wxFont & Slic3r::GUI::DPIAware< wxFrame >::normal_font ( ) const
inlineinherited
205{ return m_normal_font; }

References m_normal_font.

Referenced by Slic3r::GUI::MainFrame::init_tabpanel(), and Slic3r::GUI::MainFrame::on_dpi_changed().

Here is the caller graph for this function:

◆ on_close()

void Slic3r::GUI::BaseTransparentDPIFrame::on_close ( )
private
191 {
192 Destroy();
193}

◆ on_dpi_changed()

void Slic3r::GUI::BaseTransparentDPIFrame::on_dpi_changed ( const wxRect & suggested_rect)
overridevirtual

Implements Slic3r::GUI::DPIAware< wxFrame >.

149{
150 m_button_ok->Rescale();
151 m_button_cancel->Rescale();
152}

References m_button_cancel, and m_button_ok.

◆ on_full_screen()

void Slic3r::GUI::BaseTransparentDPIFrame::on_full_screen ( IntEvent & e)
142 {
143#ifdef __APPLE__
144 SetWindowStyleFlag(GetWindowStyleFlag() | wxSTAY_ON_TOP);
145#endif
146}

◆ on_hide()

void Slic3r::GUI::BaseTransparentDPIFrame::on_hide ( )
160{
161 if (m_refresh_timer) {
162 m_refresh_timer->Stop();
163 }
164 Hide();
165 auto *mainframe = wxGetApp().mainframe;
166 if (mainframe != nullptr) {
167 if (!mainframe->IsShown())
168 mainframe->Show();
169 mainframe->Raise();
170 }
171}

References m_refresh_timer.

Referenced by BaseTransparentDPIFrame(), begin_gradual_disappearance(), begin_move_to_target_and_gradual_disappearance(), Slic3r::GUI::SyncNozzleAndAmsDialog::deal_cancel(), Slic3r::GUI::FinishSyncAmsDialog::deal_ok(), and Slic3r::GUI::SyncNozzleAndAmsDialog::deal_ok().

Here is the caller graph for this function:

◆ on_show()

void Slic3r::GUI::BaseTransparentDPIFrame::on_show ( )
154 {
155 Show();
156 Raise();
157}
bool Show(bool show=true) override
Definition BaseTransparentDPIFrame.cpp:126

References Show().

Here is the call graph for this function:

◆ on_sys_color_changed()

virtual void Slic3r::GUI::DPIAware< wxFrame >::on_sys_color_changed ( )
inlineprotectedvirtualinherited

Reimplemented in Slic3r::GUI::MainFrame.

226{};

◆ on_timer()

void Slic3r::GUI::BaseTransparentDPIFrame::on_timer ( wxTimerEvent & event)
virtual
196{
199 if (cur_time > m_disappearance_second) {
202 }
203 }
204 if (m_display_stage == 1) {
207 }
208 else {
210 }
211 }
213}
int m_disappearance_second
Definition BaseTransparentDPIFrame.hpp:61
bool m_move_to_target_gradual_disappearance
Definition BaseTransparentDPIFrame.hpp:62
void begin_gradual_disappearance()
Definition BaseTransparentDPIFrame.cpp:249
void begin_move_to_target_and_gradual_disappearance()
Definition BaseTransparentDPIFrame.cpp:261

References ANIMATION_REFRESH_INTERVAL, begin_gradual_disappearance(), begin_move_to_target_and_gradual_disappearance(), m_disappearance_second, m_display_stage, m_move_to_target_gradual_disappearance, m_timed_disappearance_mode, m_timer_count, start_gradual_disappearance(), and TimedDisappearance.

Referenced by BaseTransparentDPIFrame().

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

◆ prev_scale_factor()

float Slic3r::GUI::DPIAware< wxFrame >::prev_scale_factor ( ) const
inlineinherited
196{ return m_prev_scale_factor; }

References m_prev_scale_factor.

◆ rescale()

void Slic3r::GUI::DPIAware< wxFrame >::rescale ( const wxRect & suggested_rect)
inlineprivateinherited
265 {
266 this->Freeze();
267
268 m_force_rescale = false;
269
270 // set normal application font as a current window font
271 m_normal_font = this->GetFont();
272
274
275 // rescale missed controls sizes and images
277
278 this->Layout();
279 this->Thaw();
280
281 // reset previous scale factor from current scale factor value
283 }
virtual void on_dpi_changed(const wxRect &suggested_rect)=0
void update_em_unit()
Definition GUI_Utils.hpp:249

References m_force_rescale, m_normal_font, m_prev_scale_factor, m_scale_factor, Slic3r::GUI::DPIAware< P >::on_dpi_changed(), and Slic3r::GUI::DPIAware< P >::update_em_unit().

Here is the call graph for this function:

◆ restart()

void Slic3r::GUI::BaseTransparentDPIFrame::restart ( )
225 {
226 m_display_stage = 0;
228 SetTransparent(m_init_transparent);
229 if (m_refresh_timer) {
232 }
233}

References ANIMATION_REFRESH_INTERVAL, clear_timer_count(), m_display_stage, m_enter_window_valid, m_init_transparent, and m_refresh_timer.

Referenced by Slic3r::GUI::FinishSyncAmsDialog::update_info(), and Slic3r::GUI::SyncNozzleAndAmsDialog::update_info().

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

◆ scale_factor()

float Slic3r::GUI::DPIAware< wxFrame >::scale_factor ( ) const
inlineinherited
195{ return m_scale_factor; }

References m_scale_factor.

◆ set_em_unit()

void Slic3r::GUI::DPIAware< wxFrame >::set_em_unit ( int v)
inlineinherited
200{ m_em_unit = v; }

References m_em_unit.

◆ set_prev_scale_factor()

void Slic3r::GUI::DPIAware< wxFrame >::set_prev_scale_factor ( float v)
inlineinherited

References m_prev_scale_factor.

◆ set_scale_factor()

void Slic3r::GUI::DPIAware< wxFrame >::set_scale_factor ( float v)
inlineinherited
198{ m_scale_factor = v; }

References m_scale_factor.

◆ set_target_pos_and_gradual_disappearance()

void Slic3r::GUI::BaseTransparentDPIFrame::set_target_pos_and_gradual_disappearance ( wxPoint pos)

◆ Show()

bool Slic3r::GUI::BaseTransparentDPIFrame::Show ( bool show = true)
override
127{
128 if (show) {
129 m_finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
130 if (m_refresh_timer) {
132 }
133 } else {
134 if (m_refresh_timer) {
135 m_refresh_timer->Stop();
136 }
137 }
138 Layout();
139 return DPIFrame::Show(show);
140}

References ANIMATION_REFRESH_INTERVAL, m_finish_text, and m_refresh_timer.

Referenced by on_show().

Here is the caller graph for this function:

◆ show_sizer()

void Slic3r::GUI::BaseTransparentDPIFrame::show_sizer ( wxSizer * sizer,
bool show )
private
286{
287 wxSizerItemList items = sizer->GetChildren();
288 for (wxSizerItemList::iterator it = items.begin(); it != items.end(); ++it) {
289 wxSizerItem *item = *it;
290 if (wxWindow *window = item->GetWindow()) {
291 window->Show(show);
292 }
293 if (wxSizer *son_sizer = item->GetSizer()) {
294 show_sizer(son_sizer, show);
295 }
296 }
297}

References show_sizer().

Referenced by hide_all(), and show_sizer().

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

◆ ShowModal()

int Slic3r::GUI::DPIAware< wxFrame >::ShowModal ( )
inlineinherited
217 {
218 dialogStack.push_front(this);
219 int r = wxDialog::ShowModal();
220 dialogStack.pop_front();
221 return r;
222 }

References Slic3r::GUI::dialogStack.

◆ start_gradual_disappearance()

void Slic3r::GUI::BaseTransparentDPIFrame::start_gradual_disappearance ( )
private
235{
237 //hide_all();
239}
void calc_step_transparent()
Definition BaseTransparentDPIFrame.cpp:184

References calc_step_transparent(), and clear_timer_count().

Referenced by call_start_gradual_disappearance(), and on_timer().

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

◆ update_em_unit()

void Slic3r::GUI::DPIAware< wxFrame >::update_em_unit ( )
inlineprivateinherited
250 {
251 // Linux specific issue : get_dpi_for_window(this) still doesn't responce to the Display's scale in new wxWidgets(3.1.3).
252 // So, calculate the m_em_unit value from the font size, as before
253#if !defined(__WXGTK__)
255#else
256 // initialize default width_unit according to the width of the one symbol ("m") of the currently active font of this window.
257 m_em_unit = std::max<size_t>(10, this->GetTextExtent("m").x - 1);
258#endif // __WXGTK__
259 }

References m_em_unit, and m_scale_factor.

Member Data Documentation

◆ m_button_cancel

Button* Slic3r::GUI::BaseTransparentDPIFrame::m_button_cancel = nullptr
protected

◆ m_button_ok

Button* Slic3r::GUI::BaseTransparentDPIFrame::m_button_ok = nullptr
protected

◆ m_can_rescale

bool Slic3r::GUI::DPIAware< wxFrame >::m_can_rescale
privateinherited
235{ true };

Referenced by DPIAware().

◆ m_disappearance_second

int Slic3r::GUI::BaseTransparentDPIFrame::m_disappearance_second = 2500
protected

Referenced by on_timer().

◆ m_display_stage

int Slic3r::GUI::BaseTransparentDPIFrame::m_display_stage = 0
private

◆ m_em_unit

int Slic3r::GUI::DPIAware< wxFrame >::m_em_unit
privateinherited

◆ m_enter_window_valid

bool Slic3r::GUI::BaseTransparentDPIFrame::m_enter_window_valid {true}
private

◆ m_finish_text

Label* Slic3r::GUI::BaseTransparentDPIFrame::m_finish_text = nullptr
protected

Referenced by BaseTransparentDPIFrame(), and Show().

◆ m_force_rescale

bool Slic3r::GUI::DPIAware< wxFrame >::m_force_rescale
privateinherited
236{ false };

Referenced by DPIAware(), enable_force_rescale(), force_rescale(), and rescale().

◆ m_init_transparent

int Slic3r::GUI::BaseTransparentDPIFrame::m_init_transparent {220}
private

◆ m_max_size

wxSize Slic3r::GUI::BaseTransparentDPIFrame::m_max_size
private

◆ m_move_to_target_gradual_disappearance

bool Slic3r::GUI::BaseTransparentDPIFrame::m_move_to_target_gradual_disappearance = false
protected

◆ m_new_font_point_size

int Slic3r::GUI::DPIAware< wxFrame >::m_new_font_point_size
privateinherited

Referenced by DPIAware().

◆ m_normal_font

wxFont Slic3r::GUI::DPIAware< wxFrame >::m_normal_font
privateinherited

Referenced by DPIAware(), normal_font(), and rescale().

◆ m_prev_scale_factor

float Slic3r::GUI::DPIAware< wxFrame >::m_prev_scale_factor
privateinherited

◆ m_refresh_timer

wxTimer* Slic3r::GUI::BaseTransparentDPIFrame::m_refresh_timer {nullptr}
protected

◆ m_scale_factor

float Slic3r::GUI::DPIAware< wxFrame >::m_scale_factor
privateinherited

◆ m_sizer_main

wxBoxSizer* Slic3r::GUI::BaseTransparentDPIFrame::m_sizer_main {nullptr}
private
66{nullptr};

Referenced by BaseTransparentDPIFrame(), and hide_all().

◆ m_start_pos

wxPoint Slic3r::GUI::BaseTransparentDPIFrame::m_start_pos
private

◆ m_step_pos

wxPoint Slic3r::GUI::BaseTransparentDPIFrame::m_step_pos
private

◆ m_step_size

wxSize Slic3r::GUI::BaseTransparentDPIFrame::m_step_size
private

◆ m_step_transparent

int Slic3r::GUI::BaseTransparentDPIFrame::m_step_transparent
private

◆ m_target_pos

wxPoint Slic3r::GUI::BaseTransparentDPIFrame::m_target_pos
protected

◆ m_time_gradual_and_scale

float Slic3r::GUI::BaseTransparentDPIFrame::m_time_gradual_and_scale {100.0f}
private

◆ m_time_move

float Slic3r::GUI::BaseTransparentDPIFrame::m_time_move {6.0f}
private

◆ m_timed_disappearance_mode

DisappearanceMode Slic3r::GUI::BaseTransparentDPIFrame::m_timed_disappearance_mode
protected

◆ m_timer_count

float Slic3r::GUI::BaseTransparentDPIFrame::m_timer_count = 0
protected

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