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

Classes

struct  overloaded

Functions

wxString shortcut_names (const std::vector< Shortcut > &shortcuts)
const wxColour ERROR_COLOUR ("#D01B1B")
const char * mouse_action (const char *preference)
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
std::vector< wxString > to_wx (const std::vector< std::string > &parts)
wxString global_key_advice ()
wxString join_keys (const std::vector< wxString > &parts)

Variables

constexpr int PAGE_WIDTH = 640
constexpr int TITLE_MARGIN = DESIGN_LEFT_MARGIN - 10
constexpr int ROW_MARGIN = DESIGN_LEFT_MARGIN
constexpr int ROW_GAP = 16

Function Documentation

◆ ERROR_COLOUR()

const wxColour Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::ERROR_COLOUR ( "#D01B1B" )

References ERROR_COLOUR().

Referenced by ERROR_COLOUR().

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

◆ global_key_advice()

wxString Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::global_key_advice ( )
83{
84 return wxString::Format(_L("Use %s or %s, or a key that does not type a character."),
86}
#define _L(s)
Definition OBJ.cpp:34
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
static std::string modifier_name(int modifier)
Definition KeyChord.cpp:317

References _L, Slic3r::GUI::from_u8(), global_key_advice(), and Slic3r::GUI::KeyChord::modifier_name().

Referenced by global_key_advice().

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

◆ join_keys()

wxString Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::join_keys ( const std::vector< wxString > & parts)
90{
91 wxString out;
92 for (const wxString& part : parts)
93 out += (out.empty() ? "" : " + ") + part;
94 return out;
95}

References join_keys().

Referenced by join_keys().

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

◆ mouse_action()

const char * Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::mouse_action ( const char * preference)
59{
60 const std::string action = wxGetApp().app_config->get(preference);
61 return action == "1" ? L("Pan View") : action == "2" ? L("Rotate View") : L("None");
62}
#define L(s)
Definition ExtrusionEntity.cpp:25

References L, and mouse_action().

Referenced by mouse_action().

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

◆ overloaded()

template<class... Ts>
Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::overloaded ( Ts... ) ->overloaded< Ts... >

◆ shortcut_names()

wxString Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::shortcut_names ( const std::vector< Shortcut > & shortcuts)
45{
46 wxString names;
47 for (Shortcut shortcut : shortcuts) {
48 if (!names.empty())
49 names += ", ";
50 names += _(shortcut_info(shortcut).name);
51 }
52 return names;
53}
#define _(s)
Definition 3mf.cpp:306
const ShortcutInfo & shortcut_info(Shortcut shortcut)
Definition Shortcuts.cpp:237
Shortcut
Definition Shortcuts.hpp:25

References _, Slic3r::GUI::shortcut_info(), and shortcut_names().

Referenced by shortcut_names().

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

◆ to_wx()

std::vector< wxString > Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::to_wx ( const std::vector< std::string > & parts)
74{
75 std::vector<wxString> out;
76 for (const std::string& part : parts)
77 out.push_back(from_u8(part));
78 return out;
79}

References Slic3r::GUI::from_u8(), and to_wx().

Referenced by to_wx().

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

Variable Documentation

◆ PAGE_WIDTH

int Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::PAGE_WIDTH = 640
constexpr

◆ ROW_GAP

int Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::ROW_GAP = 16
constexpr

◆ ROW_MARGIN

int Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::ROW_MARGIN = DESIGN_LEFT_MARGIN
constexpr

◆ TITLE_MARGIN

int Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::TITLE_MARGIN = DESIGN_LEFT_MARGIN - 10
constexpr