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

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

Inheritance diagram for Slic3r::GUI::AuiMgr:
Collaboration diagram for Slic3r::GUI::AuiMgr:

Public Member Functions

void init (wxWindow *window)
void apply_color_mode ()
void track_docked_size (wxWindow *window)
wxAuiFloatingFrame * CreateFloatingFrame (wxWindow *parent, const wxAuiPaneInfo &pane) override

Static Public Member Functions

static wxAuiPaneInfo sidebar_pane_info ()

Detailed Description

Member Function Documentation

◆ apply_color_mode()

void Slic3r::GUI::AuiMgr::apply_color_mode ( )
46{
47 const bool is_dark = wxGetApp().dark_mode();
48 const wxColour sash_color = is_dark ? wxColour(38, 46, 48) : wxColour(206, 206, 206);
49 GetArtProvider()->SetColour(wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR, sash_color);
50 GetArtProvider()->SetColour(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, *wxWHITE);
51 GetArtProvider()->SetColour(wxAUI_DOCKART_SASH_COLOUR, sash_color);
52 GetArtProvider()->SetColour(wxAUI_DOCKART_BORDER_COLOUR, is_dark ? *wxBLACK : wxColour(165, 165, 165));
53}
static bool is_dark()
Definition TextureImportDialog.cpp:85

References is_dark().

Referenced by init().

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

◆ CreateFloatingFrame()

wxAuiFloatingFrame * Slic3r::GUI::AuiMgr::CreateFloatingFrame ( wxWindow * parent,
const wxAuiPaneInfo & pane )
override
80{
81 return new FloatFrame(parent, this, pane);
82}

◆ init()

void Slic3r::GUI::AuiMgr::init ( wxWindow * window)
32{
33 SetManagedWindow(window);
34 SetDockSizeConstraint(1, 1);
35#ifdef __WXGTK__
36 // Floating and its docking hints need global pointer positions and window moves, which Wayland does not provide.
37 if (is_running_on_wayland())
38 SetFlags(GetFlags() & ~wxAUI_MGR_ALLOW_FLOATING);
39#endif
40 GetArtProvider()->SetMetric(wxAUI_DOCKART_CAPTION_SIZE, 18);
41 GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
43}
void apply_color_mode()
Definition AuiMgr.cpp:45

References apply_color_mode().

Here is the call graph for this function:

◆ sidebar_pane_info()

wxAuiPaneInfo Slic3r::GUI::AuiMgr::sidebar_pane_info ( )
static
69{
70 return wxAuiPaneInfo()
71 .Name("sidebar")
72 .Left()
73 .CloseButton(false)
74 .TopDockable(false)
75 .BottomDockable(false)
76 .BestSize(wxSize(39 * wxGetApp().em_unit(), 90 * wxGetApp().em_unit()));
77}
int em_unit(wxWindow *win)
Definition wxExtensions.cpp:424

References em_unit().

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

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

◆ track_docked_size()

void Slic3r::GUI::AuiMgr::track_docked_size ( wxWindow * window)
56{
57 window->Bind(wxEVT_IDLE, [this, window](wxIdleEvent& evt) {
58 wxAuiPaneInfo& pane = GetPane(window);
59 if (pane.IsOk() && pane.IsShown() && pane.IsDocked() && pane.rect.GetWidth() > 0 && pane.rect.GetHeight() > 0) {
60 const bool horizontal = pane.dock_direction == wxAUI_DOCK_TOP || pane.dock_direction == wxAUI_DOCK_BOTTOM;
61 pane.BestSize(horizontal ? pane.best_size.GetWidth() : pane.rect.GetWidth(),
62 horizontal ? pane.rect.GetHeight() : pane.best_size.GetHeight());
63 }
64 evt.Skip();
65 });
66}

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