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

Functions

int json_int_or (const nlohmann::json &j, const char *key, int fallback)
wxString mode_label (ConfigOptionMode mode)
wxColour bg_color ()
void focus_webview (wxWebView *browser, bool page_ready)
nlohmann::json speed_dial_ui_strings ()

Variables

constexpr int kPopupWidth = 540
constexpr int kPopupMinHeight = 60
constexpr int kPopupMaxHeight = 282

Function Documentation

◆ bg_color()

wxColour Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::bg_color ( )
69{ return wxGetApp().get_window_default_clr(); }

References bg_color().

Referenced by bg_color().

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

◆ focus_webview()

void Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::focus_webview ( wxWebView * browser,
bool page_ready )
76{
77 if (!browser)
78 return;
79#ifdef __linux__
80 if (void* nb = browser->GetNativeBackend())
81 gtk_widget_grab_focus((GtkWidget*) nb);
82#else
83 browser->SetFocus();
84#endif
85 if (page_ready)
86 browser->RunScript("focusInput();");
87}

References focus_webview().

Referenced by focus_webview().

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

◆ json_int_or()

int Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::json_int_or ( const nlohmann::json & j,
const char * key,
int fallback )
53{
54 auto it = j.find(key);
55 return it != j.end() && it->is_number() ? it->get<int>() : fallback;
56}

References json_int_or().

Referenced by json_int_or().

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

◆ mode_label()

wxString Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::mode_label ( ConfigOptionMode mode)
60{
61 switch (mode) {
62 case comAdvanced: return _L_CONTEXT("Advanced", "Settings Mode");
63 case comExpert: return _L_CONTEXT("Expert", "Settings Mode");
64 case comDevelop: return _L_CONTEXT("Developer", "Settings Mode");
65 default: return _L_CONTEXT("Simple", "Settings Mode");
66 }
67}
@ comDevelop
Definition Config.hpp:225
@ comAdvanced
Definition Config.hpp:223
@ comExpert
Definition Config.hpp:224
#define _L_CONTEXT(s, ctx)
Definition I18N.hpp:15

References _L_CONTEXT, Slic3r::comAdvanced, Slic3r::comDevelop, Slic3r::comExpert, and mode_label().

Referenced by mode_label().

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

◆ speed_dial_ui_strings()

nlohmann::json Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::speed_dial_ui_strings ( )
94{
95 const std::string alt = GUI::shortkey_alt_prefix();
96 const std::string ctrl = GUI::shortkey_ctrl_prefix();
97 return {
98 // TRN Screen-reader label of a Speed Dial action: the first %s is the action name, the second where it comes from (a menu, tab or settings group). Keep the two %s in this order.
99 {"sd_action_from", _u8L("%s from %s")},
100 {"shortcut_alt", alt},
101 {"shortcut_ctrl", ctrl},
102
103 {"sd_search", _u8L("Search actions")},
104 {"sd_clear", _u8L("Clear")},
105 {"sd_recent", _u8L("Recent")},
106 {"sd_plugins", _u8L("Plugins")},
107 {"sd_other", _u8L("Other")},
108 {"sd_no_match_total", _u8L("No actions match (Total: %s)")},
109 {"sd_no_actions", _u8L("No actions yet")},
110 {"sd_no_tabs_match", _u8L("No tabs match")},
111 {"sd_no_tabs", _u8L("No tabs")},
112 {"sd_result_count", _u8L("Matching actions: %s")},
113 {"sd_result_count_all", _u8L("Actions: %s")},
114 {"sd_tab_count", _u8L("Tabs: %s")},
115 {"sd_tab_match_count", _u8L("Matching tabs: %s")},
116 {"sd_favs_full", _u8L("Favorites are full (%s max)")},
117 {"sd_go_to_pct", _u8L("Go to %s%% of the layer range")},
118 {"sd_enter_pct", _u8L("Enter a layer percentage (0-100)")},
119 {"sd_go_layer_ph", _u8L("Go to layer %% (0-100)")},
120 {"sd_go_tab_ph", _u8L("Go to tab")},
121 {"sd_fav_slot", _u8L("Favorite %s (%s)")},
122 {"sd_pin_fav", _u8L("Pin to favorites (%s)")},
123 {"sd_unpin_fav", _u8L("Unpin from favorites (%s)")},
124 {"sd_remove_fav", _u8L("Remove from favorites")},
125 {"sd_move_left", _u8L("Move left")},
126 {"sd_move_right", _u8L("Move right")},
127 {"sd_unpin", _u8L("Unpin")},
128 {"sd_mode_advanced", _u8L_CONTEXT("Advanced", "Settings Mode")},
129 {"sd_mode_expert", _u8L_CONTEXT("Expert", "Settings Mode")},
130 {"sd_mode_develop", _u8L_CONTEXT("Developer", "Settings Mode")},
131 {"sd_wiki_f1", _u8L("Wiki (F1)")},
132 {"sd_no_wiki", _u8L("No wiki page for this action")},
133 {"sd_show_details", _u8L("Show details")},
134 {"sd_hide_details", _u8L("Hide details")},
135 };
136}
const std::string & shortkey_alt_prefix()
Definition GUI.cpp:127
const std::string & shortkey_ctrl_prefix()
Definition GUI.cpp:115
#define _u8L_CONTEXT(s, ctx)
Definition I18N.hpp:16
#define _u8L(s)
Definition I18N.hpp:11

References _u8L, _u8L_CONTEXT, Slic3r::GUI::shortkey_alt_prefix(), Slic3r::GUI::shortkey_ctrl_prefix(), and speed_dial_ui_strings().

Referenced by speed_dial_ui_strings().

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

Variable Documentation

◆ kPopupMaxHeight

int Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::kPopupMaxHeight = 282
constexpr

◆ kPopupMinHeight

int Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::kPopupMinHeight = 60
constexpr

◆ kPopupWidth

int Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::kPopupWidth = 540
constexpr