FLTK logo

[Library] r8679 - in branches/branch-3.0: . fltk3 ide/Xcode4/FLTK.xcodeproj src

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r8679 - in branches/branch-3.0: . fltk3 ide/Xcode4/FLTK.xcodeproj src fltk-dev May 17, 2011  
 
Author: matt
Date: 2011-05-17 07:27:45 -0700 (Tue, 17 May 2011)
New Revision: 8679
Log:
123: snapshot

Modified:
   branches/branch-3.0/fltk3/Button.h
   branches/branch-3.0/fltk3/InputChoice.h
   branches/branch-3.0/fltk3/Object.h
   branches/branch-3.0/fltk3/Wrapper.h
   branches/branch-3.0/fltk3/run.h
   branches/branch-3.0/ide/Xcode4/FLTK.xcodeproj/project.pbxproj
   branches/branch-3.0/make3.sh
   branches/branch-3.0/src/Fl.cxx
   branches/branch-3.0/src/Fl_Adjuster.cxx
   branches/branch-3.0/src/Fl_Browser_.cxx
   branches/branch-3.0/src/Fl_Button.cxx
   branches/branch-3.0/src/Fl_Counter.cxx
   branches/branch-3.0/src/Fl_Dial.cxx
   branches/branch-3.0/src/Fl_File_Input.cxx
   branches/branch-3.0/src/Fl_Group.cxx
   branches/branch-3.0/src/Fl_Menu_Button.cxx
   branches/branch-3.0/src/Fl_Slider.cxx
   branches/branch-3.0/src/Fl_Tabs.cxx
   branches/branch-3.0/src/Fl_Value_Input.cxx
   branches/branch-3.0/src/Fl_Widget.cxx

Modified: branches/branch-3.0/fltk3/Button.h
===================================================================
--- branches/branch-3.0/fltk3/Button.h	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/fltk3/Button.h	2011-05-17 14:27:45 UTC (rev 8679)
@@ -46,7 +46,7 @@
 
 extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*);
 
-class Fl_Widget_Tracker;
+class fltk3::WidgetTracker;
 
 /**
   \class Fl_Button
@@ -90,7 +90,7 @@
 
 protected:
 
-  static Fl_Widget_Tracker *key_release_tracker;
+  static fltk3::WidgetTracker *key_release_tracker;
   static void key_release_timeout(void*);
   void simulate_key_action();
   

Modified: branches/branch-3.0/fltk3/InputChoice.h
===================================================================
--- branches/branch-3.0/fltk3/InputChoice.h	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/fltk3/InputChoice.h	2011-05-17 14:27:45 UTC (rev 8679)
@@ -76,7 +76,7 @@
 
   static void menu_cb(fltk3::Widget*, void *data) { 
     Fl_Input_Choice *o=(Fl_Input_Choice *)data;
-    Fl_Widget_Tracker wp(o);
+    fltk3::WidgetTracker wp(o);
     const Fl_Menu_Item *item = o->menubutton()->mvalue();
     if (item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) return;	// ignore submenus
     if (!strcmp(o->inp_->value(), o->menu_->text()))
@@ -105,7 +105,7 @@
 
   static void inp_cb(fltk3::Widget*, void *data) { 
     Fl_Input_Choice *o=(Fl_Input_Choice *)data;
-    Fl_Widget_Tracker wp(o);
+    fltk3::WidgetTracker wp(o);
     if (o->inp_->changed()) {
       o->fltk3::Widget::set_changed();
       if (o->when() & (fltk3::WHEN_CHANGED|fltk3::WHEN_RELEASE))

Modified: branches/branch-3.0/fltk3/Object.h
===================================================================
--- branches/branch-3.0/fltk3/Object.h	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/fltk3/Object.h	2011-05-17 14:27:45 UTC (rev 8679)
@@ -26,7 +26,7 @@
 //
 
 /* \file
-   fltk3::Object */
+ fltk3::Object */
 
 #ifndef FLTK3_OBJECT_H
 #define FLTK3_OBJECT_H
@@ -34,18 +34,42 @@
 namespace fltk3 {
   
   class Wrapper; 
-
-/**
- * \brief a base class for any kind of langage wrapper around FLTK3.
- */
+  
+  /**
+   \brief A base class for any kind of langage wrapper around FLTK3.
+   
+   fltk3::Object is a way to inject code into the existing library at
+   run-time. When used as a base class, external languages and interfaces can 
+   use the counterpart fltk3::Wrapper to allow for external overrides of every 
+   fltk3 class.  
+   
+   Practical examples for this are the FLTK1 and FLTK2 emulation. It all looks
+   a bit convoluted at first, but the use is straight forward and creates a true
+   relationship between this library and any other frontend.
+   */
   class Object {
+    
   protected:
     Wrapper *pWrapper;
+    
   public:
+    
+    /**
+     \brief Creator. This adds one pointer to the class.
+     */ 
     Object() 
     : pWrapper(0L) { }
+    
     virtual ~Object();
+    
+    /**
+     \brief Return the class that is injecting code.
+     */
     Wrapper *wrapper() { return this?pWrapper:0L; }
+    
+    /**
+     \brief Set the class that can then inject code.
+     */
     void wrapper(Wrapper *w) { pWrapper = w; }
   };
   

Modified: branches/branch-3.0/fltk3/Wrapper.h
===================================================================
--- branches/branch-3.0/fltk3/Wrapper.h	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/fltk3/Wrapper.h	2011-05-17 14:27:45 UTC (rev 8679)
@@ -79,9 +79,9 @@
 
 namespace fltk3 {
   
-/**
- * \brief a base class for any kind of langage wrapper around FLTK3.
- */
+  /**
+   * \brief a base class for any kind of langage wrapper around FLTK3.
+   */
   class Wrapper {
   protected:
   public:
@@ -97,7 +97,7 @@
     static const unsigned int pVCallWidgetResize  = 1<<3;
     static const unsigned int pVCallWidgetShow    = 1<<4;
     static const unsigned int pVCallWidgetHide    = 1<<5;
-
+    
     virtual void draw() { /* call _p->draw() with a flag set */ }
   };
   
@@ -109,8 +109,8 @@
                                 draw(),
                                 Draw)
     FLTK3_WRAPPER_VCALLS_OBJECT_INT(handle(int event),
-                                handle(event),
-                                Handle)
+                                    handle(event),
+                                    Handle)
     FLTK3_WRAPPER_VCALLS_OBJECT(resize(int x, int y, int w, int h),
                                 resize(x, y, w, h),
                                 Resize)

Modified: branches/branch-3.0/fltk3/run.h
===================================================================
--- branches/branch-3.0/fltk3/run.h	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/fltk3/run.h	2011-05-17 14:27:45 UTC (rev 8679)
@@ -26,7 +26,7 @@
 //
 
 /** \file
-    Fl static class.
+ Fl static class.
  */
 
 #ifndef Fl_H
@@ -57,19 +57,19 @@
 
 /** \defgroup  callback_functions Callback function typedefs
  \brief Typedefs defined in <fltk3/run.h> for callback or handler functions passed as function parameters.
+ 
+ FLTK uses callback functions as parameters for some function calls, e.g. to
+ set up global event handlers (Fl::add_handler()), to add a timeout handler
+ (Fl::add_timeout()), and many more.
+ 
+ The typedefs defined in this group describe the function parameters used to set
+ up or clear the callback functions and should also be referenced to define the
+ callback function to handle such events in the user's code.
+ 
+ \see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
+ Fl::remove_timeout() and others
+ @{ */
 
-    FLTK uses callback functions as parameters for some function calls, e.g. to
-    set up global event handlers (Fl::add_handler()), to add a timeout handler
-    (Fl::add_timeout()), and many more.
-
-    The typedefs defined in this group describe the function parameters used to set
-    up or clear the callback functions and should also be referenced to define the
-    callback function to handle such events in the user's code.
-
-    \see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
-	 Fl::remove_timeout() and others
-  @{ */
-
 /** Signature of some label drawing functions passed as parameters */
 typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, fltk3::Align align);
 
@@ -107,16 +107,16 @@
 typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
 
 /** Signature of event_dispatch functions passed as parameters.
-    \see Fl::event_dispatch(Fl_Event_Dispatch) */
+ \see Fl::event_dispatch(Fl_Event_Dispatch) */
 typedef int (*Fl_Event_Dispatch)(int event, fltk3::Window *w);
 
 /** @} */ /* group callback_functions */
 
 
 /**
-  The Fl is the FLTK global (static) class containing
-  state information and global methods for the current application.
-*/
+ The Fl is the FLTK global (static) class containing
+ state information and global methods for the current application.
+ */
 class FL_EXPORT Fl {
   Fl() {}; // no constructor!
   
@@ -146,51 +146,51 @@
   static int compose_state;
 #endif
   /**
-    If true then flush() will do something.
-  */
+   If true then flush() will do something.
+   */
   static void damage(int d) {damage_ = d;}
   
 public:
   /** Enumerator for global FLTK options.
-      These options can be set system wide, per user, or for the running
-      application only.
-      \see Fl::option(Fl_Option, bool)
-      \see Fl::option(Fl_Option)
-  */
+   These options can be set system wide, per user, or for the running
+   application only.
+   \see Fl::option(Fl_Option, bool)
+   \see Fl::option(Fl_Option)
+   */
   typedef enum {
-      /// When switched on, moving the text cursor beyond the start or end of
-      /// a text in a text widget will change focus to the next text widget.
-      /// When switched off, the cursor will stop at the end of the text.
-      /// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
+    /// When switched on, moving the text cursor beyond the start or end of
+    /// a text in a text widget will change focus to the next text widget.
+    /// When switched off, the cursor will stop at the end of the text.
+    /// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
     OPTION_ARROW_FOCUS = 0,
-      // When switched on, FLTK will use the file chooser dialog that comes 
-      // with your operating system whenever possible. When switched off, FLTK
-      // will present its own file chooser.
-      // \todo implement me
+    // When switched on, FLTK will use the file chooser dialog that comes 
+    // with your operating system whenever possible. When switched off, FLTK
+    // will present its own file chooser.
+    // \todo implement me
     // OPTION_NATIVE_FILECHOOSER,
-      // When Filechooser Preview is enabled, the FLTK or native file chooser
-      // will show a preview of a selected file (if possible) before the user
-      // decides to choose the file.
-      // \todo implement me
+    // When Filechooser Preview is enabled, the FLTK or native file chooser
+    // will show a preview of a selected file (if possible) before the user
+    // decides to choose the file.
+    // \todo implement me
     //OPTION_FILECHOOSER_PREVIEW,
-      /// If visible focus is switched on, FLTK will draw a dotted rectangle 
-      /// inside the widget that will receive the next keystroke. If switched
-      /// off, no such indicator will be drawn and keyboard navigation
-      /// is disabled.
+    /// If visible focus is switched on, FLTK will draw a dotted rectangle 
+    /// inside the widget that will receive the next keystroke. If switched
+    /// off, no such indicator will be drawn and keyboard navigation
+    /// is disabled.
     OPTION_VISIBLE_FOCUS,
-      /// If text drag-and-drop is enabled, the user can select and drag text
-      /// from any text widget. If disabled, no dragging is possible, however
-      /// dropping text from other applications still works.
+    /// If text drag-and-drop is enabled, the user can select and drag text
+    /// from any text widget. If disabled, no dragging is possible, however
+    /// dropping text from other applications still works.
     OPTION_DND_TEXT,
-      /// If tooltips are enabled, hovering the mouse over a widget with a 
-      /// tooltip text will open a little tooltip window until the mouse leaves
-      /// the widget. If disabled, no tooltip is shown.
+    /// If tooltips are enabled, hovering the mouse over a widget with a 
+    /// tooltip text will open a little tooltip window until the mouse leaves
+    /// the widget. If disabled, no tooltip is shown.
     OPTION_SHOW_TOOLTIPS,
-      // don't change this, leave it always as the last element
-      /// For internal use only.
+    // don't change this, leave it always as the last element
+    /// For internal use only.
     OPTION_LAST
   } Fl_Option;
-
+  
 private:  
   static unsigned char options_[OPTION_LAST];
   static unsigned char options_read_;
@@ -208,14 +208,14 @@
   static void option(Fl_Option opt, bool val);
   
   /**
-    The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
-    
-    This is now used as part of a higher level system allowing multiple
-    idle callback functions to be called.
-    \see add_idle(), remove_idle()
-  */
+   The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
+   
+   This is now used as part of a higher level system allowing multiple
+   idle callback functions to be called.
+   \see add_idle(), remove_idle()
+   */
   static void (*idle)();
-
+  
 #ifndef FL_DOXYGEN
   static Fl_Awake_Handler *awake_ring_;
   static void **awake_data_;
@@ -224,62 +224,62 @@
   static int awake_ring_tail_;
   static const char* scheme_;
   static Fl_Image* scheme_bg_;
-
+  
   static int e_original_keysym; // late addition
   static int scrollbar_size_;
 #endif
-
-
+  
+  
   static int add_awake_handler_(Fl_Awake_Handler, void*);
   static int get_awake_handler_(Fl_Awake_Handler&, void*&);
-
+  
 public:
-
+  
   // API version number
   static double version();
-
+  
   // argument parsers:
   static int arg(int argc, char **argv, int& i);
   static int args(int argc, char **argv, int& i, Fl_Args_Handler cb = 0);
   static void args(int argc, char **argv);
   /**
-    Usage string displayed if Fl::args() detects an invalid argument.
-    This may be changed to point to customized text at run-time.
-  */
+   Usage string displayed if Fl::args() detects an invalid argument.
+   This may be changed to point to customized text at run-time.
+   */
   static const char* const help;
-
+  
   // things called by initialization:
   static void display(const char*);
   static int visual(int);
   /**
-    This does the same thing as Fl::visual(int) but also requires OpenGL
-    drawing to work. This <I>must</I> be done if you want to draw in
-    normal windows with OpenGL with gl_start() and gl_end().
-    It may be useful to call this so your X windows use the same visual
-    as an Fl_Gl_Window, which on some servers will reduce colormap flashing.
-
-    See Fl_Gl_Window for a list of additional values for the argument.
-  */
+   This does the same thing as Fl::visual(int) but also requires OpenGL
+   drawing to work. This <I>must</I> be done if you want to draw in
+   normal windows with OpenGL with gl_start() and gl_end().
+   It may be useful to call this so your X windows use the same visual
+   as an Fl_Gl_Window, which on some servers will reduce colormap flashing.
+   
+   See Fl_Gl_Window for a list of additional values for the argument.
+   */
   static int gl_visual(int, int *alist=0); // platform dependent
   static void own_colormap();
   static void get_system_colors();
   static void foreground(uchar, uchar, uchar);
   static void background(uchar, uchar, uchar);
   static void background2(uchar, uchar, uchar);
-
+  
   // schemes:
   static int scheme(const char*);
   /** See void scheme(const char *name) */
   static const char* scheme() {return scheme_;}
   /** 
-    Called by scheme according to scheme name. 
-    Loads or reloads the current scheme selection. 
-    See void scheme(const char *name) 
-  */
+   Called by scheme according to scheme name. 
+   Loads or reloads the current scheme selection. 
+   See void scheme(const char *name) 
+   */
   static int reload_scheme(); // platform dependent
   static int scrollbar_size();
   static void scrollbar_size(int W);
-
+  
   // execution:
   static int wait();
   static double wait(double time);
@@ -288,52 +288,52 @@
   static int run();
   static fltk3::Widget* readqueue();
   /**
-  Adds a one-shot timeout callback.  The function will be called by
-  Fl::wait() at <i>t</i> seconds after this function is called.
-  The optional void* argument is passed to the callback.
-  
-  You can have multiple timeout callbacks. To remove a timeout
-  callback use Fl::remove_timeout().
-  
-  If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to
-  reschedule the subsequent timeouts.
-  
-  The following code will print "TICK" each second on
-  stdout with a fair degree of accuracy:
-  
-  \code
-     void callback(void*) {
-       puts("TICK");
-       Fl::repeat_timeout(1.0, callback);
-     }
-  
-     int main() {
-       Fl::add_timeout(1.0, callback);
-       return Fl::run();
-     }
-  \endcode
-  */
+   Adds a one-shot timeout callback.  The function will be called by
+   Fl::wait() at <i>t</i> seconds after this function is called.
+   The optional void* argument is passed to the callback.
+   
+   You can have multiple timeout callbacks. To remove a timeout
+   callback use Fl::remove_timeout().
+   
+   If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to
+   reschedule the subsequent timeouts.
+   
+   The following code will print "TICK" each second on
+   stdout with a fair degree of accuracy:
+   
+   \code
+   void callback(void*) {
+   puts("TICK");
+   Fl::repeat_timeout(1.0, callback);
+   }
+   
+   int main() {
+   Fl::add_timeout(1.0, callback);
+   return Fl::run();
+   }
+   \endcode
+   */
   static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent
   /**
-  Repeats a timeout callback from the expiration of the
-  previous timeout, allowing for more accurate timing. You may only call
-  this method inside a timeout callback.
-  
-  The following code will print "TICK" each second on
-  stdout with a fair degree of accuracy:
-  
-  \code
-     void callback(void*) {
-       puts("TICK");
-       Fl::repeat_timeout(1.0, callback);
-     }
-  
-     int main() {
-       Fl::add_timeout(1.0, callback);
-       return Fl::run();
-     }
-  \endcode
-  */
+   Repeats a timeout callback from the expiration of the
+   previous timeout, allowing for more accurate timing. You may only call
+   this method inside a timeout callback.
+   
+   The following code will print "TICK" each second on
+   stdout with a fair degree of accuracy:
+   
+   \code
+   void callback(void*) {
+   puts("TICK");
+   Fl::repeat_timeout(1.0, callback);
+   }
+   
+   int main() {
+   Fl::add_timeout(1.0, callback);
+   return Fl::run();
+   }
+   \endcode
+   */
   static void repeat_timeout(double t, Fl_Timeout_Handler, void* = 0); // platform dependent
   static int  has_timeout(Fl_Timeout_Handler, void* = 0);
   static void remove_timeout(Fl_Timeout_Handler, void* = 0);
@@ -341,24 +341,24 @@
   static int  has_check(Fl_Timeout_Handler, void* = 0);
   static void remove_check(Fl_Timeout_Handler, void* = 0);
   /**
-    Adds file descriptor fd to listen to.
-    
-    When the fd becomes ready for reading Fl::wait() will call the
-    callback and then return. The callback is passed the fd and the
-    arbitrary void* argument.
-    
-    The second version takes a when bitfield, with the bits
-    fltk3::READ, fltk3::WRITE, and fltk3::EXCEPT defined,
-    to indicate when the callback should be done.
-    
-    There can only be one callback of each type for a file descriptor. 
-    Fl::remove_fd() gets rid of <I>all</I> the callbacks for a given
-    file descriptor.
-    
-    Under UNIX <I>any</I> file descriptor can be monitored (files,
-    devices, pipes, sockets, etc.). Due to limitations in Microsoft Windows,
-    WIN32 applications can only monitor sockets.
-  */
+   Adds file descriptor fd to listen to.
+   
+   When the fd becomes ready for reading Fl::wait() will call the
+   callback and then return. The callback is passed the fd and the
+   arbitrary void* argument.
+   
+   The second version takes a when bitfield, with the bits
+   fltk3::READ, fltk3::WRITE, and fltk3::EXCEPT defined,
+   to indicate when the callback should be done.
+   
+   There can only be one callback of each type for a file descriptor. 
+   Fl::remove_fd() gets rid of <I>all</I> the callbacks for a given
+   file descriptor.
+   
+   Under UNIX <I>any</I> file descriptor can be monitored (files,
+   devices, pipes, sockets, etc.). Due to limitations in Microsoft Windows,
+   WIN32 applications can only monitor sockets.
+   */
   static void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); // platform dependent
   /** See void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0) */
   static void add_fd(int fd, Fl_FD_Handler cb, void* = 0); // platform dependent
@@ -366,7 +366,7 @@
   static void remove_fd(int, int when); // platform dependent
   /** Removes a file descriptor handler. */
   static void remove_fd(int); // platform dependent
-
+  
   static void add_idle(Fl_Idle_Handler cb, void* data = 0);
   static int  has_idle(Fl_Idle_Handler cb, void* data = 0);
   static void remove_idle(Fl_Idle_Handler cb, void* data = 0);
@@ -375,82 +375,82 @@
   static void redraw();
   static void flush();
   /** \addtogroup group_comdlg
-    @{ */
+   @{ */
   /**
-  FLTK calls Fl::warning() to output a warning message.
-  
-  The default version on Windows returns \e without printing a warning
-  message, because Windows programs normally don't have stderr (a console
-  window) enabled.
-
-  The default version on all other platforms prints the warning message to stderr.
-
-  You can override the behavior by setting the function pointer to your
-  own routine.
-
-  Fl::warning() means that there was a recoverable problem, the display may
-  be messed up, but the user can probably keep working - all X protocol
-  errors call this, for example. The default implementation returns after
-  displaying the message.
+   FLTK calls Fl::warning() to output a warning message.
+   
+   The default version on Windows returns \e without printing a warning
+   message, because Windows programs normally don't have stderr (a console
+   window) enabled.
+   
+   The default version on all other platforms prints the warning message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   Fl::warning() means that there was a recoverable problem, the display may
+   be messed up, but the user can probably keep working - all X protocol
+   errors call this, for example. The default implementation returns after
+   displaying the message.
    \note \#include <fltk3/run.h>
-  */
+   */
   static void (*warning)(const char*, ...);
   /**
-  FLTK calls Fl::error() to output a normal error message.
-  
-  The default version on Windows displays the error message in a MessageBox window.
-
-  The default version on all other platforms prints the error message to stderr.
-
-  You can override the behavior by setting the function pointer to your
-  own routine.
-
-  Fl::error() means there is a recoverable error such as the inability to read
-  an image file. The default implementation returns after displaying the message.
+   FLTK calls Fl::error() to output a normal error message.
+   
+   The default version on Windows displays the error message in a MessageBox window.
+   
+   The default version on all other platforms prints the error message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   Fl::error() means there is a recoverable error such as the inability to read
+   an image file. The default implementation returns after displaying the message.
    \note \#include <fltk3/run.h>
-  */
+   */
   static void (*error)(const char*, ...);
   /**
-  FLTK calls Fl::fatal() to output a fatal error message.
-  
-  The default version on Windows displays the error message in a MessageBox window.
-
-  The default version on all other platforms prints the error message to stderr.
-  
-  You can override the behavior by setting the function pointer to your
-  own routine.
-
-  Fl::fatal() must not return, as FLTK is in an unusable state, however your
-  version may be able to use longjmp or an exception to continue, as long as
-  it does not call FLTK again. The default implementation exits with status 1
-  after displaying the message.
+   FLTK calls Fl::fatal() to output a fatal error message.
+   
+   The default version on Windows displays the error message in a MessageBox window.
+   
+   The default version on all other platforms prints the error message to stderr.
+   
+   You can override the behavior by setting the function pointer to your
+   own routine.
+   
+   Fl::fatal() must not return, as FLTK is in an unusable state, however your
+   version may be able to use longjmp or an exception to continue, as long as
+   it does not call FLTK again. The default implementation exits with status 1
+   after displaying the message.
    \note \#include <fltk3/run.h>
-  */
+   */
   static void (*fatal)(const char*, ...);
   /** @} */
-
+  
   /** \defgroup  fl_windows Windows handling functions
-      \brief Windows and standard dialogs handling declared in <fltk3/run.h>
-    @{ */
+   \brief Windows and standard dialogs handling declared in <fltk3/run.h>
+   @{ */
   static fltk3::Window* first_window();
   static void first_window(fltk3::Window*);
   static fltk3::Window* next_window(const fltk3::Window*);
-
+  
   /**
-    Returns the top-most modal() window currently shown.
-
-    This is the most recently shown() window with modal() true, or NULL
-    if there are no modal() windows shown().
-    The modal() window has its handle() method called
-    for all events, and no other windows will have handle()
-    called (grab() overrides this).
-  */
+   Returns the top-most modal() window currently shown.
+   
+   This is the most recently shown() window with modal() true, or NULL
+   if there are no modal() windows shown().
+   The modal() window has its handle() method called
+   for all events, and no other windows will have handle()
+   called (grab() overrides this).
+   */
   static fltk3::Window* modal() {return modal_;}
   /** Returns the window that currently receives all events.
    
    \return The window that currently receives all events,
    or NULL if event grabbing is currently OFF.
-  */
+   */
   static fltk3::Window* grab() {return grab_;}
   /** Selects the window to grab.  
    This is used when pop-up menu systems are active.
@@ -478,230 +478,230 @@
    */
   static void grab(fltk3::Window*); // platform dependent
   /** @} */
-
+  
   /** \defgroup fl_events Events handling functions
-	Fl class events handling API declared in <fltk3/run.h>
-	@{
-  */
+   Fl class events handling API declared in <fltk3/run.h>
+   @{
+   */
   // event information:
   /**
-    Returns the last event that was processed. This can be used
-    to determine if a callback is being done in response to a
-    keypress, mouse click, etc.
-  */
+   Returns the last event that was processed. This can be used
+   to determine if a callback is being done in response to a
+   keypress, mouse click, etc.
+   */
   static int event()		{return e_number;}
   /**
-    Returns the mouse position of the event relative to the fltk3::Window
-    it was passed to.
-  */
+   Returns the mouse position of the event relative to the fltk3::Window
+   it was passed to.
+   */
   static int event_x()	{return e_x;}
   /**
-    Returns the mouse position of the event relative to the fltk3::Window
-    it was passed to.
-  */
+   Returns the mouse position of the event relative to the fltk3::Window
+   it was passed to.
+   */
   static int event_y()	{return e_y;}
   /**
-    Returns the mouse position on the screen of the event.  To find the
-    absolute position of an fltk3::Window on the screen, use the
-    difference between event_x_root(),event_y_root() and 
-    event_x(),event_y().
-  */
+   Returns the mouse position on the screen of the event.  To find the
+   absolute position of an fltk3::Window on the screen, use the
+   difference between event_x_root(),event_y_root() and 
+   event_x(),event_y().
+   */
   static int event_x_root()	{return e_x_root;}
   /**
-    Returns the mouse position on the screen of the event.  To find the
-    absolute position of an fltk3::Window on the screen, use the
-    difference between event_x_root(),event_y_root() and 
-    event_x(),event_y().
-  */
+   Returns the mouse position on the screen of the event.  To find the
+   absolute position of an fltk3::Window on the screen, use the
+   difference between event_x_root(),event_y_root() and 
+   event_x(),event_y().
+   */
   static int event_y_root()	{return e_y_root;}
   /**
-    Returns the current horizontal mouse scrolling associated with the
-    fltk3::MOUSEWHEEL event. Right is positive.
-  */
+   Returns the current horizontal mouse scrolling associated with the
+   fltk3::MOUSEWHEEL event. Right is positive.
+   */
   static int event_dx()	{return e_dx;}
   /**
-    Returns the current vertical mouse scrolling associated with the
-    fltk3::MOUSEWHEEL event. Down is positive.
-  */
+   Returns the current vertical mouse scrolling associated with the
+   fltk3::MOUSEWHEEL event. Down is positive.
+   */
   static int event_dy()	{return e_dy;}
   /**
-    Return where the mouse is on the screen by doing a round-trip query to
-    the server.  You should use Fl::event_x_root() and 
-    Fl::event_y_root() if possible, but this is necessary if you are
-    not sure if a mouse event has been processed recently (such as to
-    position your first window).  If the display is not open, this will
-    open it.
-  */
+   Return where the mouse is on the screen by doing a round-trip query to
+   the server.  You should use Fl::event_x_root() and 
+   Fl::event_y_root() if possible, but this is necessary if you are
+   not sure if a mouse event has been processed recently (such as to
+   position your first window).  If the display is not open, this will
+   open it.
+   */
   static void get_mouse(int &,int &); // platform dependent
   /**
-    Returns non zero if we had a double click event.
-    \retval Non-zero if the most recent fltk3::PUSH or fltk3::KEYBOARD was a "double click".  
-    \retval  N-1 for  N clicks. 
-    A double click is counted if the same button is pressed
-    again while event_is_click() is true.
-    
+   Returns non zero if we had a double click event.
+   \retval Non-zero if the most recent fltk3::PUSH or fltk3::KEYBOARD was a "double click".  
+   \retval  N-1 for  N clicks. 
+   A double click is counted if the same button is pressed
+   again while event_is_click() is true.
+   
    */
   static int event_clicks()	{return e_clicks;}
   /**
-    Manually sets the number returned by Fl::event_clicks().  
-    This can be used to set it to zero so that
-    later code does not think an item was double-clicked.
-    \param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise
-    \see int event_clicks()
-  */
+   Manually sets the number returned by Fl::event_clicks().  
+   This can be used to set it to zero so that
+   later code does not think an item was double-clicked.
+   \param[in] i corresponds to no double-click if 0, i+1 mouse clicks otherwise
+   \see int event_clicks()
+   */
   static void event_clicks(int i) {e_clicks = i;}
   /**
-  Returns non-zero if the mouse has not moved far enough
-  and not enough time has passed since the last fltk3::PUSH or 
-  fltk3::KEYBOARD event for it to be considered a "drag" rather than a
-  "click".  You can test this on fltk3::DRAG, fltk3::RELEASE,
-  and fltk3::MOVE events.  
-  */
+   Returns non-zero if the mouse has not moved far enough
+   and not enough time has passed since the last fltk3::PUSH or 
+   fltk3::KEYBOARD event for it to be considered a "drag" rather than a
+   "click".  You can test this on fltk3::DRAG, fltk3::RELEASE,
+   and fltk3::MOVE events.  
+   */
   static int event_is_click()	{return e_is_click;}
   /**
    Clears the value returned by Fl::event_is_click().  
    Useful to prevent the <I>next</I>
    click from being counted as a double-click or to make a popup menu
    pick an item with a single click.  Don't pass non-zero to this. 
-  */
+   */
   static void event_is_click(int i) {e_is_click = i;}
   /**
-    Gets which particular mouse button caused the current event. 
-    This returns garbage if the most recent event was not a fltk3::PUSH or fltk3::RELEASE event.
-    \retval fltk3::LEFT_MOUSE \retval fltk3::MIDDLE_MOUSE \retval fltk3::RIGHT_MOUSE.
-    \see Fl::event_buttons()
-  */
+   Gets which particular mouse button caused the current event. 
+   This returns garbage if the most recent event was not a fltk3::PUSH or fltk3::RELEASE event.
+   \retval fltk3::LEFT_MOUSE \retval fltk3::MIDDLE_MOUSE \retval fltk3::RIGHT_MOUSE.
+   \see Fl::event_buttons()
+   */
   static int event_button()	{return e_keysym-fltk3::MouseButton;}
   /**
-    This is a bitfield of what shift states were on and what mouse buttons
-    were held down during the most recent event. The second version
-    returns non-zero if any of the passed bits are turned on.
-    The legal bits are:
-    
-    \li fltk3::SHIFT
-    \li fltk3::CAPS_LOCK
-    \li fltk3::CTRL
-    \li fltk3::ALT
-    \li fltk3::NUM_LOCK
-    \li fltk3::META
-    \li fltk3::SCROLL_LOCK
-    \li fltk3::BUTTON1
-    \li fltk3::BUTTON2
-    \li fltk3::BUTTON3
-    
-    X servers do not agree on shift states, and fltk3::NUM_LOCK, fltk3::META, and
-    fltk3::SCROLL_LOCK may not work. The values were selected to match the
-    XFree86 server on Linux. In addition there is a bug in the way X works
-    so that the shift state is not correctly reported until the first event
-    <I>after</I> the shift key is pressed or released.
-  */
+   This is a bitfield of what shift states were on and what mouse buttons
+   were held down during the most recent event. The second version
+   returns non-zero if any of the passed bits are turned on.
+   The legal bits are:
+   
+   \li fltk3::SHIFT
+   \li fltk3::CAPS_LOCK
+   \li fltk3::CTRL
+   \li fltk3::ALT
+   \li fltk3::NUM_LOCK
+   \li fltk3::META
+   \li fltk3::SCROLL_LOCK
+   \li fltk3::BUTTON1
+   \li fltk3::BUTTON2
+   \li fltk3::BUTTON3
+   
+   X servers do not agree on shift states, and fltk3::NUM_LOCK, fltk3::META, and
+   fltk3::SCROLL_LOCK may not work. The values were selected to match the
+   XFree86 server on Linux. In addition there is a bug in the way X works
+   so that the shift state is not correctly reported until the first event
+   <I>after</I> the shift key is pressed or released.
+   */
   static int event_state()	{return e_state;}
   /** See int event_state() */
   static int event_state(int i) {return e_state&i;}
   /**
-    Gets which key on the keyboard was last pushed.
-
-    The returned integer 'key code' is not necessarily a text
-    equivalent for the keystroke. For instance: if someone presses '5' on the 
-    numeric keypad with numlock on, Fl::event_key() may return the 'key code'
-    for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead.
-    
-    \returns an integer 'key code', or 0 if the last event was not a key press or release.
-    \see int event_key(int), event_text(), compose(int&).
-  */
+   Gets which key on the keyboard was last pushed.
+   
+   The returned integer 'key code' is not necessarily a text
+   equivalent for the keystroke. For instance: if someone presses '5' on the 
+   numeric keypad with numlock on, Fl::event_key() may return the 'key code'
+   for this key, and NOT the character '5'. To always get the '5', use Fl::event_text() instead.
+   
+   \returns an integer 'key code', or 0 if the last event was not a key press or release.
+   \see int event_key(int), event_text(), compose(int&).
+   */
   static int event_key()	{return e_keysym;}
   /**
-    Returns the keycode of the last key event, regardless of the NumLock state.
-      
-    If NumLock is deactivated, FLTK translates events from the 
-    numeric keypad into the corresponding arrow key events. 
-    event_key() returns the translated key code, whereas
-    event_original_key() returns the keycode before NumLock translation.
-  */
+   Returns the keycode of the last key event, regardless of the NumLock state.
+   
+   If NumLock is deactivated, FLTK translates events from the 
+   numeric keypad into the corresponding arrow key events. 
+   event_key() returns the translated key code, whereas
+   event_original_key() returns the keycode before NumLock translation.
+   */
   static int event_original_key(){return e_original_keysym;}
   /** 
-    Returns true if the given \p key was held
-    down (or pressed) <I>during</I> the last event.  This is constant until
-    the next event is read from the server.
-    
-    Fl::get_key(int) returns true if the given key is held down <I>now</I>.
-    Under X this requires a round-trip to the server and is <I>much</I>
-    slower than Fl::event_key(int).
-    
-    Keys are identified by the <I>unshifted</I> values. FLTK defines a
-    set of symbols that should work on most modern machines for every key
-    on the keyboard:
-    
-    \li All keys on the main keyboard producing a printable ASCII
-	character use the value of that ASCII character (as though shift,
-	ctrl, and caps lock were not on). The space bar is 32.
-    \li All keys on the numeric keypad producing a printable ASCII
-	character use the value of that ASCII character plus fltk3::KPKey.
-	The highest possible value is fltk3::KPLastKey so you can
-	range-check to see if something is  on the keypad.
-    \li All numbered function keys use the number on the function key plus 
-	fltk3::FKey.  The highest possible number is fltk3::FLastKey, so you
-	can range-check a value.
-    \li Buttons on the mouse are considered keys, and use the button
-	number (where the left button is 1) plus fltk3::MouseButton.
-    \li All other keys on the keypad have a symbol: fltk3::EscapeKey,
-	fltk3::BackSpaceKey, fltk3::TabKey, fltk3::EnterKey, fltk3::PrintKey, fltk3::ScrollLockKey, fltk3::PauseKey,
-	fltk3::InsertKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::EndKey, fltk3::PageDownKey,
-	fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey, fltk3::DownKey, fltk3::ShiftLKey, fltk3::ShiftRKey,
-	fltk3::ControlLKey, fltk3::ControlRKey, fltk3::CapsLockKey, fltk3::AltLKey, fltk3::AltRKey,
-	fltk3::MetaLKey, fltk3::MetaRKey, fltk3::MenuKey, fltk3::NumLockKey, fltk3::KPEnterKey.  Be
-	careful not to confuse these with the very similar, but all-caps,
-	symbols used by Fl::event_state().
-
-    On X Fl::get_key(fltk3::MouseButton+n) does not work.
-    
-    On WIN32 Fl::get_key(fltk3::KPEnterKey) and Fl::event_key(fltk3::KPEnterKey) do not work.
-  */
+   Returns true if the given \p key was held
+   down (or pressed) <I>during</I> the last event.  This is constant until
+   the next event is read from the server.
+   
+   Fl::get_key(int) returns true if the given key is held down <I>now</I>.
+   Under X this requires a round-trip to the server and is <I>much</I>
+   slower than Fl::event_key(int).
+   
+   Keys are identified by the <I>unshifted</I> values. FLTK defines a
+   set of symbols that should work on most modern machines for every key
+   on the keyboard:
+   
+   \li All keys on the main keyboard producing a printable ASCII
+   character use the value of that ASCII character (as though shift,
+   ctrl, and caps lock were not on). The space bar is 32.
+   \li All keys on the numeric keypad producing a printable ASCII
+   character use the value of that ASCII character plus fltk3::KPKey.
+   The highest possible value is fltk3::KPLastKey so you can
+   range-check to see if something is  on the keypad.
+   \li All numbered function keys use the number on the function key plus 
+   fltk3::FKey.  The highest possible number is fltk3::FLastKey, so you
+   can range-check a value.
+   \li Buttons on the mouse are considered keys, and use the button
+   number (where the left button is 1) plus fltk3::MouseButton.
+   \li All other keys on the keypad have a symbol: fltk3::EscapeKey,
+   fltk3::BackSpaceKey, fltk3::TabKey, fltk3::EnterKey, fltk3::PrintKey, fltk3::ScrollLockKey, fltk3::PauseKey,
+   fltk3::InsertKey, fltk3::HomeKey, fltk3::PageUpKey, fltk3::DeleteKey, fltk3::EndKey, fltk3::PageDownKey,
+   fltk3::LeftKey, fltk3::UpKey, fltk3::RightKey, fltk3::DownKey, fltk3::ShiftLKey, fltk3::ShiftRKey,
+   fltk3::ControlLKey, fltk3::ControlRKey, fltk3::CapsLockKey, fltk3::AltLKey, fltk3::AltRKey,
+   fltk3::MetaLKey, fltk3::MetaRKey, fltk3::MenuKey, fltk3::NumLockKey, fltk3::KPEnterKey.  Be
+   careful not to confuse these with the very similar, but all-caps,
+   symbols used by Fl::event_state().
+   
+   On X Fl::get_key(fltk3::MouseButton+n) does not work.
+   
+   On WIN32 Fl::get_key(fltk3::KPEnterKey) and Fl::event_key(fltk3::KPEnterKey) do not work.
+   */
   static int event_key(int key);
   /** 
-    Returns true if the given \p key is held down <I>now</I>.  
-    Under X this requires a round-trip to the server and is <I>much</I>
-    slower than Fl::event_key(int). \see event_key(int)
-  */
+   Returns true if the given \p key is held down <I>now</I>.  
+   Under X this requires a round-trip to the server and is <I>much</I>
+   slower than Fl::event_key(int). \see event_key(int)
+   */
   static int get_key(int key); // platform dependent
   /** 
-    Returns the text associated with the current event, including fltk3::PASTE or fltk3::DND_RELEASE events.
-    This can be used in response to fltk3::KEYUP, FL_KEYDOWN, fltk3::PASTE, fltk3::DND_RELEASE.
-
-    When responding to fltk3::KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key()
-    to get the text equivalent of keystrokes suitable for inserting into strings 
-    and text widgets.
-
-    The returned string is guaranteed to be be NULL terminated.
-    However, see Fl::event_length() for the actual length of the string,
-    in case the string itself contains NULLs that are part of the text data.
-
-    \returns A NULL terminated text string equivalent of the last keystroke.
+   Returns the text associated with the current event, including fltk3::PASTE or fltk3::DND_RELEASE events.
+   This can be used in response to fltk3::KEYUP, FL_KEYDOWN, fltk3::PASTE, fltk3::DND_RELEASE.
+   
+   When responding to fltk3::KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key()
+   to get the text equivalent of keystrokes suitable for inserting into strings 
+   and text widgets.
+   
+   The returned string is guaranteed to be be NULL terminated.
+   However, see Fl::event_length() for the actual length of the string,
+   in case the string itself contains NULLs that are part of the text data.
+   
+   \returns A NULL terminated text string equivalent of the last keystroke.
    */
   static const char* event_text() {return e_text;}
   /**
-    Returns the length of the text in Fl::event_text(). There
-    will always be a nul at this position in the text. However there may
-    be a nul before that if the keystroke translates to a nul character or
-    you paste a nul character.
-  */
+   Returns the length of the text in Fl::event_text(). There
+   will always be a nul at this position in the text. However there may
+   be a nul before that if the keystroke translates to a nul character or
+   you paste a nul character.
+   */
   static int event_length() {return e_length;}
-
+  
   static int compose(int &del);
   static void compose_reset();
   static int event_inside(int,int,int,int);
   static int event_inside(const fltk3::Widget*);
   static int test_shortcut(Fl_Shortcut);
-
+  
   // event destinations:
   static int handle(int, fltk3::Window*);
   static int handle_(int, fltk3::Window*);
   /**  Gets the widget that is below the mouse. 
-       \see  belowmouse(fltk3::Widget*) */
+   \see  belowmouse(fltk3::Widget*) */
   static fltk3::Widget* belowmouse() {return belowmouse_;}
   static void belowmouse(fltk3::Widget*);
   /** Gets the widget that is being pushed.
-      \see void pushed(fltk3::Widget*) */
+   \see void pushed(fltk3::Widget*) */
   static fltk3::Widget* pushed()	{return pushed_;}
   static void pushed(fltk3::Widget*);
   /** Gets the current Fl::focus() widget. \sa Fl::focus(fltk3::Widget*) */
@@ -712,61 +712,61 @@
   static void event_dispatch(Fl_Event_Dispatch d);
   static Fl_Event_Dispatch event_dispatch();
   /** @} */
-
+  
   /** \defgroup  fl_clipboard  Selection & Clipboard functions
-	FLTK global copy/cut/paste functions declared in <fltk3/run.h>
+   FLTK global copy/cut/paste functions declared in <fltk3/run.h>
    @{ */
   // cut/paste:
   /**
-  Copies the data pointed to by \p stuff to the selection buffer 
-  (\p destination is 0) or
-  the clipboard (\p destination is 1); \p len is the number of relevant
-  bytes in \p stuff.
-  The selection buffer is used for
-  middle-mouse pastes and for drag-and-drop selections. The 
-  clipboard is used for traditional copy/cut/paste operations.
-  */
+   Copies the data pointed to by \p stuff to the selection buffer 
+   (\p destination is 0) or
+   the clipboard (\p destination is 1); \p len is the number of relevant
+   bytes in \p stuff.
+   The selection buffer is used for
+   middle-mouse pastes and for drag-and-drop selections. The 
+   clipboard is used for traditional copy/cut/paste operations.
+   */
   static void copy(const char* stuff, int len, int destination = 0); // platform dependent
   /**
-  Pastes the data from the selection buffer (\p source is 0) or the clipboard 
-  (\p source is 1) into \p receiver.  
-  Set things up so the receiver widget will be called with an fltk3::PASTE event some
-  time in the future with the data from the specified \p source in Fl::event_text()
-  and the number of characters in Fl::event_length().
-  The receiver
-  should be prepared to be called \e directly by this, or for
-  it to happen \e later, or possibly <i>not at all</i>.  This
-  allows the window system to take as long as necessary to retrieve
-  the paste buffer (or even to screw up completely) without complex
-  and error-prone synchronization code in FLTK.
+   Pastes the data from the selection buffer (\p source is 0) or the clipboard 
+   (\p source is 1) into \p receiver.  
+   Set things up so the receiver widget will be called with an fltk3::PASTE event some
+   time in the future with the data from the specified \p source in Fl::event_text()
+   and the number of characters in Fl::event_length().
+   The receiver
+   should be prepared to be called \e directly by this, or for
+   it to happen \e later, or possibly <i>not at all</i>.  This
+   allows the window system to take as long as necessary to retrieve
+   the paste buffer (or even to screw up completely) without complex
+   and error-prone synchronization code in FLTK.
    
-  The selection buffer is used for middle-mouse pastes and for 
-  drag-and-drop selections. The clipboard is used for traditional 
-  copy/cut/paste operations.
-  */
+   The selection buffer is used for middle-mouse pastes and for 
+   drag-and-drop selections. The clipboard is used for traditional 
+   copy/cut/paste operations.
+   */
   static void paste(fltk3::Widget &receiver, int source /*=0*/); // platform dependent
   /**
-    Initiate a Drag And Drop operation. The selection buffer should be
-    filled with relevant data before calling this method. FLTK will
-    then initiate the system wide drag and drop handling. Dropped data
-    will be marked as <i>text</i>.
+   Initiate a Drag And Drop operation. The selection buffer should be
+   filled with relevant data before calling this method. FLTK will
+   then initiate the system wide drag and drop handling. Dropped data
+   will be marked as <i>text</i>.
    
-    Create a selection first using:
-    Fl::copy(const char *stuff, int len, 0)
-  */
+   Create a selection first using:
+   Fl::copy(const char *stuff, int len, 0)
+   */
   static int dnd(); // platform dependent
-
+  
   // These are for back-compatibility only:
   /**  back-compatibility only: Gets the widget owning the current selection  
-       \see fltk3::Widget* selection_owner(fltk3::Widget*) */
+   \see fltk3::Widget* selection_owner(fltk3::Widget*) */
   static fltk3::Widget* selection_owner() {return selection_owner_;}
   static void selection_owner(fltk3::Widget*);
   static void selection(fltk3::Widget &owner, const char*, int len);
   static void paste(fltk3::Widget &receiver);
-/** @} */
-/** \defgroup  fl_screen  Screen functions
-	fl global screen functions declared in <fltk3/run.h>
-     @{ */
+  /** @} */
+  /** \defgroup  fl_screen  Screen functions
+   fl global screen functions declared in <fltk3/run.h>
+   @{ */
   // screen size:
   /** Returns the origin of the current screen, where 0 indicates the left side of the screen. */
   static int x(); // platform dependent
@@ -776,14 +776,14 @@
   static int w(); // platform dependent
   /** Returns the height of the screen in pixels. */
   static int h(); // platform dependent
-
+  
   // multi-head support:
   static int screen_count();
   /** 
-      Gets the bounding box of a screen that contains the mouse pointer.
-      \param[out]  X,Y,W,H the corresponding screen bounding box
-      \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
-  */
+   Gets the bounding box of a screen that contains the mouse pointer.
+   \param[out]  X,Y,W,H the corresponding screen bounding box
+   \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
+   */
   static void screen_xywh(int &X, int &Y, int &W, int &H) {
     screen_xywh(X, Y, W, H, e_x_root, e_y_root);
   }
@@ -791,93 +791,93 @@
   static void screen_xywh(int &X, int &Y, int &W, int &H, int n); 
   static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
   static void screen_dpi(float &h, float &v, int n=0);
-
+  
   /**   @} */
-
+  
   /** \defgroup  fl_attributes  Color & Font functions
-	fl global color, font functions.
+   fl global color, font functions.
    These functions are declared in <fltk3/run.h> or <fltk3/draw.h>. 
-     @{ */
- 
+   @{ */
+  
   // color map:
   static void	set_color(fltk3::Color, uchar, uchar, uchar);
   /**
-    Sets an entry in the fl_color index table. You can set it to any
-    8-bit RGB color. The color is not allocated until fl_color(i) is used.
-  */
+   Sets an entry in the fl_color index table. You can set it to any
+   8-bit RGB color. The color is not allocated until fl_color(i) is used.
+   */
   static void	set_color(fltk3::Color i, unsigned c); // platform dependent
   static unsigned get_color(fltk3::Color i);
   static void	get_color(fltk3::Color i, uchar &red, uchar &green, uchar &blue);
   /**
-    Frees the specified color from the colormap, if applicable.
-    If overlay is non-zero then the color is freed from the
-    overlay colormap.
-  */
+   Frees the specified color from the colormap, if applicable.
+   If overlay is non-zero then the color is freed from the
+   overlay colormap.
+   */
   static void	free_color(fltk3::Color i, int overlay = 0); // platform dependent
-
+  
   // fonts:
   static const char* get_font(fltk3::Font);
   /**
-    Get a human-readable string describing the family of this face.  This
-    is useful if you are presenting a choice to the user.  There is no
-    guarantee that each face has a different name.  The return value points
-    to a static buffer that is overwritten each call.
-    
-    The integer pointed to by \p attributes (if the pointer is not
-    zero) is set to zero, fltk3::BOLD or fltk3::ITALIC or 
-    fltk3::BOLD | fltk3::ITALIC.  To locate a "family" of fonts, search
-    forward and back for a set with non-zero attributes, these faces along
-    with the face with a zero attribute before them constitute a family.
-  */
+   Get a human-readable string describing the family of this face.  This
+   is useful if you are presenting a choice to the user.  There is no
+   guarantee that each face has a different name.  The return value points
+   to a static buffer that is overwritten each call.
+   
+   The integer pointed to by \p attributes (if the pointer is not
+   zero) is set to zero, fltk3::BOLD or fltk3::ITALIC or 
+   fltk3::BOLD | fltk3::ITALIC.  To locate a "family" of fonts, search
+   forward and back for a set with non-zero attributes, these faces along
+   with the face with a zero attribute before them constitute a family.
+   */
   static const char* get_font_name(fltk3::Font, int* attributes = 0);
   /**
-    Return an array of sizes in \p sizep.  The return value is the
-    length of this array.  The sizes are sorted from smallest to largest
-    and indicate what sizes can be given to fl_font() that will
-    be matched exactly (fl_font() will pick the closest size for
-    other sizes).  A zero in the first location of the array indicates a
-    scalable font, where any size works, although the array may list sizes
-    that work "better" than others.  Warning: the returned array
-    points at a static buffer that is overwritten each call.  Under X this
-    will open the display.
-  */
+   Return an array of sizes in \p sizep.  The return value is the
+   length of this array.  The sizes are sorted from smallest to largest
+   and indicate what sizes can be given to fl_font() that will
+   be matched exactly (fl_font() will pick the closest size for
+   other sizes).  A zero in the first location of the array indicates a
+   scalable font, where any size works, although the array may list sizes
+   that work "better" than others.  Warning: the returned array
+   points at a static buffer that is overwritten each call.  Under X this
+   will open the display.
+   */
   static int get_font_sizes(fltk3::Font, int*& sizep);
   static void set_font(fltk3::Font, const char*);
   static void set_font(fltk3::Font, fltk3::Font);
   /**
-    FLTK will open the display, and add every fonts on the server to the
-    face table.  It will attempt to put "families" of faces together, so
-    that the normal one is first, followed by bold, italic, and bold
-    italic.
-    
-    The optional argument is a string to describe the set of fonts to
-    add.  Passing NULL will select only fonts that have the
-    ISO8859-1 character set (and are thus usable by normal text).  Passing
-    "-*" will select all fonts with any encoding as long as they have
-    normal X font names with dashes in them.  Passing "*" will list every
-    font that exists (on X this may produce some strange output).  Other
-    values may be useful but are system dependent.  With WIN32 NULL
-    selects fonts with ISO8859-1 encoding and non-NULL selects
-    all fonts.
-    
-    The return value is how many faces are in the table after this is done.
-  */
+   FLTK will open the display, and add every fonts on the server to the
+   face table.  It will attempt to put "families" of faces together, so
+   that the normal one is first, followed by bold, italic, and bold
+   italic.
+   
+   The optional argument is a string to describe the set of fonts to
+   add.  Passing NULL will select only fonts that have the
+   ISO8859-1 character set (and are thus usable by normal text).  Passing
+   "-*" will select all fonts with any encoding as long as they have
+   normal X font names with dashes in them.  Passing "*" will list every
+   font that exists (on X this may produce some strange output).  Other
+   values may be useful but are system dependent.  With WIN32 NULL
+   selects fonts with ISO8859-1 encoding and non-NULL selects
+   all fonts.
+   
+   The return value is how many faces are in the table after this is done.
+   */
   static fltk3::Font set_fonts(const char* = 0); // platform dependent
-
+  
   /**   @} */
- /** \defgroup  fl_drawings  Drawing functions
-  FLTK global graphics and GUI drawing functions.
-  These functions are declared in <fltk3/draw.h>, 
-  and in <fltk3/x.h> for offscreen buffer-related ones.
-     @{ */
+  /** \defgroup  fl_drawings  Drawing functions
+   FLTK global graphics and GUI drawing functions.
+   These functions are declared in <fltk3/draw.h>, 
+   and in <fltk3/x.h> for offscreen buffer-related ones.
+   @{ */
   // <Hack to re-order the 'Drawing functions' group>
- /** @} */
-
+  /** @} */
+  
   // labeltypes:
   static void set_labeltype(fltk3::Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
   /** Sets the functions to call to draw and measure a specific labeltype. */
   static void set_labeltype(fltk3::Labeltype, fltk3::Labeltype from); // is it defined ?
-
+  
   // boxtypes:
   static Fl_Box_Draw_F *get_boxtype(fltk3::Boxtype);
   static void set_boxtype(fltk3::Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
@@ -887,22 +887,22 @@
   static int box_dw(fltk3::Boxtype);
   static int box_dh(fltk3::Boxtype);
   static int draw_box_active();
-
+  
   // back compatibility:
   /** \addtogroup fl_windows 
-    @{ */
+   @{ */
   /** For back compatibility, sets the void Fl::fatal handler callback */
   static void set_abort(Fl_Abort_Handler f) {fatal = f;}
   static void (*atclose)(fltk3::Window*,void*);
   static void default_atclose(fltk3::Window*,void*);
   /** For back compatibility, sets the Fl::atclose handler callback. You
-      can now simply change the callback for the window instead.
-      \see fltk3::Window::callback(Fl_Callback*) */
+   can now simply change the callback for the window instead.
+   \see fltk3::Window::callback(Fl_Callback*) */
   static void set_atclose(Fl_Atclose_Handler f) {atclose = f;}
   /**   @} */
-
+  
   /** \addtogroup fl_events 
-    @{ */
+   @{ */
   /** Returns non-zero if the Shift key is pressed. */
   static int event_shift() {return e_state&fltk3::SHIFT;}
   /** Returns non-zero if the Control key is pressed. */
@@ -912,77 +912,77 @@
   /** Returns non-zero if the Alt key is pressed. */
   static int event_alt() {return e_state&fltk3::ALT;}
   /**
-    Returns the mouse buttons state bits; if non-zero, then at least one
-    button is pressed now.  This function returns the button state at the 
-    time of the event. During an fltk3::RELEASE event, the state 
-    of the released button will be 0. To find out, which button 
-    caused an fltk3::RELEASE event, you can use Fl::event_button() instead.
-    \return a bit mask value like { [fltk3::BUTTON1] | [fltk3::BUTTON2] | [fltk3::BUTTON3] }
-  */
+   Returns the mouse buttons state bits; if non-zero, then at least one
+   button is pressed now.  This function returns the button state at the 
+   time of the event. During an fltk3::RELEASE event, the state 
+   of the released button will be 0. To find out, which button 
+   caused an fltk3::RELEASE event, you can use Fl::event_button() instead.
+   \return a bit mask value like { [fltk3::BUTTON1] | [fltk3::BUTTON2] | [fltk3::BUTTON3] }
+   */
   static int event_buttons() {return e_state&0x7f000000;}
   /**
-    Returns non-zero if mouse button 1 is currently held down.
-    For more details, see Fl::event_buttons().
-  */
+   Returns non-zero if mouse button 1 is currently held down.
+   For more details, see Fl::event_buttons().
+   */
   static int event_button1() {return e_state&fltk3::BUTTON1;}
   /**
-    Returns non-zero if button 2 is currently held down.
-    For more details, see Fl::event_buttons().
-  */
+   Returns non-zero if button 2 is currently held down.
+   For more details, see Fl::event_buttons().
+   */
   static int event_button2() {return e_state&fltk3::BUTTON2;}
   /**
-    Returns non-zero if button 3 is currently held down.
-    For more details, see Fl::event_buttons().
-  */
+   Returns non-zero if button 3 is currently held down.
+   For more details, see Fl::event_buttons().
+   */
   static int event_button3() {return e_state&fltk3::BUTTON3;}
   /**   @} */
-
+  
   /**
-    Sets an idle callback.
-
-    \deprecated This method is obsolete - use the add_idle() method instead.
-  */
+   Sets an idle callback.
+   
+   \deprecated This method is obsolete - use the add_idle() method instead.
+   */
   static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
   /** See grab(fltk3::Window*) */
   static void grab(fltk3::Window& win) {grab(&win);}
   /** Releases the current grabbed window, equals grab(0).
-  \deprecated Use Fl::grab(0) instead.
-  \see grab(fltk3::Window*) */
+   \deprecated Use Fl::grab(0) instead.
+   \see grab(fltk3::Window*) */
   static void release() {grab(0);}
-
+  
   // Visible focus methods...
   /**
-    Gets or sets the visible keyboard focus on buttons and other
-    non-text widgets. The default mode is to enable keyboard focus
-    for all widgets.
-  */
+   Gets or sets the visible keyboard focus on buttons and other
+   non-text widgets. The default mode is to enable keyboard focus
+   for all widgets.
+   */
   static void visible_focus(int v) { option(OPTION_VISIBLE_FOCUS, (v!=0)); }
   /**
-    Gets or sets the visible keyboard focus on buttons and other
-    non-text widgets. The default mode is to enable keyboard focus
-    for all widgets.
-  */
+   Gets or sets the visible keyboard focus on buttons and other
+   non-text widgets. The default mode is to enable keyboard focus
+   for all widgets.
+   */
   static int  visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
-
+  
   // Drag-n-drop text operation methods...
   /**
-    Gets or sets whether drag and drop text operations are supported.
-    This specifically affects whether selected text can
-    be dragged from text fields or dragged within a text field as a
-    cut/paste shortcut.
-  */
+   Gets or sets whether drag and drop text operations are supported.
+   This specifically affects whether selected text can
+   be dragged from text fields or dragged within a text field as a
+   cut/paste shortcut.
+   */
   static void dnd_text_ops(int v) { option(OPTION_DND_TEXT, (v!=0)); }
   /**
-    Gets or sets whether drag and drop text operations are
-    supported. This specifically affects whether selected text can
-    be dragged from text fields or dragged within a text field as a
-    cut/paste shortcut.
-  */
+   Gets or sets whether drag and drop text operations are
+   supported. This specifically affects whether selected text can
+   be dragged from text fields or dragged within a text field as a
+   cut/paste shortcut.
+   */
   static int  dnd_text_ops() { return option(OPTION_DND_TEXT); }
   /** \defgroup fl_multithread Multithreading support functions
-	fl multithreading support functions declared in <fltk3/run.h>
+   fl multithreading support functions declared in <fltk3/run.h>
    @{ */
-
+  
   // Multithreading support:
   static int lock();
   static void unlock();
@@ -990,42 +990,42 @@
   /** See void awake(void* message=0). */
   static int awake(Fl_Awake_Handler cb, void* message = 0);
   /**
-    The thread_message() method returns the last message
-    that was sent from a child by the awake() method.
-    
-    See also: \ref advanced_multithreading
-  */
+   The thread_message() method returns the last message
+   that was sent from a child by the awake() method.
+   
+   See also: \ref advanced_multithreading
+   */
   static void* thread_message(); // platform dependent
   /** @} */
-
+  
   /** \defgroup fl_del_widget Safe widget deletion support functions
-
-    These functions, declared in <fltk3/run.h>, support deletion of widgets inside callbacks.
-
-    Fl::delete_widget() should be called when deleting widgets
-    or complete widget trees (fltk3::Group, fltk3::Window, ...) inside
-    callbacks.
-
-    The other functions are intended for internal use. The preferred
-    way to use them is by using the helper class Fl_Widget_Tracker.
-
-    The following is to show how it works ...
-
-    There are three groups of related methods:
-
-      -# scheduled widget deletion
-	- Fl::delete_widget() schedules widgets for deletion
-	- Fl::do_widget_deletion() deletes all scheduled widgets
-      -# widget watch list ("smart pointers")
-	- Fl::watch_widget_pointer() adds a widget pointer to the watch list
-	- Fl::release_widget_pointer() removes a widget pointer from the watch list
-	- Fl::clear_widget_pointer() clears a widget pointer \e in the watch list
-      -# the class Fl_Widget_Tracker:
-	- the constructor calls Fl::watch_widget_pointer()
-	- the destructor calls Fl::release_widget_pointer()
-	- the access methods can be used to test, if a widget has been deleted
-	  \see Fl_Widget_Tracker.
-
+   
+   These functions, declared in <fltk3/run.h>, support deletion of widgets inside callbacks.
+   
+   Fl::delete_widget() should be called when deleting widgets
+   or complete widget trees (fltk3::Group, fltk3::Window, ...) inside
+   callbacks.
+   
+   The other functions are intended for internal use. The preferred
+   way to use them is by using the helper class fltk3::WidgetTracker.
+   
+   The following is to show how it works ...
+   
+   There are three groups of related methods:
+   
+   -# scheduled widget deletion
+   - Fl::delete_widget() schedules widgets for deletion
+   - Fl::do_widget_deletion() deletes all scheduled widgets
+   -# widget watch list ("smart pointers")
+   - Fl::watch_widget_pointer() adds a widget pointer to the watch list
+   - Fl::release_widget_pointer() removes a widget pointer from the watch list
+   - Fl::clear_widget_pointer() clears a widget pointer \e in the watch list
+   -# the class fltk3::WidgetTracker:
+   - the constructor calls Fl::watch_widget_pointer()
+   - the destructor calls Fl::release_widget_pointer()
+   - the access methods can be used to test, if a widget has been deleted
+   \see fltk3::WidgetTracker.
+   
    @{ */
   // Widget deletion:
   static void delete_widget(fltk3::Widget *w);
@@ -1034,141 +1034,145 @@
   static void release_widget_pointer(fltk3::Widget *&w);
   static void clear_widget_pointer(fltk3::Widget const *w);
   /** @} */
-
+  
 #ifdef FLTK_HAVE_CAIRO
   /** \defgroup group_cairo Cairo support functions and classes 
-      @{ 
-  */
+   @{ 
+   */
 public:
   // Cairo support API
   static cairo_t * cairo_make_current(fltk3::Window* w);
-   /** when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, 
-      any current window dc is linked to a current context.
-      This is not the default, because it may not be necessary
-      to add cairo support to all fltk supported windows.
-      When you wish to associate a cairo context in this mode,
-      you need to call explicitly in your draw() overridden method,
-      FL::cairo_make_current(fltk3::Window*). This will create a cairo context
-      but only for this Window. 
-      Still in custom cairo application it is possible to handle 
-      completely this process automatically by setting \p alink to true.
-      In this last case, you don't need anymore to call Fl::cairo_make_current().
-      You can use Fl::cairo_cc() to get the current cairo context anytime.
-     \note Only available when configure has the --enable-cairo option
-  */
+  /** when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, 
+   any current window dc is linked to a current context.
+   This is not the default, because it may not be necessary
+   to add cairo support to all fltk supported windows.
+   When you wish to associate a cairo context in this mode,
+   you need to call explicitly in your draw() overridden method,
+   FL::cairo_make_current(fltk3::Window*). This will create a cairo context
+   but only for this Window. 
+   Still in custom cairo application it is possible to handle 
+   completely this process automatically by setting \p alink to true.
+   In this last case, you don't need anymore to call Fl::cairo_make_current().
+   You can use Fl::cairo_cc() to get the current cairo context anytime.
+   \note Only available when configure has the --enable-cairo option
+   */
   static void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);}
   /** 
-    Gets the current autolink mode for cairo support.
-    \retval false if no cairo context autolink is made for each window. 
-    \retval true if any fltk window is attached a cairo context when it 
-    is current. \see void cairo_autolink_context(bool alink) 
-    \note Only available when configure has the --enable-cairo option
- */
+   Gets the current autolink mode for cairo support.
+   \retval false if no cairo context autolink is made for each window. 
+   \retval true if any fltk window is attached a cairo context when it 
+   is current. \see void cairo_autolink_context(bool alink) 
+   \note Only available when configure has the --enable-cairo option
+   */
   static bool cairo_autolink_context() {return cairo_state_.autolink();}
   /** Gets the current cairo context linked with a fltk window. */
   static cairo_t * cairo_cc() { return cairo_state_.cc(); }
   /** Sets the current cairo context to \p c.
-      Set \p own to true if you want fltk to handle this cc deletion.
-     \note Only available when configure has the --enable-cairo option
-*/
+   Set \p own to true if you want fltk to handle this cc deletion.
+   \note Only available when configure has the --enable-cairo option
+   */
   static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } 
-
+  
 private:
   static cairo_t * cairo_make_current(void* gc);
   static cairo_t * cairo_make_current(void* gc, int W, int H);
   static Fl_Cairo_State cairo_state_;
 public:
   /** @} */ 
-
+  
 #endif // FLTK_HAVE_CAIRO
-
+  
 };
 
-/**
-  This class should be used to control safe widget deletion.
-
-  You can use an Fl_Widget_Tracker object to watch another widget, if you
-  need to know, if this widget has been deleted during a callback.
-
-  This simplifies the use of the "safe widget deletion" methods
-  Fl::watch_widget_pointer() and Fl::release_widget_pointer() and
-  makes their use more reliable, because the destructor autmatically
-  releases the widget pointer from the widget watch list.
-
-  It is intended to be used as an automatic (local/stack) variable,
-  such that the automatic destructor is called when the object's
-  scope is left. This ensures that no stale widget pointers are
-  left in the widget watch list (see example below).
+namespace fltk3 {
   
-  You can also create Fl_Widget_Tracker objects with \c new, but then it
-  is your responsibility to delete the object (and thus remove the
-  widget pointer from the watch list) when it is not needed any more.
-
-  Example:
-
-  \code
-    int MyClass::handle (int event) {
-
-      if (...) {
-	Fl_Widget_Tracker wp(this);	// watch myself
-	do_callback();			// call the callback
-
-	if (wp.deleted()) return 1;	// exit, if deleted
-
-	// Now we are sure that the widget has not been deleted.
-	// It is safe to access the widget
-
-	clear_changed();		// access the widget
-      }
-    }
-  \endcode
-
-*/
-class FL_EXPORT Fl_Widget_Tracker {
-
-  fltk3::Widget* wp_;
-
-public:
-
-  Fl_Widget_Tracker(fltk3::Widget *wi);
-  ~Fl_Widget_Tracker();
-
   /**
-    Returns a pointer to the watched widget.
+   This class should be used to control safe widget deletion.
+   
+   You can use an fltk3::WidgetTracker object to watch another widget, if you
+   need to know, if this widget has been deleted during a callback.
+   
+   This simplifies the use of the "safe widget deletion" methods
+   Fl::watch_widget_pointer() and Fl::release_widget_pointer() and
+   makes their use more reliable, because the destructor autmatically
+   releases the widget pointer from the widget watch list.
+   
+   It is intended to be used as an automatic (local/stack) variable,
+   such that the automatic destructor is called when the object's
+   scope is left. This ensures that no stale widget pointers are
+   left in the widget watch list (see example below).
+   
+   You can also create fltk3::WidgetTracker objects with \c new, but then it
+   is your responsibility to delete the object (and thus remove the
+   widget pointer from the watch list) when it is not needed any more.
+   
+   Example:
+   
+   \code
+   int MyClass::handle (int event) {
+   
+   if (...) {
+   fltk3::WidgetTracker wp(this);	// watch myself
+   do_callback();			// call the callback
+   
+   if (wp.deleted()) return 1;	// exit, if deleted
+   
+   // Now we are sure that the widget has not been deleted.
+   // It is safe to access the widget
+   
+   clear_changed();		// access the widget
+   }
+   }
+   \endcode
+   
+   */
+  class FL_EXPORT WidgetTracker {
+    
+    fltk3::Widget* wp_;
+    
+  public:
+    
+    WidgetTracker(Widget *wi);
+    ~WidgetTracker();
+    
+    /**
+     Returns a pointer to the watched widget.
+     
+     This pointer is \c NULL, if the widget has been deleted.
+     */
+    Widget *widget() {return wp_;}
+    
+    /**
+     Returns 1, if the watched widget has been deleted.
+     
+     This is a convenience method. You can also use something like
+     
+     <tt>  if (wp.widget() == 0) // ...</tt>
+     
+     where \p wp is an fltk3::WidgetTracker object.
+     */
+    int deleted() {return wp_ == 0;}
+    
+    /**
+     Returns 1, if the watched widget exists (has not been deleted).
+     
+     This is a convenience method. You can also use something like
+     
+     <tt>  if (wp.widget() != 0) // ...</tt>
+     
+     where \p wp is an fltk3::WidgetTracker object.
+     */
+    int exists()  {return wp_ != 0;}
+    
+  };
+  
+}
 
-    This pointer is \c NULL, if the widget has been deleted.
-  */
-  fltk3::Widget *widget() {return wp_;}
+/** \defgroup  fl_unicode  Unicode and UTF-8 functions
+ fl global Unicode and UTF-8 handling functions declared in <fltk3/utf8.h>
+ @{ */
+/** @} */
 
-  /**
-    Returns 1, if the watched widget has been deleted.
-
-    This is a convenience method. You can also use something like
-
-    <tt>  if (wp.widget() == 0) // ...</tt>
-
-    where \p wp is an Fl_Widget_Tracker object.
-  */
-  int deleted() {return wp_ == 0;}
-
-  /**
-    Returns 1, if the watched widget exists (has not been deleted).
-
-    This is a convenience method. You can also use something like
-
-    <tt>  if (wp.widget() != 0) // ...</tt>
-
-    where \p wp is an Fl_Widget_Tracker object.
-  */
-  int exists()  {return wp_ != 0;}
-
-};
-
- /** \defgroup  fl_unicode  Unicode and UTF-8 functions
-	fl global Unicode and UTF-8 handling functions declared in <fltk3/utf8.h>
-     @{ */
- /** @} */
-
 #endif // !Fl_H
 
 //

Modified: branches/branch-3.0/ide/Xcode4/FLTK.xcodeproj/project.pbxproj
===================================================================
--- branches/branch-3.0/ide/Xcode4/FLTK.xcodeproj/project.pbxproj	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/ide/Xcode4/FLTK.xcodeproj/project.pbxproj	2011-05-17 14:27:45 UTC (rev 8679)
@@ -4525,6 +4525,7 @@
 		C9628FFD1274D0B3007D3CFE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		C96290E11274D0EF007D3CFE /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = System/Library/Frameworks/AGL.framework; sourceTree = SDKROOT; };
 		C96290E51274D100007D3CFE /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+		C96FA1A4138275F800FF34AA /* Wrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Wrapper.h; path = ../../fltk3/Wrapper.h; sourceTree = "<group>"; };
 		C984AFA712D02A1800D66DAD /* demo.menu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = demo.menu; path = ../../test/demo.menu; sourceTree = SOURCE_ROOT; };
 		C9EDD143127338F600ADB21C /* README.OSX.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.OSX.txt; path = ../../README.OSX.txt; sourceTree = SOURCE_ROOT; };
 		C9EDD4DE1274BB6600ADB21C /* png.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = png.h; path = ../../png/png.h; sourceTree = SOURCE_ROOT; };
@@ -6543,6 +6544,7 @@
 				C9568C111380730900CDA5BF /* win32.h */,
 				C9568C121380730900CDA5BF /* Window.h */,
 				C9568C131380730900CDA5BF /* WizardGroup.h */,
+				C96FA1A4138275F800FF34AA /* Wrapper.h */,
 				C9568C141380730900CDA5BF /* x.h */,
 				C9568C151380730900CDA5BF /* XBMImage.h */,
 				C9568C161380730900CDA5BF /* XPMImage.h */,

Modified: branches/branch-3.0/make3.sh
===================================================================
--- branches/branch-3.0/make3.sh	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/make3.sh	2011-05-17 14:27:45 UTC (rev 8679)
@@ -234,6 +234,7 @@
 renameClass Fl_Widget Widget
 renameClass Fl_Group Group
 renameClass Fl_Window Window
+renameClass Fl_Widget_Tracker WidgetTracker
 
 
 
@@ -250,5 +251,3 @@
 
 
 
-
-

Modified: branches/branch-3.0/src/Fl.cxx
===================================================================
--- branches/branch-3.0/src/Fl.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -1769,7 +1769,7 @@
 /**
   Adds a widget pointer to the widget watch list.
   
-  \note Internal use only, please use class Fl_Widget_Tracker instead.
+  \note Internal use only, please use class fltk3::WidgetTracker instead.
 
   This can be used, if it is possible that a widget might be deleted during
   a callback or similar function. The widget pointer must be added to the
@@ -1806,10 +1806,10 @@
    \see Fl::clear_widget_pointer()
 
    An easier and more convenient method to control widget deletion during
-   callbacks is to use the class Fl_Widget_Tracker with a local (automatic)
+   callbacks is to use the class fltk3::WidgetTracker with a local (automatic)
    variable.
 
-   \see class Fl_Widget_Tracker
+   \see class fltk3::WidgetTracker
 */
 void Fl::watch_widget_pointer(fltk3::Widget *&w) 
 {
@@ -1836,7 +1836,7 @@
   This is used to remove a widget pointer that has been added to the watch list
   with Fl::watch_widget_pointer(), when it is not needed anymore.
   
-  \note Internal use only, please use class Fl_Widget_Tracker instead.
+  \note Internal use only, please use class fltk3::WidgetTracker instead.
 
   \see Fl::watch_widget_pointer()
 */
@@ -1874,10 +1874,10 @@
   This method searches the widget watch list for pointers to the widget and
   clears each pointer that points to it. Widget pointers can be added to the
   widget watch list by calling Fl::watch_widget_pointer() or by using the
-  helper class Fl_Widget_Tracker (recommended).
+  helper class fltk3::WidgetTracker (recommended).
 
   \see Fl::watch_widget_pointer()
-  \see class Fl_Widget_Tracker
+  \see class fltk3::WidgetTracker
 */
 void Fl::clear_widget_pointer(fltk3::Widget const *w) 
 {
@@ -1982,12 +1982,12 @@
 }
 
 
-// Helper class Fl_Widget_Tracker
+// Helper class fltk3::WidgetTracker
 
 /**
   The constructor adds a widget to the watch list.
 */
-Fl_Widget_Tracker::Fl_Widget_Tracker(fltk3::Widget *wi) 
+fltk3::WidgetTracker::WidgetTracker(fltk3::Widget *wi) 
 {
   wp_ = wi;
   Fl::watch_widget_pointer(wp_); // add pointer to watch list
@@ -1996,7 +1996,7 @@
 /**
   The destructor removes a widget from the watch list.
 */
-Fl_Widget_Tracker::~Fl_Widget_Tracker() 
+fltk3::WidgetTracker::~WidgetTracker() 
 {
   Fl::release_widget_pointer(wp_); // remove pointer from watch list
 }

Modified: branches/branch-3.0/src/Fl_Adjuster.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Adjuster.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Adjuster.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -69,7 +69,7 @@
   double v;
   int delta;
   int mx = Fl::event_x();
-  // Fl_Widget_Tracker wp(this);
+  // fltk3::WidgetTracker wp(this);
   switch (event) {
     case fltk3::PUSH:
       if (Fl::visible_focus()) Fl::focus(this);
@@ -78,7 +78,7 @@
 	drag = 3*(mx-x())/w() + 1;
       else
 	drag = 3-3*(Fl::event_y()-y()-1)/h();
-      { Fl_Widget_Tracker wp(this);
+      { fltk3::WidgetTracker wp(this);
 	handle_push();
 	if (wp.deleted()) return 1;
       }
@@ -117,7 +117,7 @@
 	  case 2: v = increment(previous_value(), delta*10); break;
 	  default:v = increment(previous_value(), delta*100); break;
 	}
-	Fl_Widget_Tracker wp(this);
+	fltk3::WidgetTracker wp(this);
 	handle_drag(soft() ? softclamp(v) : clamp(v));
 	if (wp.deleted()) return 1;
       }

Modified: branches/branch-3.0/src/Fl_Browser_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Browser_.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Browser_.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -678,7 +678,7 @@
 int Fl_Browser_::select_only(void* item, int docallbacks) {
   if (!item) return deselect(docallbacks);
   int change = 0;
-  Fl_Widget_Tracker wp(this);
+  fltk3::WidgetTracker wp(this);
   if (type() == FL_MULTI_BROWSER) {
     for (void* p = item_first(); p; p = item_next(p)) {
       if (p != item) change |= select(p, 0, docallbacks);
@@ -699,7 +699,7 @@
 int Fl_Browser_::handle(int event) {
   
   // NOTE:
-  // We use Fl_Widget_Tracker to test if the user has deleted
+  // We use fltk3::WidgetTracker to test if the user has deleted
   // this widget in a callback. Callbacks can be called by:
   //  - do_callback()
   //  - select()
@@ -709,7 +709,7 @@
   // unless we return directly after one of these.
   // If wp.deleted() is true, we return 1 because we used the event.
   
-  Fl_Widget_Tracker wp(this);
+  fltk3::WidgetTracker wp(this);
   
   // must do shortcuts first or the scrollbar will get them...
   if (event == fltk3::ENTER || event == fltk3::LEAVE) return 1;

Modified: branches/branch-3.0/src/Fl_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Button.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -31,7 +31,7 @@
 #include <fltk3/Window.h>
 
 
-Fl_Widget_Tracker *Fl_Button::key_release_tracker = 0;
+fltk3::WidgetTracker *Fl_Button::key_release_tracker = 0;
 
 
 // There are a lot of subclasses, named Fl_*_Button.  Some of
@@ -123,7 +123,7 @@
       value(oldval);
       set_changed();
       if (when() & fltk3::WHEN_CHANGED) {
-	Fl_Widget_Tracker wp(this);
+	fltk3::WidgetTracker wp(this);
         do_callback();
         if (wp.deleted()) return 1;
       }
@@ -153,7 +153,7 @@
         !(Fl::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
       set_changed();
     triggered_by_keyboard:
-      Fl_Widget_Tracker wp(this);
+      fltk3::WidgetTracker wp(this);
       if (type() == FL_RADIO_BUTTON && !value_) {
 	setonly();
 	if (when() & fltk3::WHEN_CHANGED) do_callback();
@@ -180,13 +180,13 @@
   }
   value(1); 
   redraw();
-  key_release_tracker = new Fl_Widget_Tracker(this);
+  key_release_tracker = new fltk3::WidgetTracker(this);
   Fl::add_timeout(0.15, key_release_timeout, key_release_tracker);
 }
 
 void Fl_Button::key_release_timeout(void *d)
 {
-  Fl_Widget_Tracker *wt = (Fl_Widget_Tracker*)d;
+  fltk3::WidgetTracker *wt = (fltk3::WidgetTracker*)d;
   if (!wt)
     return;
   if (wt==key_release_tracker) 

Modified: branches/branch-3.0/src/Fl_Counter.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Counter.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Counter.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -137,7 +137,7 @@
     return 1;
   case fltk3::PUSH:
     if (Fl::visible_focus()) Fl::focus(this);
-    { Fl_Widget_Tracker wp(this);
+    { fltk3::WidgetTracker wp(this);
       handle_push();
       if (wp.deleted()) return 1;
     }
@@ -147,7 +147,7 @@
       Fl::remove_timeout(repeat_callback, this);
       mouseobj = (uchar)i;
       if (i) Fl::add_timeout(INITIALREPEAT, repeat_callback, this);
-      Fl_Widget_Tracker wp(this);
+      fltk3::WidgetTracker wp(this);
       increment_cb();
       if (wp.deleted()) return 1;
       redraw();

Modified: branches/branch-3.0/src/Fl_Dial.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Dial.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Dial.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -110,7 +110,7 @@
 int Fl_Dial::handle(int event, int X, int Y, int W, int H) {
   switch (event) {
   case fltk3::PUSH: {
-    Fl_Widget_Tracker wp(this);  
+    fltk3::WidgetTracker wp(this);  
     handle_push();
     if (wp.deleted()) return 1; }
   case fltk3::DRAG: {

Modified: branches/branch-3.0/src/Fl_File_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Input.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_File_Input.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -218,7 +218,7 @@
         return Fl_Input::handle(event);
 
     default :
-      { Fl_Widget_Tracker wp(this);
+      { fltk3::WidgetTracker wp(this);
 	if (Fl_Input::handle(event)) {
 	  if (wp.exists())
 	    damage(fltk3::DAMAGE_BAR);

Modified: branches/branch-3.0/src/Fl_Group.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Group.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Group.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -227,7 +227,7 @@
     for (i = children(); i--;) {
       o = a[i];
       if (o->takesevents() && Fl::event_inside(o)) {
-	Fl_Widget_Tracker wp(o);
+	fltk3::WidgetTracker wp(o);
 	if (send(o,fltk3::PUSH)) {
 	  if (Fl::pushed() && wp.exists() && !o->contains(Fl::pushed())) Fl::pushed(o);
 	  return 1;

Modified: branches/branch-3.0/src/Fl_Menu_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Button.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Menu_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -58,7 +58,7 @@
   const Fl_Menu_Item* m;
   pressed_menu_button_ = this;
   redraw();
-  Fl_Widget_Tracker mb(this);
+  fltk3::WidgetTracker mb(this);
   if (!box() || type()) {
     m = menu()->popup(Fl::event_x(), Fl::event_y(), label(), mvalue(), this);
   } else {

Modified: branches/branch-3.0/src/Fl_Slider.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Slider.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Slider.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -222,10 +222,10 @@
 }
 
 int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
-  // Fl_Widget_Tracker wp(this);
+  // fltk3::WidgetTracker wp(this);
   switch (event) {
   case fltk3::PUSH: {
-    Fl_Widget_Tracker wp(this);
+    fltk3::WidgetTracker wp(this);
     if (!Fl::event_inside(X, Y, W, H)) return 0;
     handle_push();
     if (wp.deleted()) return 1; }
@@ -298,7 +298,7 @@
     handle_release();
     return 1;
   case fltk3::KEYBOARD:
-    { Fl_Widget_Tracker wp(this);
+    { fltk3::WidgetTracker wp(this);
       switch (Fl::event_key()) {
 	case fltk3::UpKey:
 	  if (horizontal()) return 0;

Modified: branches/branch-3.0/src/Fl_Tabs.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tabs.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Tabs.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -183,7 +183,7 @@
         redraw_tabs();
       }
       if (o && value(o)) {
-        Fl_Widget_Tracker wp(o);
+        fltk3::WidgetTracker wp(o);
         set_changed();
 	do_callback();
 	if (wp.deleted()) return 1;

Modified: branches/branch-3.0/src/Fl_Value_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Input.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Value_Input.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -100,7 +100,7 @@
     if (value() != previous_value() || !Fl::event_is_click())
       handle_release();
     else {
-      Fl_Widget_Tracker wp(&input);
+      fltk3::WidgetTracker wp(&input);
       input.handle(fltk3::PUSH);
       if (wp.exists())
 	input.handle(fltk3::RELEASE);

Modified: branches/branch-3.0/src/Fl_Widget.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Widget.cxx	2011-05-17 09:15:40 UTC (rev 8678)
+++ branches/branch-3.0/src/Fl_Widget.cxx	2011-05-17 14:27:45 UTC (rev 8679)
@@ -27,6 +27,7 @@
 
 #include <fltk3/run.h>
 #include <fltk3/Widget.h>
+#include <fltk3/Wrapper.h>
 #include <fltk3/Group.h>
 #include <fltk3/Tooltip.h>
 #include <fltk3/draw.h>
@@ -333,13 +334,31 @@
 */
 void
 fltk3::Widget::do_callback(fltk3::Widget* o,void* arg) {
-  Fl_Widget_Tracker wp(this);
+  fltk3::WidgetTracker wp(this);
   callback_(o,arg);
   if (wp.deleted()) return;
   if (callback_ != default_callback)
     clear_changed();
 }
 
+
+// ========================= Wrapper Support ===================================
+
+fltk3::Object::~Object() {
+  if ( pWrapper && !(pWrapper->pVCalls&Wrapper::pVCallDtor) ) {
+    pWrapper->pVCalls |= Wrapper::pVCallDtor;
+    delete pWrapper;
+  }
+}
+
+fltk3::Wrapper::~Wrapper() {
+  if ( !(pVCalls&pVCallDtor) ) {
+    pVCalls |= pVCallDtor;
+    delete _p;
+  }
+}
+
+
 //
 // End of "$Id$".
 //

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.