summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2016-03-12 17:44:24 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2016-03-12 17:44:24 +0000
commitc1fe316855ecb6a6c0159fc969c8ddef2c5d9b3c (patch)
tree2fa9c28112269fc440cd9fb1ed34acbf9044a705 /src/Fl.cxx
parent3b1434238879cd4cdb0cf1d91563c5e661698f78 (diff)
Add localization of modifier key names in shortcut labels.
Modifier key names like Alt, Shift, Ctrl, Meta can now be localized by setting global string pointers. See documentation of fl_shortcut_label(). Port branch-1.3, svn r 11321. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11354 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 60ce50164..88f82a151 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -160,8 +160,24 @@ bool Fl::cfg_sys_win32 = 0;
//
// Globals...
//
+
+// Pointers you can use to change FLTK to a foreign language.
+// Note: Similar pointers are defined in FL/fl_ask.H and src/fl_ask.cxx
+#if !defined(__APPLE__) || defined(FL_DOXYGEN)
+ const char* fl_local_alt = "Alt"; ///< string pointer used in shortcuts, you can change it to another language
+ const char* fl_local_ctrl = "Ctrl"; ///< string pointer used in shortcuts, you can change it to another language
+ const char* fl_local_meta = "Meta"; ///< string pointer used in shortcuts, you can change it to another language
+ const char* fl_local_shift = "Shift"; ///< string pointer used in shortcuts, you can change it to another language
+#else
+ const char* fl_local_alt = "\xe2\x8c\xa5\\"; // U+2325 (option key)
+ const char* fl_local_ctrl = "\xe2\x8c\x83\\"; // U+2303 (up arrowhead)
+ const char* fl_local_meta = "\xe2\x8c\x98\\"; // U+2318 (place of interest sign)
+ const char* fl_local_shift = "\xe2\x87\xa7\\"; // U+21E7 (upwards white arrow)
+#endif
+
#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: Fl_Screen_Driver - platform text
// this should probably be part of Fl_Sys_Menubar
+// Apple App Menu
const char *Fl_Mac_App_Menu::about = "About %@";
const char *Fl_Mac_App_Menu::print = "Print Front Window";
const char *Fl_Mac_App_Menu::services = "Services";
@@ -170,6 +186,7 @@ const char *Fl_Mac_App_Menu::hide_others = "Hide Others";
const char *Fl_Mac_App_Menu::show = "Show All";
const char *Fl_Mac_App_Menu::quit = "Quit %@";
#endif // __APPLE__ // PORTME: Fl_Screen_Driver - platform text, system menu
+
#ifndef FL_DOXYGEN
Fl_Widget *Fl::belowmouse_,
*Fl::pushed_,