diff options
| author | Manolo Gouy <Manolo> | 2013-01-13 15:25:37 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2013-01-13 15:25:37 +0000 |
| commit | 482c4a5e0a52cc19396fd931c651dc2d89ea8be4 (patch) | |
| tree | 4389a47e09fbe5814f8467909ea1e14f3d6bb0a7 /FL | |
| parent | e042966ae7a13b8bf6e26a09025ba47c026559a8 (diff) | |
Mac OS: added support for the text input feature introduced in OS 10.7 "Lion" where pressing and holding
some key opens a window with possible accented characters. This feature is used by the Fl_Input_ and
Fl_Text_Editor widgets. User-defined text input widgets can optionally use this feature, but the default
behavior is to not use it. Fl_Secret_Input turns it off, for example.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 2 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 5 | ||||
| -rw-r--r-- | FL/mac.H | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -147,7 +147,7 @@ public: // should be private! #ifdef __APPLE__ static int marked_text_length(void); // returns length of marked text static void reset_marked_text(); // resets marked text - static void insertion_point_location(int x, int y); // sets window coordinates of insertion point + static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point #endif #endif /** diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 27e6801c2..cbe7e9f0a 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -171,6 +171,7 @@ protected: GROUP_RELATIVE = 1<<16, ///< position this widget relative to the parent group, not to the window COPIED_TOOLTIP = 1<<17, ///< the widget tooltip is internally copied, its destruction is handled by the widget FULLSCREEN = 1<<18, ///< a fullscreen window (Fl_Window) + MAC_USE_ACCENTS_MENU = 1<<19, ///< On the Mac OS platform, pressing and holding a key on the keyboard opens an accented-character menu window (Fl_Input_, Fl_Text_Editor) // (space for more flags) USERFLAG3 = 1<<29, ///< reserved for 3rd party extensions USERFLAG2 = 1<<30, ///< reserved for 3rd party extensions @@ -976,6 +977,10 @@ public: */ virtual class Fl_Gl_Window* as_gl_window() {return 0;} + /** Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise. + */ + int use_accents_menu() { return flags() & MAC_USE_ACCENTS_MENU; } + /** For back compatibility only. \deprecated Use selection_color() instead. */ @@ -132,7 +132,7 @@ public: static void *get_carbon_function(const char *name); static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // compute work area of a given screen static int next_marked_length; // next length of marked text after current marked text will have been replaced - static int insertion_point_location(int *px, int *py); // computes window coordinates of insertion point + static int insertion_point_location(int *px, int *py, int *pheight); // computes window coordinates & height of insertion point private: static void relink(Fl_Window*, Fl_Window*); bool subwindow; |
