summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-02-01 21:31:57 +0000
committerManolo Gouy <Manolo>2011-02-01 21:31:57 +0000
commit816fc3b9718c8c407a41d7e0a5d400b5f3ed07b6 (patch)
tree9fb6287378cb47b22786ffd287ba2a2e8f0062b1 /FL
parent073e05158903298130e56d59efc091fc5ef39b8f (diff)
Mac OS only: added class Fl_Mac_App_Menu to support localization
of the application menu. Added corresponding Doxygen doc. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/mac.H41
1 files changed, 37 insertions, 4 deletions
diff --git a/FL/mac.H b/FL/mac.H
index 98d7bb2c1..7190c8360 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -185,11 +185,13 @@ extern void fl_open_display();
#endif // FL_DOXYGEN
-/** \defgroup group_macosx Mac OS X-specific functions
- Mac OS X-specific functions declared in <FL/x.H> or <FL/gl.h>
+/** \defgroup group_macosx Mac OS X-specific symbols
+ Mac OS X-specific symbols declared in <FL/x.H> or <FL/gl.h>
@{ */
-/** @brief Register a function called for each file dropped onto an application icon
+/** @brief Register a function called for each file dropped onto an application icon.
+ \e cb will be called with a single Unix-style file name and path.
+ If multiple files were dropped, \e cb will be called multiple times.
*/
extern void fl_open_callback(void (*cb)(const char *));
@@ -205,7 +207,38 @@ extern void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 0
/** \brief The version number of the running Mac OS X (e.g., 0x1064 for 10.6.4)
*/
-extern int fl_mac_os_version;
+extern int fl_mac_os_version;
+
+/** To localize the application menu.
+
+ These character strings are used to build the application menu. They can be localized
+ at run time to any UTF-8 text by placing instructions such as these \e very
+ early in the program:
+ \verbatim
+ #include <FL/x.H>
+ Fl_Mac_App_Menu::print = "Imprimer la fenĂȘtre";
+ \endverbatim
+ */
+class Fl_Mac_App_Menu {
+public:
+ /** Localizable text for the "About xxx" application menu item */
+ static const char *about;
+ /** Localizable text for the "Print Front Window" application menu item.
+ This menu item won't be displayed if Fl_Mac_App_Menu::print
+ is set to an empty string.
+ */
+ static const char *print;
+ /** Localizable text for the "Services" application menu item */
+ static const char *services;
+ /** Localizable text for the "Hide xxx" application menu item */
+ static const char *hide;
+ /** Localizable text for the "Hide Others" application menu item */
+ static const char *hide_others;
+ /** Localizable text for the "Show All" application menu item */
+ static const char *show;
+ /** Localizable text for the "Quit xxx" application menu item */
+ static const char *quit;
+};
/** @} */