OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::wxRenderer Class Reference
Inheritance diagram for Slic3r::GUI::wxRenderer:
Collaboration diagram for Slic3r::GUI::wxRenderer:

Public Member Functions

 wxRenderer ()
virtual void DrawItemSelectionRect (wxWindow *win, wxDC &dc, const wxRect &rect, int flags=0) override
virtual void DrawFocusRect (wxWindow *win, wxDC &dc, const wxRect &rect, int flags=0) override
virtual void DrawTreeItemButton (wxWindow *win, wxDC &dc, const wxRect &rect, int flags=0) override
virtual void DrawItemText (wxWindow *win, wxDC &dc, const wxString &text, const wxRect &rect, int align=wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, int flags=0, wxEllipsizeMode ellipsizeMode=wxELLIPSIZE_END) override

Detailed Description

Constructor & Destructor Documentation

◆ wxRenderer()

Slic3r::GUI::wxRenderer::wxRenderer ( )
inline
151: wxDelegateRendererNative(wxRendererNative::Get()) {}

Member Function Documentation

◆ DrawFocusRect()

virtual void Slic3r::GUI::wxRenderer::DrawFocusRect ( wxWindow * win,
wxDC & dc,
const wxRect & rect,
int flags = 0 )
inlineoverridevirtual
159 { // ORCA draw focus rectangle to improve consistency between platforms
160 dc.SetPen( StateColor::darkModeColorFor(wxColour("#009688")));
161 dc.DrawRectangle(rect);
162 }
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219

References StateColor::darkModeColorFor().

Here is the call graph for this function:

◆ DrawItemSelectionRect()

virtual void Slic3r::GUI::wxRenderer::DrawItemSelectionRect ( wxWindow * win,
wxDC & dc,
const wxRect & rect,
int flags = 0 )
inlineoverridevirtual
153 { // ORCA draw selection background to improve consistency between platforms
154 dc.SetBrush(StateColor::darkModeColorFor(wxColour("#BFE1DE")));
155 dc.DrawRectangle(rect);
156 //GetGeneric().DrawItemSelectionRect(win, dc, rect, flags);
157 }

References StateColor::darkModeColorFor().

Here is the call graph for this function:

◆ DrawItemText()

virtual void Slic3r::GUI::wxRenderer::DrawItemText ( wxWindow * win,
wxDC & dc,
const wxString & text,
const wxRect & rect,
int align = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL,
int flags = 0,
wxEllipsizeMode ellipsizeMode = wxELLIPSIZE_END )
inlineoverridevirtual
186 { // ORCA draw custom text to improve consistency between platforms
187 //dc.SetFont(win->GetFont()); Without SetFont it pulls font from window
188 dc.SetTextForeground(StateColor::darkModeColorFor(wxColour("#262E30"))); // use same color for selected / non-selected
189 dc.DrawText(text,wxPoint(rect.x, rect.y));
190 }

References StateColor::darkModeColorFor().

Here is the call graph for this function:

◆ DrawTreeItemButton()

virtual void Slic3r::GUI::wxRenderer::DrawTreeItemButton ( wxWindow * win,
wxDC & dc,
const wxRect & rect,
int flags = 0 )
inlineoverridevirtual
164 { // ORCA draw custom triangle to improve consistency between platforms
165 dc.SetPen( StateColor::darkModeColorFor(wxColour("#7C8282")));
166 dc.SetBrush(StateColor::darkModeColorFor(wxColour("#7C8282")));
167 bool expanded = (flags == wxCONTROL_EXPANDED || flags == (wxCONTROL_CURRENT | wxCONTROL_EXPANDED));
168 wxRect r = rect;
169 // stretch rectangle depends on orientation
170 r.Deflate((expanded ? wxSize(4, 6) : wxSize(6, 4)) * (wxGetApp().em_unit() * .1));
171 wxPoint triangle[3];
172 triangle[0] = wxPoint(r.x, r.y);
173 triangle[1] = triangle[0] + wxPoint(r.width, expanded ? 0 :r.height/2);
174 triangle[2] = triangle[0] + wxPoint(expanded ? r.width/2 : 0, r.height);
175 dc.DrawPolygon(3, &triangle[0]);
176 }
int em_unit(wxWindow *win)
Definition wxExtensions.cpp:424

References StateColor::darkModeColorFor(), and em_unit().

Here is the call graph for this function:

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