OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::anonymous_namespace{MainFrame.cpp} Namespace Reference

Functions

bool focus_is_text_field (wxWindow *focus)
const ImGuiWrapper * focused_canvas_imgui (wxWindow *focus)
bool focus_keeps_space (wxWindow *focus)
const char * print_select_type_key (MainFrame::PrintSelectType type)
wxString print_select_type_label (MainFrame::PrintSelectType type)

Function Documentation

◆ focus_is_text_field()

bool Slic3r::GUI::anonymous_namespace{MainFrame.cpp}::focus_is_text_field ( wxWindow * focus)
191{
192 if (dynamic_cast<wxTextEntryBase*>(focus) || dynamic_cast<wxWebView*>(focus))
193 return true; // a web page can have its own text fields
194 if (dynamic_cast<wxSpinCtrl*>(focus) || dynamic_cast<wxSpinCtrlDouble*>(focus))
195 return true; // the native Windows spin control is not a wxTextEntry
196 return false;
197}

References focus_is_text_field().

Referenced by focus_is_text_field().

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

◆ focus_keeps_space()

bool Slic3r::GUI::anonymous_namespace{MainFrame.cpp}::focus_keeps_space ( wxWindow * focus)
212{
213 if (!focus)
214 return false;
215 if (dynamic_cast<::Button*>(focus))
216 return true; // custom button: Space clicks it (it is a wxWindow, not a wxControl)
217 if (dynamic_cast<StaticBox*>(focus))
218 return true; // custom composites (ComboBox, SpinInput, ...) activate with Space and are wxWindow
219 if (dynamic_cast<wxControl*>(focus) && !dynamic_cast<Notebook*>(focus))
220 return true; // stock button/checkbox/choice/list/etc. keep Space
221 return false;
222}
Definition Button.hpp:42
Definition Notebook.hpp:76
Definition StaticBox.hpp:17

References focus_keeps_space().

Referenced by focus_keeps_space().

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

◆ focused_canvas_imgui()

const ImGuiWrapper * Slic3r::GUI::anonymous_namespace{MainFrame.cpp}::focused_canvas_imgui ( wxWindow * focus)
201{
202 if (!OpenGLManager::is_scene_canvas(focus) || !focus->IsShownOnScreen())
203 return nullptr;
204 return wxGetApp().imgui();
205}
static bool is_scene_canvas(const wxWindow *window)
Definition OpenGLManager.cpp:481

References focused_canvas_imgui(), and Slic3r::GUI::OpenGLManager::is_scene_canvas().

Referenced by focused_canvas_imgui().

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

◆ print_select_type_key()

const char * Slic3r::GUI::anonymous_namespace{MainFrame.cpp}::print_select_type_key ( MainFrame::PrintSelectType type)
2136{
2137 switch (type) {
2138 case MainFrame::ePrintAll: return "print_all";
2139 case MainFrame::ePrintPlate: return "print_plate";
2140 case MainFrame::eExportSlicedFile: return "export_sliced_file";
2141 case MainFrame::eExportAllSlicedFile: return "export_all_sliced_file";
2142 case MainFrame::eExportGcode: return "export_gcode";
2143 case MainFrame::eSendGcode: return "send_gcode";
2144 case MainFrame::eSendToPrinter: return "send_to_printer";
2145 case MainFrame::eSendToPrinterAll: return "send_to_printer_all";
2146 case MainFrame::ePrintMultiMachine: return "print_multi_machine";
2147 case MainFrame::eUploadGcode: break; // Orca: no dropdown entry, never selectable
2148 }
2149 return "";
2150}
@ eUploadGcode
Definition MainFrame.hpp:353
@ eSendGcode
Definition MainFrame.hpp:350
@ eExportSlicedFile
Definition MainFrame.hpp:348
@ eExportAllSlicedFile
Definition MainFrame.hpp:354
@ eSendToPrinterAll
Definition MainFrame.hpp:352
@ ePrintAll
Definition MainFrame.hpp:346
@ ePrintPlate
Definition MainFrame.hpp:347
@ ePrintMultiMachine
Definition MainFrame.hpp:355
@ eSendToPrinter
Definition MainFrame.hpp:351
@ eExportGcode
Definition MainFrame.hpp:349

References Slic3r::GUI::MainFrame::eExportAllSlicedFile, Slic3r::GUI::MainFrame::eExportGcode, Slic3r::GUI::MainFrame::eExportSlicedFile, Slic3r::GUI::MainFrame::ePrintAll, Slic3r::GUI::MainFrame::ePrintMultiMachine, Slic3r::GUI::MainFrame::ePrintPlate, Slic3r::GUI::MainFrame::eSendGcode, Slic3r::GUI::MainFrame::eSendToPrinter, Slic3r::GUI::MainFrame::eSendToPrinterAll, Slic3r::GUI::MainFrame::eUploadGcode, and print_select_type_key().

Referenced by print_select_type_key().

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

◆ print_select_type_label()

wxString Slic3r::GUI::anonymous_namespace{MainFrame.cpp}::print_select_type_label ( MainFrame::PrintSelectType type)
2154{
2155 switch (type) {
2156 case MainFrame::ePrintAll: return _L("Print all");
2157 case MainFrame::ePrintPlate: return _L("Print plate");
2158 case MainFrame::eExportSlicedFile: return _L("Export plate sliced file");
2159 case MainFrame::eExportAllSlicedFile: return _L("Export all sliced file");
2160 case MainFrame::eExportGcode: return _L("Export G-code file");
2161 case MainFrame::eSendGcode: return _L_CONTEXT("Print", "Verb");
2162 case MainFrame::eSendToPrinter: return _L("Send");
2163 case MainFrame::eSendToPrinterAll: return _L("Send all");
2164 case MainFrame::ePrintMultiMachine: return _L("Send to Multi-device");
2165 case MainFrame::eUploadGcode: break; // Orca: no dropdown entry, never selectable
2166 }
2167 return _L("Print plate");
2168}
#define _L(s)
Definition OBJ.cpp:34
#define _L_CONTEXT(s, ctx)
Definition I18N.hpp:15

References _L, _L_CONTEXT, Slic3r::GUI::MainFrame::eExportAllSlicedFile, Slic3r::GUI::MainFrame::eExportGcode, Slic3r::GUI::MainFrame::eExportSlicedFile, Slic3r::GUI::MainFrame::ePrintAll, Slic3r::GUI::MainFrame::ePrintMultiMachine, Slic3r::GUI::MainFrame::ePrintPlate, Slic3r::GUI::MainFrame::eSendGcode, Slic3r::GUI::MainFrame::eSendToPrinter, Slic3r::GUI::MainFrame::eSendToPrinterAll, Slic3r::GUI::MainFrame::eUploadGcode, and print_select_type_label().

Referenced by print_select_type_label().

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