From d211b12af7662a2ea4a9d98aa2136fd23f52dd96 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 28 Nov 2001 18:00:17 +0000 Subject: Add Fl::version() and Fl::event() methods. Doco updates (use instead of
, plus more Fl_Text_Buffer docos) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index 4189ea792..39f1919c7 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.8 2001/11/27 17:44:06 easysw Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.9 2001/11/28 18:00:17 easysw Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -41,6 +41,7 @@ Fl_Widget *Fl::belowmouse_, *Fl::focus_, *Fl::selection_owner_; int Fl::damage_, + Fl::e_number, Fl::e_x, Fl::e_y, Fl::e_x_root, @@ -56,6 +57,16 @@ int Fl::e_length; int Fl::visible_focus_ = 1; +// +// 'Fl::version()' - Return the API version number... +// + +double +Fl::version() { + return FL_VERSION; +} + + // // 'Fl:event_inside()' - Return whether or not the mouse event is inside // the given rectangle. @@ -506,6 +517,8 @@ int Fl::handle(int event, Fl_Window* window) { Fl_Widget* w = window; + e_number = event; + switch (event) { case FL_CLOSE: @@ -536,7 +549,7 @@ int Fl::handle(int event, Fl_Window* window) fl_xmousewin = window; // this should already be set, but just in case. if (pushed()) { w = pushed(); - event = FL_DRAG; + e_number = event = FL_DRAG; } else if (modal() && w != modal()) { w = 0; } @@ -577,7 +590,7 @@ int Fl::handle(int event, Fl_Window* window) {char* c = (char*)event_text(); // cast away const if (!isalpha(*c)) return 0; *c = isupper(*c) ? tolower(*c) : toupper(*c);} - event = FL_SHORTCUT; + e_number = event = FL_SHORTCUT; case FL_SHORTCUT: Fl_Tooltip::enter((Fl_Widget*)0); @@ -821,5 +834,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.8 2001/11/27 17:44:06 easysw Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.9 2001/11/28 18:00:17 easysw Exp $". // -- cgit v1.2.3