From a2eeca92f09617c10e6f2b6d15a33e19b73ff8bc Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 6 Apr 2016 19:39:15 +0000 Subject: Rewrite Fl_Input.cxx under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Input.H | 2 ++ FL/Fl_Screen_Driver.H | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'FL') diff --git a/FL/Fl_Input.H b/FL/Fl_Input.H index d8fabb561..4c5ff17d4 100644 --- a/FL/Fl_Input.H +++ b/FL/Fl_Input.H @@ -219,6 +219,8 @@ */ class FL_EXPORT Fl_Input : public Fl_Input_ { + friend class Fl_Screen_Driver; + friend class Fl_Cocoa_Screen_Driver; // Not ideal, but probably no other platform will use it int handle_key(); int shift_position(int p); int shift_up_down_position(int p); diff --git a/FL/Fl_Screen_Driver.H b/FL/Fl_Screen_Driver.H index d13dbaafe..22eda6095 100644 --- a/FL/Fl_Screen_Driver.H +++ b/FL/Fl_Screen_Driver.H @@ -39,6 +39,7 @@ class Fl_Window; class Fl_RGB_Image; class Fl_Group; +class Fl_Input; class FL_EXPORT Fl_Screen_Driver { @@ -129,6 +130,9 @@ public: static void write_image_inside(Fl_RGB_Image *to, Fl_RGB_Image *from, int to_x, int to_y); static Fl_RGB_Image *traverse_to_gl_subwindows(Fl_Group *g, uchar *p, int x, int y, int w, int h, int alpha, Fl_RGB_Image *full_img); + // optional platform-specific key handling for Fl_Input widget + // the default implementation may be enough + virtual int input_widget_handle_key(int key, unsigned mods, unsigned shift, Fl_Input *input); }; -- cgit v1.2.3