summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-11-28 18:00:17 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-11-28 18:00:17 +0000
commitd211b12af7662a2ea4a9d98aa2136fd23f52dd96 (patch)
tree77fa5294b7aca44f5af0fa6d6015b8757f44c87f /src
parentf10b778a5623b81b092626049ba9a463d6213e09 (diff)
Add Fl::version() and Fl::event() methods.
Doco updates (use <!-- NEW PAGE --> instead of <HR break>, plus more Fl_Text_Buffer docos) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx21
1 files changed, 17 insertions, 4 deletions
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,
@@ -57,6 +58,16 @@ 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 $".
//