FLTK logo

[Library] r8680 - in branches/branch-3.0: . fltk3 fluid src test

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] r8680 - in branches/branch-3.0: . fltk3 fluid src test fltk-dev May 17, 2011  
 
Author: matt
Date: 2011-05-17 08:17:01 -0700 (Tue, 17 May 2011)
New Revision: 8680
Log:
123: moved FL to fltk3 namespace.

Modified:
   branches/branch-3.0/fltk3/Browser_.h
   branches/branch-3.0/fltk3/Button.h
   branches/branch-3.0/fltk3/Cairo.h
   branches/branch-3.0/fltk3/CairoWindow.h
   branches/branch-3.0/fltk3/Clock.h
   branches/branch-3.0/fltk3/DoubleWindow.h
   branches/branch-3.0/fltk3/GlWindow.h
   branches/branch-3.0/fltk3/HelpView.h
   branches/branch-3.0/fltk3/InputChoice.h
   branches/branch-3.0/fltk3/MenuItem.h
   branches/branch-3.0/fltk3/RepeatButton.h
   branches/branch-3.0/fltk3/ScrollGroup.h
   branches/branch-3.0/fltk3/Spinner.h
   branches/branch-3.0/fltk3/Table.h
   branches/branch-3.0/fltk3/TextDisplay.h
   branches/branch-3.0/fltk3/Timer.h
   branches/branch-3.0/fltk3/Tooltip.h
   branches/branch-3.0/fltk3/Tree.h
   branches/branch-3.0/fltk3/ValueInput.h
   branches/branch-3.0/fltk3/Widget.h
   branches/branch-3.0/fltk3/Window.h
   branches/branch-3.0/fltk3/draw.h
   branches/branch-3.0/fltk3/enumerations.h
   branches/branch-3.0/fltk3/forms.h
   branches/branch-3.0/fltk3/glut.h
   branches/branch-3.0/fltk3/osx.h
   branches/branch-3.0/fltk3/run.h
   branches/branch-3.0/fltk3/x.h
   branches/branch-3.0/fluid/Fl_Function_Type.cxx
   branches/branch-3.0/fluid/Fl_Group_Type.cxx
   branches/branch-3.0/fluid/Fl_Menu_Type.cxx
   branches/branch-3.0/fluid/Fl_Type.cxx
   branches/branch-3.0/fluid/Fl_Type.h
   branches/branch-3.0/fluid/Fl_Widget_Type.cxx
   branches/branch-3.0/fluid/Fl_Window_Type.cxx
   branches/branch-3.0/fluid/alignment_panel.cxx
   branches/branch-3.0/fluid/factory.cxx
   branches/branch-3.0/fluid/fluid.cxx
   branches/branch-3.0/fluid/function_panel.cxx
   branches/branch-3.0/fluid/template_panel.cxx
   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_Bitmap.cxx
   branches/branch-3.0/src/Fl_Browser_.cxx
   branches/branch-3.0/src/Fl_Button.cxx
   branches/branch-3.0/src/Fl_Chart.cxx
   branches/branch-3.0/src/Fl_Choice.cxx
   branches/branch-3.0/src/Fl_Clock.cxx
   branches/branch-3.0/src/Fl_Color_Chooser.cxx
   branches/branch-3.0/src/Fl_Counter.cxx
   branches/branch-3.0/src/Fl_Dial.cxx
   branches/branch-3.0/src/Fl_Double_Window.cxx
   branches/branch-3.0/src/Fl_File_Chooser.cxx
   branches/branch-3.0/src/Fl_File_Chooser2.cxx
   branches/branch-3.0/src/Fl_File_Icon2.cxx
   branches/branch-3.0/src/Fl_File_Input.cxx
   branches/branch-3.0/src/Fl_GIF_Image.cxx
   branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx
   branches/branch-3.0/src/Fl_Gl_Overlay.cxx
   branches/branch-3.0/src/Fl_Gl_Window.cxx
   branches/branch-3.0/src/Fl_Group.cxx
   branches/branch-3.0/src/Fl_Help_View.cxx
   branches/branch-3.0/src/Fl_Image.cxx
   branches/branch-3.0/src/Fl_Input.cxx
   branches/branch-3.0/src/Fl_Input_.cxx
   branches/branch-3.0/src/Fl_Light_Button.cxx
   branches/branch-3.0/src/Fl_Menu.cxx
   branches/branch-3.0/src/Fl_Menu_Bar.cxx
   branches/branch-3.0/src/Fl_Menu_Button.cxx
   branches/branch-3.0/src/Fl_Menu_Window.cxx
   branches/branch-3.0/src/Fl_Menu_add.cxx
   branches/branch-3.0/src/Fl_Menu_global.cxx
   branches/branch-3.0/src/Fl_Multi_Label.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx
   branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm
   branches/branch-3.0/src/Fl_Overlay_Window.cxx
   branches/branch-3.0/src/Fl_PNG_Image.cxx
   branches/branch-3.0/src/Fl_PNM_Image.cxx
   branches/branch-3.0/src/Fl_Pack.cxx
   branches/branch-3.0/src/Fl_Paged_Device.cxx
   branches/branch-3.0/src/Fl_Pixmap.cxx
   branches/branch-3.0/src/Fl_Positioner.cxx
   branches/branch-3.0/src/Fl_PostScript.cxx
   branches/branch-3.0/src/Fl_Progress.cxx
   branches/branch-3.0/src/Fl_Quartz_Printer.mm
   branches/branch-3.0/src/Fl_Repeat_Button.cxx
   branches/branch-3.0/src/Fl_Return_Button.cxx
   branches/branch-3.0/src/Fl_Roller.cxx
   branches/branch-3.0/src/Fl_Scroll.cxx
   branches/branch-3.0/src/Fl_Scrollbar.cxx
   branches/branch-3.0/src/Fl_Slider.cxx
   branches/branch-3.0/src/Fl_Table.cxx
   branches/branch-3.0/src/Fl_Table_Row.cxx
   branches/branch-3.0/src/Fl_Tabs.cxx
   branches/branch-3.0/src/Fl_Text_Buffer.cxx
   branches/branch-3.0/src/Fl_Text_Display.cxx
   branches/branch-3.0/src/Fl_Text_Editor.cxx
   branches/branch-3.0/src/Fl_Tile.cxx
   branches/branch-3.0/src/Fl_Tiled_Image.cxx
   branches/branch-3.0/src/Fl_Tooltip.cxx
   branches/branch-3.0/src/Fl_Tree.cxx
   branches/branch-3.0/src/Fl_Tree_Item.cxx
   branches/branch-3.0/src/Fl_Tree_Prefs.cxx
   branches/branch-3.0/src/Fl_Value_Input.cxx
   branches/branch-3.0/src/Fl_Value_Output.cxx
   branches/branch-3.0/src/Fl_Value_Slider.cxx
   branches/branch-3.0/src/Fl_Widget.cxx
   branches/branch-3.0/src/Fl_Window.cxx
   branches/branch-3.0/src/Fl_Window_fullscreen.cxx
   branches/branch-3.0/src/Fl_Window_hotspot.cxx
   branches/branch-3.0/src/Fl_abort.cxx
   branches/branch-3.0/src/Fl_add_idle.cxx
   branches/branch-3.0/src/Fl_arg.cxx
   branches/branch-3.0/src/Fl_cocoa.mm
   branches/branch-3.0/src/Fl_compose.cxx
   branches/branch-3.0/src/Fl_display.cxx
   branches/branch-3.0/src/Fl_get_key.cxx
   branches/branch-3.0/src/Fl_get_key_mac.cxx
   branches/branch-3.0/src/Fl_get_key_win32.cxx
   branches/branch-3.0/src/Fl_get_system_colors.cxx
   branches/branch-3.0/src/Fl_grab.cxx
   branches/branch-3.0/src/Fl_lock.cxx
   branches/branch-3.0/src/Fl_mac.cxx
   branches/branch-3.0/src/Fl_own_colormap.cxx
   branches/branch-3.0/src/Fl_visual.cxx
   branches/branch-3.0/src/Fl_win32.cxx
   branches/branch-3.0/src/Fl_x.cxx
   branches/branch-3.0/src/cmap.cxx
   branches/branch-3.0/src/fl_ask.cxx
   branches/branch-3.0/src/fl_boxtype.cxx
   branches/branch-3.0/src/fl_color.cxx
   branches/branch-3.0/src/fl_color_mac.cxx
   branches/branch-3.0/src/fl_color_win32.cxx
   branches/branch-3.0/src/fl_cursor.cxx
   branches/branch-3.0/src/fl_dnd_win32.cxx
   branches/branch-3.0/src/fl_dnd_x.cxx
   branches/branch-3.0/src/fl_draw_image.cxx
   branches/branch-3.0/src/fl_draw_pixmap.cxx
   branches/branch-3.0/src/fl_file_dir.cxx
   branches/branch-3.0/src/fl_font_mac.cxx
   branches/branch-3.0/src/fl_font_win32.cxx
   branches/branch-3.0/src/fl_font_x.cxx
   branches/branch-3.0/src/fl_font_xft.cxx
   branches/branch-3.0/src/fl_gtk.cxx
   branches/branch-3.0/src/fl_labeltype.cxx
   branches/branch-3.0/src/fl_line_style.cxx
   branches/branch-3.0/src/fl_plastic.cxx
   branches/branch-3.0/src/fl_read_image.cxx
   branches/branch-3.0/src/fl_rect.cxx
   branches/branch-3.0/src/fl_set_font.cxx
   branches/branch-3.0/src/fl_set_fonts_mac.cxx
   branches/branch-3.0/src/fl_set_fonts_win32.cxx
   branches/branch-3.0/src/fl_set_fonts_x.cxx
   branches/branch-3.0/src/fl_set_fonts_xft.cxx
   branches/branch-3.0/src/fl_shortcut.cxx
   branches/branch-3.0/src/fl_show_colormap.cxx
   branches/branch-3.0/src/fl_vertex.cxx
   branches/branch-3.0/src/forms_compatability.cxx
   branches/branch-3.0/src/forms_free.cxx
   branches/branch-3.0/src/forms_timer.cxx
   branches/branch-3.0/src/gl_draw.cxx
   branches/branch-3.0/src/gl_start.cxx
   branches/branch-3.0/src/glut_compatability.cxx
   branches/branch-3.0/src/screen_xywh.cxx
   branches/branch-3.0/test/hello.cxx

Modified: branches/branch-3.0/fltk3/Browser_.h
===================================================================
--- branches/branch-3.0/fltk3/Browser_.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Browser_.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -37,7 +37,7 @@
 #include "Group.h"
 #endif
 #include "Scrollbar.h"
-#include <fltk3/run.h>		// Fl::scrollbar_size()
+#include <fltk3/run.h>		// fltk3::scrollbar_size()
 
 #define FL_NORMAL_BROWSER	0	/**< type() of Fl_Browser */
 #define FL_SELECT_BROWSER	1	/**< type() of FL_Select_Browser */
@@ -307,10 +307,10 @@
     Gets the current size of the scrollbars' troughs, in pixels.
 
     If this value is zero (default), this widget will use the 
-    Fl::scrollbar_size() value as the scrollbar's width.
+    fltk3::scrollbar_size() value as the scrollbar's width.
   
-    \returns Scrollbar size in pixels, or 0 if the global Fl::scrollsize() is being used.
-    \see Fl::scrollbar_size(int)
+    \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollsize() is being used.
+    \see fltk3::scrollbar_size(int)
   */
   int scrollbar_size() const {
       return(scrollbar_size_);
@@ -319,7 +319,7 @@
     Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
 
     Normally you should not need this method, and should use
-    Fl::scrollbar_size(int) instead to manage the size of ALL 
+    fltk3::scrollbar_size(int) instead to manage the size of ALL 
     your widgets' scrollbars. This ensures your application 
     has a consistent UI, is the default behavior, and is normally
     what you want.
@@ -328,11 +328,11 @@
     scrollbar size. The need for this should be rare.
     
     Setting \p size to the special value of 0 causes the widget to
-    track the global Fl::scrollbar_size(), which is the default.
+    track the global fltk3::scrollbar_size(), which is the default.
     
     \param[in] size Sets the scrollbar size in pixels.\n
-                    If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
-    \see Fl::scrollbar_size()
+                    If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+    \see fltk3::scrollbar_size()
   */
   void scrollbar_size(int size) {
       scrollbar_size_ = size;
@@ -340,22 +340,22 @@
   /**
     This method has been deprecated, existing for backwards compatibility only.
     Use scrollbar_size() instead.
-    This method always returns the global value Fl::scrollbar_size().
-    \returns Always returns the global value Fl::scrollbar_size().
+    This method always returns the global value fltk3::scrollbar_size().
+    \returns Always returns the global value fltk3::scrollbar_size().
     \todo This method should eventually be removed in 1.4+
   */
   int scrollbar_width() const {
-      return(Fl::scrollbar_size());
+      return(fltk3::scrollbar_size());
   }
   /**
     This method has been deprecated, existing for backwards compatibility only.
     Use scrollbar_size(int) instead.
-    This method sets the global Fl::scrollbar_size(), and forces this
+    This method sets the global fltk3::scrollbar_size(), and forces this
     instance of the widget to use it.
     \todo This method should eventually be removed in 1.4+
   */
   void scrollbar_width(int width) {
-      Fl::scrollbar_size(width);
+      fltk3::scrollbar_size(width);
       scrollbar_size_ = 0;
   }
   /**

Modified: branches/branch-3.0/fltk3/Button.h
===================================================================
--- branches/branch-3.0/fltk3/Button.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Button.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -138,11 +138,11 @@
     <tt>'a'</tt>.
     A value of 0 disables the shortcut.
 
-    The key can be any value returned by Fl::event_key(), but will usually be
+    The key can be any value returned by fltk3::event_key(), but will usually be
     an ASCII letter.  Use a lower-case letter unless you require the shift key
     to be held down.
 
-    The shift flags can be any set of values accepted by Fl::event_state().
+    The shift flags can be any set of values accepted by fltk3::event_state().
     If the bit is on, that shift key must be pushed.  Meta, Alt, Ctrl, and
     Shift must be off if they are not in the shift flags (zero for the other
     bits indicates a "don't care" setting).

Modified: branches/branch-3.0/fltk3/Cairo.h
===================================================================
--- branches/branch-3.0/fltk3/Cairo.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Cairo.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -66,7 +66,7 @@
 
     // access attributes
     cairo_t* cc() const {return cc_;}		 ///< Gets the current cairo context
-    bool autolink() const {return autolink_;}	 ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
+    bool autolink() const {return autolink_;}	 ///< Gets the autolink option. See fltk3::cairo_autolink_context(bool)
     /** Sets the current cairo context, \p own indicates cc deletion is handle externally by user */
     void cc(cairo_t* c, bool own=true)  {	 
 	if (cc_ && own_cc_) cairo_destroy(cc_); 

Modified: branches/branch-3.0/fltk3/CairoWindow.h
===================================================================
--- branches/branch-3.0/fltk3/CairoWindow.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/CairoWindow.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -50,7 +50,7 @@
    All cairo context handling is achieved transparently.
    \note You can alternatively define your custom cairo fltk window,
    and thus at least override the draw() method to provide custom cairo
-   support. In this case you will probably use Fl::cairo_make_current(fltk3::Window*)
+   support. In this case you will probably use fltk3::cairo_make_current(fltk3::Window*)
    to attach a context to your window. You should do it only when your window is 
    the current window. \see fltk3::Window::current()
 */
@@ -64,9 +64,9 @@
   void draw() {
     Fl_Double_Window::draw();
     // manual method ? if yes explicitly get a cairo_context here
-    if (!Fl::cairo_autolink_context()) 
-      Fl::cairo_make_current(this); 
-    if (draw_cb_) draw_cb_(this, Fl::cairo_cc());
+    if (!fltk3::cairo_autolink_context()) 
+      fltk3::cairo_make_current(this); 
+    if (draw_cb_) draw_cb_(this, fltk3::cairo_cc());
   }
 
 public:

Modified: branches/branch-3.0/fltk3/Clock.h
===================================================================
--- branches/branch-3.0/fltk3/Clock.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Clock.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -108,7 +108,7 @@
   \brief This widget provides a round analog clock display.
 
   Fl_Clock is provided for Forms compatibility. 
-  It installs a 1-second timeout callback using Fl::add_timeout().
+  It installs a 1-second timeout callback using fltk3::add_timeout().
   You can choose the rounded or square type of the clock with type(), see below.
   \htmlonly <BR>  <table align=CENTER border=1 cellpadding=5 >  
   <caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly

Modified: branches/branch-3.0/fltk3/DoubleWindow.h
===================================================================
--- branches/branch-3.0/fltk3/DoubleWindow.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/DoubleWindow.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -41,7 +41,7 @@
   <P>It is highly recommended that you put the following code before the
   first show() of <I>any</I> window in your program: </P>
   \code
-  Fl::visual(fltk3::DOUBLE|fltk3::INDEX)
+  fltk3::visual(fltk3::DOUBLE|fltk3::INDEX)
   \endcode
   This makes sure you can use Xdbe on servers where double buffering
   does not exist for every visual.

Modified: branches/branch-3.0/fltk3/GlWindow.h
===================================================================
--- branches/branch-3.0/fltk3/GlWindow.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/GlWindow.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -158,7 +158,7 @@
 
     If the desired combination cannot be done, FLTK will try turning off 
     fltk3::MULTISAMPLE.  If this also fails the show() will call 
-    Fl::error() and not show the window.
+    fltk3::error() and not show the window.
 
     You can change the mode while the window is displayed.  This is most
     useful for turning double-buffering on and off.  Under X this will

Modified: branches/branch-3.0/fltk3/HelpView.h
===================================================================
--- branches/branch-3.0/fltk3/HelpView.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/HelpView.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -357,10 +357,10 @@
     Gets the current size of the scrollbars' troughs, in pixels.
 
     If this value is zero (default), this widget will use the 
-    Fl::scrollbar_size() value as the scrollbar's width.
+    fltk3::scrollbar_size() value as the scrollbar's width.
   
-    \returns Scrollbar size in pixels, or 0 if the global Fl::scrollbar_size() is being used.
-    \see Fl::scrollbar_size(int)
+    \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollbar_size() is being used.
+    \see fltk3::scrollbar_size(int)
   */
   int scrollbar_size() const {
       return(scrollbar_size_);
@@ -369,7 +369,7 @@
     Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
 
     Normally you should not need this method, and should use
-    Fl::scrollbar_size(int) instead to manage the size of ALL 
+    fltk3::scrollbar_size(int) instead to manage the size of ALL 
     your widgets' scrollbars. This ensures your application 
     has a consistent UI, is the default behavior, and is normally
     what you want.
@@ -378,11 +378,11 @@
     scrollbar size. The need for this should be rare.
     
     Setting \p size to the special value of 0 causes the widget to
-    track the global Fl::scrollbar_size(), which is the default.
+    track the global fltk3::scrollbar_size(), which is the default.
     
     \param[in] size Sets the scrollbar size in pixels.\n
-                    If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
-    \see Fl::scrollbar_size()
+                    If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+    \see fltk3::scrollbar_size()
   */
   void scrollbar_size(int size) {
       scrollbar_size_ = size;

Modified: branches/branch-3.0/fltk3/InputChoice.h
===================================================================
--- branches/branch-3.0/fltk3/InputChoice.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/InputChoice.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -64,7 +64,7 @@
       fl_color(active_r() ? labelcolor() : fltk3::inactive(labelcolor()));
       int xc = x()+w()/2, yc=y()+h()/2;
       fl_polygon(xc-5,yc-3,xc+5,yc-3,xc,yc+3);
-      if (Fl::focus() == this) draw_focus();
+      if (fltk3::focus() == this) draw_focus();
     }
   public:
     InputMenuButton(int x,int y,int w,int h,const char*l=0) : 
@@ -123,15 +123,15 @@
   }
 
   // Custom resize behavior -- input stretches, menu button doesn't
-  inline int inp_x() { return(x() + Fl::box_dx(box())); }
-  inline int inp_y() { return(y() + Fl::box_dy(box())); }
-  inline int inp_w() { return(w() - Fl::box_dw(box()) - 20); }
-  inline int inp_h() { return(h() - Fl::box_dh(box())); }
+  inline int inp_x() { return(x() + fltk3::box_dx(box())); }
+  inline int inp_y() { return(y() + fltk3::box_dy(box())); }
+  inline int inp_w() { return(w() - fltk3::box_dw(box()) - 20); }
+  inline int inp_h() { return(h() - fltk3::box_dh(box())); }
 
-  inline int menu_x() { return(x() + w() - 20 - Fl::box_dx(box())); }
-  inline int menu_y() { return(y() + Fl::box_dy(box())); }
+  inline int menu_x() { return(x() + w() - 20 - fltk3::box_dx(box())); }
+  inline int menu_y() { return(y() + fltk3::box_dy(box())); }
   inline int menu_w() { return(20); }
-  inline int menu_h() { return(h() - Fl::box_dh(box())); }
+  inline int menu_h() { return(h() - fltk3::box_dh(box())); }
 
 public:
   /**

Modified: branches/branch-3.0/fltk3/MenuItem.h
===================================================================
--- branches/branch-3.0/fltk3/MenuItem.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/MenuItem.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -195,7 +195,7 @@
     Gets the menu item's label font.
     Fonts are identified by small 8-bit indexes into a table. See the
     enumeration list for predefined fonts. The default value is a
-    Helvetica font. The function Fl::set_font() can define new fonts.
+    Helvetica font. The function fltk3::set_font() can define new fonts.
   */
   fltk3::Font labelfont() const {return labelfont_;}
 
@@ -203,7 +203,7 @@
     Sets the menu item's label font.
     Fonts are identified by small 8-bit indexes into a table. See the
     enumeration list for predefined fonts. The default value is a
-    Helvetica font.  The function Fl::set_font() can define new fonts.
+    Helvetica font.  The function fltk3::set_font() can define new fonts.
   */
   void labelfont(fltk3::Font a) {labelfont_ = a;}
 
@@ -284,11 +284,11 @@
     fltk3::ALT+'a' or fltk3::ALT+fltk3::FKey+10 or just 'a'.  A value of
     zero disables the shortcut.
 
-    The key can be any value returned by Fl::event_key(), but will usually 
+    The key can be any value returned by fltk3::event_key(), but will usually 
     be an ASCII letter. Use a lower-case letter unless you require the shift 
     key to be held down.
 
-    The shift flags can be any set of values accepted by Fl::event_state().
+    The shift flags can be any set of values accepted by fltk3::event_state().
     If the bit is on that shift key must be pushed.  Meta, Alt, Ctrl, 
     and Shift must be off if they are not in the shift flags (zero for the 
     other bits indicates a "don't care" setting).

Modified: branches/branch-3.0/fltk3/RepeatButton.h
===================================================================
--- branches/branch-3.0/fltk3/RepeatButton.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/RepeatButton.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -51,7 +51,7 @@
   Fl_Repeat_Button(int X,int Y,int W,int H,const char *l=0)
     : Fl_Button(X,Y,W,H,l) {}
   void deactivate() {
-    Fl::remove_timeout(repeat_callback,this);
+    fltk3::remove_timeout(repeat_callback,this);
     Fl_Button::deactivate();
   }
 };

Modified: branches/branch-3.0/fltk3/ScrollGroup.h
===================================================================
--- branches/branch-3.0/fltk3/ScrollGroup.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/ScrollGroup.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -159,10 +159,10 @@
     Gets the current size of the scrollbars' troughs, in pixels.
 
     If this value is zero (default), this widget will use the 
-    Fl::scrollbar_size() value as the scrollbar's width.
+    fltk3::scrollbar_size() value as the scrollbar's width.
   
-    \returns Scrollbar size in pixels, or 0 if the global Fl::scrollsize() is being used.
-    \see Fl::scrollbar_size(int)
+    \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollsize() is being used.
+    \see fltk3::scrollbar_size(int)
   */
   int scrollbar_size() const {
       return(scrollbar_size_);
@@ -171,7 +171,7 @@
     Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
 
     Normally you should not need this method, and should use
-    Fl::scrollbar_size(int) instead to manage the size of ALL 
+    fltk3::scrollbar_size(int) instead to manage the size of ALL 
     your widgets' scrollbars. This ensures your application 
     has a consistent UI, is the default behavior, and is normally
     what you want.
@@ -180,11 +180,11 @@
     scrollbar size. The need for this should be rare.
     
     Setting \p size to the special value of 0 causes the widget to
-    track the global Fl::scrollbar_size(), which is the default.
+    track the global fltk3::scrollbar_size(), which is the default.
     
     \param[in] size Sets the scrollbar size in pixels.\n
-                    If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
-    \see Fl::scrollbar_size()
+                    If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+    \see fltk3::scrollbar_size()
   */
   void scrollbar_size(int size) {
       if ( size != scrollbar_size_ ) redraw();

Modified: branches/branch-3.0/fltk3/Spinner.h
===================================================================
--- branches/branch-3.0/fltk3/Spinner.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Spinner.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -158,10 +158,10 @@
 		  switch (event) {
 		    case FL_KEYDOWN :
 		    case fltk3::SHORTCUT :
-		      if (Fl::event_key() == fltk3::UpKey) {
+		      if (fltk3::event_key() == fltk3::UpKey) {
 			up_button_.do_callback();
 			return 1;
-		      } else if (Fl::event_key() == fltk3::DownKey) {
+		      } else if (fltk3::event_key() == fltk3::DownKey) {
 			down_button_.do_callback();
 			return 1;
 		      } else return 0;

Modified: branches/branch-3.0/fltk3/Table.h
===================================================================
--- branches/branch-3.0/fltk3/Table.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Table.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -986,7 +986,7 @@
    event occurred in, such as in a cell, in a header, or elsewhere on the table.  
    When an event occurs in a cell or header, callback_row() and 
    callback_col() can be used to determine the row and column. The callback can 
-   also look at the regular fltk event values (ie. Fl::event() and Fl::button()) 
+   also look at the regular fltk event values (ie. fltk3::event() and fltk3::button()) 
    to determine what kind of event is occurring.
    */
   void when(fltk3::When flags);
@@ -1051,7 +1051,7 @@
        C = callback_col();                             // column where event occurred
        TableContext context = callback_context();      // which part of table
        fprintf(stderr, "callback: Row=%d Col=%d Context=%d Event=%d\n",
-               R, C, (int)context, (int)Fl::event());
+               R, C, (int)context, (int)fltk3::event());
      }
    
      // Actual static callback

Modified: branches/branch-3.0/fltk3/TextDisplay.h
===================================================================
--- branches/branch-3.0/fltk3/TextDisplay.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/TextDisplay.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -73,7 +73,7 @@
   };
   
   /** 
-   drag types - they match Fl::event_clicks() so that single clicking to
+   drag types - they match fltk3::event_clicks() so that single clicking to
    start a collection selects by character, double clicking selects by
    word and triple clicking selects by line.
    */

Modified: branches/branch-3.0/fltk3/Timer.h
===================================================================
--- branches/branch-3.0/fltk3/Timer.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Timer.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -45,7 +45,7 @@
   making a timeout callback every 1/5 second.  This is wasteful and
   inaccurate if you just want something to happen a fixed time in the
   future.  You should directly call 
-  Fl::add_timeout() instead.
+  fltk3::add_timeout() instead.
 */
 class FL_EXPORT Fl_Timer : public fltk3::Widget {
   static void stepcb(void *);

Modified: branches/branch-3.0/fltk3/Tooltip.h
===================================================================
--- branches/branch-3.0/fltk3/Tooltip.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Tooltip.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -55,9 +55,9 @@
   */
   static void hoverdelay(float f) { hoverdelay_ = f; }
   /**    Returns non-zero if tooltips are enabled.  */
-  static int enabled() { return Fl::option(Fl::OPTION_SHOW_TOOLTIPS); }
+  static int enabled() { return fltk3::option(fltk3::OPTION_SHOW_TOOLTIPS); }
   /**    Enables tooltips on all widgets (or disables if <i>b</i> is false).  */
-  static void enable(int b = 1) { Fl::option(Fl::OPTION_SHOW_TOOLTIPS, (b!=0));}
+  static void enable(int b = 1) { fltk3::option(fltk3::OPTION_SHOW_TOOLTIPS, (b!=0));}
   /**    Same as enable(0), disables tooltips on all widgets.  */
   static void disable() { enable(0); }
   static void (*enter)(fltk3::Widget* w);

Modified: branches/branch-3.0/fltk3/Tree.h
===================================================================
--- branches/branch-3.0/fltk3/Tree.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Tree.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -880,14 +880,14 @@
   }
   /// Sets the style of box used to draw selected items.
   /// This is an fltk fltk3::Boxtype.
-  /// The default is influenced by FLTK's current Fl::scheme()
+  /// The default is influenced by FLTK's current fltk3::scheme()
   ///
   fltk3::Boxtype selectbox() const {
     return(_prefs.selectbox());
   }
   /// Gets the style of box used to draw selected items.
   /// This is an fltk fltk3::Boxtype.
-  /// The default is influenced by FLTK's current Fl::scheme()
+  /// The default is influenced by FLTK's current fltk3::scheme()
   ///
   void selectbox(fltk3::Boxtype val) {
     _prefs.selectbox(val);
@@ -929,10 +929,10 @@
   /// Gets the current size of the scrollbars' troughs, in pixels.
   ///
   /// If this value is zero (default), this widget will use the global
-  /// Fl::scrollbar_size() value as the scrollbar's width.
+  /// fltk3::scrollbar_size() value as the scrollbar's width.
   /// 
-  /// \returns Scrollbar size in pixels, or 0 if the global Fl::scrollsize() is being used.
-  /// \see Fl::scrollbar_size(int)
+  /// \returns Scrollbar size in pixels, or 0 if the global fltk3::scrollsize() is being used.
+  /// \see fltk3::scrollbar_size(int)
   ///
   int scrollbar_size() const {
       return(_scrollbar_size);
@@ -940,7 +940,7 @@
   /// Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
   ///
   /// Normally you should not need this method, and should use the global
-  /// Fl::scrollbar_size(int) instead to manage the size of ALL 
+  /// fltk3::scrollbar_size(int) instead to manage the size of ALL 
   /// your widgets' scrollbars. This ensures your application 
   /// has a consistent UI, is the default behavior, and is normally
   /// what you want.
@@ -949,15 +949,15 @@
   /// scrollbar size. The need for this should be rare.
   ///   
   /// Setting \p size to the special value of 0 causes the widget to
-  /// track the global Fl::scrollbar_size(), which is the default.
+  /// track the global fltk3::scrollbar_size(), which is the default.
   ///   
   /// \param[in] size Sets the scrollbar size in pixels.\n
-  ///                 If 0 (default), scrollbar size tracks the global Fl::scrollbar_size()
-  /// \see Fl::scrollbar_size()
+  ///                 If 0 (default), scrollbar size tracks the global fltk3::scrollbar_size()
+  /// \see fltk3::scrollbar_size()
   ///
   void scrollbar_size(int size) {
       _scrollbar_size = size;
-      int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
+      int scrollsize = _scrollbar_size ? _scrollbar_size : fltk3::scrollbar_size();
       if ( _vscroll->w() != scrollsize ) {
         _vscroll->resize(x()+w()-scrollsize, h(), scrollsize, _vscroll->h());
       }

Modified: branches/branch-3.0/fltk3/ValueInput.h
===================================================================
--- branches/branch-3.0/fltk3/ValueInput.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/ValueInput.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -102,11 +102,11 @@
    of 0 disables the shortcut.
    
    The key can be any value returned by 
-   Fl::event_key(), but will usually be an ASCII letter.  Use
+   fltk3::event_key(), but will usually be an ASCII letter.  Use
    a lower-case letter unless you require the shift key to be held down.
    
    The shift flags can be any set of values accepted by 
-   Fl::event_state().  If the bit is on that shift key must
+   fltk3::event_state().  If the bit is on that shift key must
    be pushed.  Meta, Alt, Ctrl, and Shift must be off if they are not in
    the shift flags (zero for the other bits indicates a "don't care"
    setting).

Modified: branches/branch-3.0/fltk3/Widget.h
===================================================================
--- branches/branch-3.0/fltk3/Widget.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Widget.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -383,7 +383,7 @@
      an internal table of RGB colors or an RGB color value generated using 
      fltk3::rgb_color().
      
-     The default for most widgets is fltk3::BACKGROUND_COLOR. Use Fl::set_color()
+     The default for most widgets is fltk3::BACKGROUND_COLOR. Use fltk3::set_color()
      to redefine colors in the color map.
      \param[in] bg background color
      \see color(), color(fltk3::Color, fltk3::Color), selection_color(fltk3::Color)
@@ -481,7 +481,7 @@
     /** Gets the font to use. 
      Fonts are identified by indexes into a table. The default value
      uses a Helvetica typeface (Arial for Microsoft&reg; Windows&reg;).
-     The function Fl::set_font() can define new typefaces.
+     The function fltk3::set_font() can define new typefaces.
      \return current font used by the label
      \see fltk3::Font
      */
@@ -490,7 +490,7 @@
     /** Sets the font to use. 
      Fonts are identified by indexes into a table. The default value
      uses a Helvetica typeface (Arial for Microsoft&reg; Windows&reg;).
-     The function Fl::set_font() can define new typefaces.
+     The function fltk3::set_font() can define new typefaces.
      \param[in] f the new font for the label
      \see fltk3::Font
      */
@@ -790,9 +790,9 @@
     void clear_changed() {flags_ &= ~CHANGED;}
     
     /** Gives the widget the keyboard focus.
-     Tries to make this widget be the Fl::focus() widget, by first sending 
+     Tries to make this widget be the fltk3::focus() widget, by first sending 
      it an fltk3::FOCUS event, and if it returns non-zero, setting 
-     Fl::focus() to this widget. You should use this method to 
+     fltk3::focus() to this widget. You should use this method to 
      assign the focus to a widget.  
      \return true if the widget accepted the focus.
      */
@@ -826,10 +826,10 @@
     
     /** Sets the default callback for all widgets.
      Sets the default callback, which puts a pointer to the widget on the queue 
-     returned by Fl::readqueue(). You may want to call this from your own callback.
+     returned by fltk3::readqueue(). You may want to call this from your own callback.
      \param[in] cb the new callback
      \param[in] d user data associated with that callback
-     \see callback(), do_callback(), Fl::readqueue()
+     \see callback(), do_callback(), fltk3::readqueue()
      */
     static void default_callback(fltk3::Widget *cb, void *d);
     

Modified: branches/branch-3.0/fltk3/Window.h
===================================================================
--- branches/branch-3.0/fltk3/Window.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/Window.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -54,7 +54,7 @@
    double-buffering, overlay, menu, and OpenGL support.
    
    The window's callback is done if the user tries to close a window
-   using the window manager and Fl::modal() is zero or equal to the
+   using the window manager and fltk3::modal() is zero or equal to the
    window. fltk3::Window has a default callback that calls fltk3::Window::hide().
    */
   class FL_EXPORT Window : public Group {
@@ -201,7 +201,7 @@
      remain on top of the other windows (if the X window manager supports
      the "transient for" property).  Several modal windows may be shown at
      once, in which case only the last one shown gets events.  You can see
-     which window (if any) is modal by calling Fl::modal().
+     which window (if any) is modal by calling fltk3::modal().
      */
     void set_modal()	{set_flag(MODAL);}
     /**  Returns true if this window is modal.  */

Modified: branches/branch-3.0/fltk3/draw.h
===================================================================
--- branches/branch-3.0/fltk3/draw.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/draw.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -649,7 +649,7 @@
   first <tt>show()</tt> of \e any window in your program to get rid of
   the dithering if possible:
   \code
-  Fl::visual(fltk3::RGB);
+  fltk3::visual(fltk3::RGB);
   \endcode
 
   Gray scale (1-channel) images may be drawn. This is done if

Modified: branches/branch-3.0/fltk3/enumerations.h
===================================================================
--- branches/branch-3.0/fltk3/enumerations.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/enumerations.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -92,31 +92,31 @@
    Events are identified by the integer argument passed to the 
    fltk3::Widget::handle() virtual method. Other information about the 
    most recent event is stored in static locations and acquired  by 
-   calling the Fl::event_*() methods. This static information remains 
+   calling the fltk3::event_*() methods. This static information remains 
    valid until the next event is read from the window system, so it 
    is ok to look at it outside of the handle() method.
    
-   \sa Fl::event_text(), Fl::event_key(), class Fl::
+   \sa fltk3::event_text(), fltk3::event_key(), class fltk3::
    */
   enum Event {	// events
     /** No event. */
     NO_EVENT		= 0,
     
     /** A mouse button has gone down with the mouse pointing at this
-     widget. You can find out what button by calling Fl::event_button(). 
-     You find out the mouse position by calling Fl::event_x() and
-     Fl::event_y().
+     widget. You can find out what button by calling fltk3::event_button(). 
+     You find out the mouse position by calling fltk3::event_x() and
+     fltk3::event_y().
      
      A widget indicates that it "wants" the mouse click by returning non-zero 
      from its fltk3::Widget::handle() method. It will then become the 
-     Fl::pushed() widget and will get fltk3::DRAG and the matching fltk3::RELEASE events.  
+     fltk3::pushed() widget and will get fltk3::DRAG and the matching fltk3::RELEASE events.  
      If fltk3::Widget::handle() returns zero then FLTK will try sending the fltk3::PUSH 
      to another widget. 
      */
     PUSH		= 1,
     
     /** A mouse button has been released. You can find out what button by 
-     calling Fl::event_button().
+     calling fltk3::event_button().
      
      In order to receive the fltk3::RELEASE event, the widget must return 
      non-zero when handling fltk3::PUSH.
@@ -127,7 +127,7 @@
      be used for highlighting feedback.  If a widget wants to
      highlight or otherwise track the mouse, it indicates this by
      returning non-zero from its handle() method. It then
-     becomes the Fl::belowmouse() widget and will receive 
+     becomes the fltk3::belowmouse() widget and will receive 
      fltk3::MOVE and fltk3::LEAVE events.
      */
     ENTER		= 3,
@@ -139,8 +139,8 @@
     LEAVE		= 4,
     
     /** The mouse has moved with a button held down. The current button state 
-     is in Fl::event_state(). The mouse position is in Fl::event_x() and 
-     Fl::event_y().
+     is in fltk3::event_state(). The mouse position is in fltk3::event_x() and 
+     fltk3::event_y().
      
      In order to receive fltk3::DRAG events, the widget must return non-zero 
      when handling fltk3::PUSH.
@@ -151,27 +151,27 @@
      
      If a widget wants the focus, it should change itself to display the 
      fact that it has the focus, and return non-zero from its handle() method.
-     It then becomes the Fl::focus() widget and gets FL_KEYDOWN, fltk3::KEYUP, 
+     It then becomes the fltk3::focus() widget and gets FL_KEYDOWN, fltk3::KEYUP, 
      and fltk3::UNFOCUS events.
      
      The focus will change either because the window manager changed which 
      window gets the focus, or because the user tried to navigate using tab, 
-     arrows, or other keys. You can check Fl::event_key() to figure out why 
+     arrows, or other keys. You can check fltk3::event_key() to figure out why 
      it moved. For navigation it will be the key pressed and for interaction 
      with the window manager it will be zero.
      */
     FOCUS		= 6,
     
-    /** This event is sent to the previous Fl::focus() widget when another 
+    /** This event is sent to the previous fltk3::focus() widget when another 
      widget gets the focus or the window loses focus.
      */
     UNFOCUS		= 7,
     
     /** A key was pressed (FL_KEYDOWN) or released (fltk3::KEYUP). 
      Fl_KEYBOARD is a synonym for FL_KEYDOWN.
-     The key can be found in Fl::event_key().
-     The text that the key should insert can be found with Fl::event_text() 
-     and its length is in Fl::event_length(). If you use the key handle()
+     The key can be found in fltk3::event_key().
+     The text that the key should insert can be found with fltk3::event_text() 
+     and its length is in fltk3::event_length(). If you use the key handle()
      should return 1. If you return zero then FLTK assumes you ignored the 
      key and will then attempt to send it to a parent widget. If none of 
      them want it, it will change the event into a fltk3::SHORTCUT event.
@@ -180,7 +180,7 @@
      and fltk3::UNFOCUS events.
      
      If you are writing a text-editing widget you may also want to call 
-     the Fl::compose() function to translate individual keystrokes into 
+     the fltk3::compose() function to translate individual keystrokes into 
      non-ASCII characters.
      
      fltk3::KEYUP events are sent to the widget that currently has focus. This 
@@ -207,22 +207,22 @@
     CLOSE		= 10,
     
     /** The mouse has moved without any mouse buttons held down. 
-     This event is sent to the Fl::belowmouse() widget.
+     This event is sent to the fltk3::belowmouse() widget.
      
      In order to receive fltk3::MOVE events, the widget must return 
      non-zero when handling fltk3::ENTER.
      */
     MOVE		= 11,
     
-    /** If the Fl::focus() widget is zero or ignores an fltk3::KEYBOARD
+    /** If the fltk3::focus() widget is zero or ignores an fltk3::KEYBOARD
      event then FLTK tries sending this event to every widget it 
      can, until one of them returns non-zero. fltk3::SHORTCUT is first 
-     sent to the Fl::belowmouse() widget, then its parents and siblings, 
+     sent to the fltk3::belowmouse() widget, then its parents and siblings, 
      and eventually to every widget in the window, trying to find an 
      object that returns non-zero. FLTK tries really hard to not to ignore 
      any keystrokes!
      
-     You can also make "global" shortcuts by using Fl::add_handler(). A 
+     You can also make "global" shortcuts by using fltk3::add_handler(). A 
      global shortcut will work no matter what windows are displayed or 
      which one has the focus.
      */
@@ -256,20 +256,20 @@
      */
     SHOW		= 16,
     
-    /** You should get this event some time after you call Fl::paste(). 
-     The contents of Fl::event_text() is the text to insert and the number 
-     of characters is in Fl::event_length().
+    /** You should get this event some time after you call fltk3::paste(). 
+     The contents of fltk3::event_text() is the text to insert and the number 
+     of characters is in fltk3::event_length().
      */
     PASTE		= 17,
     
-    /** The Fl::selection_owner() will get this event before the selection is 
+    /** The fltk3::selection_owner() will get this event before the selection is 
      moved to another widget. This indicates that some other widget or program 
      has claimed the selection. Motif programs used this to clear the selection 
      indication. Most modern programs ignore this.
      */
     SELECTIONCLEAR	= 18,
     
-    /** The user has moved the mouse wheel. The Fl::event_dx() and Fl::event_dy()
+    /** The user has moved the mouse wheel. The fltk3::event_dx() and fltk3::event_dy()
      methods can be used to find the amount to scroll horizontally and vertically.
      */
     MOUSEWHEEL		= 19,
@@ -327,7 +327,7 @@
    \todo	fltk3::MouseButton and FL_key... constants could be structured better
    (use an enum or some doxygen grouping ?)
    
-   \sa	Fl::event_key() and Fl::get_key(int) (use ascii letters for all other keys):
+   \sa	fltk3::event_key() and fltk3::get_key(int) (use ascii letters for all other keys):
    */
   
   /*@{*/
@@ -377,7 +377,7 @@
    
    These constants define the button numbers for fltk3::PUSH and fltk3::RELEASE events.
    
-   \sa Fl::event_button()
+   \sa fltk3::event_button()
    */
   
   /*@{*/
@@ -391,7 +391,7 @@
   
   /** \name	Event States
    
-   The following constants define bits in the Fl::event_state() value.
+   The following constants define bits in the fltk3::event_state() value.
    */
   
   /*@{*/		// group: Event States
@@ -827,7 +827,7 @@
   
   
   /** FD "when" conditions */
-  enum { // values for "when" passed to Fl::add_fd()
+  enum { // values for "when" passed to fltk3::add_fd()
     READ   = 1, /**< Call the callback when there is data to be read. */
     WRITE  = 4, /**< Call the callback when data can be written without blocking. */
     EXCEPT = 8  /**< Call the callback if an exception occurs on the file. */

Modified: branches/branch-3.0/fltk3/forms.h
===================================================================
--- branches/branch-3.0/fltk3/forms.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/forms.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -170,17 +170,17 @@
 
 typedef void (*FL_IO_CALLBACK) (int, void*);
 inline void fl_add_io_callback(int fd, short w, FL_IO_CALLBACK cb, void* v) {
-  Fl::add_fd(fd,w,cb,v);}
+  fltk3::add_fd(fd,w,cb,v);}
 inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) {
-  Fl::remove_fd(fd);} // removes all the callbacks!
+  fltk3::remove_fd(fd);} // removes all the callbacks!
 
 // type of callback is different and no "id" number is returned:
 inline void fl_add_timeout(long msec, void (*cb)(void*), void* v) {
-  Fl::add_timeout(msec*.001, cb, v);}
+  fltk3::add_timeout(msec*.001, cb, v);}
 inline void fl_remove_timeout(int) {}
 
 // type of callback is different!
-inline void fl_set_idle_callback(void (*cb)()) {Fl::set_idle(cb);}
+inline void fl_set_idle_callback(void (*cb)()) {fltk3::set_idle(cb, 0L);}
 
 FL_EXPORT fltk3::Widget* fl_do_forms(void);
 FL_EXPORT fltk3::Widget* fl_check_forms();
@@ -195,8 +195,8 @@
 inline void fl_freeze_all_forms() {}
 inline void fl_unfreeze_all_forms() {}
 
-inline void fl_set_focus_object(fltk3::Window*, fltk3::Widget* o) {Fl::focus(o);}
-inline void fl_reset_focus_object(fltk3::Widget* o) {Fl::focus(o);}
+inline void fl_set_focus_object(fltk3::Window*, fltk3::Widget* o) {fltk3::focus(o);}
+inline void fl_reset_focus_object(fltk3::Widget* o) {fltk3::focus(o);}
 #define fl_set_object_focus fl_set_focus_object
 
 // void fl_set_form_atclose(fltk3::Window*w,int (*cb)(fltk3::Window*,void*),void* v)
@@ -338,7 +338,7 @@
 
 inline int fl_form_is_visible(fltk3::Window* f) {return f->visible();}
 
-inline int fl_mouse_button() {return Fl::event_button();}
+inline int fl_mouse_button() {return fltk3::event_button();}
 #define fl_mousebutton fl_mouse_button
 
 #define fl_free       free
@@ -371,9 +371,9 @@
   fl_draw(s,x,y,w,h,align);
 }
 
-inline void fl_set_font_name(fltk3::Font n,const char* s) {Fl::set_font(n,s);}
+inline void fl_set_font_name(fltk3::Font n,const char* s) {fltk3::set_font(n,s);}
 
-inline void fl_mapcolor(fltk3::Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);}
+inline void fl_mapcolor(fltk3::Color c, uchar r, uchar g, uchar b) {fltk3::set_color(c,r,g,b);}
 
 #define fl_set_clipping(x,y,w,h) fl_push_clip(x,y,w,h)
 #define fl_unset_clipping() fl_pop_clip()
@@ -485,7 +485,7 @@
 FL_EXPORT Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l);
 inline int fl_get_button(fltk3::Widget* b) {return ((Fl_Button*)b)->value();}
 inline void fl_set_button(fltk3::Widget* b, int v) {((Fl_Button*)b)->value(v);}
-inline int fl_get_button_numb(fltk3::Widget*) {return Fl::event_button();}
+inline int fl_get_button_numb(fltk3::Widget*) {return fltk3::event_button();}
 inline void fl_set_button_shortcut(fltk3::Widget* b, const char* s,int=0) {
     ((Fl_Button*)b)->shortcut(s);}
 //#define fl_set_object_shortcut(b,s) fl_set_button_shortcut(b,s)
@@ -835,8 +835,8 @@
 
 // stuff from DDForms:
 
-inline int fl_double_click() {return Fl::event_clicks();}
-inline void fl_draw() {Fl::flush();}
+inline int fl_double_click() {return fltk3::event_clicks();}
+inline void fl_draw() {fltk3::flush();}
 
 #endif	/* define __FORMS_H__ */
 

Modified: branches/branch-3.0/fltk3/glut.h
===================================================================
--- branches/branch-3.0/fltk3/glut.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/glut.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -242,7 +242,7 @@
 
 // Warning: this cast may not work on all machines:
 inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) {
-  Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);
+  fltk3::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);
 }
 
 inline void glutMenuStateFunc(void (*f)(int state)) {
@@ -371,7 +371,7 @@
 #  define GLUT_ACTIVE_SHIFT               fltk3::SHIFT
 #  define GLUT_ACTIVE_CTRL                fltk3::CTRL
 #  define GLUT_ACTIVE_ALT                 fltk3::ALT
-inline int glutGetModifiers() {return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);}
+inline int glutGetModifiers() {return fltk3::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);}
 
 FL_EXPORT int glutLayerGet(GLenum);
 #  define GLUT_OVERLAY_POSSIBLE		800

Modified: branches/branch-3.0/fltk3/osx.h
===================================================================
--- branches/branch-3.0/fltk3/osx.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/osx.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -65,7 +65,7 @@
 
 // Standard MacOS C/C++ includes...
 #include <ApplicationServices/ApplicationServices.h>
-#undef check // because of Fl::check()
+#undef check // because of fltk3::check()
 
 typedef CGContextRef	Fl_CGContextRef;
 typedef PMPrintSettings Fl_PMPrintSettings;

Modified: branches/branch-3.0/fltk3/run.h
===================================================================
--- branches/branch-3.0/fltk3/run.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/run.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -26,7 +26,7 @@
 //
 
 /** \file
- Fl static class.
+ fltk3 namespace
  */
 
 #ifndef Fl_H
@@ -55,107 +55,107 @@
 struct Fl_Label;
 
 
-/** \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
- @{ */
-
-/** 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);
-
-/** Signature of some label measurement functions passed as parameters */
-typedef void (Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height);
-
-/** Signature of some box drawing functions passed as parameters */
-typedef void (Fl_Box_Draw_F)(int x, int y, int w, int h, fltk3::Color color);
-
-/** Signature of some timeout callback functions passed as parameters */
-typedef void (*Fl_Timeout_Handler)(void *data);
-
-/** Signature of some wakeup callback functions passed as parameters */
-typedef void (*Fl_Awake_Handler)(void *data);
-
-/** Signature of add_idle callback functions passed as parameters */
-typedef void (*Fl_Idle_Handler)(void *data);
-
-/** Signature of set_idle callback functions passed as parameters */
-typedef void (*Fl_Old_Idle_Handler)();
-
-/** Signature of add_fd functions passed as parameters */
-typedef void (*Fl_FD_Handler)(int fd, void *data);
-
-/** Signature of add_handler functions passed as parameters */
-typedef int (*Fl_Event_Handler)(int event);
-
-/** Signature of set_abort functions passed as parameters */
-typedef void (*Fl_Abort_Handler)(const char *format,...);
-
-/** Signature of set_atclose functions passed as parameters */
-typedef void (*Fl_Atclose_Handler)(fltk3::Window *window, void *data);
-
-/** Signature of args functions passed as parameters */
-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) */
-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.
- */
-class FL_EXPORT Fl {
-  Fl() {}; // no constructor!
+namespace fltk3 {
   
-public: // should be private!
+  /** \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 (fltk3::add_handler()), to add a timeout handler
+   (fltk3::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 fltk3::add_handler(), fltk3::add_timeout(), fltk3::repeat_timeout(),
+   fltk3::remove_timeout() and others
+   @{ */
+  
+  /** Signature of some label drawing functions passed as parameters */
+  typedef void (LabelDrawF)(const Fl_Label *label, int x, int y, int w, int h, fltk3::Align align);
+  
+  /** Signature of some label measurement functions passed as parameters */
+  typedef void (LabelMeasureF)(const Fl_Label *label, int &width, int &height);
+  
+  /** Signature of some box drawing functions passed as parameters */
+  typedef void (BoxDrawF)(int x, int y, int w, int h, fltk3::Color color);
+  
+  /** Signature of some timeout callback functions passed as parameters */
+  typedef void (*TimeoutHandler)(void *data);
+  
+  /** Signature of some wakeup callback functions passed as parameters */
+  typedef void (*AwakeHandler)(void *data);
+  
+  /** Signature of add_idle callback functions passed as parameters */
+  typedef void (*IdleHandler)(void *data);
+  
+  /** Signature of set_idle callback functions passed as parameters */
+  typedef void (*OldIdleHandler)();
+  
+  /** Signature of add_fd functions passed as parameters */
+  typedef void (*FDHandler)(int fd, void *data);
+  
+  /** Signature of add_handler functions passed as parameters */
+  typedef int (*EventHandler)(int event);
+  
+  /** Signature of set_abort functions passed as parameters */
+  typedef void (*AbortHandler)(const char *format,...);
+  
+  /** Signature of set_atclose functions passed as parameters */
+  typedef void (*AtcloseHandler)(fltk3::Window *window, void *data);
+  
+  /** Signature of args functions passed as parameters */
+  typedef int (*ArgsHandler)(int argc, char **argv, int &i);
+  
+  /** Signature of event_dispatch functions passed as parameters.
+   \see fltk3::event_dispatch(fltk3::EventDispatch) */
+  typedef int (*EventDispatch)(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.
+   */
+  
+  //public: // should be private!
 #ifndef FL_DOXYGEN
-  static int e_number;
-  static int e_x;
-  static int e_y;
-  static int e_x_root;
-  static int e_y_root;
-  static int e_dx;
-  static int e_dy;
-  static int e_state;
-  static int e_clicks;
-  static int e_is_click;
-  static int e_keysym;
-  static char* e_text;
-  static int e_length;
-  static Fl_Event_Dispatch e_dispatch;
-  static fltk3::Widget* belowmouse_;
-  static fltk3::Widget* pushed_;
-  static fltk3::Widget* focus_;
-  static int damage_;
-  static fltk3::Widget* selection_owner_;
-  static fltk3::Window* modal_;
-  static fltk3::Window* grab_;
-  static int compose_state;
+  extern int e_number;
+  extern int e_x;
+  extern int e_y;
+  extern int e_x_root;
+  extern int e_y_root;
+  extern int e_dx;
+  extern int e_dy;
+  extern int e_state;
+  extern int e_clicks;
+  extern int e_is_click;
+  extern int e_keysym;
+  extern char* e_text;
+  extern int e_length;
+  extern fltk3::EventDispatch e_dispatch;
+  extern fltk3::Widget* belowmouse_;
+  extern fltk3::Widget* pushed_;
+  extern fltk3::Widget* focus_;
+  extern int damage_;
+  extern fltk3::Widget* selection_owner_;
+  extern fltk3::Window* modal_;
+  extern fltk3::Window* grab_;
+  extern int compose_state;
 #endif
   /**
    If true then flush() will do something.
    */
-  static void damage(int d) {damage_ = d;}
+  inline void damage(int d) {damage_ = d;}
   
-public:
+  //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)
+   \see fltk3::option(Fl_Option, bool)
+   \see fltk3::option(Fl_Option)
    */
   typedef enum {
     /// When switched on, moving the text cursor beyond the start or end of
@@ -191,21 +191,21 @@
     OPTION_LAST
   } Fl_Option;
   
-private:  
-  static unsigned char options_[OPTION_LAST];
-  static unsigned char options_read_;
+  //private:  
+  extern unsigned char options_[OPTION_LAST];
+  extern unsigned char options_read_;
   
-public:  
+  //public:  
   /*
    Return a global setting for all FLTK applications, possibly overridden
    by a setting specifically for this application.
    */
-  static bool option(Fl_Option opt);
+  bool option(Fl_Option opt);
   
   /*
    Override an option while the application is running.
    */
-  static void option(Fl_Option opt, bool val);
+  void option(Fl_Option opt, bool val);
   
   /**
    The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
@@ -214,45 +214,45 @@
    idle callback functions to be called.
    \see add_idle(), remove_idle()
    */
-  static void (*idle)();
+  extern void (*idle)();
   
 #ifndef FL_DOXYGEN
-  static Fl_Awake_Handler *awake_ring_;
-  static void **awake_data_;
-  static int awake_ring_size_;
-  static int awake_ring_head_;
-  static int awake_ring_tail_;
-  static const char* scheme_;
-  static Fl_Image* scheme_bg_;
+  extern fltk3::AwakeHandler *awake_ring_;
+  extern void **awake_data_;
+  extern int awake_ring_size_;
+  extern int awake_ring_head_;
+  extern int awake_ring_tail_;
+  extern const char* scheme_;
+  extern Fl_Image* scheme_bg_;
   
-  static int e_original_keysym; // late addition
-  static int scrollbar_size_;
+  extern int e_original_keysym; // late addition
+  extern int scrollbar_size_;
 #endif
   
   
-  static int add_awake_handler_(Fl_Awake_Handler, void*);
-  static int get_awake_handler_(Fl_Awake_Handler&, void*&);
+  int add_awake_handler_(fltk3::AwakeHandler, void*);
+  int get_awake_handler_(fltk3::AwakeHandler&, void*&);
   
-public:
+  //public:
   
   // API version number
-  static double version();
+  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);
+  int arg(int argc, char **argv, int& i);
+  int args(int argc, char **argv, int& i, fltk3::ArgsHandler cb = 0);
+  void args(int argc, char **argv);
   /**
-   Usage string displayed if Fl::args() detects an invalid argument.
+   Usage string displayed if fltk3::args() detects an invalid argument.
    This may be changed to point to customized text at run-time.
    */
-  static const char* const help;
+  extern const char* const help;
   
   // things called by initialization:
-  static void display(const char*);
-  static int visual(int);
+  void display(const char*);
+  int visual(int);
   /**
-   This does the same thing as Fl::visual(int) but also requires OpenGL
+   This does the same thing as fltk3::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
@@ -260,42 +260,42 @@
    
    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);
+  int gl_visual(int, int *alist=0); // platform dependent
+  void own_colormap();
+  void get_system_colors();
+  void foreground(uchar, uchar, uchar);
+  void background(uchar, uchar, uchar);
+  void background2(uchar, uchar, uchar);
   
   // schemes:
-  static int scheme(const char*);
+  int scheme(const char*);
   /** See void scheme(const char *name) */
-  static const char* scheme() {return scheme_;}
+  inline 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) 
    */
-  static int reload_scheme(); // platform dependent
-  static int scrollbar_size();
-  static void scrollbar_size(int W);
+  int reload_scheme(); // platform dependent
+  int scrollbar_size();
+  void scrollbar_size(int W);
   
   // execution:
-  static int wait();
-  static double wait(double time);
-  static int check();
-  static int ready();
-  static int run();
-  static fltk3::Widget* readqueue();
+  int wait();
+  double wait(double time);
+  int check();
+  int ready();
+  int run();
+  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.
+   fltk3::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().
+   callback use fltk3::remove_timeout().
    
-   If you need more accurate, repeated timeouts, use Fl::repeat_timeout() to
+   If you need more accurate, repeated timeouts, use fltk3::repeat_timeout() to
    reschedule the subsequent timeouts.
    
    The following code will print "TICK" each second on
@@ -304,16 +304,16 @@
    \code
    void callback(void*) {
    puts("TICK");
-   Fl::repeat_timeout(1.0, callback);
+   fltk3::repeat_timeout(1.0, callback);
    }
    
    int main() {
-   Fl::add_timeout(1.0, callback);
-   return Fl::run();
+   fltk3::add_timeout(1.0, callback);
+   return fltk3::run();
    }
    \endcode
    */
-  static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent
+  void add_timeout(double t, fltk3::TimeoutHandler,void* = 0); // platform dependent
   /**
    Repeats a timeout callback from the expiration of the
    previous timeout, allowing for more accurate timing. You may only call
@@ -325,25 +325,25 @@
    \code
    void callback(void*) {
    puts("TICK");
-   Fl::repeat_timeout(1.0, callback);
+   fltk3::repeat_timeout(1.0, callback);
    }
    
    int main() {
-   Fl::add_timeout(1.0, callback);
-   return Fl::run();
+   fltk3::add_timeout(1.0, callback);
+   return fltk3::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);
-  static void add_check(Fl_Timeout_Handler, void* = 0);
-  static int  has_check(Fl_Timeout_Handler, void* = 0);
-  static void remove_check(Fl_Timeout_Handler, void* = 0);
+  void repeat_timeout(double t, fltk3::TimeoutHandler, void* = 0); // platform dependent
+  int  has_timeout(fltk3::TimeoutHandler, void* = 0);
+  void remove_timeout(fltk3::TimeoutHandler, void* = 0);
+  void add_check(fltk3::TimeoutHandler, void* = 0);
+  int  has_check(fltk3::TimeoutHandler, void* = 0);
+  void remove_check(fltk3::TimeoutHandler, void* = 0);
   /**
    Adds file descriptor fd to listen to.
    
-   When the fd becomes ready for reading Fl::wait() will call the
+   When the fd becomes ready for reading fltk3::wait() will call the
    callback and then return. The callback is passed the fd and the
    arbitrary void* argument.
    
@@ -352,32 +352,32 @@
    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
+   fltk3::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
+  void add_fd(int fd, int when, fltk3::FDHandler cb, void* = 0); // platform dependent
+  /** See void add_fd(int fd, int when, fltk3::FDHandler cb, void* = 0) */
+  void add_fd(int fd, fltk3::FDHandler cb, void* = 0); // platform dependent
   /** Removes a file descriptor handler. */
-  static void remove_fd(int, int when); // platform dependent
+  void remove_fd(int, int when); // platform dependent
   /** Removes a file descriptor handler. */
-  static void remove_fd(int); // platform dependent
+  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);
+  void add_idle(fltk3::IdleHandler cb, void* data = 0);
+  int  has_idle(fltk3::IdleHandler cb, void* data = 0);
+  void remove_idle(fltk3::IdleHandler cb, void* data = 0);
   /** If true then flush() will do something. */
-  static int damage() {return damage_;}
-  static void redraw();
-  static void flush();
+  inline int damage() {return damage_;}
+  void redraw();
+  void flush();
   /** \addtogroup group_comdlg
    @{ */
   /**
-   FLTK calls Fl::warning() to output a warning message.
+   FLTK calls fltk3::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
@@ -388,15 +388,15 @@
    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
+   fltk3::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*, ...);
+  extern void (*warning)(const char*, ...);
   /**
-   FLTK calls Fl::error() to output a normal error message.
+   FLTK calls fltk3::error() to output a normal error message.
    
    The default version on Windows displays the error message in a MessageBox window.
    
@@ -405,13 +405,13 @@
    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
+   fltk3::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*, ...);
+  extern void (*error)(const char*, ...);
   /**
-   FLTK calls Fl::fatal() to output a fatal error message.
+   FLTK calls fltk3::fatal() to output a fatal error message.
    
    The default version on Windows displays the error message in a MessageBox window.
    
@@ -420,21 +420,21 @@
    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
+   fltk3::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*, ...);
+  extern void (*fatal)(const char*, ...);
   /** @} */
   
   /** \defgroup  fl_windows Windows handling functions
    \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*);
+  fltk3::Window* first_window();
+  void first_window(fltk3::Window*);
+  fltk3::Window* next_window(const fltk3::Window*);
   
   /**
    Returns the top-most modal() window currently shown.
@@ -445,13 +445,13 @@
    for all events, and no other windows will have handle()
    called (grab() overrides this).
    */
-  static fltk3::Window* modal() {return modal_;}
+  inline 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_;}
+  inline Window* grab() {return grab_;}
   /** Selects the window to grab.  
    This is used when pop-up menu systems are active.
    
@@ -468,7 +468,7 @@
    These are designed to make menus popup reliably
    and faster on the system.
    
-   To turn off grabbing do Fl::grab(0).
+   To turn off grabbing do fltk3::grab(0).
    
    <I>Be careful that your program does not enter an infinite loop
    while grab() is on.  On X this will lock up your screen!</I>
@@ -476,7 +476,7 @@
    limit mouse pointer grabbing to the time during which a mouse button 
    is held down. Some OS's may not support grabbing at all.
    */
-  static void grab(fltk3::Window*); // platform dependent
+  void grab(fltk3::Window*); // platform dependent
   /** @} */
   
   /** \defgroup fl_events Events handling functions
@@ -489,50 +489,50 @@
    to determine if a callback is being done in response to a
    keypress, mouse click, etc.
    */
-  static int event()		{return e_number;}
+  inline int event()		{return e_number;}
   /**
    Returns the mouse position of the event relative to the fltk3::Window
    it was passed to.
    */
-  static int event_x()	{return e_x;}
+  inline int event_x()	{return e_x;}
   /**
    Returns the mouse position of the event relative to the fltk3::Window
    it was passed to.
    */
-  static int event_y()	{return e_y;}
+  inline 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().
    */
-  static int event_x_root()	{return e_x_root;}
+  inline 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().
    */
-  static int event_y_root()	{return e_y_root;}
+  inline int event_y_root()	{return e_y_root;}
   /**
    Returns the current horizontal mouse scrolling associated with the
    fltk3::MOUSEWHEEL event. Right is positive.
    */
-  static int event_dx()	{return e_dx;}
+  inline int event_dx()	{return e_dx;}
   /**
    Returns the current vertical mouse scrolling associated with the
    fltk3::MOUSEWHEEL event. Down is positive.
    */
-  static int event_dy()	{return e_dy;}
+  inline 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
+   the server.  You should use fltk3::event_x_root() and 
+   fltk3::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
+  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".  
@@ -541,15 +541,15 @@
    again while event_is_click() is true.
    
    */
-  static int event_clicks()	{return e_clicks;}
+  inline int event_clicks()	{return e_clicks;}
   /**
-   Manually sets the number returned by Fl::event_clicks().  
+   Manually sets the number returned by fltk3::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;}
+  inline 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 
@@ -557,21 +557,21 @@
    "click".  You can test this on fltk3::DRAG, fltk3::RELEASE,
    and fltk3::MOVE events.  
    */
-  static int event_is_click()	{return e_is_click;}
+  inline int event_is_click()	{return e_is_click;}
   /**
-   Clears the value returned by Fl::event_is_click().  
+   Clears the value returned by fltk3::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;}
+  inline 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()
+   \see fltk3::event_buttons()
    */
-  static int event_button()	{return e_keysym-fltk3::MouseButton;}
+  inline 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
@@ -595,21 +595,21 @@
    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;}
+  inline int event_state()	{return e_state;}
   /** See int event_state() */
-  static int event_state(int i) {return e_state&i;}
+  inline 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.
+   numeric keypad with numlock on, fltk3::event_key() may return the 'key code'
+   for this key, and NOT the character '5'. To always get the '5', use fltk3::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;}
+  inline int event_key()	{return e_keysym;}
   /**
    Returns the keycode of the last key event, regardless of the NumLock state.
    
@@ -618,15 +618,15 @@
    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;}
+  inline 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>.
+   fltk3::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).
+   slower than fltk3::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
@@ -651,66 +651,66 @@
    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().
+   symbols used by fltk3::event_state().
    
-   On X Fl::get_key(fltk3::MouseButton+n) does not work.
+   On X fltk3::get_key(fltk3::MouseButton+n) does not work.
    
-   On WIN32 Fl::get_key(fltk3::KPEnterKey) and Fl::event_key(fltk3::KPEnterKey) do not work.
+   On WIN32 fltk3::get_key(fltk3::KPEnterKey) and fltk3::event_key(fltk3::KPEnterKey) do not work.
    */
-  static int event_key(int key);
+  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)
+   slower than fltk3::event_key(int). \see event_key(int)
    */
-  static int get_key(int key); // platform dependent
+  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()
+   When responding to fltk3::KEYUP/FL_KEYDOWN, use this function instead of fltk3::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,
+   However, see fltk3::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;}
+  inline const char* event_text() {return e_text;}
   /**
-   Returns the length of the text in Fl::event_text(). There
+   Returns the length of the text in fltk3::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;}
+  inline 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);
+  int compose(int &del);
+  void compose_reset();
+  int event_inside(int,int,int,int);
+  int event_inside(const fltk3::Widget*);
+  int test_shortcut(Fl_Shortcut);
   
   // event destinations:
-  static int handle(int, fltk3::Window*);
-  static int handle_(int, fltk3::Window*);
+  int handle(int, fltk3::Window*);
+  int handle_(int, fltk3::Window*);
   /**  Gets the widget that is below the mouse. 
    \see  belowmouse(fltk3::Widget*) */
-  static fltk3::Widget* belowmouse() {return belowmouse_;}
-  static void belowmouse(fltk3::Widget*);
+  inline fltk3::Widget* belowmouse() {return belowmouse_;}
+  void belowmouse(fltk3::Widget*);
   /** Gets the widget that is being pushed.
    \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*) */
-  static fltk3::Widget* focus()	{return focus_;}
-  static void focus(fltk3::Widget*);
-  static void add_handler(Fl_Event_Handler h);
-  static void remove_handler(Fl_Event_Handler h);
-  static void event_dispatch(Fl_Event_Dispatch d);
-  static Fl_Event_Dispatch event_dispatch();
+  inline fltk3::Widget* pushed()	{return pushed_;}
+  void pushed(fltk3::Widget*);
+  /** Gets the current fltk3::focus() widget. \sa fltk3::focus(fltk3::Widget*) */
+  inline fltk3::Widget* focus()	{return focus_;}
+  void focus(fltk3::Widget*);
+  void add_handler(fltk3::EventHandler h);
+  void remove_handler(fltk3::EventHandler h);
+  void event_dispatch(fltk3::EventDispatch d);
+  fltk3::EventDispatch event_dispatch();
   /** @} */
   
   /** \defgroup  fl_clipboard  Selection & Clipboard functions
@@ -726,13 +726,13 @@
    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
+  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().
+   time in the future with the data from the specified \p source in fltk3::event_text()
+   and the number of characters in fltk3::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
@@ -744,7 +744,7 @@
    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
+  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
@@ -752,45 +752,45 @@
    will be marked as <i>text</i>.
    
    Create a selection first using:
-   Fl::copy(const char *stuff, int len, 0)
+   fltk3::copy(const char *stuff, int len, 0)
    */
-  static int dnd(); // platform dependent
+  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*) */
-  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);
+  inline fltk3::Widget* selection_owner() {return selection_owner_;}
+  void selection_owner(fltk3::Widget*);
+  void selection(fltk3::Widget &owner, const char*, int len);
+  void paste(fltk3::Widget &receiver);
   /** @} */
   /** \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
+  int x(); // platform dependent
   /** Returns the origin of the current screen, where 0 indicates the top edge of the screen. */
-  static int y(); // platform dependent
+  int y(); // platform dependent
   /** Returns the width of the screen in pixels. */
-  static int w(); // platform dependent
+  int w(); // platform dependent
   /** Returns the height of the screen in pixels. */
-  static int h(); // platform dependent
+  int h(); // platform dependent
   
   // multi-head support:
-  static int screen_count();
+  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) 
    */
-  static void screen_xywh(int &X, int &Y, int &W, int &H) {
+  void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
+  void screen_xywh(int &X, int &Y, int &W, int &H, int n); 
+  void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
+  void screen_dpi(float &h, float &v, int n=0);
+  inline void screen_xywh(int &X, int &Y, int &W, int &H) {
     screen_xywh(X, Y, W, H, e_x_root, e_y_root);
   }
-  static 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, 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);
   
   /**   @} */
   
@@ -800,23 +800,23 @@
    @{ */
   
   // color map:
-  static void	set_color(fltk3::Color, uchar, uchar, uchar);
+  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.
    */
-  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);
+  void	set_color(fltk3::Color i, unsigned c); // platform dependent
+  unsigned get_color(fltk3::Color i);
+  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.
    */
-  static void	free_color(fltk3::Color i, int overlay = 0); // platform dependent
+  void	free_color(fltk3::Color i, int overlay = 0); // platform dependent
   
   // fonts:
-  static const char* get_font(fltk3::Font);
+  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
@@ -829,7 +829,7 @@
    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);
+  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
@@ -841,9 +841,9 @@
    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);
+  int get_font_sizes(fltk3::Font, int*& sizep);
+  void set_font(fltk3::Font, const char*);
+  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
@@ -862,7 +862,7 @@
    
    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
+  fltk3::Font set_fonts(const char* = 0); // platform dependent
   
   /**   @} */
   /** \defgroup  fl_drawings  Drawing functions
@@ -874,67 +874,67 @@
   /** @} */
   
   // labeltypes:
-  static void set_labeltype(fltk3::Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
+  void set_labeltype(fltk3::Labeltype,fltk3::LabelDrawF*,fltk3::LabelMeasureF*);
   /** Sets the functions to call to draw and measure a specific labeltype. */
-  static void set_labeltype(fltk3::Labeltype, fltk3::Labeltype from); // is it defined ?
+  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);
-  static void set_boxtype(fltk3::Boxtype, fltk3::Boxtype from);
-  static int box_dx(fltk3::Boxtype);
-  static int box_dy(fltk3::Boxtype);
-  static int box_dw(fltk3::Boxtype);
-  static int box_dh(fltk3::Boxtype);
-  static int draw_box_active();
+  fltk3::BoxDrawF *get_boxtype(fltk3::Boxtype);
+  void set_boxtype(fltk3::Boxtype, fltk3::BoxDrawF*,uchar,uchar,uchar,uchar);
+  void set_boxtype(fltk3::Boxtype, fltk3::Boxtype from);
+  int box_dx(fltk3::Boxtype);
+  int box_dy(fltk3::Boxtype);
+  int box_dw(fltk3::Boxtype);
+  int box_dh(fltk3::Boxtype);
+  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
+  /** For back compatibility, sets the void fltk3::fatal handler callback */
+  inline void set_abort(fltk3::AbortHandler f) {fatal = f;}
+  extern void (*atclose)(fltk3::Window*,void*);
+  void default_atclose(fltk3::Window*,void*);
+  /** For back compatibility, sets the fltk3::atclose handler callback. You
    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;}
+  inline void set_atclose(fltk3::AtcloseHandler f) {atclose = f;}
   /**   @} */
   
   /** \addtogroup fl_events 
    @{ */
   /** Returns non-zero if the Shift key is pressed. */
-  static int event_shift() {return e_state&fltk3::SHIFT;}
+  inline int event_shift() {return e_state&fltk3::SHIFT;}
   /** Returns non-zero if the Control key is pressed. */
-  static int event_ctrl() {return e_state&fltk3::CTRL;}
+  inline int event_ctrl() {return e_state&fltk3::CTRL;}
   /** Returns non-zero if the fltk3::COMMAND key is pressed, either fltk3::CTRL or on OSX fltk3::META. */
-  static int event_command() {return e_state&fltk3::COMMAND;}
+  inline int event_command() {return e_state&fltk3::COMMAND;}
   /** Returns non-zero if the Alt key is pressed. */
-  static int event_alt() {return e_state&fltk3::ALT;}
+  inline 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.
+   caused an fltk3::RELEASE event, you can use fltk3::event_button() instead.
    \return a bit mask value like { [fltk3::BUTTON1] | [fltk3::BUTTON2] | [fltk3::BUTTON3] }
    */
-  static int event_buttons() {return e_state&0x7f000000;}
+  inline 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().
+   For more details, see fltk3::event_buttons().
    */
-  static int event_button1() {return e_state&fltk3::BUTTON1;}
+  inline 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().
+   For more details, see fltk3::event_buttons().
    */
-  static int event_button2() {return e_state&fltk3::BUTTON2;}
+  inline 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().
+   For more details, see fltk3::event_buttons().
    */
-  static int event_button3() {return e_state&fltk3::BUTTON3;}
+  inline int event_button3() {return e_state&fltk3::BUTTON3;}
   /**   @} */
   
   /**
@@ -942,13 +942,14 @@
    
    \deprecated This method is obsolete - use the add_idle() method instead.
    */
-  static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
+  inline void set_idle(fltk3::OldIdleHandler cb) {idle = cb;}
+  
   /** See grab(fltk3::Window*) */
-  static void grab(fltk3::Window& win) {grab(&win);}
+  inline void grab(fltk3::Window& win) {grab(&win);}
   /** Releases the current grabbed window, equals grab(0).
-   \deprecated Use Fl::grab(0) instead.
+   \deprecated Use fltk3::grab(0) instead.
    \see grab(fltk3::Window*) */
-  static void release() {grab(0);}
+  inline void release() {grab(0);}
   
   // Visible focus methods...
   /**
@@ -956,13 +957,13 @@
    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)); }
+  inline 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.
    */
-  static int  visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
+  inline int  visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
   
   // Drag-n-drop text operation methods...
   /**
@@ -971,38 +972,38 @@
    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)); }
+  inline 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.
    */
-  static int  dnd_text_ops() { return option(OPTION_DND_TEXT); }
+  inline int  dnd_text_ops() { return option(OPTION_DND_TEXT); }
   /** \defgroup fl_multithread Multithreading support functions
    fl multithreading support functions declared in <fltk3/run.h>
    @{ */
   
   // Multithreading support:
-  static int lock();
-  static void unlock();
-  static void awake(void* message = 0);
+  int lock();
+  void unlock();
+  void awake(void* message = 0);
   /** See void awake(void* message=0). */
-  static int awake(Fl_Awake_Handler cb, void* message = 0);
+  int awake(fltk3::AwakeHandler 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
    */
-  static void* thread_message(); // platform dependent
+  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
+   fltk3::delete_widget() should be called when deleting widgets
    or complete widget trees (fltk3::Group, fltk3::Window, ...) inside
    callbacks.
    
@@ -1014,34 +1015,34 @@
    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
+   - fltk3::delete_widget() schedules widgets for deletion
+   - fltk3::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
+   - fltk3::watch_widget_pointer() adds a widget pointer to the watch list
+   - fltk3::release_widget_pointer() removes a widget pointer from the watch list
+   - fltk3::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 constructor calls fltk3::watch_widget_pointer()
+   - the destructor calls fltk3::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);
-  static void do_widget_deletion();
-  static void watch_widget_pointer(fltk3::Widget *&w);
-  static void release_widget_pointer(fltk3::Widget *&w);
-  static void clear_widget_pointer(fltk3::Widget const *w);
+  void delete_widget(fltk3::Widget *w);
+  void do_widget_deletion();
+  void watch_widget_pointer(fltk3::Widget *&w);
+  void release_widget_pointer(fltk3::Widget *&w);
+  void clear_widget_pointer(fltk3::Widget const *w);
   /** @} */
   
 #ifdef FLTK_HAVE_CAIRO
   /** \defgroup group_cairo Cairo support functions and classes 
    @{ 
    */
-public:
+  //public:
   // Cairo support API
-  static cairo_t * cairo_make_current(fltk3::Window* w);
+  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
@@ -1052,11 +1053,11 @@
    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.
+   In this last case, you don't need anymore to call fltk3::cairo_make_current().
+   You can use fltk3::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);}
+  inline 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. 
@@ -1064,28 +1065,24 @@
    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();}
+  inline 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(); }
+  inline 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
    */
-  static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); } 
+  inline 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:
+  //private:
+  cairo_t * cairo_make_current(void* gc);
+  cairo_t * cairo_make_current(void* gc, int W, int H);
+  extern Fl_Cairo_State cairo_state_;
+  //public:
   /** @} */ 
   
 #endif // FLTK_HAVE_CAIRO
   
-};
-
-namespace fltk3 {
-  
   /**
    This class should be used to control safe widget deletion.
    
@@ -1093,7 +1090,7 @@
    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
+   fltk3::watch_widget_pointer() and fltk3::release_widget_pointer() and
    makes their use more reliable, because the destructor autmatically
    releases the widget pointer from the widget watch list.
    

Modified: branches/branch-3.0/fltk3/x.h
===================================================================
--- branches/branch-3.0/fltk3/x.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fltk3/x.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -87,7 +87,7 @@
 // feed events into fltk:
 FL_EXPORT int fl_handle(const XEvent&);
 
-// you can use these in Fl::add_handler() to look at events:
+// you can use these in fltk3::add_handler() to look at events:
 extern FL_EXPORT const XEvent* fl_xevent;
 extern FL_EXPORT ulong fl_event_time;
 
@@ -96,7 +96,7 @@
 #   define fl_create_offscreen(w,h) \
   XCreatePixmap(fl_display, \
 	      (Fl_Surface_Device::surface()->class_name() == Fl_Display_Device::class_id ? \
-	      fl_window : fl_xid(Fl::first_window()) ) , \
+	      fl_window : fl_xid(fltk3::first_window()) ) , \
 	      w, h, fl_visual->depth)
 // begin/end are macros that save the old state in local variables:
 #    define fl_begin_offscreen(pixmap) \

Modified: branches/branch-3.0/fluid/Fl_Function_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Function_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Function_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -190,10 +190,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == f_panel_cancel) goto BREAK2;
       else if (w == f_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     const char*c = f_name_input->value();
     while (isspace(*c)) c++;
@@ -407,7 +407,7 @@
   
   if (ismain()) {
     if (havewidgets) write_c("  %s->show(argc, argv);\n", var);
-    if (havechildren) write_c("  return Fl::run();\n");
+    if (havechildren) write_c("  return fltk3::run();\n");
   } else if (havewidgets && !constructor && !return_type) {
     write_c("  return %s;\n", var);
   }
@@ -451,10 +451,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == code_panel_cancel) goto BREAK2;
       else if (w == code_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     char*c = code_input->buffer()->text();
     message = c_check(c); if (message) continue;
@@ -526,10 +526,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == codeblock_panel_cancel) goto BREAK2;
       else if (w == codeblock_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     const char*c = code_before_input->value();
     message = c_check(c); if (message) continue;
@@ -630,10 +630,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == decl_panel_cancel) goto BREAK2;
       else if (w == decl_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     const char*c = decl_input->value();
     while (isspace(*c)) c++;
@@ -788,7 +788,7 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == data_panel_cancel) goto BREAK2;
       else if (w == data_panel_ok) break;
       else if (w == data_filebrowser) {
@@ -801,7 +801,7 @@
           data_filename->value(fn);
         }
       }
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     // store the variable name:
     const char*c = data_input->value();
@@ -989,10 +989,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == declblock_panel_cancel) goto BREAK2;
       else if (w == declblock_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     const char*c = decl_before_input->value();
     while (isspace(*c)) c++;
@@ -1112,7 +1112,7 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == comment_panel_cancel) goto BREAK2;
       else if (w == comment_panel_ok) break;
       else if (w == comment_predefined) {
@@ -1180,7 +1180,7 @@
           }
         }
       }
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     char*c = comment_input->buffer()->text();
     name(c);
@@ -1368,10 +1368,10 @@
   for (;;) { // repeat as long as there are errors
     if (message) fl_alert("%s", message);
     for (;;) {
-      fltk3::Widget* w = Fl::readqueue();
+      fltk3::Widget* w = fltk3::readqueue();
       if (w == c_panel_cancel) goto BREAK2;
       else if (w == c_panel_ok) break;
-      else if (!w) Fl::wait();
+      else if (!w) fltk3::wait();
     }
     const char*c = c_name_input->value();
     char *s = strdup(c);

Modified: branches/branch-3.0/fluid/Fl_Group_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Group_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Group_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -255,8 +255,8 @@
   int changed = (a!=t->value());
   // okay, run the tabs ui until they let go of mouse:
   t->handle(fltk3::PUSH);
-  Fl::pushed(t);
-  while (Fl::pushed()==t) Fl::wait();
+  fltk3::pushed(t);
+  while (fltk3::pushed()==t) fltk3::wait();
   if (changed) set_modflag(1);
   return (Fl_Type*)(t->value()->user_data());
 }

Modified: branches/branch-3.0/fluid/Fl_Menu_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Menu_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -449,7 +449,7 @@
   if (!menusize) return 0;
   const Fl_Menu_Item* save = w->mvalue();
   w->value((Fl_Menu_Item*)0);
-  Fl::pushed(w);
+  fltk3::pushed(w);
   w->handle(fltk3::PUSH);
   const Fl_Menu_Item* m = w->mvalue();
   if (m) {
@@ -551,7 +551,7 @@
   if (!menusize) return 0;
   const Fl_Menu_Item* save = w->mvalue();
   w->value((Fl_Menu_Item*)0);
-  Fl::pushed(w);
+  fltk3::pushed(w);
   w->handle(fltk3::PUSH);
   const Fl_Menu_Item* m = w->mvalue();
   if (m) {
@@ -591,15 +591,15 @@
   when(0); type(FL_TOGGLE_BUTTON);
   if (e == fltk3::KEYBOARD) {
     if (!value()) return 0;
-    int v = Fl::event_text()[0];
+    int v = fltk3::event_text()[0];
     if ( (v > 32 && v < 0x7f) || (v > 0xa0 && v <= 0xff) ) {
       if (isupper(v)) {
         v = tolower(v);
         v |= fltk3::SHIFT;
       }
-      v = v | (Fl::event_state()&(fltk3::META|fltk3::ALT|fltk3::CTRL));
+      v = v | (fltk3::event_state()&(fltk3::META|fltk3::ALT|fltk3::CTRL));
     } else {
-      v = (Fl::event_state()&(fltk3::META|fltk3::ALT|fltk3::CTRL|fltk3::SHIFT)) | Fl::event_key();
+      v = (fltk3::event_state()&(fltk3::META|fltk3::ALT|fltk3::CTRL|fltk3::SHIFT)) | fltk3::event_key();
       if (v == fltk3::BackSpaceKey && svalue) v = 0;
     }
     if (v != svalue) {svalue = v; set_changed(); redraw(); do_callback(); }
@@ -611,7 +611,7 @@
     return value();
   } else {
     int r = Fl_Button::handle(e);
-    if (e == fltk3::RELEASE && value() && Fl::focus() != this) take_focus();
+    if (e == fltk3::RELEASE && value() && fltk3::focus() != this) take_focus();
     return r;
   }
 }

Modified: branches/branch-3.0/fluid/Fl_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -405,11 +405,11 @@
   int X,Y,W,H; bbox(X,Y,W,H);
   switch (e) {
   case fltk3::PUSH:
-    if (!Fl::event_inside(X,Y,W,H)) break;
-    l = (Fl_Type*)find_item(Fl::event_y());
+    if (!fltk3::event_inside(X,Y,W,H)) break;
+    l = (Fl_Type*)find_item(fltk3::event_y());
     if (l) {
       X += 12*l->level + 18 - hposition();
-      if (l->is_parent() && Fl::event_x()>X && Fl::event_x()<X+13) {
+      if (l->is_parent() && fltk3::event_x()>X && fltk3::event_x()<X+13) {
 	title = pushedtitle = l;
 	redraw_line(l);
 	return 1;
@@ -418,10 +418,10 @@
     break;
   case fltk3::DRAG:
     if (!title) break;
-    l = (Fl_Type*)find_item(Fl::event_y());
+    l = (Fl_Type*)find_item(fltk3::event_y());
     if (l) {
       X += 12*l->level + 18 - hposition();
-      if (l->is_parent() && Fl::event_x()>X && Fl::event_x()<X+13) ;
+      if (l->is_parent() && fltk3::event_x()>X && fltk3::event_x()<X+13) ;
       else l = 0;
     }
     if (l != pushedtitle) {
@@ -432,8 +432,8 @@
     return 1;
   case fltk3::RELEASE:
     if (!title) {
-      l = (Fl_Type*)find_item(Fl::event_y());
-      if (l && l->new_selected && (Fl::event_clicks() || Fl::event_state(fltk3::CTRL)))
+      l = (Fl_Type*)find_item(fltk3::event_y());
+      if (l && l->new_selected && (fltk3::event_clicks() || fltk3::event_state(fltk3::CTRL)))
 	l->open();
       break;
     }

Modified: branches/branch-3.0/fluid/Fl_Type.h
===================================================================
--- branches/branch-3.0/fluid/Fl_Type.h	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Type.h	2011-05-17 15:17:01 UTC (rev 8680)
@@ -721,7 +721,7 @@
 public:
   virtual void ideal_size(int &w, int &h) {
     Fl_Widget_Type::ideal_size(w, h);
-    int w1 = o->h() - Fl::box_dh(o->box());
+    int w1 = o->h() - fltk3::box_dh(o->box());
     if (w1 > 20) w1 = 20;
     w1 = (w1 - 4) / 3;
     if (w1 < 1) w1 = 1;
@@ -759,9 +759,9 @@
     Fl_Input_Choice *myo = (Fl_Input_Choice *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
-    w = o->w() - 20 - Fl::box_dw(o->box());
+    w = o->w() - 20 - fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + 20 + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + 20 + fltk3::box_dw(o->box());
     if (h < 15) h = 15;
     if (w < (15 + h)) w = 15 + h;
   }
@@ -786,7 +786,7 @@
 public:
   virtual void ideal_size(int &w, int &h) {
     w = o->window()->w();
-    h = ((o->labelsize() + Fl::box_dh(o->box()) + 4) / 5) * 5;
+    h = ((o->labelsize() + fltk3::box_dh(o->box()) + 4) / 5) * 5;
     if (h < 15) h = 15;
   }
   virtual const char *type_name() {return "Fl_Menu_Bar";}

Modified: branches/branch-3.0/fluid/Fl_Widget_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Widget_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -82,8 +82,8 @@
   h = o->labelsize();
   o->measure_label(w, h);
 
-  w += Fl::box_dw(o->box());
-  h += Fl::box_dh(o->box());
+  w += fltk3::box_dw(o->box());
+  h += fltk3::box_dh(o->box());
 
   if (w < 15) w = 15;
   if (h < 15) h = 15;
@@ -518,7 +518,7 @@
 	w->resize((int)i->value(), w->y(), w->w(), w->h());
 	if (w->window()) w->window()->redraw();
 	if (o->is_window()) {
-          ((fltk3::Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
+          ((fltk3::Window *)w)->size_range(gridx, gridy, fltk3::w(), fltk3::h(),
                                        gridx, gridy, 0);
 	}
 	mod = 1;
@@ -543,7 +543,7 @@
 	w->resize(w->x(), (int)i->value(), w->w(), w->h());
 	if (w->window()) w->window()->redraw();
 	if (o->is_window()) {
-          ((fltk3::Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
+          ((fltk3::Window *)w)->size_range(gridx, gridy, fltk3::w(), fltk3::h(),
                                        gridx, gridy, 0);
 	}
 	mod = 1;
@@ -568,7 +568,7 @@
 	w->resize(w->x(), w->y(), (int)i->value(), w->h());
 	if (w->window()) w->window()->redraw();
 	if (o->is_window()) {
-          ((fltk3::Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
+          ((fltk3::Window *)w)->size_range(gridx, gridy, fltk3::w(), fltk3::h(),
                                        gridx, gridy, 0);
 	}
 	mod = 1;
@@ -593,7 +593,7 @@
 	w->resize(w->x(), w->y(), w->w(), (int)i->value());
 	if (w->window()) w->window()->redraw();
 	if (o->is_window()) {
-          ((fltk3::Window *)w)->size_range(gridx, gridy, Fl::w(), Fl::h(),
+          ((fltk3::Window *)w)->size_range(gridx, gridy, fltk3::w(), fltk3::h(),
                                        gridx, gridy, 0);
 	}
 	mod = 1;
@@ -1841,7 +1841,7 @@
       live_type->leave_live_mode();
     if (live_window) {
       live_window->hide();
-      Fl::delete_widget(live_window);
+      fltk3::delete_widget(live_window);
     }
     live_type = 0L;
     live_widget = 0L;

Modified: branches/branch-3.0/fluid/Fl_Window_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Window_Type.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/Fl_Window_Type.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -111,7 +111,7 @@
     if (p->is_window()) {
       w = (Fl_Window_Type *)p;
       ((fltk3::Window *)(w->o))->size_range(gridx, gridy,
-                                        Fl::w(), Fl::h(),
+                                        fltk3::w(), fltk3::h(),
                                         gridx, gridy, 0);
     }
   }
@@ -330,7 +330,7 @@
   // Redraw the window into the offscreen buffer...
   fl_begin_offscreen(offscreen);
 
-  if (!shown()) image(Fl::scheme_bg_);
+  if (!shown()) image(fltk3::scheme_bg_);
 
   redraw();
   draw();
@@ -428,8 +428,8 @@
     w->resizable(p);
   }
 
-  w->image(Fl::scheme_bg_);
-  w->size_range(gridx, gridy, Fl::w(), Fl::h(), gridx, gridy, 0);
+  w->image(fltk3::scheme_bg_);
+  w->size_range(gridx, gridy, fltk3::w(), fltk3::h(), gridx, gridy, 0);
 }
 
 // Read an image of the window
@@ -530,7 +530,7 @@
 // nearest multiple of gridsize, and snap to original position
 void Fl_Window_Type::newdx() {
   int mydx, mydy;
-  if (Fl::event_state(fltk3::ALT) || !snap) {
+  if (fltk3::event_state(fltk3::ALT) || !snap) {
     mydx = mx-x1;
     mydy = my-y1;
 
@@ -1185,11 +1185,11 @@
   static Fl_Type* selection;
   switch (event) {
   case fltk3::PUSH:
-    x1 = mx = Fl::event_x();
-    y1 = my = Fl::event_y();
+    x1 = mx = fltk3::event_x();
+    y1 = my = fltk3::event_y();
     drag = dx = dy = 0;
     // test for popup menu:
-    if (Fl::event_button() >= 3) {
+    if (fltk3::event_button() >= 3) {
       in_this_only = this; // modifies how some menu items work.
       static const Fl_Menu_Item* myprev;
       const Fl_Menu_Item* m = New_Menu->popup(mx,my,"New",myprev);
@@ -1204,15 +1204,15 @@
       Fl_Widget_Type* myo = (Fl_Widget_Type*)i;
       for (fltk3::Widget *o1 = myo->o; o1; o1 = o1->parent())
 	if (!o1->visible()) goto CONTINUE2;
-      if (Fl::event_inside(myo->o)) {
+      if (fltk3::event_inside(myo->o)) {
         selection = myo;
-        if (Fl::event_clicks()==1)
+        if (fltk3::event_clicks()==1)
           reveal_in_browser(myo);
       }
     CONTINUE2:;
     }}
     // see if user grabs edges of selected region:
-    if (numselected && !(Fl::event_state(fltk3::SHIFT)) &&
+    if (numselected && !(fltk3::event_state(fltk3::SHIFT)) &&
 	mx<=br+snap && mx>=bx-snap && my<=bt+snap && my>=by-snap) {
       int snap1 = snap>5 ? snap : 5;
       int w1 = (br-bx)/4; if (w1 > snap1) w1 = snap1;
@@ -1227,8 +1227,8 @@
     {Fl_Type* t = selection->click_test(mx, my);
     if (t) {
       //if (t == selection) return 1; // indicates mouse eaten w/o change
-      if (Fl::event_state(fltk3::SHIFT)) {
-	Fl::event_is_click(0);
+      if (fltk3::event_state(fltk3::SHIFT)) {
+	fltk3::event_is_click(0);
 	select(t, !t->selected);
       } else {
 	deselect();
@@ -1244,33 +1244,33 @@
 
   case fltk3::DRAG:
     if (!drag) return 0;
-    mx = Fl::event_x();
-    my = Fl::event_y();
+    mx = fltk3::event_x();
+    my = fltk3::event_y();
     newdx();
     return 1;
 
   case fltk3::RELEASE:
     if (!drag) return 0;
-    mx = Fl::event_x();
-    my = Fl::event_y();
-    if (drag != BOX && (dx || dy || !Fl::event_is_click())) {
+    mx = fltk3::event_x();
+    my = fltk3::event_y();
+    if (drag != BOX && (dx || dy || !fltk3::event_is_click())) {
       if (dx || dy) moveallchildren();
-    } else if ((Fl::event_clicks() || Fl::event_state(fltk3::CTRL))) {
+    } else if ((fltk3::event_clicks() || fltk3::event_state(fltk3::CTRL))) {
       Fl_Widget_Type::open();
     } else {
       if (mx<x1) {int t = x1; x1 = mx; mx = t;}
       if (my<y1) {int t = y1; y1 = my; my = t;}
       int n = 0;
-      int toggle = Fl::event_state(fltk3::SHIFT);
+      int toggle = fltk3::event_state(fltk3::SHIFT);
       // clear selection on everything:
-      if (!toggle) deselect(); else Fl::event_is_click(0);
+      if (!toggle) deselect(); else fltk3::event_is_click(0);
       // select everything in box:
       for (Fl_Type*i=next; i&&i->level>level; i=i->next)
 	if (i->is_widget() && !i->is_menu_item()) {
 	Fl_Widget_Type* myo = (Fl_Widget_Type*)i;
 	for (fltk3::Widget *o1 = myo->o; o1; o1 = o1->parent())
 	  if (!o1->visible()) goto CONTINUE;
-	if (Fl::event_inside(myo->o)) selection = myo;
+	if (fltk3::event_inside(myo->o)) selection = myo;
 	if (myo->o->x()>=x1 && myo->o->y()>y1 &&
 	    myo->o->x()+myo->o->w()<mx && myo->o->y()+myo->o->h()<my) {
 	  n++;
@@ -1290,14 +1290,14 @@
   case fltk3::KEYBOARD: {
 
     int backtab = 0;
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
 
     case fltk3::EscapeKey:
       ((fltk3::Window*)o)->hide();
       return 1;
 
     case fltk3::TabKey: {
-      if (Fl::event_state(fltk3::SHIFT)) backtab = 1;
+      if (fltk3::event_state(fltk3::SHIFT)) backtab = 1;
       // find current child:
       Fl_Type *i = Fl_Type::current;
       while (i && (!i->is_widget() || i->is_menu_item())) i = i->parent;
@@ -1322,8 +1322,8 @@
     case fltk3::DownKey:  dx = 0; dy = +1; goto ARROW;
     ARROW:
       // for some reason BOTTOM/TOP are swapped... should be fixed...
-      drag = (Fl::event_state(fltk3::SHIFT)) ? (RIGHT|TOP) : DRAG;
-      if (Fl::event_state(fltk3::CTRL)) {dx *= gridx; dy *= gridy;}
+      drag = (fltk3::event_state(fltk3::SHIFT)) ? (RIGHT|TOP) : DRAG;
+      if (fltk3::event_state(fltk3::CTRL)) {dx *= gridx; dy *= gridy;}
       moveallchildren();
       drag = 0;
       return 1;
@@ -1400,7 +1400,7 @@
   } else if (!strcmp(c,"non_modal")) {
     non_modal = 1;
   } else if (!strcmp(c, "visible")) {
-    if (Fl::first_window()) open(); // only if we are using user interface
+    if (fltk3::first_window()) open(); // only if we are using user interface
   } else if (!strcmp(c,"noborder")) {
     ((fltk3::Window*)o)->border(0);
   } else if (!strcmp(c,"xclass")) {

Modified: branches/branch-3.0/fluid/alignment_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/alignment_panel.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/alignment_panel.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -509,10 +509,10 @@
 */
 static void refreshUI() {
   int mode = wUserOrSystem->value();
-  wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
-  wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
-  wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
-  wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
+  wVisibleFocus->value(opt[fltk3::OPTION_VISIBLE_FOCUS][mode]);
+  wArrowFocus->value(opt[fltk3::OPTION_ARROW_FOCUS][mode]);
+  wShowTooltips->value(opt[fltk3::OPTION_SHOW_TOOLTIPS][mode]);
+  wDNDText->value(opt[fltk3::OPTION_DND_TEXT][mode]);
 }
 
 /**
@@ -523,18 +523,18 @@
   {
     Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
     Fl_Preferences opt_prefs(prefs, "options");
-    opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
-    opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
-    opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
-    opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
+    opt_prefs.get("ArrowFocus", opt[fltk3::OPTION_ARROW_FOCUS][1], 2);
+    opt_prefs.get("VisibleFocus", opt[fltk3::OPTION_VISIBLE_FOCUS][1], 2);
+    opt_prefs.get("DNDText", opt[fltk3::OPTION_DND_TEXT][1], 2);
+    opt_prefs.get("ShowTooltips", opt[fltk3::OPTION_SHOW_TOOLTIPS][1], 2);
   }
   {
     Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
     Fl_Preferences opt_prefs(prefs, "options");
-    opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
-    opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
-    opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
-    opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
+    opt_prefs.get("ArrowFocus", opt[fltk3::OPTION_ARROW_FOCUS][0], 2);
+    opt_prefs.get("VisibleFocus", opt[fltk3::OPTION_VISIBLE_FOCUS][0], 2);
+    opt_prefs.get("DNDText", opt[fltk3::OPTION_DND_TEXT][0], 2);
+    opt_prefs.get("ShowTooltips", opt[fltk3::OPTION_SHOW_TOOLTIPS][0], 2);
   }
   refreshUI();
 }
@@ -547,26 +547,26 @@
   {
     Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
     Fl_Preferences opt_prefs(prefs, "options");
-    if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
-    else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
-    if (opt[Fl::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
-    else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1]);
-    if (opt[Fl::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
-    else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
-    if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
-    else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
+    if (opt[fltk3::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
+    else opt_prefs.set("ArrowFocus", opt[fltk3::OPTION_ARROW_FOCUS][1]);
+    if (opt[fltk3::OPTION_VISIBLE_FOCUS][1]==2) opt_prefs.deleteEntry("VisibleFocus");
+    else opt_prefs.set("VisibleFocus", opt[fltk3::OPTION_VISIBLE_FOCUS][1]);
+    if (opt[fltk3::OPTION_DND_TEXT][1]==2) opt_prefs.deleteEntry("DNDText");
+    else opt_prefs.set("DNDText", opt[fltk3::OPTION_DND_TEXT][1]);
+    if (opt[fltk3::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
+    else opt_prefs.set("ShowTooltips", opt[fltk3::OPTION_SHOW_TOOLTIPS][1]);
   }
   {
     Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
     Fl_Preferences opt_prefs(prefs, "options");
-    if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
-    else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
-    if (opt[Fl::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
-    else opt_prefs.set("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0]);
-    if (opt[Fl::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
-    else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
-    if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
-    else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
+    if (opt[fltk3::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
+    else opt_prefs.set("ArrowFocus", opt[fltk3::OPTION_ARROW_FOCUS][0]);
+    if (opt[fltk3::OPTION_VISIBLE_FOCUS][0]==2) opt_prefs.deleteEntry("VisibleFocus");
+    else opt_prefs.set("VisibleFocus", opt[fltk3::OPTION_VISIBLE_FOCUS][0]);
+    if (opt[fltk3::OPTION_DND_TEXT][0]==2) opt_prefs.deleteEntry("DNDText");
+    else opt_prefs.set("DNDText", opt[fltk3::OPTION_DND_TEXT][0]);
+    if (opt[fltk3::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
+    else opt_prefs.set("ShowTooltips", opt[fltk3::OPTION_SHOW_TOOLTIPS][0]);
   }
 }
 
@@ -591,7 +591,7 @@
 
 static void cb_wVisibleFocus(Fl_Choice*, void*) {
   int mode = wUserOrSystem->value();
-opt[Fl::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();
+opt[fltk3::OPTION_VISIBLE_FOCUS][mode] = wVisibleFocus->value();
 }
 
 Fl_Menu_Item menu_wVisibleFocus[] = {
@@ -605,7 +605,7 @@
 
 static void cb_wArrowFocus(Fl_Choice*, void*) {
   int mode = wUserOrSystem->value();
-opt[Fl::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();
+opt[fltk3::OPTION_ARROW_FOCUS][mode] = wArrowFocus->value();
 }
 
 Fl_Menu_Item menu_wArrowFocus[] = {
@@ -619,7 +619,7 @@
 
 static void cb_wShowTooltips(Fl_Choice*, void*) {
   int mode = wUserOrSystem->value();
-opt[Fl::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();
+opt[fltk3::OPTION_SHOW_TOOLTIPS][mode] = wShowTooltips->value();
 }
 
 Fl_Menu_Item menu_wShowTooltips[] = {
@@ -633,7 +633,7 @@
 
 static void cb_wDNDText(Fl_Choice*, void*) {
   int mode = wUserOrSystem->value();
-opt[Fl::OPTION_DND_TEXT][mode] = wDNDText->value();
+opt[fltk3::OPTION_DND_TEXT][mode] = wDNDText->value();
 }
 
 Fl_Menu_Item menu_wDNDText[] = {
@@ -737,7 +737,7 @@
     global_settings_window->end();
   } // Fl_Double_Window* global_settings_window
   readPrefs();
-    Fl::option(Fl::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !
+    fltk3::option(fltk3::OPTION_SHOW_TOOLTIPS,1); // make sure tooltips are on !
   return global_settings_window;
 }
 

Modified: branches/branch-3.0/fluid/factory.cxx
===================================================================
--- branches/branch-3.0/fluid/factory.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/factory.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -221,12 +221,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_Browser *myo = (Fl_Browser *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box());
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -269,12 +269,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_Check_Browser *myo = (Fl_Check_Browser *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box()) - fl_height();
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box()) - fl_height();
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -344,12 +344,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_File_Browser *myo = (Fl_File_Browser *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box()) + fl_height();
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box()) + fl_height();
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -431,9 +431,9 @@
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
     if (h < 15) h = 15;
-    w -= Fl::box_dw(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box()) + h / 2;
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box()) + h / 2;
     if (w < 40) w = 40	;
   }
   virtual const char *type_name() {return "Fl_Spinner";}
@@ -475,9 +475,9 @@
     Fl_Input *myo = (Fl_Input *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
-    w -= Fl::box_dw(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     if (h < 15) h = 15;
     if (w < 15) w = 15;
   }
@@ -525,9 +525,9 @@
     Fl_File_Input *myo = (Fl_File_Input *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() + 4;
-    w -= Fl::box_dw(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     if (h < 20) h = 20;
     if (w < 50) w = 50;
   }
@@ -565,12 +565,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_Text_Display *myo = (Fl_Text_Display *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box());
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -607,12 +607,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_Text_Editor *myo = (Fl_Text_Editor *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box());
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -662,12 +662,12 @@
   virtual void ideal_size(int &w, int &h) {
     Fl_Help_View *myo = (Fl_Help_View *)o;
     fl_font(myo->textfont(), myo->textsize());
-    h -= Fl::box_dh(o->box());
-    w -= Fl::box_dw(o->box());
+    h -= fltk3::box_dh(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
-        Fl::box_dh(o->box());
+        fltk3::box_dh(o->box());
     if (h < 30) h = 30;
     if (w < 50) w = 50;
   }
@@ -812,9 +812,9 @@
     Fl_Output *myo = (Fl_Output *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
-    w -= Fl::box_dw(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     if (h < 15) h = 15;
     if (w < 15) w = 15;
   }
@@ -839,9 +839,9 @@
     Fl_Value_Input *myo = (Fl_Value_Input *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
-    w -= Fl::box_dw(o->box());
+    w -= fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     if (h < 15) h = 15;
     if (w < 15) w = 15;
   }
@@ -880,9 +880,9 @@
     Fl_Value_Output *myo = (Fl_Value_Output *)o;
     fl_font(myo->textfont(), myo->textsize());
     h = fl_height() + myo->textsize() - 6;
-    w = o->w() - Fl::box_dw(o->box());
+    w = o->w() - fltk3::box_dw(o->box());
     int ww = (int)fl_width('m');
-    w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
+    w = ((w + ww - 1) / ww) * ww + fltk3::box_dw(o->box());
     if (h < 15) h = 15;
     if (w < 15) w = 15;
   }

Modified: branches/branch-3.0/fluid/fluid.cxx
===================================================================
--- branches/branch-3.0/fluid/fluid.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/fluid.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -255,7 +255,7 @@
 
   // Show the panel and wait for the user to do something...
   template_panel->show();
-  while (template_panel->shown()) Fl::wait();
+  while (template_panel->shown()) fltk3::wait();
 
   // Get the template name, return if it is empty...
   const char *c = template_name->value();
@@ -572,7 +572,7 @@
 
   // Show the panel and wait for the user to do something...
   template_panel->show();
-  while (template_panel->shown()) Fl::wait();
+  while (template_panel->shown()) fltk3::wait();
 
   // See if the user chose anything...
   int item = template_browser->value();
@@ -1273,7 +1273,7 @@
   print_progress->minimum(0);
   print_progress->maximum(num_pages);
   print_progress->value(0);
-  Fl::check();
+  fltk3::check();
 
   // Get the base filename...
   const char *basename = strrchr(filename, '/');
@@ -1400,7 +1400,7 @@
 	sprintf(progress, "Printing page %d/%d...", page, num_pages);
 	print_progress->value(page);
 	print_progress->label(progress);
-	Fl::check();
+	fltk3::check();
 
         // Add common page stuff...
 	fprintf(outfile,
@@ -1742,16 +1742,16 @@
 
   switch (scheme_choice->value()) {
     case 0 : // Default
-      Fl::scheme(NULL);
+      fltk3::scheme(NULL);
       break;
     case 1 : // None
-      Fl::scheme("none");
+      fltk3::scheme("none");
       break;
     case 2 : // Plastic
-      Fl::scheme("plastic");
+      fltk3::scheme("plastic");
       break;
     case 3 : // GTK+
-      Fl::scheme("gtk+");
+      fltk3::scheme("gtk+");
       break;
   }
 
@@ -2079,7 +2079,7 @@
     shell_run_buffer->append(line);
   } else {
     // End of file; tell the parent...
-    Fl::remove_fd(fileno(s_proc.desc()));
+    fltk3::remove_fd(fileno(s_proc.desc()));
     s_proc.close();
     shell_run_buffer->append("... END SHELL COMMAND ...\n");
   }
@@ -2109,15 +2109,15 @@
   shell_run_window->hotspot(shell_run_display);
   shell_run_window->show();
 
-  Fl::add_fd(fileno(s_proc.desc()), shell_pipe_cb);
+  fltk3::add_fd(fileno(s_proc.desc()), shell_pipe_cb);
 
-  while (s_proc.desc()) Fl::wait();
+  while (s_proc.desc()) fltk3::wait();
 
   shell_run_button->activate();
   shell_run_window->label("Shell Command Complete");
   fl_beep();
 
-  while (shell_run_window->shown()) Fl::wait();
+  while (shell_run_window->shown()) fltk3::wait();
 }
 #else
 // Just do basic shell command stuff, no status window...
@@ -2285,8 +2285,8 @@
     // we will only update ealiest 0.5 seconds after the last change, and only
     // if no other change was made, so dragging a widget will not generate any
     // CPU load
-    Fl::remove_timeout(update_sourceview_timer, 0);
-    Fl::add_timeout(0.5, update_sourceview_timer, 0);
+    fltk3::remove_timeout(update_sourceview_timer, 0);
+    fltk3::add_timeout(0.5, update_sourceview_timer, 0);
   }
 
   // Enable/disable the Save menu item...
@@ -2347,14 +2347,14 @@
 int main(int argc,char **argv) {
   int i = 1;
   
-  if (!Fl::args(argc,argv,i,arg) || i < argc-1) {
+  if (!fltk3::args(argc,argv,i,arg) || i < argc-1) {
     static const char *msg = 
       "usage: %s <switches> name.fl\n"
       " -c : write .cxx and .h and exit\n"
       " -cs : write .cxx and .h and strings and exit\n"
       " -o <name> : .cxx output filename, or extension if <name> starts with '.'\n"
       " -h <name> : .h output filename, or extension if <name> starts with '.'\n";
-    int len = strlen(msg) + strlen(argv[0]) + strlen(Fl::help);
+    int len = strlen(msg) + strlen(argv[0]) + strlen(fltk3::help);
     Fl_Plugin_Manager pm("commandline");
     int i, n = pm.plugins();
     for (i=0; i<n; i++) {
@@ -2367,7 +2367,7 @@
       Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
       if (pi) strcat(buf, pi->help());
     }
-    strcat(buf, Fl::help);
+    strcat(buf, fltk3::help);
 #ifdef _MSC_VER
     fl_message("%s\n", buf);
 #else
@@ -2391,7 +2391,7 @@
 #ifdef __APPLE__
     fl_open_callback(apple_open_cb);
 #endif // __APPLE__
-    Fl::visual((Fl_Mode)(fltk3::DOUBLE|fltk3::INDEX));
+    fltk3::visual((Fl_Mode)(fltk3::DOUBLE|fltk3::INDEX));
     Fl_File_Icon::load_system_icons();
     main_window->callback(exit_cb);
     position_window(main_window,"main_window_pos", 1, 10, 30, WINWIDTH, WINHEIGHT );
@@ -2426,9 +2426,9 @@
   grid_cb(horizontal_input, 0); // Makes sure that windows get snap params...
 
 #ifdef WIN32
-  Fl::run();
+  fltk3::run();
 #else
-  while (!quit_flag) Fl::wait();
+  while (!quit_flag) fltk3::wait();
 
   if (quit_flag) exit_cb(0,0);
 #endif // WIN32

Modified: branches/branch-3.0/fluid/function_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/function_panel.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/function_panel.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -240,7 +240,7 @@
       } // fltk3::Box* o
       o->end();
     } // fltk3::Group* o
-    o->size_range(o->w(), o->h(), Fl::w(), o->h());
+    o->size_range(o->w(), o->h(), fltk3::w(), o->h());
     codeblock_panel->set_modal();
     codeblock_panel->end();
   } // Fl_Double_Window* codeblock_panel
@@ -321,7 +321,7 @@
       } // fltk3::Box* o
       o->end();
     } // fltk3::Group* o
-    o->size_range(o->w(), o->h(), Fl::w(), o->h());
+    o->size_range(o->w(), o->h(), fltk3::w(), o->h());
     declblock_panel->set_modal();
     declblock_panel->end();
   } // Fl_Double_Window* declblock_panel
@@ -704,7 +704,7 @@
 fltk3::Window *widgetbin_panel=(fltk3::Window *)0;
 
 static void cb_widgetbin_panel(fltk3::Window* o, void* v) {
-  if (Fl::event()==fltk3::SHORTCUT && Fl::event_key()==fltk3::EscapeKey)
+  if (fltk3::event()==fltk3::SHORTCUT && fltk3::event_key()==fltk3::EscapeKey)
   exit_cb((fltk3::Widget*)o, v);
 else  
   toggle_widgetbin_cb((fltk3::Widget*)o, v);

Modified: branches/branch-3.0/fluid/template_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/template_panel.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/fluid/template_panel.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -59,7 +59,7 @@
 Fl_Browser *template_browser=(Fl_Browser *)0;
 
 static void cb_template_browser(Fl_Browser*, void*) {
-  if (Fl::event_clicks()) {
+  if (fltk3::event_clicks()) {
   template_panel->hide();
   return;
 }
@@ -112,7 +112,7 @@
 static void cb_template_name(Fl_Input*, void*) {
   if (strlen(template_name->value())) {
   template_submit->activate();
-  if (Fl::event_key() == fltk3::EnterKey) template_panel->hide();
+  if (fltk3::event_key() == fltk3::EnterKey) template_panel->hide();
 } else template_submit->deactivate();
 }
 

Modified: branches/branch-3.0/make3.sh
===================================================================
--- branches/branch-3.0/make3.sh	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/make3.sh	2011-05-17 15:17:01 UTC (rev 8680)
@@ -236,6 +236,19 @@
 renameClass Fl_Window Window
 renameClass Fl_Widget_Tracker WidgetTracker
 
+renameType Fl_Label_Draw_F LabelDrawF
+renameType Fl_Label_Measure_F LabelMeasureF
+renameType Fl_Box_Draw_F BoxDrawF
+renameType Fl_Timeout_Handler TimeoutHandler
+renameType Fl_Awake_Handler AwakeHandler
+renameType Fl_Idle_Handler IdleHandler
+renameType Fl_Old_Idle_Handler OldIdleHandler
+renameType Fl_FD_Handler FDHandler
+renameType Fl_Event_Handler EventHandler
+renameType Fl_Abort_Handler Fl_Abort_HandlerAbortHandler
+renameType Fl_Atclose_Handler FlAtcloseHandler
+renameType Fl_Args_Handler ArgsHandler
+renameType Fl_Event_Dispatch EventDispatch
 
 
 
@@ -249,5 +262,3 @@
 
 
 
-
-

Modified: branches/branch-3.0/src/Fl.cxx
===================================================================
--- branches/branch-3.0/src/Fl.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -76,43 +76,43 @@
 const char *Fl_Mac_App_Menu::quit = "Quit ";
 #endif // __APPLE__
 #ifndef FL_DOXYGEN
-fltk3::Widget	*Fl::belowmouse_,
-		*Fl::pushed_,
-		*Fl::focus_,
-		*Fl::selection_owner_;
-int		Fl::damage_,
-		Fl::e_number,
-		Fl::e_x,
-		Fl::e_y,
-		Fl::e_x_root,
-		Fl::e_y_root,
-		Fl::e_dx,
-		Fl::e_dy,
-		Fl::e_state,
-		Fl::e_clicks,
-		Fl::e_is_click,
-		Fl::e_keysym,
-                Fl::e_original_keysym,
-		Fl::scrollbar_size_ = 16;
+fltk3::Widget	*fltk3::belowmouse_,
+		*fltk3::pushed_,
+		*fltk3::focus_,
+		*fltk3::selection_owner_;
+int		fltk3::damage_,
+		fltk3::e_number,
+		fltk3::e_x,
+		fltk3::e_y,
+		fltk3::e_x_root,
+		fltk3::e_y_root,
+		fltk3::e_dx,
+		fltk3::e_dy,
+		fltk3::e_state,
+		fltk3::e_clicks,
+		fltk3::e_is_click,
+		fltk3::e_keysym,
+                fltk3::e_original_keysym,
+		fltk3::scrollbar_size_ = 16;
 
-char		*Fl::e_text = (char *)"";
-int		Fl::e_length;
+char		*fltk3::e_text = (char *)"";
+int		fltk3::e_length;
 
-Fl_Event_Dispatch Fl::e_dispatch = 0;
+fltk3::EventDispatch fltk3::e_dispatch = 0;
 
-unsigned char   Fl::options_[] = { 0, 0 };
-unsigned char   Fl::options_read_ = 0;
+unsigned char   fltk3::options_[] = { 0, 0 };
+unsigned char   fltk3::options_read_ = 0;
 
 
 fltk3::Window *fl_xfocus;	// which window X thinks has focus
 fltk3::Window *fl_xmousewin;// which window X thinks has fltk3::ENTER
-fltk3::Window *Fl::grab_;	// most recent Fl::grab()
-fltk3::Window *Fl::modal_;	// topmost modal() window
+fltk3::Window *fltk3::grab_;	// most recent fltk3::grab()
+fltk3::Window *fltk3::modal_;	// topmost modal() window
 
 #endif // FL_DOXYGEN
 
 //
-// 'Fl::version()' - Return the API version number...
+// 'fltk3::version()' - Return the API version number...
 //
 
 double
@@ -120,7 +120,7 @@
   Returns the compiled-in value of the FL_VERSION constant. This
   is useful for checking the version of a shared library.
 */
-Fl::version() {
+fltk3::version() {
   return FL_VERSION;
 }
 
@@ -132,7 +132,7 @@
   Fl_Text_Display widgets.
   \returns The default size for widget scrollbars, in pixels.
 */
-int Fl::scrollbar_size() {
+int fltk3::scrollbar_size() {
   return scrollbar_size_;
 }
 
@@ -144,26 +144,26 @@
   Fl_Text_Display widgets.
   \param[in] W The new default size for widget scrollbars, in pixels.
 */
-void Fl::scrollbar_size(int W) {
+void fltk3::scrollbar_size(int W) {
   scrollbar_size_ = W;
 }
 
 
 /** Returns whether or not the mouse event is inside the given rectangle.
 
-    Returns non-zero if the current Fl::event_x() and Fl::event_y()
+    Returns non-zero if the current fltk3::event_x() and fltk3::event_y()
     put it inside the given arbitrary bounding box.
 
     You should always call this rather than doing your own comparison
     so you are consistent about edge effects.
 
     To find out, whether the event is inside a child widget of the
-    current window, you can use Fl::event_inside(const fltk3::Widget *).
+    current window, you can use fltk3::event_inside(const fltk3::Widget *).
 
     \param[in] xx,yy,ww,hh	bounding box
     \return			non-zero, if mouse event is inside
 */
-int Fl::event_inside(int xx,int yy,int ww,int hh) /*const*/ {
+int fltk3::event_inside(int xx,int yy,int ww,int hh) /*const*/ {
   int mx = e_x - xx;
   int my = e_y - yy;
   return (mx >= 0 && mx < ww && my >= 0 && my < hh);
@@ -171,7 +171,7 @@
 
 /** Returns whether or not the mouse event is inside a given child widget.
 
-    Returns non-zero if the current Fl::event_x() and Fl::event_y()
+    Returns non-zero if the current fltk3::event_x() and fltk3::event_y()
     put it inside the given child widget's bounding box.
 
     This method can only be used to check whether the mouse event is
@@ -191,12 +191,12 @@
     You should always call this rather than doing your own comparison
     so you are consistent about edge effects.
 
-    \see Fl::event_inside(int, int, int, int)
+    \see fltk3::event_inside(int, int, int, int)
 
     \param[in] o	child widget to be tested
     \return		non-zero, if mouse event is inside the widget
 */
-int Fl::event_inside(const fltk3::Widget *o) /*const*/ {
+int fltk3::event_inside(const fltk3::Widget *o) /*const*/ {
   int mx = e_x - o->x();
   int my = e_y - o->y();
   return (mx >= 0 && mx < o->w() && my >= 0 && my < o->h());
@@ -265,12 +265,12 @@
 // time interval:
 static double missed_timeout_by;
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void *argp) {
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void *argp) {
   elapse_timeouts();
   repeat_timeout(time, cb, argp);
 }
 
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp) {
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void *argp) {
   time += missed_timeout_by; if (time < -.05) time = 0;
   Timeout* t = free_timeout;
   if (t) {
@@ -291,7 +291,7 @@
 /**
   Returns true if the timeout exists and has not been called yet.
 */
-int Fl::has_timeout(Fl_Timeout_Handler cb, void *argp) {
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void *argp) {
   for (Timeout* t = first_timeout; t; t = t->next)
     if (t->cb == cb && t->arg == argp) return 1;
   return 0;
@@ -304,7 +304,7 @@
   \note	This version removes all matching timeouts, not just the first one.
 	This may change in the future.
 */
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void *argp) {
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void *argp) {
   for (Timeout** p = &first_timeout; *p;) {
     Timeout* t = *p;
     if (t->cb == cb && (t->arg == argp || !argp)) {
@@ -325,7 +325,7 @@
 // This is a bit messy because I want to allow checks to be added,
 // removed, and have wait() called from inside them. To do this
 // next_check points at the next unprocessed one for the outermost
-// call to Fl::wait().
+// call to fltk3::wait().
 
 struct Check {
   void (*cb)(void*);
@@ -360,12 +360,12 @@
   }
   
   main() {
-   Fl::add_check(callback);
-   return Fl::run();
+   fltk3::add_check(callback);
+   return fltk3::run();
   }
   \endcode
 */
-void Fl::add_check(Fl_Timeout_Handler cb, void *argp) {
+void fltk3::add_check(fltk3::TimeoutHandler cb, void *argp) {
   Check* t = free_check;
   if (t) free_check = t->next;
   else t = new Check;
@@ -380,7 +380,7 @@
   Removes a check callback. It is harmless to remove a check
   callback that no longer exists.
 */
-void Fl::remove_check(Fl_Timeout_Handler cb, void *argp) {
+void fltk3::remove_check(fltk3::TimeoutHandler cb, void *argp) {
   for (Check** p = &first_check; *p;) {
     Check* t = *p;
     if (t->cb == cb && t->arg == argp) {
@@ -397,7 +397,7 @@
 /**
   Returns 1 if the check exists and has not been called yet, 0 otherwise.
 */
-int Fl::has_check(Fl_Timeout_Handler cb, void *argp) {
+int fltk3::has_check(fltk3::TimeoutHandler cb, void *argp) {
   for (Check** p = &first_check; *p;) {
     Check* t = *p;
     if (t->cb == cb && t->arg == argp) {
@@ -430,15 +430,15 @@
 ////////////////////////////////////////////////////////////////
 // wait/run/check/ready:
 
-void (*Fl::idle)(); // see Fl::add_idle.cxx for the add/remove functions
+void (*fltk3::idle)(); // see fltk3::add_idle.cxx for the add/remove functions
 
 extern int fl_ready(); // in Fl_<platform>.cxx
 extern int fl_wait(double time); // in Fl_<platform>.cxx
 
 /**
-  See int Fl::wait()
+  See int fltk3::wait()
 */
-double Fl::wait(double time_to_wait) {
+double fltk3::wait(double time_to_wait) {
   // delete all widgets that were listed during callbacks
   do_widget_deletion();
 
@@ -512,13 +512,13 @@
 #define FOREVER 1e20
 
 /**
-  As long as any windows are displayed this calls Fl::wait()
+  As long as any windows are displayed this calls fltk3::wait()
   repeatedly.  When all the windows are closed it returns zero
   (supposedly it would return non-zero on any errors, but FLTK calls
   exit directly for these).  A normal program will end main()
-  with return Fl::run();.
+  with return fltk3::run();.
 */
-int Fl::run() {
+int fltk3::run() {
   while (Fl_X::first) wait(FOREVER);
   return 0;
 }
@@ -569,16 +569,16 @@
   program state.
   
   What this really does is call all idle callbacks, all elapsed
-  timeouts, call Fl::flush() to get the screen to update, and
+  timeouts, call fltk3::flush() to get the screen to update, and
   then wait some time (zero if there are idle callbacks, the shortest of
   all pending timeouts, or infinity), for any events from the user or
-  any Fl::add_fd() callbacks.  It then handles the events and
+  any fltk3::add_fd() callbacks.  It then handles the events and
   calls the callbacks and then returns.
 
-  The return value of Fl::wait() is non-zero if there are any
+  The return value of fltk3::wait() is non-zero if there are any
   visible windows - this may change in future versions of FLTK.
 
-  Fl::wait(time) waits a maximum of \e time seconds.
+  fltk3::wait(time) waits a maximum of \e time seconds.
   <i>It can return much sooner if something happens.</i>
 
   The return value is positive if an event or fd happens before the
@@ -586,20 +586,20 @@
   return zero if \e time is zero).  It is negative if an error
   occurs (this will happen on UNIX if a signal happens).
 */
-int Fl::wait() {
+int fltk3::wait() {
   if (!Fl_X::first) return 0;
   wait(FOREVER);
   return Fl_X::first != 0; // return true if there is a window
 }
 
 /**
-  Same as Fl::wait(0).  Calling this during a big calculation
+  Same as fltk3::wait(0).  Calling this during a big calculation
   will keep the screen up to date and the interface responsive:
   
   \code
   while (!calculation_done()) {
   calculate();
-  Fl::check();
+  fltk3::check();
   if (user_hit_abort_button()) break;
   }
   \endcode
@@ -608,30 +608,30 @@
   windows are displayed (this is likely to change in future versions of
   FLTK).
 */
-int Fl::check() {
+int fltk3::check() {
   wait(0.0);
   return Fl_X::first != 0; // return true if there is a window
 }
 
 /**
-  This is similar to Fl::check() except this does \e not
-  call Fl::flush() or any callbacks, which is useful if your
+  This is similar to fltk3::check() except this does \e not
+  call fltk3::flush() or any callbacks, which is useful if your
   program is in a state where such callbacks are illegal.  This returns
-  true if Fl::check() would do anything (it will continue to
-  return true until you call Fl::check() or Fl::wait()).
+  true if fltk3::check() would do anything (it will continue to
+  return true until you call fltk3::check() or fltk3::wait()).
   
   \code
   while (!calculation_done()) {
     calculate();
-    if (Fl::ready()) {
+    if (fltk3::ready()) {
       do_expensive_cleanup();
-      Fl::check();
+      fltk3::check();
       if (user_hit_abort_button()) break;
     }
   }
   \endcode
 */
-int Fl::ready() {
+int fltk3::ready() {
 #if ! defined( WIN32 )  &&  ! defined(__APPLE__)
   if (first_timeout) {
     elapse_timeouts();
@@ -661,7 +661,7 @@
 # error unsupported platform
 #endif // __APPLE__
 	{
-      if (window != Fl_X::first && !Fl::modal()) {
+      if (window != Fl_X::first && !fltk3::modal()) {
 	// make this window be first to speed up searches
 	// this is not done if modal is true to avoid messing up modal stack
 	*pp = window->next;
@@ -678,7 +678,7 @@
   a modal() window is shown this is the top-most modal window, otherwise
   it is the most recent window to get an event.
 */
-fltk3::Window* Fl::first_window() {
+fltk3::Window* fltk3::first_window() {
   Fl_X* i = Fl_X::first;
   return i ? i->w : 0;
 }
@@ -688,7 +688,7 @@
   You can use this call to iterate through all the windows that are shown().
   \param[in] window	must be shown and not NULL
 */
-fltk3::Window* Fl::next_window(const fltk3::Window* window) {
+fltk3::Window* fltk3::next_window(const fltk3::Window* window) {
   Fl_X* i = Fl_X::i(window)->next;
   return i ? i->w : 0;
 }
@@ -696,12 +696,12 @@
 /**
  Sets the window that is returned by first_window().  
  The window is removed from wherever it is in the
- list and inserted at the top.  This is not done if Fl::modal()
+ list and inserted at the top.  This is not done if fltk3::modal()
  is on or if the window is not shown(). Because the first window
  is used to set the "parent" of modal windows, this is often
  useful.
  */
-void Fl::first_window(fltk3::Window* window) {
+void fltk3::first_window(fltk3::Window* window) {
   if (!window || !window->shown()) return;
   fl_find( Fl_X::i(window)->xid );
 }
@@ -709,7 +709,7 @@
 /**
   Redraws all widgets.
 */
-void Fl::redraw() {
+void fltk3::redraw() {
   for (Fl_X* i = Fl_X::first; i; i = i->next) i->w->redraw();
 }
 
@@ -719,16 +719,16 @@
   
   This is what wait() does before looking for events.
 
-  Note: in multi-threaded applications you should only call Fl::flush()
+  Note: in multi-threaded applications you should only call fltk3::flush()
   from the main thread. If a child thread needs to trigger a redraw event,
-  it should instead call Fl::awake() to get the main thread to process the
+  it should instead call fltk3::awake() to get the main thread to process the
   event queue.
 */
-void Fl::flush() {
+void fltk3::flush() {
   if (damage()) {
-    damage_ = 0;
+    fltk3::damage_ = 0;
     for (Fl_X* i = Fl_X::first; i; i = i->next) {
-      if (i->wait_for_expose) {damage_ = 1; continue;}
+      if (i->wait_for_expose) {fltk3::damage_ = 1; continue;}
       fltk3::Window* wi = i->w;
       if (!wi->visible_r()) continue;
       if (wi->damage()) {i->flush(); wi->clear_damage();}
@@ -776,11 +776,11 @@
     zero from its handle() method.  Exactly which ones may change
     in future versions, however.
 
- \see Fl::remove_handler(Fl_Event_Handler)
- \see Fl::event_dispatch(Fl_Event_Dispatch d)
- \see Fl::handle(int, fltk3::Window*)
+ \see fltk3::remove_handler(fltk3::EventHandler)
+ \see fltk3::event_dispatch(fltk3::EventDispatch d)
+ \see fltk3::handle(int, fltk3::Window*)
 */
-void Fl::add_handler(Fl_Event_Handler ha) {
+void fltk3::add_handler(fltk3::EventHandler ha) {
   handler_link *l = new handler_link;
   l->handle = ha;
   l->next = handlers;
@@ -790,9 +790,9 @@
 
 /**
  Removes a previously added event handler.
- \see Fl::handle(int, fltk3::Window*)
+ \see fltk3::handle(int, fltk3::Window*)
 */
-void Fl::remove_handler(Fl_Event_Handler ha) {
+void fltk3::remove_handler(fltk3::EventHandler ha) {
   handler_link *l, *p;
 
   // Search for the handler in the list...
@@ -823,7 +823,7 @@
 /**
     Sets the widget that will receive fltk3::KEYBOARD events.
     
-    If you change Fl::focus(), the previous widget and all
+    If you change fltk3::focus(), the previous widget and all
     parents (that don't contain the new widget) are sent fltk3::UNFOCUS
     events.  Changing the focus does \e not send fltk3::FOCUS to
     this or any widget, because sending fltk3::FOCUS is supposed to
@@ -832,12 +832,12 @@
     
     \see fltk3::Widget::take_focus()
 */
-void Fl::focus(fltk3::Widget *o) {
+void fltk3::focus(fltk3::Widget *o) {
   if (o && !o->visible_focus()) return;
   if (grab()) return; // don't do anything while grab is on
   fltk3::Widget *p = focus_;
   if (o != p) {
-    Fl::compose_reset();
+    fltk3::compose_reset();
     focus_ = o;
     // make sure that fl_xfocus is set to the top level window
     // of this widget, or fl_fix_focus will clear our focus again
@@ -883,7 +883,7 @@
     if the widget wants the mouse (by it returning non-zero from 
     handle()).
 */
-void Fl::belowmouse(fltk3::Widget *o) {
+void fltk3::belowmouse(fltk3::Widget *o) {
   if (grab()) return; // don't do anything while grab is on
   fltk3::Widget *p = belowmouse_;
   if (o != p) {
@@ -909,7 +909,7 @@
     if the widget wants the mouse (by it returning non-zero from 
     handle()).
 */
- void Fl::pushed(fltk3::Widget *o) {
+ void fltk3::pushed(fltk3::Widget *o) {
   pushed_ = o;
 }
 
@@ -929,46 +929,46 @@
   puts("fl_fix_focus();");
 #endif // DEBUG
 
-  if (Fl::grab()) return; // don't do anything while grab is on.
+  if (fltk3::grab()) return; // don't do anything while grab is on.
 
-  // set focus based on Fl::modal() and fl_xfocus
+  // set focus based on fltk3::modal() and fl_xfocus
   fltk3::Widget* w = fl_xfocus;
   if (w) {
-    int saved = Fl::e_keysym;
-    if (Fl::e_keysym < (fltk3::MouseButton + fltk3::LEFT_MOUSE) ||
-        Fl::e_keysym > (fltk3::MouseButton + fltk3::RIGHT_MOUSE))
-      Fl::e_keysym = 0; // make sure widgets don't think a keystroke moved focus
+    int saved = fltk3::e_keysym;
+    if (fltk3::e_keysym < (fltk3::MouseButton + fltk3::LEFT_MOUSE) ||
+        fltk3::e_keysym > (fltk3::MouseButton + fltk3::RIGHT_MOUSE))
+      fltk3::e_keysym = 0; // make sure widgets don't think a keystroke moved focus
     while (w->parent()) w = w->parent();
-    if (Fl::modal()) w = Fl::modal();
-    if (!w->contains(Fl::focus()))
-      if (!w->take_focus()) Fl::focus(w);
-    Fl::e_keysym = saved;
+    if (fltk3::modal()) w = fltk3::modal();
+    if (!w->contains(fltk3::focus()))
+      if (!w->take_focus()) fltk3::focus(w);
+    fltk3::e_keysym = saved;
   } else
-    Fl::focus(0);
+    fltk3::focus(0);
 
 // MRS: Originally we checked the button state, but a user reported that it
 //      broke click-to-focus in FLWM?!?
-//  if (!(Fl::event_state() & 0x7f00000 /*fltk3::BUTTONS*/)) {
-  if (!Fl::pushed()) {
-    // set belowmouse based on Fl::modal() and fl_xmousewin:
+//  if (!(fltk3::event_state() & 0x7f00000 /*fltk3::BUTTONS*/)) {
+  if (!fltk3::pushed()) {
+    // set belowmouse based on fltk3::modal() and fl_xmousewin:
     w = fl_xmousewin;
     if (w) {
-      if (Fl::modal()) w = Fl::modal();
-      if (!w->contains(Fl::belowmouse())) {
-        int old_event = Fl::e_number;
-	w->handle(Fl::e_number = fltk3::ENTER);
-	Fl::e_number = old_event;
-	if (!w->contains(Fl::belowmouse())) Fl::belowmouse(w);
+      if (fltk3::modal()) w = fltk3::modal();
+      if (!w->contains(fltk3::belowmouse())) {
+        int old_event = fltk3::e_number;
+	w->handle(fltk3::e_number = fltk3::ENTER);
+	fltk3::e_number = old_event;
+	if (!w->contains(fltk3::belowmouse())) fltk3::belowmouse(w);
       } else {
 	// send a fltk3::MOVE event so the enter/leave state is up to date
-	Fl::e_x = Fl::e_x_root-fl_xmousewin->x();
-	Fl::e_y = Fl::e_y_root-fl_xmousewin->y();
-        int old_event = Fl::e_number;
-	w->handle(Fl::e_number = fltk3::MOVE);
-	Fl::e_number = old_event;
+	fltk3::e_x = fltk3::e_x_root-fl_xmousewin->x();
+	fltk3::e_y = fltk3::e_y_root-fl_xmousewin->y();
+        int old_event = fltk3::e_number;
+	w->handle(fltk3::e_number = fltk3::MOVE);
+	fltk3::e_number = old_event;
       }
     } else {
-      Fl::belowmouse(0);
+      fltk3::belowmouse(0);
       Fl_Tooltip::enter(0);
     }
   }
@@ -991,12 +991,12 @@
   printf("fl_throw_focus(o=%p)\n", o);
 #endif // DEBUG
 
-  if (o->contains(Fl::pushed())) Fl::pushed_ = 0;
+  if (o->contains(fltk3::pushed())) fltk3::pushed_ = 0;
 #if !(defined(WIN32) || defined(__APPLE__))
   if (o->contains(fl_selection_requestor)) fl_selection_requestor = 0;
 #endif
-  if (o->contains(Fl::belowmouse())) Fl::belowmouse_ = 0;
-  if (o->contains(Fl::focus())) Fl::focus_ = 0;
+  if (o->contains(fltk3::belowmouse())) fltk3::belowmouse_ = 0;
+  if (o->contains(fltk3::focus())) fltk3::focus_ = 0;
   if (o == fl_xfocus) fl_xfocus = 0;
   if (o == Fl_Tooltip::current()) Fl_Tooltip::current(0);
   if (o == fl_xmousewin) fl_xmousewin = 0;
@@ -1011,7 +1011,7 @@
 // window the event was posted to by the system:
 static int send(int event, fltk3::Widget* to, fltk3::Window* window) {
   int dx, dy;
-  int old_event = Fl::e_number;
+  int old_event = fltk3::e_number;
   if (window) {
     dx = window->x();
     dy = window->y();
@@ -1020,12 +1020,12 @@
   }
   for (const fltk3::Widget* w = to; w; w = w->parent())
     if (w->type()>=FL_WINDOW) {dx -= w->x(); dy -= w->y();}
-  int save_x = Fl::e_x; Fl::e_x += dx;
-  int save_y = Fl::e_y; Fl::e_y += dy;
-  int ret = to->handle(Fl::e_number = event);
-  Fl::e_number = old_event;
-  Fl::e_y = save_y;
-  Fl::e_x = save_x;
+  int save_x = fltk3::e_x; fltk3::e_x += dx;
+  int save_y = fltk3::e_y; fltk3::e_y += dy;
+  int ret = to->handle(fltk3::e_number = event);
+  fltk3::e_number = old_event;
+  fltk3::e_y = save_y;
+  fltk3::e_x = save_x;
   return ret;
 }
 
@@ -1035,11 +1035,11 @@
 
  The event dispatch function is called after native events are converted to
  FLTK events, but before they are handled by FLTK. If the dispatch function
- Fl_Event_Dispatch \p d is set, it is up to the dispatch function to call
- Fl::handle_(int, fltk3::Window*) or to ignore the event.
+ fltk3::EventDispatch \p d is set, it is up to the dispatch function to call
+ fltk3::handle_(int, fltk3::Window*) or to ignore the event.
 
  The dispatch function itself must return 0 if it ignored the event,
- or non-zero if it used the event. If you call Fl::handle_(), then
+ or non-zero if it used the event. If you call fltk3::handle_(), then
  this will return the correct value.
 
  The event dispatch can be used to handle exceptions in FLTK events and
@@ -1048,25 +1048,25 @@
  \code
  int myHandler(int e, fltk3::Window *w) {
    try {
-     return Fl::handle_(e, w);
+     return fltk3::handle_(e, w);
    } catch () {
      ...
    }
  }
 
  main() {
-   Fl::event_dispatch(myHandler);
+   fltk3::event_dispatch(myHandler);
    ...
-   Fl::run();
+   fltk3::run();
  }
  \endcode
 
  \param d new dispatch function, or NULL 
- \see Fl::add_handler(Fl_Event_Handler)
- \see Fl::handle(int, fltk3::Window*)
- \see Fl::handle_(int, fltk3::Window*)
+ \see fltk3::add_handler(fltk3::EventHandler)
+ \see fltk3::handle(int, fltk3::Window*)
+ \see fltk3::handle_(int, fltk3::Window*)
  */
-void Fl::event_dispatch(Fl_Event_Dispatch d)
+void fltk3::event_dispatch(fltk3::EventDispatch d)
 {
   e_dispatch = d; 
 }
@@ -1075,7 +1075,7 @@
 /** 
  \brief Return the current event dispatch function. 
  */
-Fl_Event_Dispatch Fl::event_dispatch() 
+fltk3::EventDispatch fltk3::event_dispatch() 
 { 
   return e_dispatch; 
 }
@@ -1085,19 +1085,19 @@
  \brief Handle events from the window system.
 
  This is called from the native event dispatch after native events have been
- converted to FLTK notation. This function calls Fl::handle_(int, fltk3::Window*) 
+ converted to FLTK notation. This function calls fltk3::handle_(int, fltk3::Window*) 
  unless the user sets a dispatch function. If a user dispatch function is set,
- the user must make sure that Fl::handle_() is called, or the event will be
+ the user must make sure that fltk3::handle_() is called, or the event will be
  ignored.
 
- \param e the event type (Fl::event_number() is not yet set)
+ \param e the event type (fltk3::event_number() is not yet set)
  \param window the window that caused this event
  \return 0 if the event was not handled
 
- \see Fl::add_handler(Fl_Event_Handler)
- \see Fl::event_dispatch(Fl_Event_Dispatch)
+ \see fltk3::add_handler(fltk3::EventHandler)
+ \see fltk3::event_dispatch(fltk3::EventDispatch)
  */
-int Fl::handle(int e, fltk3::Window* window)
+int fltk3::handle(int e, fltk3::Window* window)
 {
   if (e_dispatch) {
     return e_dispatch(e, window);
@@ -1112,15 +1112,15 @@
 
  This function is called from the native event dispatch, unless the user sets 
  another dispatch function. In that case, the user dispatch function must 
- decide when to call Fl::handle_(int, fltk3::Window*)
+ decide when to call fltk3::handle_(int, fltk3::Window*)
 
- \param e the event type (Fl::event_number() is not yet set)
+ \param e the event type (fltk3::event_number() is not yet set)
  \param window the window that caused this event
  \return 0 if the event was not handled
 
- \see Fl::event_dispatch(Fl_Event_Dispatch)
+ \see fltk3::event_dispatch(fltk3::EventDispatch)
  */
-int Fl::handle_(int e, fltk3::Window* window)
+int fltk3::handle_(int e, fltk3::Window* window)
 {  
   e_number = e;
   if (fl_local_grab) return fl_local_grab(e);
@@ -1144,7 +1144,7 @@
 
   case fltk3::PUSH:
 #ifdef DEBUG
-    printf("Fl::handle(e=%d, window=%p);\n", e, window);
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
 #endif // DEBUG
 
     if (grab()) wi = grab();
@@ -1191,8 +1191,8 @@
 	int inside = 0;
 	if (tooltip && tooltip->shown() ) { // check if a tooltip window is currently opened
 	  // check if mouse is inside the tooltip
-	  inside = (Fl::event_x_root() >= tooltip->x() && Fl::event_x_root() < tooltip->x() + tooltip->w() &&
-	  Fl::event_y_root() >= tooltip->y() && Fl::event_y_root() < tooltip->y() + tooltip->h() );
+	  inside = (fltk3::event_x_root() >= tooltip->x() && fltk3::event_x_root() < tooltip->x() + tooltip->w() &&
+	  fltk3::event_y_root() >= tooltip->y() && fltk3::event_y_root() < tooltip->y() + tooltip->h() );
 	}
 	// if inside, send event to tooltip window instead of background window
 	if (inside) ret = send(e, tooltip, window);
@@ -1202,7 +1202,7 @@
       ret = (wi && send(e, wi, window));
    if (pbm != belowmouse()) {
 #ifdef DEBUG
-      printf("Fl::handle(e=%d, window=%p);\n", e, window);
+      printf("fltk3::handle(e=%d, window=%p);\n", e, window);
 #endif // DEBUG
       Fl_Tooltip::enter(belowmouse());
     }
@@ -1246,7 +1246,7 @@
 
   case fltk3::KEYBOARD:
 #ifdef DEBUG
-    printf("Fl::handle(e=%d, window=%p);\n", e, window);
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
 #endif // DEBUG
 
     Fl_Tooltip::enter((fltk3::Widget*)0);
@@ -1297,7 +1297,7 @@
 
   case fltk3::ENTER:
 #ifdef DEBUG
-    printf("Fl::handle(e=%d, window=%p);\n", e, window);
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
 #endif // DEBUG
 
     fl_xmousewin = window;
@@ -1307,7 +1307,7 @@
 
   case fltk3::LEAVE:
 #ifdef DEBUG
-    printf("Fl::handle(e=%d, window=%p);\n", e, window);
+    printf("fltk3::handle(e=%d, window=%p);\n", e, window);
 #endif // DEBUG
 
     if (!pushed_) {
@@ -1378,11 +1378,11 @@
     } else wi = wi->next;
   }
 
-  if (this == Fl::modal_) { // we are closing the modal window, find next one:
+  if (this == fltk3::modal_) { // we are closing the modal window, find next one:
     fltk3::Window* W;
-    for (W = Fl::first_window(); W; W = Fl::next_window(W))
+    for (W = fltk3::first_window(); W; W = fltk3::next_window(W))
       if (W->modal()) break;
-    Fl::modal_ = W;
+    fltk3::modal_ = W;
   }
 
   // Make sure no events are sent to this window:
@@ -1393,7 +1393,7 @@
   // this little trick keeps the current clipboard alive, even if we are about
   // to destroy the window that owns the selection.
   if (GetClipboardOwner()==ip->xid) {
-    fltk3::Window *w1 = Fl::first_window();
+    fltk3::Window *w1 = fltk3::first_window();
     if (w1 && OpenClipboard(fl_xid(w1))) {
       EmptyClipboard();
       SetClipboardData(CF_TEXT, NULL);
@@ -1408,7 +1408,7 @@
       fl_window = (HWND)-1;
       fl_gc = 0;
 # ifdef FLTK_USE_CAIRO
-      if (Fl::cairo_autolink_context()) Fl::cairo_make_current((fltk3::Window*) 0);
+      if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0);
 # endif
     }
 #elif defined(__APPLE_QUARTZ__)
@@ -1440,8 +1440,8 @@
   
 #ifdef WIN32
   // Try to stop the annoying "raise another program" behavior
-  if (non_modal() && Fl::first_window() && Fl::first_window()->shown())
-    Fl::first_window()->show();
+  if (non_modal() && fltk3::first_window() && fltk3::first_window()->shown())
+    fltk3::first_window()->show();
 #endif
   delete ip;
 }
@@ -1522,7 +1522,7 @@
     by a callback function.  The current interface will be emulated on top
     of this.</i>
 */
-void Fl::selection_owner(fltk3::Widget *owner) {selection_owner_ = owner;}
+void fltk3::selection_owner(fltk3::Widget *owner) {selection_owner_ = owner;}
 
 /**
   Changes the current selection.  The block of text is
@@ -1531,17 +1531,17 @@
   returned by event_text()).  The selection_owner()
   widget is set to the passed owner.
 */
-void Fl::selection(fltk3::Widget &owner, const char* text, int len) {
+void fltk3::selection(fltk3::Widget &owner, const char* text, int len) {
   selection_owner_ = &owner;
-  Fl::copy(text, len, 0);
+  fltk3::copy(text, len, 0);
 }
 
 /** Backward compatibility only.
-  This calls Fl::paste(receiver, 0);
-  \see Fl::paste(fltk3::Widget &receiver, int clipboard)
+  This calls fltk3::paste(receiver, 0);
+  \see fltk3::paste(fltk3::Widget &receiver, int clipboard)
 */
-void Fl::paste(fltk3::Widget &receiver) {
-  Fl::paste(receiver, 0);
+void fltk3::paste(fltk3::Widget &receiver) {
+  fltk3::paste(receiver, 0);
 }
 
 ////////////////////////////////////////////////////////////////
@@ -1618,8 +1618,8 @@
     Fl_X* i = Fl_X::i((fltk3::Window*)this);
     if (!i) return; // window not mapped, so ignore it
     if (i->region) {XDestroyRegion(i->region); i->region = 0;}
-    damage_ |= fl;
-    Fl::damage(fltk3::DAMAGE_CHILD);
+    fltk3::damage_ |= fl;
+    fltk3::damage(fltk3::DAMAGE_CHILD);
   }
 }
 
@@ -1680,7 +1680,7 @@
     i->region = XRectangleRegion(X,Y,W,H);
     wi->damage_ = fl;
   }
-  Fl::damage(fltk3::DAMAGE_CHILD);
+  fltk3::damage(fltk3::DAMAGE_CHILD);
 }
 void fltk3::Window::flush() {
   make_current();
@@ -1708,7 +1708,7 @@
 
   To avoid early deletion of widgets, this function should be called
   toward the end of a callback and only after any call to the event
-  loop (Fl::wait(), Fl::flush(), Fl::check(), fl_ask(), etc.).
+  loop (fltk3::wait(), fltk3::flush(), fltk3::check(), fl_ask(), etc.).
 
   When deleting groups or windows, you must only delete the group or
   window widget and not the individual child widgets.
@@ -1722,7 +1722,7 @@
 
   \see fltk3::Widget::~Fl_Widget()
 */
-void Fl::delete_widget(fltk3::Widget *wi) {
+void fltk3::delete_widget(fltk3::Widget *wi) {
   if (!wi) return;
 
   if (num_dwidgets >= alloc_dwidgets) {
@@ -1747,13 +1747,13 @@
     
     This is for internal use only. You should never call this directly.
 
-    Fl::do_widget_deletion() is called from the FLTK event loop or whenever
-    you call Fl::wait(). The previously scheduled widgets are deleted in the
-    same order they were scheduled by calling Fl::delete_widget().
+    fltk3::do_widget_deletion() is called from the FLTK event loop or whenever
+    you call fltk3::wait(). The previously scheduled widgets are deleted in the
+    same order they were scheduled by calling fltk3::delete_widget().
 
-    \see Fl::delete_widget(fltk3::Widget *wi)
+    \see fltk3::delete_widget(fltk3::Widget *wi)
 */
-void Fl::do_widget_deletion() {
+void fltk3::do_widget_deletion() {
   if (!num_dwidgets) return;
 
   for (int i = 0; i < num_dwidgets; i ++)
@@ -1780,12 +1780,12 @@
   safely.
 
   After accessing the widget, the widget pointer must be released from the
-  watch list by calling Fl::release_widget_pointer().
+  watch list by calling fltk3::release_widget_pointer().
 
   Example for a button that is clicked (from its handle() method):
   \code
     fltk3::Widget *wp = this;		// save 'this' in a pointer variable
-    Fl::watch_widget_pointer(wp);	// add the pointer to the watch list
+    fltk3::watch_widget_pointer(wp);	// add the pointer to the watch list
     set_changed();			// set the changed flag
     do_callback();			// call the callback
     if (!wp) {				// the widget has been deleted
@@ -1796,14 +1796,14 @@
       clear_changed();			// reset the changed flag
     }
 
-    Fl::release_widget_pointer(wp);	// remove the pointer from the watch list
+    fltk3::release_widget_pointer(wp);	// remove the pointer from the watch list
    \endcode
 
-   This works, because all widgets call Fl::clear_widget_pointer() in their
+   This works, because all widgets call fltk3::clear_widget_pointer() in their
    destructors.
 
-   \see Fl::release_widget_pointer()
-   \see Fl::clear_widget_pointer()
+   \see fltk3::release_widget_pointer()
+   \see fltk3::clear_widget_pointer()
 
    An easier and more convenient method to control widget deletion during
    callbacks is to use the class fltk3::WidgetTracker with a local (automatic)
@@ -1811,7 +1811,7 @@
 
    \see class fltk3::WidgetTracker
 */
-void Fl::watch_widget_pointer(fltk3::Widget *&w) 
+void fltk3::watch_widget_pointer(fltk3::Widget *&w) 
 {
   fltk3::Widget **wp = &w;
   int i;
@@ -1834,13 +1834,13 @@
   Releases a widget pointer from the watch list.
 
   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.
+  with fltk3::watch_widget_pointer(), when it is not needed anymore.
   
   \note Internal use only, please use class fltk3::WidgetTracker instead.
 
-  \see Fl::watch_widget_pointer()
+  \see fltk3::watch_widget_pointer()
 */
-void Fl::release_widget_pointer(fltk3::Widget *&w)
+void fltk3::release_widget_pointer(fltk3::Widget *&w)
 {
   fltk3::Widget **wp = &w;
   int i,j=0;
@@ -1873,13 +1873,13 @@
 
   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
+  widget watch list by calling fltk3::watch_widget_pointer() or by using the
   helper class fltk3::WidgetTracker (recommended).
 
-  \see Fl::watch_widget_pointer()
+  \see fltk3::watch_widget_pointer()
   \see class fltk3::WidgetTracker
 */
-void Fl::clear_widget_pointer(fltk3::Widget const *w) 
+void fltk3::clear_widget_pointer(fltk3::Widget const *w) 
 {
   if (w==0L) return;
   int i;
@@ -1909,12 +1909,12 @@
 
  \param opt which option
  \return true or false
- \see enum Fl::Fl_Option
- \see Fl::option(Fl_Option, bool)
+ \see enum fltk3::Fl_Option
+ \see fltk3::option(Fl_Option, bool)
 
  \since FLTK 1.3.0
  */ 
-bool Fl::option(Fl_Option opt)
+bool fltk3::option(Fl_Option opt)
 {
   if (!options_read_) {
     int tmp;
@@ -1967,10 +1967,10 @@
  
  \param opt which option
  \param val set to true or false
- \see enum Fl::Fl_Option
- \see bool Fl::option(Fl_Option)
+ \see enum fltk3::Fl_Option
+ \see bool fltk3::option(Fl_Option)
  */
-void Fl::option(Fl_Option opt, bool val)
+void fltk3::option(Fl_Option opt, bool val)
 {
   if (opt<0 || opt>=OPTION_LAST) 
     return;
@@ -1990,7 +1990,7 @@
 fltk3::WidgetTracker::WidgetTracker(fltk3::Widget *wi) 
 {
   wp_ = wi;
-  Fl::watch_widget_pointer(wp_); // add pointer to watch list
+  fltk3::watch_widget_pointer(wp_); // add pointer to watch list
 }
 
 /**
@@ -1998,7 +1998,7 @@
 */
 fltk3::WidgetTracker::~WidgetTracker() 
 {
-  Fl::release_widget_pointer(wp_); // remove pointer from watch list
+  fltk3::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 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Adjuster.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -62,22 +62,22 @@
 		   y()+dy+(H-mediumarrow_height)/2, W, H);
   slowarrow.draw(x()+2*dx+(W-slowarrow_width)/2,
 		 y()+(H-slowarrow_width)/2, W, H);
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
 }
 
 int Fl_Adjuster::handle(int event) {
   double v;
   int delta;
-  int mx = Fl::event_x();
+  int mx = fltk3::event_x();
   // fltk3::WidgetTracker wp(this);
   switch (event) {
     case fltk3::PUSH:
-      if (Fl::visible_focus()) Fl::focus(this);
+      if (fltk3::visible_focus()) fltk3::focus(this);
       ix = mx;
       if (w()>=h())
 	drag = 3*(mx-x())/w() + 1;
       else
-	drag = 3-3*(Fl::event_y()-y()-1)/h();
+	drag = 3-3*(fltk3::event_y()-y()-1)/h();
       { fltk3::WidgetTracker wp(this);
 	handle_push();
 	if (wp.deleted()) return 1;
@@ -109,8 +109,8 @@
       handle_drag(soft() ? softclamp(v) : clamp(v));
       return 1;
     case fltk3::RELEASE:
-      if (Fl::event_is_click()) { // detect click but no drag
-	if (Fl::event_state()&0xF0000) delta = -10;
+      if (fltk3::event_is_click()) { // detect click but no drag
+	if (fltk3::event_state()&0xF0000) delta = -10;
 	else delta = 10;
 	switch (drag) {
 	  case 3: v = increment(previous_value(), delta); break;
@@ -126,7 +126,7 @@
       handle_release();
       return 1;
     case fltk3::KEYBOARD :
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
 	case fltk3::UpKey:
           if (w() > h()) return 0;
 	  handle_drag(clamp(increment(value(),-1)));
@@ -150,7 +150,7 @@
 
     case fltk3::FOCUS:
     case fltk3::UNFOCUS:
-      if (Fl::visible_focus()) {
+      if (fltk3::visible_focus()) {
         redraw();
         return 1;
       } else return 0;

Modified: branches/branch-3.0/src/Fl_Bitmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Bitmap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Bitmap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -317,7 +317,7 @@
     fl_begin_offscreen(tmp_id);
     fltk3::Color save_c = fl_color(); // save bitmap's desired color
     uchar r, g, b;
-    Fl::get_color(save_c, r, g, b);
+    fltk3::get_color(save_c, r, g, b);
     r = 255-r;
     g = 255-g;
     b = 255-b;
@@ -395,7 +395,7 @@
 }
 
 void Fl_Bitmap::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
+  fltk3::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
   m->label(fltk3::IMAGE_LABEL, (const char*)this);
 }
 

Modified: branches/branch-3.0/src/Fl_Browser_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Browser_.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Browser_.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -75,12 +75,12 @@
  (The original contents of these parameters are overwritten)
  */
 void Fl_Browser_::bbox(int& X, int& Y, int& W, int& H) const {
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   fltk3::Boxtype b = box() ? box() : fltk3::DOWN_BOX;
-  X = x()+Fl::box_dx(b);
-  Y = y()+Fl::box_dy(b);
-  W = w()-Fl::box_dw(b);
-  H = h()-Fl::box_dh(b);
+  X = x()+fltk3::box_dx(b);
+  Y = y()+fltk3::box_dy(b);
+  W = w()-fltk3::box_dw(b);
+  H = h()-fltk3::box_dh(b);
   if (scrollbar.visible()) {
     W -= scrollsize;
     if (scrollbar.align() & fltk3::ALIGN_LEFT) X += scrollsize;
@@ -112,7 +112,7 @@
  \param[in] X,Y,W,H The new position and size for the browser, in pixels.
  */
 void Fl_Browser_::resize(int X, int Y, int W, int H) {
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   fltk3::Widget::resize(X, Y, W, H);
   // move the scrollbars so they can respond to events:
   bbox(X,Y,W,H);
@@ -416,7 +416,7 @@
 	fl_pop_clip();
       }
       item_draw(l, X-hposition_, yy+Y, W+hposition_, hh);
-      if (l == selection_ && Fl::focus() == this) {
+      if (l == selection_ && fltk3::focus() == this) {
 	draw_box(fltk3::BORDER_FRAME, X, yy+Y, W, hh, color());
 	draw_focus(fltk3::NO_BOX, X, yy+Y, W+1, hh+1);
       }
@@ -455,7 +455,7 @@
   }
   
   // update the scrollbars and redraw them:
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   int dy = top_ ? item_quick_height(top_) : 0; if (dy < 10) dy = 10;
   if (scrollbar.visible()) {
     scrollbar.damage_resize(
@@ -583,7 +583,7 @@
 /**
  This method returns the item under mouse y position \p ypos.
  NULL is returned if no item is displayed at that position.
- \param[in] ypos The y position (eg. Fl::event_y()) to find an item under.
+ \param[in] ypos The y position (eg. fltk3::event_y()) to find an item under.
  \returns The item, or NULL if not found
  */
 void* Fl_Browser_::find_item(int ypos) {
@@ -718,7 +718,7 @@
     void* l = l1; if (!l) l = top_; if (!l) l = item_first();
     if (l) {
       if (type()==FL_HOLD_BROWSER) {
-        switch (Fl::event_key()) {
+        switch (fltk3::event_key()) {
           case fltk3::DownKey:
             while ((l = item_next(l)))
               if (item_height(l)>0) {select_only(l, when()); break;}
@@ -733,7 +733,7 @@
             return 1;
         } 
       } else  {
-        switch (Fl::event_key()) {
+        switch (fltk3::event_key()) {
           case fltk3::EnterKey:
           case fltk3::KPEnterKey:
             select_only(l, when() & ~fltk3::WHEN_ENTER_KEY);
@@ -749,7 +749,7 @@
             return 1;
           case fltk3::DownKey:
             while ((l = item_next(l))) {
-              if (Fl::event_state(fltk3::SHIFT|fltk3::CTRL))
+              if (fltk3::event_state(fltk3::SHIFT|fltk3::CTRL))
                 select(l, l1 ? item_selected(l1) : 1, when());
               if (wp.deleted()) return 1;
               if (item_height(l)>0) goto J1;
@@ -757,7 +757,7 @@
             return 1;
           case fltk3::UpKey:
             while ((l = item_prev(l))) {
-              if (Fl::event_state(fltk3::SHIFT|fltk3::CTRL))
+              if (fltk3::event_state(fltk3::SHIFT|fltk3::CTRL))
                 select(l, l1 ? item_selected(l1) : 1, when());
               if (wp.deleted()) return 1;
               if (item_height(l)>0) goto J1;
@@ -789,7 +789,7 @@
   //     }
   // See str #834
   // The first form calls the callback *before* setting change.
-  // The callback may execute an Fl::wait(), resulting in another
+  // The callback may execute an fltk3::wait(), resulting in another
   // call of Fl_Browser_::handle() for the same widget. The sequence
   // of events can be an fltk3::PUSH followed by an fltk3::RELEASE.
   // This second call of Fl_Browser_::handle() may result in a -
@@ -800,12 +800,12 @@
   static int py;
   switch (event) {
     case fltk3::PUSH:
-      if (!Fl::event_inside(X, Y, W, H)) return 0;
-      if (Fl::visible_focus()) {
-        Fl::focus(this);
+      if (!fltk3::event_inside(X, Y, W, H)) return 0;
+      if (fltk3::visible_focus()) {
+        fltk3::focus(this);
         redraw();
       }
-      my = py = Fl::event_y();
+      my = py = fltk3::event_y();
       change = 0;
       if (type() == FL_NORMAL_BROWSER || !top_)
         ;
@@ -820,7 +820,7 @@
       } else {
         void* l = find_item(my);
         whichway = 1;
-        if (Fl::event_state(fltk3::CTRL)) { // toggle selection:
+        if (fltk3::event_state(fltk3::CTRL)) { // toggle selection:
         TOGGLE:
           if (l) {
             whichway = !item_selected(l);
@@ -832,7 +832,7 @@
               if (wp.deleted()) return 1;
             }
           }
-        } else if (Fl::event_state(fltk3::SHIFT)) { // extend selection:
+        } else if (fltk3::event_state(fltk3::SHIFT)) { // extend selection:
           if (l == selection_) goto TOGGLE;
           // state of previous selection determines new value:
           whichway = l ? !item_selected(l) : 1;
@@ -874,7 +874,7 @@
       return 1;
     case fltk3::DRAG:
       // do the scrolling first:
-      my = Fl::event_y();
+      my = fltk3::event_y();
       if (my < Y && my < py) {
         int p = real_position_+my-Y;
         if (p<0) p = 0;
@@ -912,7 +912,7 @@
       } else {
         void* l1 = selection_;
         void* l =
-	(Fl::event_x()<x() || Fl::event_x()>x()+w()) ? selection_ :
+	(fltk3::event_x()<x() || fltk3::event_x()>x()+w()) ? selection_ :
 	find_item(my);
         change = (l != l1);
         select_only(l, when() & fltk3::WHEN_CHANGED);
@@ -936,14 +936,14 @@
       if (wp.deleted()) return 1;
       
       // double click calls the callback: (like Enter Key)
-      if (Fl::event_clicks() && (when() & fltk3::WHEN_ENTER_KEY)) {
+      if (fltk3::event_clicks() && (when() & fltk3::WHEN_ENTER_KEY)) {
         set_changed();
         do_callback();
       }
       return 1;
     case fltk3::FOCUS:
     case fltk3::UNFOCUS:
-      if (type() >= FL_HOLD_BROWSER && Fl::visible_focus()) {
+      if (type() >= FL_HOLD_BROWSER && fltk3::visible_focus()) {
         redraw();
         return 1;
       } else return 0;

Modified: branches/branch-3.0/src/Fl_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Button.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -83,7 +83,7 @@
     draw_label();
     labelcolor(c);
   } else draw_label();
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
 }
 
 int Fl_Button::handle(int event) {
@@ -94,9 +94,9 @@
 //  if ((value_?selection_color():color())==fltk3::GRAY) redraw();
     return 1;
   case fltk3::PUSH:
-    if (Fl::visible_focus() && handle(fltk3::FOCUS)) Fl::focus(this);
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) fltk3::focus(this);
   case fltk3::DRAG:
-    if (Fl::event_inside(this)) {
+    if (fltk3::event_inside(this)) {
       if (type() == FL_RADIO_BUTTON) newval = 1;
       else newval = !oldval;
     } else
@@ -132,12 +132,12 @@
     return 1;
   case fltk3::SHORTCUT:
     if (!(shortcut() ?
-	  Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;    
-    if (Fl::visible_focus() && handle(fltk3::FOCUS)) Fl::focus(this);
+	  fltk3::test_shortcut(shortcut()) : test_shortcut())) return 0;    
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) fltk3::focus(this);
     goto triggered_by_keyboard;
   case fltk3::FOCUS : /* FALLTHROUGH */
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       if (box() == fltk3::NO_BOX) {
 	// Widgets with the fltk3::NO_BOX boxtype need a parent to
 	// redraw, since it is responsible for redrawing the
@@ -149,8 +149,8 @@
       return 1;
     } else return 0;
   case fltk3::KEYBOARD :
-    if (Fl::focus() == this && Fl::event_key() == ' ' &&
-        !(Fl::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
+    if (fltk3::focus() == this && fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
       set_changed();
     triggered_by_keyboard:
       fltk3::WidgetTracker wp(this);
@@ -175,13 +175,13 @@
 void Fl_Button::simulate_key_action()
 {
   if (key_release_tracker) {
-    Fl::remove_timeout(key_release_timeout, key_release_tracker);
+    fltk3::remove_timeout(key_release_timeout, key_release_tracker);
     key_release_timeout(key_release_tracker);
   }
   value(1); 
   redraw();
   key_release_tracker = new fltk3::WidgetTracker(this);
-  Fl::add_timeout(0.15, key_release_timeout, key_release_tracker);
+  fltk3::add_timeout(0.15, key_release_timeout, key_release_tracker);
 }
 
 void Fl_Button::key_release_timeout(void *d)

Modified: branches/branch-3.0/src/Fl_Chart.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Chart.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Chart.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -234,10 +234,10 @@
 
     draw_box();
     fltk3::Boxtype b = box();
-    int xx = x()+Fl::box_dx(b); // was 9 instead of dx...
-    int yy = y()+Fl::box_dy(b);
-    int ww = w()-Fl::box_dw(b);
-    int hh = h()-Fl::box_dh(b);
+    int xx = x()+fltk3::box_dx(b); // was 9 instead of dx...
+    int yy = y()+fltk3::box_dy(b);
+    int ww = w()-fltk3::box_dw(b);
+    int hh = h()-fltk3::box_dh(b);
     fl_push_clip(xx, yy, ww, hh);
 
     ww--; hh--; // adjust for line thickness

Modified: branches/branch-3.0/src/Fl_Choice.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Choice.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Choice.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -35,8 +35,8 @@
 // button: it draws the text of the current pick and a down-arrow.
 
 void Fl_Choice::draw() {
-  int dx = Fl::box_dx(fltk3::DOWN_BOX);
-  int dy = Fl::box_dy(fltk3::DOWN_BOX);
+  int dx = fltk3::box_dx(fltk3::DOWN_BOX);
+  int dy = fltk3::box_dy(fltk3::DOWN_BOX);
   int H = h() - 2 * dy;
   int W = (H > 20) ? 20 : H;
   int X = x() + w() - W - dx;
@@ -45,11 +45,11 @@
   int x1 = X + (W - 2 * w1 - 1) / 2;
   int y1 = Y + (H - w1 - 1) / 2;
 
-  if (Fl::scheme()) {
+  if (fltk3::scheme()) {
     draw_box(fltk3::UP_BOX, color());
 
     fl_color(active_r() ? labelcolor() : fltk3::inactive(labelcolor()));
-    if (!strcmp(Fl::scheme(), "plastic")) {
+    if (!strcmp(fltk3::scheme(), "plastic")) {
       // Show larger up/down arrows...
       fl_polygon(x1, y1 + 3, x1 + w1, y1 + w1 + 3, x1 + 2 * w1, y1 + 3);
       fl_polygon(x1, y1 + 1, x1 + w1, y1 - w1 + 1, x1 + 2 * w1, y1 + 1);
@@ -89,7 +89,7 @@
 
     fl_push_clip(xx, yy, ww, hh);
 
-    if ( Fl::scheme()) {
+    if ( fltk3::scheme()) {
       Fl_Label l;
       l.value = m.text;
       l.image = 0;
@@ -102,11 +102,11 @@
       fl_draw_shortcut = 2; // hack value to make '&' disappear
       l.draw(xx+3, yy, ww>6 ? ww-6 : 0, hh, fltk3::ALIGN_LEFT);
       fl_draw_shortcut = 0;
-      if ( Fl::focus() == this ) draw_focus(box(), xx, yy, ww, hh);
+      if ( fltk3::focus() == this ) draw_focus(box(), xx, yy, ww, hh);
     }
     else {
       fl_draw_shortcut = 2; // hack value to make '&' disappear
-      m.draw(xx, yy, ww, hh, this, Fl::focus() == this);
+      m.draw(xx, yy, ww, hh, this, fltk3::focus() == this);
       fl_draw_shortcut = 0;
     }
 
@@ -170,12 +170,12 @@
     return 1;
 
   case fltk3::KEYBOARD:
-    if (Fl::event_key() != ' ' ||
-        (Fl::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) return 0;
+    if (fltk3::event_key() != ' ' ||
+        (fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) return 0;
   case fltk3::PUSH:
-    if (Fl::visible_focus()) Fl::focus(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
   J1:
-    if (Fl::scheme()
+    if (fltk3::scheme()
 	|| fltk3::contrast(textcolor(), fltk3::BACKGROUND2_COLOR) != textcolor()) {
       v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
     } else {
@@ -199,7 +199,7 @@
     return 1;
   case fltk3::FOCUS:
   case fltk3::UNFOCUS:
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     } else return 0;

Modified: branches/branch-3.0/src/Fl_Clock.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Clock.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Clock.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -191,7 +191,7 @@
 
 static void tick(void *v) {
   ((Fl_Clock*)v)->value(time(0));
-  Fl::add_timeout(1.0, tick, v);
+  fltk3::add_timeout(1.0, tick, v);
 }
 
 int Fl_Clock::handle(int event) {
@@ -200,7 +200,7 @@
     tick(this);
     break;
   case fltk3::HIDE:
-    Fl::remove_timeout(tick, this);
+    fltk3::remove_timeout(tick, this);
     break;
   }
   return Fl_Clock_Output::handle(event);
@@ -210,7 +210,7 @@
   The destructor removes the clock.
  */
 Fl_Clock::~Fl_Clock() {
-  Fl::remove_timeout(tick, this);
+  fltk3::remove_timeout(tick, this);
 }
 
 //

Modified: branches/branch-3.0/src/Fl_Color_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Color_Chooser.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Color_Chooser.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -217,31 +217,31 @@
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
   switch (e) {
   case fltk3::PUSH:
-    if (Fl::visible_focus()) {
-      Fl::focus(this);
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
       redraw();
     }
     ih = c->hue();
     is = c->saturation();
   case fltk3::DRAG: {
     double Xf, Yf, H, S;
-    Xf = (Fl::event_x()-x()-Fl::box_dx(box()))/double(w()-Fl::box_dw(box()));
-    Yf = (Fl::event_y()-y()-Fl::box_dy(box()))/double(h()-Fl::box_dh(box()));
+    Xf = (fltk3::event_x()-x()-fltk3::box_dx(box()))/double(w()-fltk3::box_dw(box()));
+    Yf = (fltk3::event_y()-y()-fltk3::box_dy(box()))/double(h()-fltk3::box_dh(box()));
     tohs(Xf, Yf, H, S);
     if (fabs(H-ih) < 3*6.0/w()) H = ih;
     if (fabs(S-is) < 3*1.0/h()) S = is;
-    if (Fl::event_state(fltk3::CTRL)) H = ih;
+    if (fltk3::event_state(fltk3::CTRL)) H = ih;
     if (c->hsv(H, S, c->value())) c->do_callback();
     } return 1;
   case fltk3::FOCUS : /* FALLTHROUGH */
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     }
     else return 1;
   case fltk3::KEYBOARD :
-    return handle_key(Fl::event_key());
+    return handle_key(fltk3::event_key());
   default:
     return 0;
   }
@@ -250,8 +250,8 @@
 
 static void generate_image(void* vv, int X, int Y, int W, uchar* buf) {
   Flcc_HueBox* v = (Flcc_HueBox*)vv;
-  int iw = v->w()-Fl::box_dw(v->box());
-  double Yf = double(Y)/(v->h()-Fl::box_dh(v->box()));
+  int iw = v->w()-fltk3::box_dw(v->box());
+  double Yf = double(Y)/(v->h()-fltk3::box_dh(v->box()));
 #ifdef UPDATE_HUE_BOX
   const double V = ((Fl_Color_Chooser*)(v->parent()))->value();
 #else
@@ -270,8 +270,8 @@
 
 #ifndef FL_DOXYGEN
 int Flcc_HueBox::handle_key(int key) {
-  int w1 = w()-Fl::box_dw(box())-6;
-  int h1 = h()-Fl::box_dh(box())-6;
+  int w1 = w()-fltk3::box_dw(box())-6;
+  int h1 = h()-fltk3::box_dh(box())-6;
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
 
 #ifdef CIRCLE
@@ -312,10 +312,10 @@
 #ifndef FL_DOXYGEN
 void Flcc_HueBox::draw() {
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
-  int x1 = x()+Fl::box_dx(box());
-  int yy1 = y()+Fl::box_dy(box());
-  int w1 = w()-Fl::box_dw(box());
-  int h1 = h()-Fl::box_dh(box());
+  int x1 = x()+fltk3::box_dx(box());
+  int yy1 = y()+fltk3::box_dy(box());
+  int w1 = w()-fltk3::box_dw(box());
+  int h1 = h()-fltk3::box_dh(box());
   if (damage() == fltk3::DAMAGE_EXPOSE) fl_push_clip(x1+px,yy1+py,6,6);
   fl_draw_image(generate_image, this, x1, yy1, w1, h1);
   if (damage() == fltk3::DAMAGE_EXPOSE) fl_pop_clip();
@@ -330,7 +330,7 @@
   if (X < 0) X = 0; else if (X > w1-6) X = w1-6;
   if (Y < 0) Y = 0; else if (Y > h1-6) Y = h1-6;
   //  fl_color(c->value()>.75 ? fltk3::BLACK : fltk3::WHITE);
-  draw_box(fltk3::UP_BOX,x1+X,yy1+Y,6,6,Fl::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
+  draw_box(fltk3::UP_BOX,x1+X,yy1+Y,6,6,fltk3::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
   px = X; py = Y;
 }
 #endif // !FL_DOXYGEN
@@ -343,26 +343,26 @@
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
   switch (e) {
   case fltk3::PUSH:
-    if (Fl::visible_focus()) {
-      Fl::focus(this);
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
       redraw();
     }
     iv = c->value();
   case fltk3::DRAG: {
     double Yf;
-    Yf = 1-(Fl::event_y()-y()-Fl::box_dy(box()))/double(h()-Fl::box_dh(box()));
+    Yf = 1-(fltk3::event_y()-y()-fltk3::box_dy(box()))/double(h()-fltk3::box_dh(box()));
     if (fabs(Yf-iv)<(3*1.0/h())) Yf = iv;
     if (c->hsv(c->hue(),c->saturation(),Yf)) c->do_callback();
     } return 1;
   case fltk3::FOCUS : /* FALLTHROUGH */
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     }
     else return 1;
   case fltk3::KEYBOARD :
-    return handle_key(Fl::event_key());
+    return handle_key(fltk3::event_key());
   default:
     return 0;
   }
@@ -372,7 +372,7 @@
 static double tr, tg, tb;
 static void generate_vimage(void* vv, int X, int Y, int W, uchar* buf) {
   Flcc_ValueBox* v = (Flcc_ValueBox*)vv;
-  double Yf = 255*(1.0-double(Y)/(v->h()-Fl::box_dh(v->box())));
+  double Yf = 255*(1.0-double(Y)/(v->h()-fltk3::box_dh(v->box())));
   uchar r = uchar(tr*Yf+.5);
   uchar g = uchar(tg*Yf+.5);
   uchar b = uchar(tb*Yf+.5);
@@ -386,23 +386,23 @@
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
   c->hsv2rgb(c->hue(),c->saturation(),1.0,tr,tg,tb);
-  int x1 = x()+Fl::box_dx(box());
-  int yy1 = y()+Fl::box_dy(box());
-  int w1 = w()-Fl::box_dw(box());
-  int h1 = h()-Fl::box_dh(box());
+  int x1 = x()+fltk3::box_dx(box());
+  int yy1 = y()+fltk3::box_dy(box());
+  int w1 = w()-fltk3::box_dw(box());
+  int h1 = h()-fltk3::box_dh(box());
   if (damage() == fltk3::DAMAGE_EXPOSE) fl_push_clip(x1,yy1+py,w1,6);
   fl_draw_image(generate_vimage, this, x1, yy1, w1, h1);
   if (damage() == fltk3::DAMAGE_EXPOSE) fl_pop_clip();
   int Y = int((1-c->value()) * (h1-6));
   if (Y < 0) Y = 0; else if (Y > h1-6) Y = h1-6;
-  draw_box(fltk3::UP_BOX,x1,yy1+Y,w1,6,Fl::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
+  draw_box(fltk3::UP_BOX,x1,yy1+Y,w1,6,fltk3::focus() == this ? fltk3::FOREGROUND_COLOR : fltk3::GRAY);
   py = Y;
 }
 #endif // !FL_DOXYGEN
 
 #ifndef FL_DOXYGEN
 int Flcc_ValueBox::handle_key(int key) {
-  int h1 = h()-Fl::box_dh(box())-6;
+  int h1 = h()-fltk3::box_dh(box())-6;
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
 
   int Y = int((1-c->value()) * h1);
@@ -517,10 +517,10 @@
 
 void ColorChip::draw() {
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
-  fl_rectf(x()+Fl::box_dx(box()),
-	   y()+Fl::box_dy(box()),
-	   w()-Fl::box_dw(box()),
-	   h()-Fl::box_dh(box()),r,g,b);
+  fl_rectf(x()+fltk3::box_dx(box()),
+	   y()+fltk3::box_dy(box()),
+	   w()-fltk3::box_dw(box()),
+	   h()-fltk3::box_dh(box()),r,g,b);
 }
 
 static void chooser_cb(fltk3::Widget* o, void* vv) {
@@ -592,7 +592,7 @@
   window.set_modal();
   window.hotspot(window);
   window.show();
-  while (window.shown()) Fl::wait();
+  while (window.shown()) fltk3::wait();
   if (ret) { // ok_button or Enter
     r = chooser.r();
     g = chooser.g();

Modified: branches/branch-3.0/src/Fl_Counter.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Counter.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Counter.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -64,7 +64,7 @@
   fl_color(active_r() ? textcolor() : fltk3::inactive(textcolor()));
   char str[128]; format(str);
   fl_draw(str, xx[0], y(), ww[0], h(), fltk3::ALIGN_CENTER);
-  if (Fl::focus() == this) draw_focus(boxtype[0], xx[0], y(), ww[0], h());
+  if (fltk3::focus() == this) draw_focus(boxtype[0], xx[0], y(), ww[0], h());
   if (!(damage()&fltk3::DAMAGE_ALL)) return; // only need to redraw text
 
   if (active_r())
@@ -104,7 +104,7 @@
 void Fl_Counter::repeat_callback(void* v) {
   Fl_Counter* b = (Fl_Counter*)v;
   if (b->mouseobj) {
-    Fl::add_timeout(REPEAT, repeat_callback, b);
+    fltk3::add_timeout(REPEAT, repeat_callback, b);
     b->increment_cb();
   }
 }
@@ -112,14 +112,14 @@
 int Fl_Counter::calc_mouseobj() {
   if (type() == FL_NORMAL_COUNTER) {
     int W = w()*15/100;
-    if (Fl::event_inside(x(), y(), W, h())) return 1;
-    if (Fl::event_inside(x()+W, y(), W, h())) return 2;
-    if (Fl::event_inside(x()+w()-2*W, y(), W, h())) return 3;
-    if (Fl::event_inside(x()+w()-W, y(), W, h())) return 4;
+    if (fltk3::event_inside(x(), y(), W, h())) return 1;
+    if (fltk3::event_inside(x()+W, y(), W, h())) return 2;
+    if (fltk3::event_inside(x()+w()-2*W, y(), W, h())) return 3;
+    if (fltk3::event_inside(x()+w()-W, y(), W, h())) return 4;
   } else {
     int W = w()*20/100;
-    if (Fl::event_inside(x(), y(), W, h())) return 2;
-    if (Fl::event_inside(x()+w()-W, y(), W, h())) return 3;
+    if (fltk3::event_inside(x(), y(), W, h())) return 2;
+    if (fltk3::event_inside(x()+w()-W, y(), W, h())) return 3;
   }
   return -1;
 }
@@ -129,14 +129,14 @@
   switch (event) {
   case fltk3::RELEASE:
     if (mouseobj) {
-      Fl::remove_timeout(repeat_callback, this);
+      fltk3::remove_timeout(repeat_callback, this);
       mouseobj = 0;
       redraw();
     }
     handle_release();
     return 1;
   case fltk3::PUSH:
-    if (Fl::visible_focus()) Fl::focus(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
     { fltk3::WidgetTracker wp(this);
       handle_push();
       if (wp.deleted()) return 1;
@@ -144,9 +144,9 @@
   case fltk3::DRAG:
     i = calc_mouseobj();
     if (i != mouseobj) {
-      Fl::remove_timeout(repeat_callback, this);
+      fltk3::remove_timeout(repeat_callback, this);
       mouseobj = (uchar)i;
-      if (i) Fl::add_timeout(INITIALREPEAT, repeat_callback, this);
+      if (i) fltk3::add_timeout(INITIALREPEAT, repeat_callback, this);
       fltk3::WidgetTracker wp(this);
       increment_cb();
       if (wp.deleted()) return 1;
@@ -154,7 +154,7 @@
     }
     return 1;
   case fltk3::KEYBOARD :
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case fltk3::LeftKey:
 	handle_drag(clamp(increment(value(),-1)));
 	return 1;
@@ -167,7 +167,7 @@
     // break not required because of switch...
   case fltk3::FOCUS : /* FALLTHROUGH */
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     } else return 0;
@@ -183,7 +183,7 @@
   Destroys the valuator.
  */
 Fl_Counter::~Fl_Counter() {
-  Fl::remove_timeout(repeat_callback, this);
+  fltk3::remove_timeout(repeat_callback, this);
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_Dial.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Dial.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Dial.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -38,14 +38,14 @@
 */
 void Fl_Dial::draw(int X, int Y, int W, int H) {
   if (damage()&fltk3::DAMAGE_ALL) draw_box(box(), X, Y, W, H, color());
-  X += Fl::box_dx(box());
-  Y += Fl::box_dy(box());
-  W -= Fl::box_dw(box());
-  H -= Fl::box_dh(box());
+  X += fltk3::box_dx(box());
+  Y += fltk3::box_dy(box());
+  W -= fltk3::box_dw(box());
+  H -= fltk3::box_dh(box());
   double angle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1;
   if (type() == FL_FILL_DIAL) {
     // foo: draw this nicely in certain round box types
-    int foo = (box() > fltk3::ROUND_UP_BOX && Fl::box_dx(box()));
+    int foo = (box() > fltk3::ROUND_UP_BOX && fltk3::box_dx(box()));
     if (foo) {X--; Y--; W+=2; H+=2;}
     if (active_r()) fl_color(color());
     else fl_color(fltk3::inactive(color()));
@@ -114,8 +114,8 @@
     handle_push();
     if (wp.deleted()) return 1; }
   case fltk3::DRAG: {
-    int mx = (Fl::event_x()-X-W/2)*H;
-    int my = (Fl::event_y()-Y-H/2)*W;
+    int mx = (fltk3::event_x()-X-W/2)*H;
+    int my = (fltk3::event_y()-Y-H/2)*W;
     if (!mx && !my) return 1;
     double angle = 270-atan2((float)-my, (float)mx)*180/M_PI;
     double oldangle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1;

Modified: branches/branch-3.0/src/Fl_Double_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Double_Window.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Double_Window.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -391,7 +391,7 @@
     DeleteDC(fl_gc);
     fl_gc = _sgc;
     //# if defined(FLTK_USE_CAIRO)
-    //if Fl::cairo_autolink_context() Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+    //if fltk3::cairo_autolink_context() fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
     //# endif
 #elif defined(__APPLE__)
     if ( myi->other_xid ) {

Modified: branches/branch-3.0/src/Fl_File_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Chooser.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_File_Chooser.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -33,7 +33,7 @@
 void Fl_File_Chooser::cb_window_i(Fl_Double_Window*, void*) {
   fileName->value("");
 fileList->deselect();
-Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
 window->hide();
 }
 void Fl_File_Chooser::cb_window(Fl_Double_Window* o, void* v) {
@@ -129,7 +129,7 @@
 void Fl_File_Chooser::cb_cancelButton_i(Fl_Button*, void*) {
   fileName->value("");
 fileList->deselect();
-Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
 window->hide();
 }
 void Fl_File_Chooser::cb_cancelButton(Fl_Button* o, void* v) {
@@ -317,7 +317,7 @@
   callback_ = 0;
 data_ = 0;
 directory_[0] = 0;
-window->size_range(window->w(), window->h(), Fl::w(), Fl::h());
+window->size_range(window->w(), window->h(), fltk3::w(), fltk3::h());
 type(t);
 filter(p);
 update_favorites();
@@ -331,7 +331,7 @@
 }
 
 Fl_File_Chooser::~Fl_File_Chooser() {
-  Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+  fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
 if(ext_group)window->remove(ext_group);
 delete window;
 delete favWindow;
@@ -403,7 +403,7 @@
 void Fl_File_Chooser::show() {
   window->hotspot(fileList);
 window->show();
-Fl::flush();
+fltk3::flush();
 fl_cursor(fltk3::CURSOR_WAIT);
 rescan_keep_filename();
 fl_cursor(fltk3::CURSOR_DEFAULT);

Modified: branches/branch-3.0/src/Fl_File_Chooser2.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Chooser2.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_File_Chooser2.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -711,7 +711,7 @@
     snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
   }
 
-  if (Fl::event_clicks()) {
+  if (fltk3::event_clicks()) {
 #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
     if ((strlen(pathname) == 2 && pathname[1] == ':') ||
         _fl_filename_isdir_quick(pathname))
@@ -726,7 +726,7 @@
       // be treated as a triple-click.  We use a value of -1 because
       // the next click will increment click count to 0, which is what
       // we really want...
-      Fl::event_clicks(-1);
+      fltk3::event_clicks(-1);
     }
     else
     {
@@ -773,8 +773,8 @@
     fileName->value(pathname);
 
     // Update the preview box...
-    Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
-    Fl::add_timeout(1.0, (Fl_Timeout_Handler)previewCB, this);
+    fltk3::remove_timeout((fltk3::TimeoutHandler)previewCB, this);
+    fltk3::add_timeout(1.0, (fltk3::TimeoutHandler)previewCB, this);
 
     // Do any callback that is registered...
     if (callback_) (*callback_)(this, data_);
@@ -807,7 +807,7 @@
   const char	*file;		// File from directory
 
 //  puts("fileNameCB()");
-//  printf("Event: %s\n", fl_eventnames[Fl::event()]);
+//  printf("Event: %s\n", fl_eventnames[fltk3::event()]);
 
   // Get the filename from the text field...
   filename = (char *)fileName->value();
@@ -843,7 +843,7 @@
   filename = pathname;
 
   // Now process things according to the key pressed...
-  if (Fl::event_key() == fltk3::EnterKey || Fl::event_key() == fltk3::KPEnterKey) {
+  if (fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey) {
     // Enter pressed - select or change directory...
 #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
     if ((isalpha(pathname[0] & 255) && pathname[1] == ':' && !pathname[2]) ||
@@ -870,8 +870,8 @@
       fl_alert("%s",existing_file_label);
     }
   }
-  else if (Fl::event_key() != fltk3::DeleteKey &&
-           Fl::event_key() != fltk3::BackSpaceKey) {
+  else if (fltk3::event_key() != fltk3::DeleteKey &&
+           fltk3::event_key() != fltk3::BackSpaceKey) {
     // Check to see if the user has entered a directory...
     if ((slash = strrchr(pathname, '/')) == NULL)
       slash = strrchr(pathname, '\\');
@@ -1328,13 +1328,13 @@
       } else {
         // if this file is an image, try to load it
         window->cursor(fltk3::CURSOR_WAIT);
-        Fl::check();
+        fltk3::check();
         
         image = Fl_Shared_Image::get(filename);
         
         if (image) {
           window->cursor(fltk3::CURSOR_DEFAULT);
-          Fl::check();
+          fltk3::check();
           set = 1;
         }
       }
@@ -1366,7 +1366,7 @@
     }
 
     window->cursor(fltk3::CURSOR_DEFAULT);
-    Fl::check();
+    fltk3::check();
 
     // Scan the buffer for printable UTF8 chars...
     for (ptr = preview_text_; *ptr; ptr++) {

Modified: branches/branch-3.0/src/Fl_File_Icon2.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Icon2.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_File_Icon2.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -118,7 +118,7 @@
 
   if (i)
   {
-    Fl::warning("Fl_File_Icon::load(): Unable to load icon file \"%s\".", f);
+    fltk3::warning("Fl_File_Icon::load(): Unable to load icon file \"%s\".", f);
     return;
   }
 }
@@ -143,7 +143,7 @@
   // Try to open the file...
   if ((fp = fl_fopen(fti, "rb")) == NULL)
   {
-    Fl::error("Fl_File_Icon::load_fti(): Unable to open \"%s\" - %s",
+    fltk3::error("Fl_File_Icon::load_fti(): Unable to open \"%s\" - %s",
               fti, strerror(errno));
     return -1;
   }
@@ -173,7 +173,7 @@
     // OK, this character better be a letter...
     if (!isalpha(ch))
     {
-      Fl::error("Fl_File_Icon::load_fti(): Expected a letter at file position %ld (saw '%c')",
+      fltk3::error("Fl_File_Icon::load_fti(): Expected a letter at file position %ld (saw '%c')",
                 ftell(fp) - 1, ch);
       break;
     }
@@ -195,7 +195,7 @@
     // Make sure we stopped on a parenthesis...
     if (ch != '(')
     {
-      Fl::error("Fl_File_Icon::load_fti(): Expected a ( at file position %ld (saw '%c')",
+      fltk3::error("Fl_File_Icon::load_fti(): Expected a ( at file position %ld (saw '%c')",
                 ftell(fp) - 1, ch);
       break;
     }
@@ -216,7 +216,7 @@
     // Make sure we stopped on a parenthesis...
     if (ch != ')')
     {
-      Fl::error("Fl_File_Icon::load_fti(): Expected a ) at file position %ld (saw '%c')",
+      fltk3::error("Fl_File_Icon::load_fti(): Expected a ) at file position %ld (saw '%c')",
                 ftell(fp) - 1, ch);
       break;
     }
@@ -224,7 +224,7 @@
     // Make sure the next character is a semicolon...
     if ((ch = getc(fp)) != ';')
     {
-      Fl::error("Fl_File_Icon::load_fti(): Expected a ; at file position %ld (saw '%c')",
+      fltk3::error("Fl_File_Icon::load_fti(): Expected a ; at file position %ld (saw '%c')",
                 ftell(fp) - 1, ch);
       break;
     }
@@ -323,7 +323,7 @@
     }
     else
     {
-      Fl::error("Fl_File_Icon::load_fti(): Unknown command \"%s\" at file position %ld.",
+      fltk3::error("Fl_File_Icon::load_fti(): Unknown command \"%s\" at file position %ld.",
                 command, ftell(fp) - 1);
       break;
     }

Modified: branches/branch-3.0/src/Fl_File_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Input.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_File_Input.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -132,7 +132,7 @@
     end ++;
 
     buttons_[i] = (short)fl_width(start, end - start);
-    if (!i) buttons_[i] += Fl::box_dx(box()) + 6;
+    if (!i) buttons_[i] += fltk3::box_dx(box()) + 6;
   }
 
 //  printf("    found %d components/buttons...\n", i);
@@ -175,12 +175,12 @@
   if (damage() & (fltk3::DAMAGE_BAR | fltk3::DAMAGE_ALL)) draw_buttons();
   // this flag keeps Fl_Input_::drawtext from drawing a bogus box!
   char must_trick_fl_input_ = 
-    Fl::focus()!=this && !size() && !(damage()&fltk3::DAMAGE_ALL);
+    fltk3::focus()!=this && !size() && !(damage()&fltk3::DAMAGE_ALL);
   if ((damage() & fltk3::DAMAGE_ALL) || must_trick_fl_input_) 
     draw_box(b,x(),y()+DIR_HEIGHT,w(),h()-DIR_HEIGHT,color());
   if (!must_trick_fl_input_) 
-    Fl_Input_::drawtext(x()+Fl::box_dx(b)+3, y()+Fl::box_dy(b)+DIR_HEIGHT,
-		        w()-Fl::box_dw(b)-6, h()-Fl::box_dh(b)-DIR_HEIGHT);
+    Fl_Input_::drawtext(x()+fltk3::box_dx(b)+3, y()+fltk3::box_dy(b)+DIR_HEIGHT,
+		        w()-fltk3::box_dw(b)-6, h()-fltk3::box_dh(b)-DIR_HEIGHT);
 }
 
 
@@ -200,7 +200,7 @@
     case fltk3::MOVE :
     case fltk3::ENTER :
       if (active_r()) {
-	if (Fl::event_y() < (y() + DIR_HEIGHT)) 
+	if (fltk3::event_y() < (y() + DIR_HEIGHT)) 
           window()->cursor(fltk3::CURSOR_DEFAULT);
 	else 
           window()->cursor(fltk3::CURSOR_INSERT);
@@ -209,7 +209,7 @@
       return 1;
 
     case fltk3::PUSH :
-      inButtonBar = (Fl::event_y() < (y() + DIR_HEIGHT));
+      inButtonBar = (fltk3::event_y() < (y() + DIR_HEIGHT));
     case fltk3::RELEASE :
     case fltk3::DRAG :
       if (inButtonBar) 
@@ -251,7 +251,7 @@
   {
     X += buttons_[i];
 
-    if (X > xscroll() && Fl::event_x() < (x() + X - xscroll())) break;
+    if (X > xscroll() && fltk3::event_x() < (x() + X - xscroll())) break;
   }
 
 //  printf("handle_button(event = %d), button = %d\n", event, i);

Modified: branches/branch-3.0/src/Fl_GIF_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_GIF_Image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_GIF_Image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -89,7 +89,7 @@
   char **new_data;	// Data array
 
   if ((GifFile = fl_fopen(infname, "rb")) == NULL) {
-    Fl::error("Fl_GIF_Image: Unable to open %s!", infname);
+    fltk3::error("Fl_GIF_Image: Unable to open %s!", infname);
     return;
   }
 
@@ -100,11 +100,11 @@
   }
   if (b[0]!='G' || b[1]!='I' || b[2] != 'F') {
     fclose(GifFile);
-    Fl::error("Fl_GIF_Image: %s is not a GIF file.\n", infname);
+    fltk3::error("Fl_GIF_Image: %s is not a GIF file.\n", infname);
     return;
   }
   if (b[3]!='8' || b[4]>'9' || b[5]!= 'a')
-    Fl::warning("%s is version %c%c%c.",infname,b[3],b[4],b[5]);
+    fltk3::warning("%s is version %c%c%c.",infname,b[3],b[4],b[5]);
   }
 
   int Width; GETSHORT(Width);
@@ -130,7 +130,7 @@
       Blue[i] = NEXTBYTE;
     }
   } else {
-    Fl::warning("%s does not have a colormap.", infname);
+    fltk3::warning("%s does not have a colormap.", infname);
     for (int i = 0; i < ColorMapSize; i++)
       Red[i] = Green[i] = Blue[i] = (uchar)(255 * i / (ColorMapSize-1));
   }
@@ -143,7 +143,7 @@
     int i = NEXTBYTE;
     if (i<0) {
       fclose(GifFile);
-      Fl::error("Fl_GIF_Image: %s - unexpected EOF",infname); 
+      fltk3::error("Fl_GIF_Image: %s - unexpected EOF",infname); 
       return;
     }
     int blocklen;
@@ -168,7 +168,7 @@
 	;
 
       } else if (ch != 0xFE) { //Gif Comment
-	Fl::warning("%s: unknown gif extension 0x%02x.", infname, ch);
+	fltk3::warning("%s: unknown gif extension 0x%02x.", infname, ch);
       }
     } else if (i == 0x2c) {	// an image
 
@@ -190,7 +190,7 @@
       CodeSize = NEXTBYTE+1;
       break; // okay, this is the image we want
     } else {
-      Fl::warning("%s: unknown gif code 0x%02x", infname, i);
+      fltk3::warning("%s: unknown gif code 0x%02x", infname, i);
       blocklen = 0;
     }
 
@@ -270,7 +270,7 @@
     int i;
     if (CurCode < FreeCode) i = CurCode;
     else if (CurCode == FreeCode) {*tp++ = (uchar)FinChar; i = OldCode;}
-    else {Fl::error("Fl_GIF_Image: %s - LZW Barf!", infname); break;}
+    else {fltk3::error("Fl_GIF_Image: %s - LZW Barf!", infname); break;}
 
     while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];}
     *tp++ = FinChar = i;

Modified: branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -57,17 +57,17 @@
   fl_gc = NULL;
   Fl_Display_Device::display_device()->set_current();
 #ifdef WIN32
-  Fl::check();
+  fltk3::check();
   fltk3::Window *win = (fltk3::Window*)glw;
   while( win->window() ) win = win->window();
   win->redraw();
-  Fl::check();
+  fltk3::check();
   glw->make_current();
 #else
   glw->make_current();
   glw->redraw();
   glFlush();
-  Fl::check();
+  fltk3::check();
   glFinish();
 #endif
   // Read OpenGL context pixels directly.

Modified: branches/branch-3.0/src/Fl_Gl_Overlay.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Overlay.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Gl_Overlay.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -164,7 +164,7 @@
     int n = (1<<fl_overlay_depth)-1;
     // copy all colors except #0 into the overlay palette:
     for (int i = 0; i <= n; i++) {
-      uchar r,g,b; Fl::get_color((fltk3::Color)i,r,g,b);
+      uchar r,g,b; fltk3::get_color((fltk3::Color)i,r,g,b);
       palette[i] = RGB(r,g,b);
     }
     // always provide black & white in the last 2 pixels:

Modified: branches/branch-3.0/src/Fl_Gl_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Window.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Gl_Window.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -86,7 +86,7 @@
       }
 
       if (!g) {
-        Fl::error("Insufficient GL support");
+        fltk3::error("Insufficient GL support");
 	return;
       }
     }
@@ -532,7 +532,7 @@
   buffers are swapped after this function is completed.
 */
 void Fl_Gl_Window::draw() {
-    Fl::fatal("Fl_Gl_Window::draw() *must* be overriden. Please refer to the documentation.");
+    fltk3::fatal("Fl_Gl_Window::draw() *must* be overriden. Please refer to the documentation.");
 }
 
 

Modified: branches/branch-3.0/src/Fl_Group.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Group.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Group.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -94,7 +94,7 @@
 */
 void fltk3::Group::current(fltk3::Group *g) {current_ = g;}
 
-extern fltk3::Widget* fl_oldfocus; // set by Fl::focus
+extern fltk3::Widget* fl_oldfocus; // set by fltk3::focus
 
 // For back-compatibility, we must adjust all events sent to child
 // windows so they are relative to that window.
@@ -106,21 +106,21 @@
   case fltk3::DND_ENTER: /* FALLTHROUGH */
   case fltk3::DND_DRAG:
     // figure out correct type of event:
-    event = (o->contains(Fl::belowmouse())) ? fltk3::DND_DRAG : fltk3::DND_ENTER;
+    event = (o->contains(fltk3::belowmouse())) ? fltk3::DND_DRAG : fltk3::DND_ENTER;
   }
-  int save_x = Fl::e_x; Fl::e_x -= o->x();
-  int save_y = Fl::e_y; Fl::e_y -= o->y();
+  int save_x = fltk3::e_x; fltk3::e_x -= o->x();
+  int save_y = fltk3::e_y; fltk3::e_y -= o->y();
   int ret = o->handle(event);
-  Fl::e_y = save_y;
-  Fl::e_x = save_x;
+  fltk3::e_y = save_y;
+  fltk3::e_x = save_x;
   switch ( event )
   {
   case fltk3::ENTER: /* FALLTHROUGH */
   case fltk3::DND_ENTER:
     // Successful completion of fltk3::ENTER means the widget is now the
-    // belowmouse widget, but only call Fl::belowmouse if the child
+    // belowmouse widget, but only call fltk3::belowmouse if the child
     // widget did not do so:
-    if (!o->contains(Fl::belowmouse())) Fl::belowmouse(o);
+    if (!o->contains(fltk3::belowmouse())) fltk3::belowmouse(o);
     break;
   }
   return ret;
@@ -129,11 +129,11 @@
 // translate the current keystroke into up/down/left/right for navigation:
 #define ctrl(x) (x^0x40)
 static int navkey() {
-  switch (Fl::event_key()) {
+  switch (fltk3::event_key()) {
   case 0: // not an fltk3::KEYBOARD/fltk3::SHORTCUT event
     break;
   case fltk3::TabKey:
-    if (!Fl::event_state(fltk3::SHIFT)) return fltk3::RightKey;
+    if (!fltk3::event_state(fltk3::SHIFT)) return fltk3::RightKey;
     return fltk3::LeftKey;
   case fltk3::RightKey:
     return fltk3::RightKey;
@@ -180,56 +180,56 @@
   case fltk3::SHORTCUT:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o) && send(o,fltk3::SHORTCUT))
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,fltk3::SHORTCUT))
 	return 1;
     }
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && !Fl::event_inside(o) && send(o,fltk3::SHORTCUT))
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,fltk3::SHORTCUT))
 	return 1;
     }
-    if ((Fl::event_key() == fltk3::EnterKey || Fl::event_key() == fltk3::KPEnterKey)) return navigation(fltk3::DownKey);
+    if ((fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey)) return navigation(fltk3::DownKey);
     return 0;
 
   case fltk3::ENTER:
   case fltk3::MOVE:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->visible() && Fl::event_inside(o)) {
-	if (o->contains(Fl::belowmouse())) {
+      if (o->visible() && fltk3::event_inside(o)) {
+	if (o->contains(fltk3::belowmouse())) {
 	  return send(o,fltk3::MOVE);
 	} else {
-	  Fl::belowmouse(o);
+	  fltk3::belowmouse(o);
 	  if (send(o,fltk3::ENTER)) return 1;
 	}
       }
     }
-    Fl::belowmouse(this);
+    fltk3::belowmouse(this);
     return 1;
 
   case fltk3::DND_ENTER:
   case fltk3::DND_DRAG:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o)) {
-	if (o->contains(Fl::belowmouse())) {
+      if (o->takesevents() && fltk3::event_inside(o)) {
+	if (o->contains(fltk3::belowmouse())) {
 	  return send(o,fltk3::DND_DRAG);
 	} else if (send(o,fltk3::DND_ENTER)) {
-	  if (!o->contains(Fl::belowmouse())) Fl::belowmouse(o);
+	  if (!o->contains(fltk3::belowmouse())) fltk3::belowmouse(o);
 	  return 1;
 	}
       }
     }
-    Fl::belowmouse(this);
+    fltk3::belowmouse(this);
     return 0;
 
   case fltk3::PUSH:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o)) {
+      if (o->takesevents() && fltk3::event_inside(o)) {
 	fltk3::WidgetTracker wp(o);
 	if (send(o,fltk3::PUSH)) {
-	  if (Fl::pushed() && wp.exists() && !o->contains(Fl::pushed())) Fl::pushed(o);
+	  if (fltk3::pushed() && wp.exists() && !o->contains(fltk3::pushed())) fltk3::pushed(o);
 	  return 1;
 	}
       }
@@ -238,13 +238,13 @@
 
   case fltk3::RELEASE:
   case fltk3::DRAG:
-    o = Fl::pushed();
+    o = fltk3::pushed();
     if (o == this) return 0;
     else if (o) send(o,event);
     else {
       for (i = children(); i--;) {
 	o = a[i];
-	if (o->takesevents() && Fl::event_inside(o)) {
+	if (o->takesevents() && fltk3::event_inside(o)) {
 	  if (send(o,event)) return 1;
 	}
       }
@@ -254,12 +254,12 @@
   case fltk3::MOUSEWHEEL:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
 	return 1;
     }
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && !Fl::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,fltk3::MOUSEWHEEL))
 	return 1;
     }
     return 0;
@@ -276,12 +276,12 @@
   case fltk3::HIDE:
     for (i = children(); i--;) {
       o = *a++;
-      if (event == fltk3::HIDE && o == Fl::focus()) {
+      if (event == fltk3::HIDE && o == fltk3::focus()) {
         // Give up input focus...
-	int old_event = Fl::e_number;
-        o->handle(Fl::e_number = fltk3::UNFOCUS);
-	Fl::e_number = old_event;
-	Fl::focus(0);
+	int old_event = fltk3::e_number;
+        o->handle(fltk3::e_number = fltk3::UNFOCUS);
+	fltk3::e_number = old_event;
+	fltk3::focus(0);
       }
       if (o->visible()) o->handle(event);
     }
@@ -290,7 +290,7 @@
   default:
     // For all other events, try to give to each child, starting at focus:
     for (i = 0; i < children(); i ++)
-      if (Fl::focus_ == a[i]) break;
+      if (fltk3::focus_ == a[i]) break;
 
     if (i >= children()) i = 0;
 
@@ -307,7 +307,7 @@
   }
 }
 
-//void fltk3::Group::focus(fltk3::Widget *o) {Fl::focus(o); o->handle(fltk3::FOCUS);}
+//void fltk3::Group::focus(fltk3::Widget *o) {fltk3::focus(o); o->handle(fltk3::FOCUS);}
 
 #if 0
 const char *nameof(fltk3::Widget *o) {
@@ -323,7 +323,7 @@
   int i;
   for (i = 0; ; i++) {
     if (i >= children_) return 0;
-    if (array_[i]->contains(Fl::focus())) break;
+    if (array_[i]->contains(fltk3::focus())) break;
   }
   fltk3::Widget *previous = array_[i];
 
@@ -388,14 +388,14 @@
   resizable_ = this;
   init_sizes();
 
-  // we must change the Fl::pushed() widget, if it is one of
+  // we must change the fltk3::pushed() widget, if it is one of
   // the group's children. Otherwise fl_fix_focus() would send
   // lots of events to children that are about to be deleted
   // anyway.
 
-  fltk3::Widget *pushed = Fl::pushed();	// save pushed() widget
+  fltk3::Widget *pushed = fltk3::pushed();	// save pushed() widget
   if (contains(pushed)) pushed = this;	// set it to be the group, if it's a child
-  Fl::pushed(this);			// for fl_fix_focus etc.
+  fltk3::pushed(this);			// for fl_fix_focus etc.
 
   // okay, now it is safe to destroy the children:
 
@@ -430,7 +430,7 @@
     }
   }
 
-  if (pushed != this) Fl::pushed(pushed); // reset pushed() widget
+  if (pushed != this) fltk3::pushed(pushed); // reset pushed() widget
 
 }
 
@@ -719,10 +719,10 @@
   fltk3::Widget*const* a = array();
 
   if (clip_children()) {
-    fl_push_clip(x() + Fl::box_dx(box()),
-                 y() + Fl::box_dy(box()),
-		 w() - Fl::box_dw(box()),
-		 h() - Fl::box_dh(box()));
+    fl_push_clip(x() + fltk3::box_dx(box()),
+                 y() + fltk3::box_dy(box()),
+		 w() - fltk3::box_dw(box()),
+		 h() - fltk3::box_dh(box()));
   }
 
   if (damage() & ~fltk3::DAMAGE_CHILD) { // redraw the entire thing:

Modified: branches/branch-3.0/src/Fl_Help_View.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Help_View.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Help_View.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -464,12 +464,12 @@
   draw_box(b, x(), y(), ww, hh, bgcolor_);
 
   if ( hscrollbar_.visible() || scrollbar_.visible() ) {
-    int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+    int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
     int hor_vis = hscrollbar_.visible();
     int ver_vis = scrollbar_.visible();
     // Scrollbar corner
-    int scorn_x = x() + ww - (ver_vis?scrollsize:0) - Fl::box_dw(b) + Fl::box_dx(b);
-    int scorn_y = y() + hh - (hor_vis?scrollsize:0) - Fl::box_dh(b) + Fl::box_dy(b);
+    int scorn_x = x() + ww - (ver_vis?scrollsize:0) - fltk3::box_dw(b) + fltk3::box_dx(b);
+    int scorn_y = y() + hh - (hor_vis?scrollsize:0) - fltk3::box_dh(b) + fltk3::box_dy(b);
     if ( hor_vis ) {
       if ( hscrollbar_.h() != scrollsize ) {		// scrollsize changed?
 	hscrollbar_.resize(x(), scorn_y, scorn_x - x(), scrollsize);
@@ -503,8 +503,8 @@
   current_pos = 0;
 
   // Clip the drawing to the inside of the box...
-  fl_push_clip(x() + Fl::box_dx(b), y() + Fl::box_dy(b),
-               ww - Fl::box_dw(b), hh - Fl::box_dh(b));
+  fl_push_clip(x() + fltk3::box_dx(b), y() + fltk3::box_dy(b),
+               ww - fltk3::box_dw(b), hh - fltk3::box_dh(b));
   fl_color(textcolor_);
 
   // Draw all visible blocks...
@@ -1094,8 +1094,8 @@
 
 
   // Reset document width...
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
-  hsize_ = w() - scrollsize - Fl::box_dw(b);
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  hsize_ = w() - scrollsize - fltk3::box_dw(b);
 
   done = 0;
   while (!done)
@@ -1824,11 +1824,11 @@
     qsort(targets_, ntargets_, sizeof(Fl_Help_Target),
           (compare_func_t)compare_targets);
 
-  int dx = Fl::box_dw(b) - Fl::box_dx(b);
-  int dy = Fl::box_dh(b) - Fl::box_dy(b);
-  int ss = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
-  int dw = Fl::box_dw(b) + ss;
-  int dh = Fl::box_dh(b);
+  int dx = fltk3::box_dw(b) - fltk3::box_dx(b);
+  int dy = fltk3::box_dh(b) - fltk3::box_dy(b);
+  int ss = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  int dw = fltk3::box_dw(b) + ss;
+  int dh = fltk3::box_dh(b);
 
   if (hsize_ > (w() - dw)) {
     hscrollbar_.show();
@@ -1837,36 +1837,36 @@
 
     if (size_ < (h() - dh)) {
       scrollbar_.hide();
-      hscrollbar_.resize(x() + Fl::box_dx(b), y() + h() - ss - dy,
-                         w() - Fl::box_dw(b), ss);
+      hscrollbar_.resize(x() + fltk3::box_dx(b), y() + h() - ss - dy,
+                         w() - fltk3::box_dw(b), ss);
     } else {
       scrollbar_.show();
-      scrollbar_.resize(x() + w() - ss - dx, y() + Fl::box_dy(b),
-                        ss, h() - ss - Fl::box_dh(b));
-      hscrollbar_.resize(x() + Fl::box_dx(b), y() + h() - ss - dy,
-                         w() - ss - Fl::box_dw(b), ss);
+      scrollbar_.resize(x() + w() - ss - dx, y() + fltk3::box_dy(b),
+                        ss, h() - ss - fltk3::box_dh(b));
+      hscrollbar_.resize(x() + fltk3::box_dx(b), y() + h() - ss - dy,
+                         w() - ss - fltk3::box_dw(b), ss);
     }
   } else {
     hscrollbar_.hide();
 
     if (size_ < (h() - dh)) scrollbar_.hide();
     else {
-      scrollbar_.resize(x() + w() - ss - dx, y() + Fl::box_dy(b),
-                        ss, h() - Fl::box_dh(b));
+      scrollbar_.resize(x() + w() - ss - dx, y() + fltk3::box_dy(b),
+                        ss, h() - fltk3::box_dh(b));
       scrollbar_.show();
     }
   }
 
   // Reset scrolling if it needs to be...
   if (scrollbar_.visible()) {
-    int temph = h() - Fl::box_dh(b);
+    int temph = h() - fltk3::box_dh(b);
     if (hscrollbar_.visible()) temph -= ss;
     if ((topline_ + temph) > size_) topline(size_ - temph);
     else topline(topline_);
   } else topline(0);
 
   if (hscrollbar_.visible()) {
-    int tempw = w() - ss - Fl::box_dw(b);
+    int tempw = w() - ss - fltk3::box_dw(b);
     if ((leftline_ + tempw) > hsize_) leftline(hsize_ - tempw);
     else leftline(leftline_);
   } else leftline(0);
@@ -2244,7 +2244,7 @@
   // Adjust the width if needed...
   int scale_width = *table_width;
 
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   if (scale_width == 0) {
     if (width > (hsize_ - scrollsize)) scale_width = hsize_ - scrollsize;
     else scale_width = width;
@@ -2671,7 +2671,7 @@
     if (val > 100) val = 100;
     else if (val < 0) val = 0;
 
-    int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+    int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
     val = val * (hsize_ - scrollsize) / 100;
   }
 
@@ -2780,8 +2780,8 @@
 
   if (!fl_help_view_buffer) fl_help_view_buffer = fl_create_offscreen(1, 1);
 
-  mouse_x = Fl::event_x();
-  mouse_y = Fl::event_y();
+  mouse_x = fltk3::event_x();
+  mouse_y = fltk3::event_y();
   draw_mode = 1;
 
     current_view = this;
@@ -2797,7 +2797,7 @@
 
 char Fl_Help_View::extend_selection()
 {
-  if (Fl::event_is_click())
+  if (fltk3::event_is_click())
     return 0;
 
 //  printf("old selection_first=%d, selection_last=%d\n",
@@ -2806,8 +2806,8 @@
   int sf = selection_first, sl = selection_last;
 
   selected = 1;
-  mouse_x = Fl::event_x();
-  mouse_y = Fl::event_y();
+  mouse_x = fltk3::event_x();
+  mouse_y = fltk3::event_y();
   draw_mode = 2;
 
     fl_begin_offscreen(fl_help_view_buffer);
@@ -2936,7 +2936,7 @@
     }
   }
   *d = 0;
-  Fl::copy(txt, strlen(txt), clipboard);
+  fltk3::copy(txt, strlen(txt), clipboard);
   free(txt);
 }
 
@@ -2948,8 +2948,8 @@
 {
   static Fl_Help_Link *linkp;   // currently clicked link
 
-  int xx = Fl::event_x() - x() + leftline_;
-  int yy = Fl::event_y() - y() + topline_;
+  int xx = fltk3::event_x() - x() + leftline_;
+  int yy = fltk3::event_y() - y() + topline_;
 
   switch (event)
   {
@@ -2985,7 +2985,7 @@
       return 1;
     case fltk3::DRAG:
       if (linkp) {
-        if (Fl::event_is_click()) {
+        if (fltk3::event_is_click()) {
           fl_cursor(fltk3::CURSOR_HAND);
         } else {
           fl_cursor(fltk3::CURSOR_DEFAULT); // should be "fltk3::CURSOR_CANCEL" if we had it
@@ -3001,7 +3001,7 @@
       return 1;
     case fltk3::RELEASE:
       if (linkp) {
-        if (Fl::event_is_click()) {
+        if (fltk3::event_is_click()) {
           follow_link(linkp);
         }
         fl_cursor(fltk3::CURSOR_DEFAULT);
@@ -3014,7 +3014,7 @@
       }
       return 1;
     case fltk3::SHORTCUT: {
-      char ascii = Fl::event_text()[0];
+      char ascii = fltk3::event_text()[0];
       switch (ascii) {
         case ctrl('A'): select_all(); redraw(); return 1;
         case ctrl('C'):
@@ -3035,10 +3035,10 @@
 			   int        hh,	// I - Height in pixels
 			   const char *l)
     : fltk3::Group(xx, yy, ww, hh, l),
-      scrollbar_(xx + ww - Fl::scrollbar_size(), yy,
-                 Fl::scrollbar_size(), hh - Fl::scrollbar_size()),
-      hscrollbar_(xx, yy + hh - Fl::scrollbar_size(),
-                  ww - Fl::scrollbar_size(), Fl::scrollbar_size())
+      scrollbar_(xx + ww - fltk3::scrollbar_size(), yy,
+                 fltk3::scrollbar_size(), hh - fltk3::scrollbar_size()),
+      hscrollbar_(xx, yy + hh - fltk3::scrollbar_size(),
+                  ww - fltk3::scrollbar_size(), fltk3::scrollbar_size())
 {
   color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
 
@@ -3242,12 +3242,12 @@
 
   fltk3::Widget::resize(xx, yy, ww, hh);
 
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
-  scrollbar_.resize(x() + w() - scrollsize - Fl::box_dw(b) + Fl::box_dx(b),
-                    y() + Fl::box_dy(b), scrollsize, h() - scrollsize - Fl::box_dh(b));
-  hscrollbar_.resize(x() + Fl::box_dx(b),
-                     y() + h() - scrollsize - Fl::box_dh(b) + Fl::box_dy(b),
-                     w() - scrollsize - Fl::box_dw(b), scrollsize);
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
+  scrollbar_.resize(x() + w() - scrollsize - fltk3::box_dw(b) + fltk3::box_dx(b),
+                    y() + fltk3::box_dy(b), scrollsize, h() - scrollsize - fltk3::box_dh(b));
+  hscrollbar_.resize(x() + fltk3::box_dx(b),
+                     y() + h() - scrollsize - fltk3::box_dh(b) + fltk3::box_dy(b),
+                     w() - scrollsize - fltk3::box_dw(b), scrollsize);
 
   format();
 }
@@ -3290,7 +3290,7 @@
   if (!value_)
     return;
 
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   if (size_ < (h() - scrollsize) || top < 0)
     top = 0;
   else if (top > size_)
@@ -3319,7 +3319,7 @@
   if (!value_)
     return;
 
-  int scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+  int scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
   if (hsize_ < (w() - scrollsize) || left < 0)
     left = 0;
   else if (left > hsize_)

Modified: branches/branch-3.0/src/Fl_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -127,7 +127,7 @@
   instead.
 */
 void Fl_Image::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
+  fltk3::set_labeltype(fltk3::IMAGE_LABEL, labeltype, measure);
   m->label(fltk3::IMAGE_LABEL, (const char*)this);
 }
 
@@ -295,7 +295,7 @@
   uchar		r, g, b;
   unsigned	ia, ir, ig, ib;
 
-  Fl::get_color(c, r, g, b);
+  fltk3::get_color(c, r, g, b);
   if (i < 0.0f) i = 0.0f;
   else if (i > 1.0f) i = 1.0f;
 

Modified: branches/branch-3.0/src/Fl_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Input.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Input.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -49,17 +49,17 @@
   if (input_type() == FL_HIDDEN_INPUT) return;
   fltk3::Boxtype b = box();
   if (damage() & fltk3::DAMAGE_ALL) draw_box(b, color());
-  Fl_Input_::drawtext(x()+Fl::box_dx(b), y()+Fl::box_dy(b),
-		      w()-Fl::box_dw(b), h()-Fl::box_dh(b));
+  Fl_Input_::drawtext(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+		      w()-fltk3::box_dw(b), h()-fltk3::box_dh(b));
 }
 
 // kludge so shift causes selection to extend:
 int Fl_Input::shift_position(int p) {
-  return position(p, Fl::event_state(fltk3::SHIFT) ? mark() : p);
+  return position(p, fltk3::event_state(fltk3::SHIFT) ? mark() : p);
 }
 
 int Fl_Input::shift_up_down_position(int p) {
-  return up_down_position(p, Fl::event_state(fltk3::SHIFT));
+  return up_down_position(p, fltk3::event_state(fltk3::SHIFT));
 }
 
 // Old text from FLTK 1.1 for reference:
@@ -68,13 +68,13 @@
 // cursor into the next field:
 // define it as 1 to prevent cursor movement from going to next field:
 //
-// Note: this has been replaced by Fl::option(Fl::OPTION_ARROW_FOCUS)
+// Note: this has been replaced by fltk3::option(fltk3::OPTION_ARROW_FOCUS)
 // in FLTK 1.3.  This option has "inverted" values:
 //   1 = Arrow keys move focus (previously 0)
 //   0 = Arrow keys don't move focus (previously 1)
 // Hence we define ...
 //
-#define NORMAL_INPUT_MOVE (Fl::option(Fl::OPTION_ARROW_FOCUS) ? 0 : 1)
+#define NORMAL_INPUT_MOVE (fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? 0 : 1)
 
 #define ctrl(x) ((x)^0x40)
 
@@ -96,7 +96,7 @@
 int Fl_Input::kf_lines_up(int repeat_num) {
   int i = position();
   if (!line_start(i)) {
-    //UNNEEDED if (input_type()==FL_MULTILINE_INPUT && !Fl::option(Fl::OPTION_ARROW_FOCUS)) return 1;
+    //UNNEEDED if (input_type()==FL_MULTILINE_INPUT && !fltk3::option(fltk3::OPTION_ARROW_FOCUS)) return 1;
     return NORMAL_INPUT_MOVE;
   }
   while(repeat_num--) {
@@ -114,7 +114,7 @@
 int Fl_Input::kf_lines_down(int repeat_num) {
   int i = position();
   if (line_end(i) >= size()) {
-    //UNNEEDED if (input_type()==FL_MULTILINE_INPUT && !Fl::option(Fl::OPTION_ARROW_FOCUS)) return 1;
+    //UNNEEDED if (input_type()==FL_MULTILINE_INPUT && !fltk3::option(fltk3::OPTION_ARROW_FOCUS)) return 1;
     return NORMAL_INPUT_MOVE;
   }
   while (repeat_num--) {  
@@ -212,7 +212,7 @@
 //
 int Fl_Input::kf_move_char_left() {
   int i = shift_position(position()-1) + NORMAL_INPUT_MOVE;
-  return Fl::option(Fl::OPTION_ARROW_FOCUS) ? i : 1;
+  return fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? i : 1;
 }
 
 // Move cursor one character to the right
@@ -220,7 +220,7 @@
 //
 int Fl_Input::kf_move_char_right() {
   int i = shift_position(position()+1) + NORMAL_INPUT_MOVE;
-  return Fl::option(Fl::OPTION_ARROW_FOCUS) ? i : 1;
+  return fltk3::option(fltk3::OPTION_ARROW_FOCUS) ? i : 1;
 }
 
 // Move cursor word-left
@@ -289,7 +289,7 @@
 // Do a paste operation
 int Fl_Input::kf_paste() {
   if (readonly()) { fl_beep(); return 1; }
-  Fl::paste(*this, 1);
+  fltk3::paste(*this, 1);
   return 1;
 }
 
@@ -305,14 +305,14 @@
 //
 int Fl_Input::handle_key() {
   
-  char ascii = Fl::event_text()[0];
+  char ascii = fltk3::event_text()[0];
   
   int del;
-  if (Fl::compose(del)) {
+  if (fltk3::compose(del)) {
     
     // Insert characters into numeric fields after checking for legality:
     if (input_type() == FL_FLOAT_INPUT || input_type() == FL_INT_INPUT) {
-      Fl::compose_reset(); // ignore any foreign letters...
+      fltk3::compose_reset(); // ignore any foreign letters...
       
       // initialize the list of legal characters inside a floating point number
 #ifdef HAVE_LOCALECONV
@@ -355,16 +355,16 @@
       return 1;
     }
     
-    if (del || Fl::event_length()) {
+    if (del || fltk3::event_length()) {
       if (readonly()) fl_beep();
       else replace(position(), del ? position()-del : mark(),
-	           Fl::event_text(), Fl::event_length());
+	           fltk3::event_text(), fltk3::event_length());
     }
     return 1;
   }
   
-  unsigned int mods = Fl::event_state() & (fltk3::META|fltk3::CTRL|fltk3::ALT);
-  unsigned int shift = Fl::event_state() & fltk3::SHIFT;
+  unsigned int mods = fltk3::event_state() & (fltk3::META|fltk3::CTRL|fltk3::ALT);
+  unsigned int shift = fltk3::event_state() & fltk3::SHIFT;
   unsigned int multiline = (input_type() == FL_MULTILINE_INPUT) ? 1 : 0;
   //
   // The following lists apps that support these keypresses.
@@ -378,7 +378,7 @@
   //
   // Example: (NP,WP,!WO) means supported in notepad + wordpad, but NOT word.
   //
-  switch (Fl::event_key()) {
+  switch (fltk3::event_key()) {
 
     case fltk3::InsertKey:
       // Note: Mac has no "Insert" key; it's the "Help" key.
@@ -588,7 +588,7 @@
   static fltk3::Widget *dnd_save_focus;
   switch (event) {
     case fltk3::FOCUS:
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
         case fltk3::RightKey:
           position(0);
           break;
@@ -615,8 +615,8 @@
       // where tab is entered as a character: make sure user attempt to 'tab over'
       // widget doesn't destroy the field, replacing it with a tab character.
       //
-      if (Fl::event_key() == fltk3::TabKey 			// Tab key?
-          && !Fl::event_state(fltk3::SHIFT)			// no shift?
+      if (fltk3::event_key() == fltk3::TabKey 			// Tab key?
+          && !fltk3::event_state(fltk3::SHIFT)			// no shift?
           && !tab_nav()					// with tab navigation disabled?
 	  && input_type() == FL_MULTILINE_INPUT		// with a multiline input?
           && (mark()==0 && position()==size())) {	// while entire field selected?
@@ -627,21 +627,21 @@
           position(position());
         return (1);
       } else {
-        if (active_r() && window() && this == Fl::belowmouse()) 
+        if (active_r() && window() && this == fltk3::belowmouse()) 
           window()->cursor(fltk3::CURSOR_NONE);
         return handle_key();
       }
       //NOTREACHED
       
     case fltk3::PUSH:
-      if (Fl::dnd_text_ops()) {
+      if (fltk3::dnd_text_ops()) {
         int oldpos = position(), oldmark = mark();
         fltk3::Boxtype b = box();
-        Fl_Input_::handle_mouse(x()+Fl::box_dx(b), y()+Fl::box_dy(b),
-                                w()-Fl::box_dw(b), h()-Fl::box_dh(b), 0);
+        Fl_Input_::handle_mouse(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                                w()-fltk3::box_dw(b), h()-fltk3::box_dh(b), 0);
         newpos = position(); 
         position( oldpos, oldmark );
-        if (Fl::focus()==this && !Fl::event_state(fltk3::SHIFT) && input_type()!=FL_SECRET_INPUT &&
+        if (fltk3::focus()==this && !fltk3::event_state(fltk3::SHIFT) && input_type()!=FL_SECRET_INPUT &&
            ( (newpos >= mark() && newpos < position()) || 
              (newpos >= position() && newpos < mark()) ) ) {
           // user clicked in the selection, may be trying to drag
@@ -651,38 +651,38 @@
         drag_start = -1;
       }
       
-      if (Fl::focus() != this) {
-        Fl::focus(this);
+      if (fltk3::focus() != this) {
+        fltk3::focus(this);
         handle(fltk3::FOCUS);
       }
       break;
       
     case fltk3::DRAG:
-      if (Fl::dnd_text_ops()) {
+      if (fltk3::dnd_text_ops()) {
         if (drag_start >= 0) {
-          if (Fl::event_is_click()) return 1; // debounce the mouse
+          if (fltk3::event_is_click()) return 1; // debounce the mouse
                                               // save the position because sometimes we don't get DND_ENTER:
           dnd_save_position = position();
           dnd_save_mark = mark();
           // drag the data:
-          copy(0); Fl::dnd();
+          copy(0); fltk3::dnd();
           return 1;
         }
       }
       break;
       
     case fltk3::RELEASE:
-      if (Fl::event_button() == 2) {
-        Fl::event_is_click(0); // stop double click from picking a word
-        Fl::paste(*this, 0);
-      } else if (!Fl::event_is_click()) {
+      if (fltk3::event_button() == 2) {
+        fltk3::event_is_click(0); // stop double click from picking a word
+        fltk3::paste(*this, 0);
+      } else if (!fltk3::event_is_click()) {
         // copy drag-selected text to the clipboard.
         copy(0);
-      } else if (Fl::event_is_click() && drag_start >= 0) {
+      } else if (fltk3::event_is_click() && drag_start >= 0) {
         // user clicked in the field and wants to reset the cursor position...
         position(drag_start, drag_start);
         drag_start = -1;
-      } else if (Fl::event_clicks()) {
+      } else if (fltk3::event_clicks()) {
         // user double or triple clicked to select word or whole text
         copy(0);
       }
@@ -694,19 +694,19 @@
       return 1;
       
     case fltk3::DND_ENTER:
-      Fl::belowmouse(this); // send the leave events first
+      fltk3::belowmouse(this); // send the leave events first
       dnd_save_position = position();
       dnd_save_mark = mark();
-      dnd_save_focus = Fl::focus();
+      dnd_save_focus = fltk3::focus();
       if (dnd_save_focus != this) {
-        Fl::focus(this);
+        fltk3::focus(this);
         handle(fltk3::FOCUS);
       }
       // fall through:
     case fltk3::DND_DRAG: 
       //int p = mouse_position(X, Y, W, H);
 #if DND_OUT_XXXX
-      if (Fl::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark ||
+      if (fltk3::focus()==this && (p>=dnd_save_position && p<=dnd_save_mark ||
                                 p>=dnd_save_mark && p<=dnd_save_position)) {
         position(dnd_save_position, dnd_save_mark);
         return 0;
@@ -714,8 +714,8 @@
 #endif
       {
         fltk3::Boxtype b = box();
-        Fl_Input_::handle_mouse(x()+Fl::box_dx(b), y()+Fl::box_dy(b),
-                                w()-Fl::box_dw(b), h()-Fl::box_dh(b), 0);
+        Fl_Input_::handle_mouse(x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                                w()-fltk3::box_dw(b), h()-fltk3::box_dh(b), 0);
       }
       return 1;
       
@@ -725,11 +725,11 @@
       if (!focused())
 #endif
         if (dnd_save_focus != this) {
-          Fl::focus(dnd_save_focus);
+          fltk3::focus(dnd_save_focus);
           handle(fltk3::UNFOCUS);
         }
 #if !(defined(__APPLE__) || defined(WIN32))
-      Fl::first_window()->cursor(fltk3::CURSOR_MOVE);
+      fltk3::first_window()->cursor(fltk3::CURSOR_MOVE);
 #endif
       return 1;
       
@@ -741,18 +741,18 @@
        That clipping happens in drawtext(). Do we change the clipping or should 
        we move the cursor (ouch)?
        case fltk3::MOUSEWHEEL:
-       if (Fl::e_dy > 0) {
-       yscroll( yscroll() - Fl::e_dy*15 );
-       } else if (Fl::e_dy < 0) {
-       yscroll( yscroll() - Fl::e_dy*15 );
+       if (fltk3::e_dy > 0) {
+       yscroll( yscroll() - fltk3::e_dy*15 );
+       } else if (fltk3::e_dy < 0) {
+       yscroll( yscroll() - fltk3::e_dy*15 );
        }
        return 1;
        */
   }
   fltk3::Boxtype b = box();
   return Fl_Input_::handletext(event,
-                               x()+Fl::box_dx(b), y()+Fl::box_dy(b),
-                               w()-Fl::box_dw(b), h()-Fl::box_dh(b));
+                               x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                               w()-fltk3::box_dw(b), h()-fltk3::box_dh(b));
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_Input_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Input_.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Input_.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -82,7 +82,7 @@
 
   } else while (o<e) {
     if (wrap() && (p >= value_+size_ || isspace(*p & 255))) {
-      word_wrap = w() - Fl::box_dw(box()) - 2;
+      word_wrap = w() - fltk3::box_dw(box()) - 2;
       width_to_lastspace += (int)fl_width(lastspace_out, o-lastspace_out);
       if (p > lastspace+1) {
 	if (word_count && width_to_lastspace > word_wrap) {
@@ -226,16 +226,16 @@
 void Fl_Input_::drawtext(int X, int Y, int W, int H) {
   int do_mu = !(damage()&fltk3::DAMAGE_ALL);
 
-  if (Fl::focus()!=this && !size()) {
+  if (fltk3::focus()!=this && !size()) {
     if (do_mu) { // we have to erase it if cursor was there
-      draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
-               W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
+      draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+               W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
     }
     return;
   }
 
   int selstart, selend;
-  if (Fl::focus()!=this && /*Fl::selection_owner()!=this &&*/ Fl::pushed()!=this)
+  if (fltk3::focus()!=this && /*fltk3::selection_owner()!=this &&*/ fltk3::pushed()!=this)
     selstart = selend = 0;
   else if (position() <= mark()) {
     selstart = position(); selend = mark();
@@ -257,7 +257,7 @@
     e = expand(p, buf);
     if (position() >= p-value() && position() <= e-value()) {
       curx = int(expandpos(p, value()+position(), buf, 0)+.5);
-      if (Fl::focus()==this && !was_up_down) up_down_pos = curx;
+      if (fltk3::focus()==this && !was_up_down) up_down_pos = curx;
       cury = lines*height;
       int newscroll = xscroll_;
       if (curx > newscroll+W-threshold) {
@@ -326,8 +326,8 @@
       }
       // clip to and erase it:
       fl_push_clip((int)xx-1-height/8, Y+ypos, (int)(r-xx+2+height/4), height);
-      draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
-               W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
+      draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+               W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
       // it now draws entire line over it
       // this should not draw letters to left of erased area, but
       // that is nyi.
@@ -366,7 +366,7 @@
 
   CONTINUE2:
     // draw the cursor:
-    if (Fl::focus() == this && selstart == selend &&
+    if (fltk3::focus() == this && selstart == selend &&
 	position() >= p-value() && position() <= e-value()) {
       fl_color(cursor_color());
       // cursor position may need to be recomputed (see STR #2486)
@@ -392,13 +392,13 @@
       && (!erase_cursor_only || p <= value()+mu_p)) {
     if (ypos < 0) ypos = 0;
     fl_push_clip(X, Y+ypos, W, H-ypos);
-    draw_box(box(), X-Fl::box_dx(box()), Y-Fl::box_dy(box()),
-             W+Fl::box_dw(box()), H+Fl::box_dh(box()), color());
+    draw_box(box(), X-fltk3::box_dx(box()), Y-fltk3::box_dy(box()),
+             W+fltk3::box_dw(box()), H+fltk3::box_dh(box()), color());
     fl_pop_clip();
   }
 
   fl_pop_clip();
-  if (Fl::focus() == this) {
+  if (fltk3::focus() == this) {
        fl_set_spot(textfont(), textsize(),
                (int)xpos+curx, Y+ypos-fl_descent(), W, H, window());
   }
@@ -517,7 +517,7 @@
   char buf[MAXBUF];
 
   int theline = (input_type()==FL_MULTILINE_INPUT) ?
-    (Fl::event_y()-Y+yscroll_)/fl_height() : 0;
+    (fltk3::event_y()-Y+yscroll_)/fl_height() : 0;
 
   int newpos = 0;
   for (p=value();; ) {
@@ -526,34 +526,34 @@
     if (e >= value_+size_) break;
     p = e+1;
   }
-  const char *l, *r, *t; double f0 = Fl::event_x()-X+xscroll_;
+  const char *l, *r, *t; double f0 = fltk3::event_x()-X+xscroll_;
   for (l = p, r = e; l<r; ) {
     double f;
     int cw = fl_utf8len((char)l[0]);
     if (cw < 1) cw = 1;
     t = l+cw;
     f = X-xscroll_+expandpos(p, t, buf, 0);
-    if (f <= Fl::event_x()) {l = t; f0 = Fl::event_x()-f;}
+    if (f <= fltk3::event_x()) {l = t; f0 = fltk3::event_x()-f;}
     else r = t-cw;
   }
   if (l < e) { // see if closer to character on right:
     double f1;
     int cw = fl_utf8len((char)l[0]);
     if (cw > 0) {
-      f1 = X-xscroll_+expandpos(p, l + cw, buf, 0) - Fl::event_x();
+      f1 = X-xscroll_+expandpos(p, l + cw, buf, 0) - fltk3::event_x();
       if (f1 < f0) l = l+cw;
     }
   }
   newpos = l-value();
 
   int newmark = drag ? mark() : newpos;
-  if (Fl::event_clicks()) {
+  if (fltk3::event_clicks()) {
     if (newpos >= newmark) {
       if (newpos == newmark) {
 	if (newpos < size()) newpos++;
 	else newmark--;
       }
-      if (Fl::event_clicks() > 1) {
+      if (fltk3::event_clicks() > 1) {
 	newpos = line_end(newpos);
 	newmark = line_start(newmark);
       } else {
@@ -561,7 +561,7 @@
 	newmark = word_start(newmark);
       }
     } else {
-      if (Fl::event_clicks() > 1) {
+      if (fltk3::event_clicks() > 1) {
 	newpos = line_start(newpos);
 	newmark = line_end(newmark);
       } else {
@@ -574,7 +574,7 @@
     if (!drag && (mark() > position() ?
                   (newmark >= position() && newpos <= mark()) :
                   (newmark >= mark() && newpos <= position()))) {
-      Fl::event_clicks(0);
+      fltk3::event_clicks(0);
       newmark = newpos = l-value();
     }
   }
@@ -626,7 +626,7 @@
   if (p == position_ && m == mark_) return 0;
 
 
-  //if (Fl::selection_owner() == this) Fl::selection_owner(0);
+  //if (fltk3::selection_owner() == this) fltk3::selection_owner(0);
   if (p != m) {
     if (p != position_) minimal_update(position_, p);
     if (m != mark_) minimal_update(mark_, m);
@@ -634,7 +634,7 @@
     // new position is a cursor
     if (position_ == mark_) {
       // old position was just a cursor
-      if (Fl::focus() == this && !(damage()&fltk3::DAMAGE_EXPOSE)) {
+      if (fltk3::focus() == this && !(damage()&fltk3::DAMAGE_EXPOSE)) {
 	minimal_update(position_); erase_cursor_only = 1;
       }
     } else { // old position was a selection
@@ -688,7 +688,7 @@
 
   \param clipboard the clipboard destination 0 or 1
   \return 0 if no text is selected, 1 if the selection was copied
-  \see Fl::copy(const char *, int, int)
+  \see fltk3::copy(const char *, int, int)
 */
 int Fl_Input_::copy(int clipboard) {
   int b = position();
@@ -696,7 +696,7 @@
   if (b != e) {
     if (b > e) {b = mark(); e = position();}
     if (input_type() == FL_SECRET_INPUT) e = b;
-    Fl::copy(value()+b, e-b, clipboard);
+    fltk3::copy(value()+b, e-b, clipboard);
     return 1;
   }
   return 0;
@@ -908,7 +908,7 @@
 int Fl_Input_::copy_cuts() {
   // put the yank buffer into the X clipboard
   if (!yankcut || input_type()==FL_SECRET_INPUT) return 0;
-  Fl::copy(undobuffer, yankcut, 1);
+  fltk3::copy(undobuffer, yankcut, 1);
   return 1;
 }
 
@@ -943,7 +943,7 @@
     fl_set_spot(textfont(), textsize(), x(), y(), w(), h(), window());
     if (mark_ == position_) {
       minimal_update(size()+1);
-    } else //if (Fl::selection_owner() != this)
+    } else //if (fltk3::selection_owner() != this)
       minimal_update(mark_, position_);
     return 1;
 
@@ -951,7 +951,7 @@
     if (active_r() && window()) window()->cursor(fltk3::CURSOR_DEFAULT);
     if (mark_ == position_) {
       if (!(damage()&fltk3::DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;}
-    } else //if (Fl::selection_owner() != this)
+    } else //if (fltk3::selection_owner() != this)
       minimal_update(mark_, position_);
   case fltk3::HIDE:
     fl_reset_spot();
@@ -962,10 +962,10 @@
   case fltk3::PUSH:
     if (active_r() && window()) window()->cursor(fltk3::CURSOR_INSERT);
 
-    handle_mouse(X, Y, W, H, Fl::event_state(fltk3::SHIFT));
+    handle_mouse(X, Y, W, H, fltk3::event_state(fltk3::SHIFT));
 
-    if (Fl::focus() != this) {
-      Fl::focus(this);
+    if (fltk3::focus() != this) {
+      fltk3::focus(this);
       handle(fltk3::FOCUS);
     }
     return 1;
@@ -986,11 +986,11 @@
     }
 
     // See if we have anything to paste...
-    if (!Fl::event_text() || !Fl::event_length()) return 1;
+    if (!fltk3::event_text() || !fltk3::event_length()) return 1;
 
     // strip trailing control characters and spaces before pasting:
-    const char* t = Fl::event_text();
-    const char* e = t+Fl::event_length();
+    const char* t = fltk3::event_text();
+    const char* e = t+fltk3::event_length();
     if (input_type() != FL_MULTILINE_INPUT) while (e > t && isspace(*(e-1) & 255)) e--;
     if (!t || e <= t) return 1; // Int/float stuff will crash without this test
     if (input_type() == FL_INT_INPUT) {
@@ -1029,10 +1029,10 @@
     return replace(position(), mark(), t, e-t);}
 
   case fltk3::SHORTCUT:
-    if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) 
+    if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut())) 
       return 0;
-    if (Fl::visible_focus() && handle(fltk3::FOCUS)) {
-      Fl::focus(this);
+    if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+      fltk3::focus(this);
       return 1;
     } // else fall through
 

Modified: branches/branch-3.0/src/Fl_Light_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Light_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Light_Button.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -38,14 +38,14 @@
 #include "flstring.h"
 
 void Fl_Light_Button::draw() {
-  if (box()) draw_box(this==Fl::pushed() ? fltk3::down(box()) : box(), color());
+  if (box()) draw_box(this==fltk3::pushed() ? fltk3::down(box()) : box(), color());
   fltk3::Color col = value() ? (active_r() ? selection_color() :
                             fltk3::inactive(selection_color())) : color();
   int W;
   int dx, dy;
 
   W  = labelsize();
-  dx = Fl::box_dx(box()) + 2;
+  dx = fltk3::box_dx(box()) + 2;
   dy = (h() - W) / 2;
   // if (dy < 0) dy = 0;         // neg. offset o.k. for vertical centering
 
@@ -59,7 +59,7 @@
         // Check box...
         draw_box(down_box(), x()+dx, y()+dy, W, W, fltk3::BACKGROUND2_COLOR);
 	if (value()) {
-	  if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(fltk3::SELECTION_COLOR);
 	  } else {
 	    fl_color(col);
@@ -80,12 +80,12 @@
         // Radio button...
         draw_box(down_box(), x()+dx, y()+dy, W, W, fltk3::BACKGROUND2_COLOR);
 	if (value()) {
-	  int tW = (W - Fl::box_dw(down_box())) / 2 + 1;
+	  int tW = (W - fltk3::box_dw(down_box())) / 2 + 1;
 	  if ((W - tW) & 1) tW++; // Make sure difference is even to center
 	  int tdx = dx + (W - tW) / 2;
 	  int tdy = dy + (W - tW) / 2;
 
-	  if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(fltk3::SELECTION_COLOR);
 	    tW --;
 	    fl_pie(x() + tdx - 1, y() + tdy - 1, tW + 3, tW + 3, 0.0, 360.0);
@@ -119,7 +119,7 @@
 	      break;
 	  }
 
-	  if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.5));
 	    fl_arc(x() + tdx, y() + tdy, tW + 1, tW + 1, 60.0, 180.0);
 	  }
@@ -135,7 +135,7 @@
     int ww = W/2+1;
     int xx = dx;
     if (w()<ww+2*xx) xx = (w()-ww)/2;
-    if (Fl::scheme() && !strcmp(Fl::scheme(), "plastic")) {
+    if (fltk3::scheme() && !strcmp(fltk3::scheme(), "plastic")) {
       col = active_r() ? selection_color() : fltk3::inactive(selection_color());
       fl_color(value() ? col : fltk3::color_average(col, fltk3::BLACK, 0.5f));
       fl_pie(x()+xx, y()+dy+1, ww, hh, 0, 360);
@@ -145,7 +145,7 @@
     dx = (ww + 2 * dx - W) / 2;
   }
   draw_label(x()+W+2*dx, y(), w()-W-2*dx, h());
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
 }
 
 int Fl_Light_Button::handle(int event) {

Modified: branches/branch-3.0/src/Fl_Menu.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -195,14 +195,14 @@
     if (flags & FL_MENU_RADIO) {
       fl_draw_box(fltk3::ROUND_DOWN_BOX, x+2, y+d, W, W, fltk3::BACKGROUND2_COLOR);
       if (value()) {
-	int tW = (W - Fl::box_dw(fltk3::ROUND_DOWN_BOX)) / 2 + 1;
+	int tW = (W - fltk3::box_dw(fltk3::ROUND_DOWN_BOX)) / 2 + 1;
 	if ((W - tW) & 1) tW++;	// Make sure difference is even to center
-	int td = Fl::box_dx(fltk3::ROUND_DOWN_BOX) + 1;
-        if (Fl::scheme()) {
+	int td = fltk3::box_dx(fltk3::ROUND_DOWN_BOX) + 1;
+        if (fltk3::scheme()) {
 	  // Offset the radio circle...
 	  td ++;
 
-	  if (!strcmp(Fl::scheme(), "gtk+")) {
+	  if (!strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(fltk3::SELECTION_COLOR);
 	    tW --;
 	    fl_pie(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0);
@@ -237,7 +237,7 @@
 	    break;
 	}
 
-	if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	  fl_color(fltk3::color_average(fltk3::WHITE, fltk3::SELECTION_COLOR, 0.5));
 	  fl_arc(x + td + 2, y + d + td, tW + 1, tW + 1, 60.0, 180.0);
 	}
@@ -245,7 +245,7 @@
     } else {
       fl_draw_box(fltk3::DOWN_BOX, x+2, y+d, W, W, fltk3::BACKGROUND2_COLOR);
       if (value()) {
-	if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	  fl_color(fltk3::SELECTION_COLOR);
 	} else {
 	  fl_color(labelcolor_);
@@ -277,7 +277,7 @@
   clear_border();
   set_menu_window();
   menu = L;
-  if (L->labelcolor_ || Fl::scheme() || L->labeltype_ > fltk3::NO_LABEL) clear_overlay();
+  if (L->labelcolor_ || fltk3::scheme() || L->labeltype_ > fltk3::NO_LABEL) clear_overlay();
 }
 
 menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
@@ -288,7 +288,7 @@
   int scr_x, scr_y, scr_w, scr_h;
   int tx = X, ty = Y;
 
-  Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
   if (!right_edge || right_edge > scr_x+scr_w) right_edge = scr_x+scr_w;
 
   end();
@@ -304,7 +304,7 @@
   } else {
     box(fltk3::UP_BOX);
   }
-  color(button && !Fl::scheme() ? button->color() : fltk3::GRAY);
+  color(button && !fltk3::scheme() ? button->color() : fltk3::GRAY);
   selected = -1;
   {
     int j = 0;
@@ -356,11 +356,11 @@
         }
       }
     }
-    if (m->labelcolor_ || Fl::scheme() || m->labeltype_ > fltk3::NO_LABEL) clear_overlay();
+    if (m->labelcolor_ || fltk3::scheme() || m->labeltype_ > fltk3::NO_LABEL) clear_overlay();
   }
   shortcutWidth = hotKeysw;
   if (selected >= 0 && !Wp) X -= W/2;
-  int BW = Fl::box_dx(box());
+  int BW = fltk3::box_dx(box());
   W += hotKeysw+hotModsw+2*BW+7;
   if (Wp > W) W = Wp;
   if (Wtitle > W) W = Wtitle;
@@ -382,10 +382,10 @@
       } else if (t) {
         // assume that the menubar item height relates to the first
         // menuitem as well
-        Y = Y-itemheight-h()-Fl::box_dh(box());
+        Y = Y-itemheight-h()-fltk3::box_dh(box());
       } else {
         // draw the menu to the right
-        Y = Y-h()+itemheight+Fl::box_dy(box());
+        Y = Y-h()+itemheight+fltk3::box_dy(box());
       }
     }
   }
@@ -393,7 +393,7 @@
 
   if (t) {
     if (menubar_title) {
-      int dy = Fl::box_dy(button->box())+1;
+      int dy = fltk3::box_dy(button->box())+1;
       int ht = button->h()-dy*2;
       title = new menutitle(tx, ty-ht-dy, Wtitle, ht, t);
     } else {
@@ -420,9 +420,9 @@
 // scroll so item i is visible on screen
 void menuwindow::autoscroll(int n) {
   int scr_x, scr_y, scr_w, scr_h;
-  int Y = y()+Fl::box_dx(box())+2+n*itemheight;
+  int Y = y()+fltk3::box_dx(box())+2+n*itemheight;
 
-  Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
   if (Y <= scr_y) Y = scr_y-Y+10;
   else {
     Y = Y+itemheight-scr_h-scr_y;
@@ -438,7 +438,7 @@
 void menuwindow::drawentry(const Fl_Menu_Item* m, int n, int eraseit) {
   if (!m) return; // this happens if -1 is selected item and redrawn
 
-  int BW = Fl::box_dx(box());
+  int BW = fltk3::box_dx(box());
   int xx = BW;
   int W = w();
   int ww = W-2*BW-1;
@@ -525,8 +525,8 @@
     }
     return n;
   }
-  if (mx < Fl::box_dx(box()) || mx >= w()) return -1;
-  int n = (my-Fl::box_dx(box())-1)/itemheight;
+  if (mx < fltk3::box_dx(box()) || mx >= w()) return -1;
+  int n = (my-fltk3::box_dx(box())-1)/itemheight;
   if (n < 0 || n>=numitems) return -1;
   return n;
 }
@@ -555,7 +555,7 @@
 ////////////////////////////////////////////////////////////////
 // Fl_Menu_Item::popup(...)
 
-// Because Fl::grab() is done, all events go to one of the menu windows.
+// Because fltk3::grab() is done, all events go to one of the menu windows.
 // But the handle method needs to look at all of them to find out
 // what item the user is pointing at.  And it needs a whole lot
 // of other state variables to determine what is going on with
@@ -669,7 +669,7 @@
   menustate &pp = *p;
   switch (e) {
   case fltk3::KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
     case fltk3::BackSpaceKey:
     BACKTAB:
       if (!backward(pp.menu_number)) {pp.item_number = -1;backward(pp.menu_number);}
@@ -684,10 +684,10 @@
       }
       return 1;
     case fltk3::TabKey:
-      if (Fl::event_shift()) goto BACKTAB;
+      if (fltk3::event_shift()) goto BACKTAB;
     case fltk3::DownKey:
       if (pp.menu_number || !pp.menubar) {
-        if (!forward(pp.menu_number) && Fl::event_key()==fltk3::TabKey) {
+        if (!forward(pp.menu_number) && fltk3::event_key()==fltk3::TabKey) {
           pp.item_number = -1;
           forward(pp.menu_number);
         }
@@ -740,8 +740,8 @@
   case fltk3::PUSH:
   case fltk3::DRAG:
     {
-      int mx = Fl::event_x_root();
-      int my = Fl::event_y_root();
+      int mx = fltk3::event_x_root();
+      int my = fltk3::event_y_root();
       int item=0; int mymenu = pp.nummenus-1;
       // Clicking or dragging outside menu cancels it...
       if ((!pp.menubar || mymenu) && !pp.is_inside(mx, my)) {
@@ -785,7 +785,7 @@
   case fltk3::RELEASE:
     // Mouse must either be held down/dragged some, or this must be
     // the second click (not the one that popped up the menu):
-    if (   !Fl::event_is_click() 
+    if (   !fltk3::event_is_click() 
         || pp.state == PUSH_STATE 
         || (pp.menubar && pp.current_item && !pp.current_item->submenu()) // button
 	) {
@@ -830,11 +830,11 @@
       Y += w->y();
     }
   } else {
-    X += Fl::event_x_root()-Fl::event_x();
-    Y += Fl::event_y_root()-Fl::event_y();
+    X += fltk3::event_x_root()-fltk3::event_x();
+    Y += fltk3::event_y_root()-fltk3::event_y();
   }
   menuwindow mw(this, X, Y, W, H, initial_item, t, menubar);
-  Fl::grab(mw);
+  fltk3::grab(mw);
   menustate pp; p = &pp;
   pp.p[0] = &mw;
   pp.nummenus = 1;
@@ -852,7 +852,7 @@
   if (menubar) {
     // find the initial menu
     if (!mw.handle(fltk3::DRAG)) {
-      Fl::grab(0);
+      fltk3::grab(0);
       return 0;
     }
   }
@@ -875,7 +875,7 @@
     // get events:
     {
       const Fl_Menu_Item* oldi = pp.current_item;
-      Fl::wait();
+      fltk3::wait();
       if (pp.state == DONE_STATE) break; // done.
       if (pp.current_item == oldi) continue;
     }
@@ -963,7 +963,7 @@
   delete pp.fakemenu;
   while (pp.nummenus>1) delete pp.p[--pp.nummenus];
   mw.hide();
-  Fl::grab(0);
+  fltk3::grab(0);
   return m;
 }
 
@@ -976,7 +976,7 @@
 
   X,Y is the position of the mouse cursor, relative to the
   window that got the most recent event (usually you can pass 
-  Fl::event_x() and Fl::event_y() unchanged here).
+  fltk3::event_x() and fltk3::event_y() unchanged here).
 
   \p title is a character string title for the menu.  If
   non-zero a small box appears above the menu with the title in it.
@@ -1016,7 +1016,7 @@
   const Fl_Menu_Item* m = this;
   if (m) for (int ii = 0; m->text; m = next_visible_or_not(m), ii++) {
     if (m->active()) {
-      if (Fl::test_shortcut(m->shortcut_)
+      if (fltk3::test_shortcut(m->shortcut_)
 	 || fltk3::Widget::test_shortcut(m->text, require_alt)) {
 	if (ip) *ip=ii;
 	return m;
@@ -1042,7 +1042,7 @@
   if (m) for (; m->text; m = next_visible_or_not(m)) {
     if (m->active()) {
       // return immediately any match of an item in top level menu:
-      if (Fl::test_shortcut(m->shortcut_)) return m;
+      if (fltk3::test_shortcut(m->shortcut_)) return m;
       // if (fltk3::Widget::test_shortcut(m->text)) return m;
       // only return matches from lower menu if nothing found in top menu:
       if (!ret && m->submenu()) {

Modified: branches/branch-3.0/src/Fl_Menu_Bar.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Bar.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu_Bar.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -39,8 +39,8 @@
     m->draw(X, y(), W, h(), this);
     X += W;
     if (m->flags & FL_MENU_DIVIDER) {
-      int y1 = y() + Fl::box_dy(box());
-      int y2 = y1 + h() - Fl::box_dh(box()) - 1;
+      int y1 = y() + fltk3::box_dy(box());
+      int y2 = y1 + h() - fltk3::box_dh(box()) - 1;
 
       // Draw a vertical divider between menus...
       fl_color(fltk3::DARK3);

Modified: branches/branch-3.0/src/Fl_Menu_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu_Button.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -36,7 +36,7 @@
   if (!box() || type()) return;
   draw_box(pressed_menu_button_ == this ? fltk3::down(box()) : box(), color());
   draw_label();
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
   // ** if (box() == fltk3::FLAT_BOX) return; // for XForms compatibility
   int H = (labelsize()-3)&-2;
   int X = x()+w()-H*2;
@@ -60,7 +60,7 @@
   redraw();
   fltk3::WidgetTracker mb(this);
   if (!box() || type()) {
-    m = menu()->popup(Fl::event_x(), Fl::event_y(), label(), mvalue(), this);
+    m = menu()->popup(fltk3::event_x(), fltk3::event_y(), label(), mvalue(), this);
   } else {
     m = menu()->pulldown(x(), y(), w(), h(), 0, this);
   }
@@ -78,17 +78,17 @@
     return (box() && !type()) ? 1 : 0;
   case fltk3::PUSH:
     if (!box()) {
-      if (Fl::event_button() != 3) return 0;
+      if (fltk3::event_button() != 3) return 0;
     } else if (type()) {
-      if (!(type() & (1 << (Fl::event_button()-1)))) return 0;
+      if (!(type() & (1 << (fltk3::event_button()-1)))) return 0;
     }
-    if (Fl::visible_focus()) Fl::focus(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
     popup();
     return 1;
   case fltk3::KEYBOARD:
     if (!box()) return 0;
-    if (Fl::event_key() == ' ' &&
-        !(Fl::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
+    if (fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (fltk3::SHIFT | fltk3::CTRL | fltk3::ALT | fltk3::META))) {
       popup();
       return 1;
     } else return 0;
@@ -97,7 +97,7 @@
     return test_shortcut() != 0;
   case fltk3::FOCUS: /* FALLTHROUGH */
   case fltk3::UNFOCUS:
-    if (box() && Fl::visible_focus()) {
+    if (box() && fltk3::visible_focus()) {
       redraw();
       return 1;
     }

Modified: branches/branch-3.0/src/Fl_Menu_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Window.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu_Window.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -70,7 +70,7 @@
   if (!gc) {
 	  gc = XCreateGC(fl_display, myi->xid, 0, 0);
 # if defined(FLTK_USE_CAIRO)
-	  if(Fl::autolink_context()) Fl::cairo_make_current(gc); // capture gc changes automatically to update the cairo context adequately
+	  if(fltk3::autolink_context()) fltk3::cairo_make_current(gc); // capture gc changes automatically to update the cairo context adequately
 # endif
   }
   fl_gc = gc;

Modified: branches/branch-3.0/src/Fl_Menu_add.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_add.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu_add.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -269,7 +269,7 @@
   or a string (eg. "^c" or "^97").
   \par
   Raw integer shortcuts can be a combination of keyboard chars (eg. 'A')
-  and optional keyboard modifiers (see Fl::event_state(), e.g. fltk3::SHIFT, etc).
+  and optional keyboard modifiers (see fltk3::event_state(), e.g. fltk3::SHIFT, etc).
   In addition, fltk3::COMMAND can be used to denote fltk3::META under Mac OS X and
   fltk3::CTRL under other platforms.
   \par

Modified: branches/branch-3.0/src/Fl_Menu_global.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_global.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Menu_global.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -35,15 +35,15 @@
 static Fl_Menu_* the_widget;
 
 static int handler(int e) {
-  if (e != fltk3::SHORTCUT || Fl::modal()) return 0;
-  Fl::first_window(the_widget->window());
+  if (e != fltk3::SHORTCUT || fltk3::modal()) return 0;
+  fltk3::first_window(the_widget->window());
   return the_widget->handle(e);
 }
 
 /**
   Make the shortcuts for this menu work no matter what window has the
   focus when you type it.  This is done by using 
-  Fl::add_handler().  This Fl_Menu_ widget does not
+  fltk3::add_handler().  This Fl_Menu_ widget does not
   have to be visible (ie the window it is in can be hidden, or it does
   not have to be put in a window at all).
   <P>Currently there can be only one global()menu.  Setting a new
@@ -51,7 +51,7 @@
   global() setting (so don't destroy the widget!)
 */
 void Fl_Menu_::global() {
-  if (!the_widget) Fl::add_handler(handler);
+  if (!the_widget) fltk3::add_handler(handler);
   the_widget = this;
 }
 

Modified: branches/branch-3.0/src/Fl_Multi_Label.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Multi_Label.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Multi_Label.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -66,12 +66,12 @@
 }
 
 void Fl_Multi_Label::label(fltk3::Widget* o) {
-  Fl::set_labeltype(fltk3::MULTI_LABEL, multi_labeltype, multi_measure);
+  fltk3::set_labeltype(fltk3::MULTI_LABEL, multi_labeltype, multi_measure);
   o->label(fltk3::MULTI_LABEL, (const char*)this);
 }
 
 void Fl_Multi_Label::label(Fl_Menu_Item* o) {
-  Fl::set_labeltype(fltk3::MULTI_LABEL, multi_labeltype, multi_measure);
+  fltk3::set_labeltype(fltk3::MULTI_LABEL, multi_labeltype, multi_measure);
   o->label(fltk3::MULTI_LABEL, (const char*)this);
 }
 

Modified: branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -187,7 +187,7 @@
 
   // BLOCK WHILE BROWSER SHOWN
   while ( _file_chooser->shown() ) {
-    Fl::wait();
+    fltk3::wait();
   }
 
   if ( _file_chooser->value() && _file_chooser->value()[0] ) {

Modified: branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm
===================================================================
--- branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.mm	2011-05-17 15:17:01 UTC (rev 8680)
@@ -123,7 +123,7 @@
 int Fl_Native_File_Chooser::show() {
 
   // Make sure fltk interface updates before posting our dialog
-  Fl::flush();
+  fltk3::flush();
   
   // POST BROWSER
   int err = post();

Modified: branches/branch-3.0/src/Fl_Overlay_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Overlay_Window.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Overlay_Window.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -93,7 +93,7 @@
 void Fl_Overlay_Window::redraw_overlay() {
   overlay_ = this;
   clear_damage((uchar)(damage()|fltk3::DAMAGE_OVERLAY));
-  Fl::damage(fltk3::DAMAGE_CHILD);
+  fltk3::damage(fltk3::DAMAGE_CHILD);
 }
 
 #else
@@ -136,7 +136,7 @@
   }
   fl_gc = gc;
 #if defined(FLTK_USE_CAIRO)
-      if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+      if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
 #endif
   fl_overlay = 1;
   Fl_Overlay_Window *w = (Fl_Overlay_Window *)parent();
@@ -161,7 +161,7 @@
   if (shown()) {
     if (overlay_ == this) {
       clear_damage(damage()|fltk3::DAMAGE_OVERLAY);
-      Fl::damage(fltk3::DAMAGE_CHILD);
+      fltk3::damage(fltk3::DAMAGE_CHILD);
     } else if (!overlay_->shown())
       overlay_->show();
     else

Modified: branches/branch-3.0/src/Fl_PNG_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PNG_Image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_PNG_Image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -131,7 +131,7 @@
   if (!pp || !info) {
     if (pp) png_destroy_read_struct(&pp, NULL, NULL);
     if (!from_memory) fclose(fp);
-    Fl::warning("Cannot allocate memory to read PNG file or data \"%s\".\n", name_png);
+    fltk3::warning("Cannot allocate memory to read PNG file or data \"%s\".\n", name_png);
     return;
   }
   
@@ -139,7 +139,7 @@
   {
     png_destroy_read_struct(&pp, &info, NULL);
     if (!from_memory) fclose(fp);
-    Fl::warning("PNG file or data \"%s\" contains errors!\n", name_png);
+    fltk3::warning("PNG file or data \"%s\" contains errors!\n", name_png);
     return;
   }
 

Modified: branches/branch-3.0/src/Fl_PNM_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PNM_Image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_PNM_Image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -83,7 +83,7 @@
   lineptr = fgets(line, sizeof(line), fp);
   if (!lineptr) {
     fclose(fp);
-    Fl::error("Early end-of-file in PNM file \"%s\"!", name);
+    fltk3::error("Early end-of-file in PNM file \"%s\"!", name);
     return;
   }
 

Modified: branches/branch-3.0/src/Fl_Pack.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pack.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Pack.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -52,10 +52,10 @@
 }
 
 void Fl_Pack::draw() {
-  int tx = x()+Fl::box_dx(box());
-  int ty = y()+Fl::box_dy(box());
-  int tw = w()-Fl::box_dw(box());
-  int th = h()-Fl::box_dh(box());
+  int tx = x()+fltk3::box_dx(box());
+  int ty = y()+fltk3::box_dy(box());
+  int tw = w()-fltk3::box_dw(box());
+  int th = h()-fltk3::box_dh(box());
   int rw, rh;
   int current_position = horizontal() ? tx : ty;
   int maximum_position = current_position;
@@ -140,8 +140,8 @@
     th = maximum_position-ty;
   }
   
-  tw += Fl::box_dw(box()); if (tw <= 0) tw = 1;
-  th += Fl::box_dh(box()); if (th <= 0) th = 1;
+  tw += fltk3::box_dw(box()); if (tw <= 0) tw = 1;
+  th += fltk3::box_dh(box()); if (th <= 0) th = 1;
   if (tw != w() || th != h()) {
     fltk3::Widget::resize(x(),y(),tw,th);
     d = fltk3::DAMAGE_ALL;

Modified: branches/branch-3.0/src/Fl_Paged_Device.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Paged_Device.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Paged_Device.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -131,10 +131,10 @@
 {
   Fl_Surface_Device *current = Fl_Surface_Device::surface();
   Fl_Display_Device::display_device()->set_current();
-  fltk3::Window *save_front = Fl::first_window();
+  fltk3::Window *save_front = fltk3::first_window();
   win->show();
   fl_gc = NULL;
-  Fl::check();
+  fltk3::check();
   win->make_current();
   uchar *image_data;
   image_data = fl_read_image(NULL, x, y, w, h);

Modified: branches/branch-3.0/src/Fl_Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pixmap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Pixmap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -420,7 +420,7 @@
   uchar		r, g, b;
   unsigned	ia, ir, ig, ib;
 
-  Fl::get_color(c, r, g, b);
+  fltk3::get_color(c, r, g, b);
   if (i < 0.0f) i = 0.0f;
   else if (i > 1.0f) i = 1.0f;
 

Modified: branches/branch-3.0/src/Fl_Positioner.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Positioner.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Positioner.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -85,7 +85,7 @@
     double y1 = Y + 4;
     double w1 = W - 2 * 4;
     double h1 = H - 2 * 4;
-    double xx = flinear(Fl::event_x(), x1, x1+w1-1.0, xmin, xmax);
+    double xx = flinear(fltk3::event_x(), x1, x1+w1-1.0, xmin, xmax);
     if (xstep_) xx = int(xx/xstep_+0.5) * xstep_;
     if (xmin < xmax) {
       if (xx < xmin) xx = xmin;
@@ -94,7 +94,7 @@
       if (xx > xmin) xx = xmin;
       if (xx < xmax) xx = xmax;
     }
-    double yy = flinear(Fl::event_y(), y1, y1+h1-1.0, ymin, ymax);
+    double yy = flinear(fltk3::event_y(), y1, y1+h1-1.0, ymin, ymax);
     if (ystep_) yy = int(yy/ystep_+0.5) * ystep_;
     if (ymin < ymax) {
       if (yy < ymin) yy = ymin;

Modified: branches/branch-3.0/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PostScript.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_PostScript.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -979,7 +979,7 @@
 
 
 void Fl_PostScript_Graphics_Driver::color(fltk3::Color c) {
-  Fl::get_color(c, cr_, cg_, cb_);
+  fltk3::get_color(c, cr_, cg_, cb_);
   color(cr_, cg_, cb_);
 }
 
@@ -1011,7 +1011,7 @@
 {
   uchar red, green, blue, r, g, b;
   uchar bit, byte, *q;
-  Fl::get_color(bg, red, green, blue);
+  fltk3::get_color(bg, red, green, blue);
   int W = (w+7)/8; // width of mask
   uchar* mask = new uchar[W * h];
   q = mask;
@@ -1534,7 +1534,7 @@
   print_from->value("1");
   { char tmp[10]; snprintf(tmp, sizeof(tmp), "%d", pages); print_to->value(tmp); }
   print_panel->show(); // this is modal
-  while (print_panel->shown()) Fl::wait();
+  while (print_panel->shown()) fltk3::wait();
   
   if (!print_start) // user clicked cancel
     return 1;

Modified: branches/branch-3.0/src/Fl_Progress.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Progress.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Progress.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -59,10 +59,10 @@
 
 
   // Get the box borders...
-  bx = Fl::box_dx(box());
-  by = Fl::box_dy(box());
-  bw = Fl::box_dw(box());
-  bh = Fl::box_dh(box());
+  bx = fltk3::box_dx(box());
+  by = fltk3::box_dy(box());
+  bw = fltk3::box_dw(box());
+  bh = fltk3::box_dh(box());
 
   tx = x() + bx;
   tw = w() - bw;

Modified: branches/branch-3.0/src/Fl_Quartz_Printer.mm
===================================================================
--- branches/branch-3.0/src/Fl_Quartz_Printer.mm	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Quartz_Printer.mm	2011-05-17 15:17:01 UTC (rev 8680)
@@ -65,7 +65,7 @@
       retval = (NSInteger)[panel runModalWithPrintInfo:info];//from 10.5 only
     }
     if(retval != NSOKButton) {
-      Fl::first_window()->show();
+      fltk3::first_window()->show();
       [localPool release];
       return 1;
     }
@@ -97,7 +97,7 @@
     if (!f) f = (dialog_f)Fl_X::get_carbon_function("PMSessionPageSetupDialog");
     status = (*f)(printSession, pageFormat, &accepted);
     if (status != noErr || !accepted) {
-      Fl::first_window()->show();
+      fltk3::first_window()->show();
       return 1;
     }
     status = PMCreatePrintSettings(&printSettings);
@@ -112,7 +112,7 @@
     status = (*f2)(printSession, printSettings, pageFormat, &accepted);
     if (!accepted) status = kPMCancel;
     if (status != noErr) {
-      Fl::first_window()->show();
+      fltk3::first_window()->show();
       return 1;
     }
     UInt32 from32, to32;
@@ -298,7 +298,7 @@
   PMSessionEndDocumentNoDialog(printSession);
   Fl_Display_Device::display_device()->set_current();
   fl_gc = 0;
-  Fl::first_window()->show();
+  fltk3::first_window()->show();
 }
 
 #endif // __APPLE__

Modified: branches/branch-3.0/src/Fl_Repeat_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Repeat_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Repeat_Button.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -33,7 +33,7 @@
 
 void Fl_Repeat_Button::repeat_callback(void *v) {
   Fl_Button *b = (Fl_Button*)v;
-  Fl::add_timeout(REPEAT,repeat_callback,b);
+  fltk3::add_timeout(REPEAT,repeat_callback,b);
   b->do_callback();
 }
 
@@ -46,17 +46,17 @@
     newval = 0; goto J1;
   case fltk3::PUSH:
   case fltk3::DRAG:
-    if (Fl::visible_focus()) Fl::focus(this);
-    newval = Fl::event_inside(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
+    newval = fltk3::event_inside(this);
   J1:
     if (!active()) 
       newval = 0;
     if (value(newval)) {
       if (newval) {
-	Fl::add_timeout(INITIALREPEAT,repeat_callback,this);
+	fltk3::add_timeout(INITIALREPEAT,repeat_callback,this);
 	do_callback();
       } else {
-	Fl::remove_timeout(repeat_callback,this);
+	fltk3::remove_timeout(repeat_callback,this);
       }
     }
     return 1;

Modified: branches/branch-3.0/src/Fl_Return_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Return_Button.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Return_Button.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -55,12 +55,12 @@
   if (w()/3 < W) W = w()/3;
   fl_return_arrow(x()+w()-W-4, y(), W, h());
   draw_label(x(), y(), w()-W+4, h());
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
 }
 
 int Fl_Return_Button::handle(int event) {
   if (event == fltk3::SHORTCUT &&
-      (Fl::event_key() == fltk3::EnterKey || Fl::event_key() == fltk3::KPEnterKey)) {
+      (fltk3::event_key() == fltk3::EnterKey || fltk3::event_key() == fltk3::KPEnterKey)) {
     simulate_key_action();
     do_callback();
     return 1;

Modified: branches/branch-3.0/src/Fl_Roller.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Roller.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Roller.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -34,11 +34,11 @@
 
 int Fl_Roller::handle(int event) {
   static int ipos;
-  int newpos = horizontal() ? Fl::event_x() : Fl::event_y();
+  int newpos = horizontal() ? fltk3::event_x() : fltk3::event_y();
   switch (event) {
   case fltk3::PUSH:
-    if (Fl::visible_focus()) {
-      Fl::focus(this);
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
       redraw();
     }
     handle_push();
@@ -51,7 +51,7 @@
     handle_release();
     return 1;
   case fltk3::KEYBOARD :
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case fltk3::UpKey:
         if (horizontal()) return 0;
 	handle_drag(clamp(increment(value(),-1)));
@@ -74,7 +74,7 @@
     // break not required because of switch...
   case fltk3::FOCUS :
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     } else return 0;
@@ -88,10 +88,10 @@
 
 void Fl_Roller::draw() {
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
-  int X = x()+Fl::box_dx(box());
-  int Y = y()+Fl::box_dy(box());
-  int W = w()-Fl::box_dw(box())-1;
-  int H = h()-Fl::box_dh(box())-1;
+  int X = x()+fltk3::box_dx(box());
+  int Y = y()+fltk3::box_dy(box());
+  int W = w()-fltk3::box_dw(box())-1;
+  int H = h()-fltk3::box_dh(box())-1;
   if (W<=0 || H <=0) return;
   int offset = step() ? int(value()/step()) : 0;
   const double ARC = 1.5; // 1/2 the number of radians visible
@@ -166,7 +166,7 @@
     }
   }
 
-  if (Fl::focus() == this) draw_focus(fltk3::THIN_UP_FRAME, x(), y(), w(), h());
+  if (fltk3::focus() == this) draw_focus(fltk3::THIN_UP_FRAME, x(), y(), w(), h());
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_Scroll.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Scroll.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Scroll.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -76,11 +76,11 @@
     case fltk3::OVAL_FRAME :
     case fltk3::PLASTIC_UP_FRAME :
     case fltk3::PLASTIC_DOWN_FRAME :
-        if (s->parent() == (fltk3::Group *)s->window() && Fl::scheme_bg_) {
-	  Fl::scheme_bg_->draw(X-(X%((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->w()),
-	                       Y-(Y%((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->h()),
-	                       W+((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->w(),
-			       H+((Fl_Tiled_Image *)Fl::scheme_bg_)->image()->h());
+        if (s->parent() == (fltk3::Group *)s->window() && fltk3::scheme_bg_) {
+	  fltk3::scheme_bg_->draw(X-(X%((Fl_Tiled_Image *)fltk3::scheme_bg_)->image()->w()),
+	                       Y-(Y%((Fl_Tiled_Image *)fltk3::scheme_bg_)->image()->h()),
+	                       W+((Fl_Tiled_Image *)fltk3::scheme_bg_)->image()->w(),
+			       H+((Fl_Tiled_Image *)fltk3::scheme_bg_)->image()->h());
 	  break;
         }
 
@@ -109,10 +109,10 @@
 void Fl_Scroll::recalc_scrollbars(ScrollInfo &si) {
 
   // inner box of widget (excluding scrollbars)
-  si.innerbox_x = x()+Fl::box_dx(box());
-  si.innerbox_y = y()+Fl::box_dy(box());
-  si.innerbox_w = w()-Fl::box_dw(box());
-  si.innerbox_h = h()-Fl::box_dh(box());
+  si.innerbox_x = x()+fltk3::box_dx(box());
+  si.innerbox_y = y()+fltk3::box_dy(box());
+  si.innerbox_w = w()-fltk3::box_dw(box());
+  si.innerbox_h = h()-fltk3::box_dh(box());
 
   // accumulate a bounding box for all the children
   si.child_l = si.innerbox_x;
@@ -145,7 +145,7 @@
     int W = si.innerbox_w;
     int H = si.innerbox_h;
 
-    si.scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
+    si.scrollsize = scrollbar_size_ ? scrollbar_size_ : fltk3::scrollbar_size();
     si.vneeded = 0;
     si.hneeded = 0;
     if (type() & VERTICAL) {
@@ -229,10 +229,10 @@
   outside of the draw() method (STR #1895).
 */
 void Fl_Scroll::bbox(int& X, int& Y, int& W, int& H) {
-  X = x()+Fl::box_dx(box());
-  Y = y()+Fl::box_dy(box());
-  W = w()-Fl::box_dw(box());
-  H = h()-Fl::box_dh(box());
+  X = x()+fltk3::box_dx(box());
+  Y = y()+fltk3::box_dy(box());
+  W = w()-fltk3::box_dw(box());
+  H = h()-fltk3::box_dh(box());
   if (scrollbar.visible()) {
     W -= scrollbar.w();
     if (scrollbar.align() & fltk3::ALIGN_LEFT) X += scrollbar.w();
@@ -372,7 +372,7 @@
     if (o == &hscrollbar || o == &scrollbar) continue;
     o->position(o->x()+dx, o->y()+dy);
   }
-  if (parent() == (fltk3::Group *)window() && Fl::scheme_bg_) damage(fltk3::DAMAGE_ALL);
+  if (parent() == (fltk3::Group *)window() && fltk3::scheme_bg_) damage(fltk3::DAMAGE_ALL);
   else damage(fltk3::DAMAGE_SCROLL);
 }
 
@@ -397,10 +397,10 @@
 */
 Fl_Scroll::Fl_Scroll(int X,int Y,int W,int H,const char* L)
   : fltk3::Group(X,Y,W,H,L), 
-    scrollbar(X+W-Fl::scrollbar_size(),Y,
-              Fl::scrollbar_size(),H-Fl::scrollbar_size()),
-    hscrollbar(X,Y+H-Fl::scrollbar_size(),
-               W-Fl::scrollbar_size(),Fl::scrollbar_size()) {
+    scrollbar(X+W-fltk3::scrollbar_size(),Y,
+              fltk3::scrollbar_size(),H-fltk3::scrollbar_size()),
+    hscrollbar(X,Y+H-fltk3::scrollbar_size(),
+               W-fltk3::scrollbar_size(),fltk3::scrollbar_size()) {
   type(BOTH);
   xposition_ = oldx = 0;
   yposition_ = oldy = 0;

Modified: branches/branch-3.0/src/Fl_Scrollbar.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Scrollbar.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Scrollbar.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -69,7 +69,7 @@
 void Fl_Scrollbar::timeout_cb(void* v) {
   Fl_Scrollbar* s = (Fl_Scrollbar*)v;
   s->increment_cb();
-  Fl::add_timeout(REPEAT, timeout_cb, s);
+  fltk3::add_timeout(REPEAT, timeout_cb, s);
 }
 
 int Fl_Scrollbar::handle(int event) {
@@ -88,10 +88,10 @@
   int relx;
   int ww;
   if (horizontal()) {
-    relx = Fl::event_x()-X;
+    relx = fltk3::event_x()-X;
     ww = W;
   } else {
-    relx = Fl::event_y()-Y;
+    relx = fltk3::event_y()-Y;
     ww = H;
   }
   if (relx < 0) area = 1;
@@ -107,7 +107,7 @@
     if (val >= 1.0) sliderx = ww-S;
     else if (val <= 0.0) sliderx = 0;
     else sliderx = int(val*(ww-S)+.5);
-    if (Fl::event_button() == fltk3::MIDDLE_MOUSE) area = 8;
+    if (fltk3::event_button() == fltk3::MIDDLE_MOUSE) area = 8;
     else if (relx < sliderx) area = 5;
     else if (relx >= sliderx+S) area = 6;
     else area = 8;
@@ -120,7 +120,7 @@
   case fltk3::RELEASE:
       damage(fltk3::DAMAGE_ALL);
     if (pushed_) {
-      Fl::remove_timeout(timeout_cb, this);
+      fltk3::remove_timeout(timeout_cb, this);
       pushed_ = 0;
     }
     handle_release();
@@ -130,7 +130,7 @@
     if (area != 8) pushed_ = area;
     if (pushed_) {
       handle_push();
-      Fl::add_timeout(INITIALREPEAT, timeout_cb, this);
+      fltk3::add_timeout(INITIALREPEAT, timeout_cb, this);
       increment_cb();
       damage(fltk3::DAMAGE_ALL);
       return 1;
@@ -141,14 +141,14 @@
     return Fl_Slider::handle(event, X,Y,W,H);
   case fltk3::MOUSEWHEEL :
     if (horizontal()) {
-      if (Fl::e_dx==0) return 0;
+      if (fltk3::e_dx==0) return 0;
       int ls = maximum()>=minimum() ? linesize_ : -linesize_;
-      handle_drag(clamp(value() + ls * Fl::e_dx));
+      handle_drag(clamp(value() + ls * fltk3::e_dx));
       return 1;
     } else {
-      if (Fl::e_dy==0) return 0;
+      if (fltk3::e_dy==0) return 0;
       int ls = maximum()>=minimum() ? linesize_ : -linesize_;
-      handle_drag(clamp(value() + ls * Fl::e_dy));
+      handle_drag(clamp(value() + ls * fltk3::e_dy));
       return 1;
     }
   case fltk3::SHORTCUT:
@@ -156,7 +156,7 @@
     int v = value();
     int ls = maximum()>=minimum() ? linesize_ : -linesize_;
     if (horizontal()) {
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
       case fltk3::LeftKey:
 	v -= ls;
 	break;
@@ -167,7 +167,7 @@
 	return 0;
       }
     } else { // vertical
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
       case fltk3::UpKey:
 	v -= ls;
 	break;
@@ -208,10 +208,10 @@
 
 void Fl_Scrollbar::draw() {
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
-  int X = x()+Fl::box_dx(box());
-  int Y = y()+Fl::box_dy(box());
-  int W = w()-Fl::box_dw(box());
-  int H = h()-Fl::box_dh(box());
+  int X = x()+fltk3::box_dx(box());
+  int Y = y()+fltk3::box_dy(box());
+  int W = w()-fltk3::box_dw(box());
+  int H = h()-fltk3::box_dh(box());
   if (horizontal()) {
     if (W < 3*H) {Fl_Slider::draw(X,Y,W,H); return;}
     Fl_Slider::draw(X+H,Y,W-2*H,H);
@@ -227,7 +227,7 @@
       int w1 = (H-4)/3; if (w1 < 1) w1 = 1;
       int x1 = X+(H-w1-1)/2;
       int yy1 = Y+(H-2*w1-1)/2;
-      if (Fl::scheme_ && !strcmp(Fl::scheme_, "gtk+")) {
+      if (fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
 	fl_polygon(x1, yy1+w1, x1+w1, yy1+2*w1, x1+w1-1, yy1+w1, x1+w1, yy1);
 	x1 += (W-H);
 	fl_polygon(x1, yy1, x1+1, yy1+w1, x1, yy1+2*w1, x1+w1, yy1+w1);
@@ -252,7 +252,7 @@
       int w1 = (W-4)/3; if (w1 < 1) w1 = 1;
       int x1 = X+(W-2*w1-1)/2;
       int yy1 = Y+(W-w1-1)/2;
-      if (Fl::scheme_ && !strcmp(Fl::scheme_, "gtk+")) {
+      if (fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
 	fl_polygon(x1, yy1+w1, x1+w1, yy1+w1-1, x1+2*w1, yy1+w1, x1+w1, yy1);
 	yy1 += H-W;
 	fl_polygon(x1, yy1, x1+w1, yy1+1, x1+w1, yy1+w1);
@@ -283,7 +283,7 @@
 /**  Destroys the Scrollbar. */
 Fl_Scrollbar::~Fl_Scrollbar() {
   if (pushed_)
-    Fl::remove_timeout(timeout_cb, this);
+    fltk3::remove_timeout(timeout_cb, this);
 }
 
 

Modified: branches/branch-3.0/src/Fl_Slider.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Slider.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Slider.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -167,7 +167,7 @@
     if (wsl>0 && hsl>0) draw_box(box1, xsl, ysl, wsl, hsl, selection_color());
 
     if (type()!=FL_HOR_FILL_SLIDER && type() != FL_VERT_FILL_SLIDER &&
-        Fl::scheme_ && !strcmp(Fl::scheme_, "gtk+")) {
+        fltk3::scheme_ && !strcmp(fltk3::scheme_, "gtk+")) {
       if (W>H && wsl>(hsl+8)) {
         // Draw horizontal grippers
 	int yy, hh;
@@ -207,7 +207,7 @@
   }
 
   draw_label(xsl, ysl, wsl, hsl);
-  if (Fl::focus() == this) {
+  if (fltk3::focus() == this) {
     if (type() == FL_HOR_FILL_SLIDER || type() == FL_VERT_FILL_SLIDER) draw_focus();
     else draw_focus(box1, xsl, ysl, wsl, hsl);
   }
@@ -215,10 +215,10 @@
 
 void Fl_Slider::draw() {
   if (damage()&fltk3::DAMAGE_ALL) draw_box();
-  draw(x()+Fl::box_dx(box()),
-       y()+Fl::box_dy(box()),
-       w()-Fl::box_dw(box()),
-       h()-Fl::box_dh(box()));
+  draw(x()+fltk3::box_dx(box()),
+       y()+fltk3::box_dy(box()),
+       w()-fltk3::box_dw(box()),
+       h()-fltk3::box_dh(box()));
 }
 
 int Fl_Slider::handle(int event, int X, int Y, int W, int H) {
@@ -226,7 +226,7 @@
   switch (event) {
   case fltk3::PUSH: {
     fltk3::WidgetTracker wp(this);
-    if (!Fl::event_inside(X, Y, W, H)) return 0;
+    if (!fltk3::event_inside(X, Y, W, H)) return 0;
     handle_push();
     if (wp.deleted()) return 1; }
     // fall through ...
@@ -242,7 +242,7 @@
     }
 
     int ww = (horizontal() ? W : H);
-    int mx = (horizontal() ? Fl::event_x()-X : Fl::event_y()-Y);
+    int mx = (horizontal() ? fltk3::event_x()-X : fltk3::event_y()-Y);
     int S;
     static int offcenter;
 
@@ -299,7 +299,7 @@
     return 1;
   case fltk3::KEYBOARD:
     { fltk3::WidgetTracker wp(this);
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
 	case fltk3::UpKey:
 	  if (horizontal()) return 0;
 	  handle_push();
@@ -339,7 +339,7 @@
     // break not required because of switch...
   case fltk3::FOCUS :
   case fltk3::UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     } else return 0;
@@ -352,16 +352,16 @@
 }
 
 int Fl_Slider::handle(int event) {
-  if (event == fltk3::PUSH && Fl::visible_focus()) {
-    Fl::focus(this);
+  if (event == fltk3::PUSH && fltk3::visible_focus()) {
+    fltk3::focus(this);
     redraw();
   }
 
   return handle(event,
-		x()+Fl::box_dx(box()),
-		y()+Fl::box_dy(box()),
-		w()-Fl::box_dw(box()),
-		h()-Fl::box_dh(box()));
+		x()+fltk3::box_dx(box()),
+		y()+fltk3::box_dy(box()),
+		w()-fltk3::box_dw(box()),
+		h()-fltk3::box_dh(box()));
 }
 
 //

Modified: branches/branch-3.0/src/Fl_Table.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Table.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Table.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -289,18 +289,18 @@
   if ( row_header() ) {
     // Inside a row heading?
     get_bounds(CONTEXT_ROW_HEADER, X, Y, W, H);
-    if ( Fl::event_inside(X, Y, W, H) ) {
+    if ( fltk3::event_inside(X, Y, W, H) ) {
       // Scan visible rows until found
       for ( R = toprow; R <= botrow; R++ ) {
         find_cell(CONTEXT_ROW_HEADER, R, 0, X, Y, W, H);
-        if ( Fl::event_y() >= Y && Fl::event_y() < (Y+H) ) {
+        if ( fltk3::event_y() >= Y && fltk3::event_y() < (Y+H) ) {
           // Found row?
           //     If cursor over resize boundary, and resize enabled,
           //     enable the appropriate resize flag.
           //
           if ( row_resize() ) {
-            if ( Fl::event_y() <= (Y+3-0) ) { resizeflag = RESIZE_ROW_ABOVE; }
-            if ( Fl::event_y() >= (Y+H-3) ) { resizeflag = RESIZE_ROW_BELOW; }
+            if ( fltk3::event_y() <= (Y+3-0) ) { resizeflag = RESIZE_ROW_ABOVE; }
+            if ( fltk3::event_y() >= (Y+H-3) ) { resizeflag = RESIZE_ROW_BELOW; }
           }
           return(CONTEXT_ROW_HEADER);
         }
@@ -313,18 +313,18 @@
   if ( col_header() ) {
     // Inside a column heading?
     get_bounds(CONTEXT_COL_HEADER, X, Y, W, H);
-    if ( Fl::event_inside(X, Y, W, H) ) {
+    if ( fltk3::event_inside(X, Y, W, H) ) {
       // Scan visible columns until found
       for ( C = leftcol; C <= rightcol; C++ ) {
         find_cell(CONTEXT_COL_HEADER, 0, C, X, Y, W, H);
-        if ( Fl::event_x() >= X && Fl::event_x() < (X+W) ) {
+        if ( fltk3::event_x() >= X && fltk3::event_x() < (X+W) ) {
           // Found column?
           //     If cursor over resize boundary, and resize enabled,
           //     enable the appropriate resize flag.
           //
           if ( col_resize() ) {
-            if ( Fl::event_x() <= (X+3-0) ) { resizeflag = RESIZE_COL_LEFT; }
-            if ( Fl::event_x() >= (X+W-3) ) { resizeflag = RESIZE_COL_RIGHT; }
+            if ( fltk3::event_x() <= (X+3-0) ) { resizeflag = RESIZE_COL_LEFT; }
+            if ( fltk3::event_x() >= (X+W-3) ) { resizeflag = RESIZE_COL_RIGHT; }
           }
           return(CONTEXT_COL_HEADER);
         }
@@ -336,14 +336,14 @@
   // Mouse somewhere in table?
   //     Scan visible r/c's until we find it.
   //
-  if ( Fl::event_inside(tox, toy, tow, toh) ) {
+  if ( fltk3::event_inside(tox, toy, tow, toh) ) {
     for ( R = toprow; R <= botrow; R++ ) {
       find_cell(CONTEXT_CELL, R, C, X, Y, W, H);
-      if ( Fl::event_y() < Y ) break;		// OPT: thanks lars
-      if ( Fl::event_y() >= (Y+H) ) continue;	// OPT: " "
+      if ( fltk3::event_y() < Y ) break;		// OPT: thanks lars
+      if ( fltk3::event_y() >= (Y+H) ) continue;	// OPT: " "
       for ( C = leftcol; C <= rightcol; C++ ) {
         find_cell(CONTEXT_CELL, R, C, X, Y, W, H);
-        if ( Fl::event_inside(X, Y, W, H) ) {
+        if ( fltk3::event_inside(X, Y, W, H) ) {
           return(CONTEXT_CELL);			// found it
         }
       }
@@ -399,13 +399,13 @@
 void Fl_Table::_start_auto_drag() {
   if (_auto_drag) return;
   _auto_drag = 1;
-  Fl::add_timeout(0.3, _auto_drag_cb2, this);
+  fltk3::add_timeout(0.3, _auto_drag_cb2, this);
 }
 
 // Disable automatic scroll-selection
 void Fl_Table::_stop_auto_drag() {
   if (!_auto_drag) return;
-  Fl::remove_timeout(_auto_drag_cb2, this);
+  fltk3::remove_timeout(_auto_drag_cb2, this);
   _auto_drag = 0;
 }
 
@@ -415,62 +415,62 @@
 
 // Handle automatic scroll-selection if mouse selection dragged off table edge
 void Fl_Table::_auto_drag_cb() {
-  int lx = Fl::e_x;
-  int ly = Fl::e_y;
+  int lx = fltk3::e_x;
+  int ly = fltk3::e_y;
   if (_selecting == CONTEXT_COL_HEADER)
   { ly = y() + col_header_height(); }
   else if (_selecting == CONTEXT_ROW_HEADER)
   { lx = x() + row_header_width(); }
   if (lx > x() + w() - 20) {
-    Fl::e_x = x() + w() - 20;
+    fltk3::e_x = x() + w() - 20;
     if (hscrollbar->visible())
       ((Fl_Slider*)hscrollbar)->value(hscrollbar->clamp(hscrollbar->value() + 30));
     hscrollbar->do_callback();
-    _dragging_x = Fl::e_x - 30;
+    _dragging_x = fltk3::e_x - 30;
   }
   else if (lx < (x() + row_header_width())) {
-    Fl::e_x = x() + row_header_width() + 1;
+    fltk3::e_x = x() + row_header_width() + 1;
     if (hscrollbar->visible()) {
       ((Fl_Slider*)hscrollbar)->value(hscrollbar->clamp(hscrollbar->value() - 30));
     }
     hscrollbar->do_callback();
-    _dragging_x = Fl::e_x + 30;
+    _dragging_x = fltk3::e_x + 30;
   }
   if (ly > y() + h() - 20) {
-    Fl::e_y = y() + h() - 20;
+    fltk3::e_y = y() + h() - 20;
     if (vscrollbar->visible()) {
       ((Fl_Slider*)vscrollbar)->value(vscrollbar->clamp(vscrollbar->value() + 30));
     }
     vscrollbar->do_callback();
-    _dragging_y = Fl::e_y - 30;
+    _dragging_y = fltk3::e_y - 30;
   }
   else if (ly < (y() + col_header_height())) {
-    Fl::e_y = y() + col_header_height() + 1;
+    fltk3::e_y = y() + col_header_height() + 1;
     if (vscrollbar->visible()) {
       ((Fl_Slider*)vscrollbar)->value(vscrollbar->clamp(vscrollbar->value() - 30));
     }
     vscrollbar->do_callback();
-    _dragging_y = Fl::e_y + 30;
+    _dragging_y = fltk3::e_y + 30;
   }
   _auto_drag = 2;
   handle(fltk3::DRAG);
   _auto_drag = 1;
-  Fl::e_x = lx;
-  Fl::e_y = ly;
-  Fl::check();
-  Fl::flush();
-  if (Fl::event_buttons() && _auto_drag) {
-    Fl::add_timeout(0.05, _auto_drag_cb2, this);
+  fltk3::e_x = lx;
+  fltk3::e_y = ly;
+  fltk3::check();
+  fltk3::flush();
+  if (fltk3::event_buttons() && _auto_drag) {
+    fltk3::add_timeout(0.05, _auto_drag_cb2, this);
   }
 }
 
 // Recalculate the window dimensions
 void Fl_Table::recalc_dimensions() {
   // Recalc to* (Table Outer), ti* (Table Inner), wi* ( Widget Inner)
-  wix = ( x() + Fl::box_dx(box())); tox = wix; tix = tox + Fl::box_dx(table->box());
-  wiy = ( y() + Fl::box_dy(box())); toy = wiy; tiy = toy + Fl::box_dy(table->box());
-  wiw = ( w() - Fl::box_dw(box())); tow = wiw; tiw = tow - Fl::box_dw(table->box());
-  wih = ( h() - Fl::box_dh(box())); toh = wih; tih = toh - Fl::box_dh(table->box());
+  wix = ( x() + fltk3::box_dx(box())); tox = wix; tix = tox + fltk3::box_dx(table->box());
+  wiy = ( y() + fltk3::box_dy(box())); toy = wiy; tiy = toy + fltk3::box_dy(table->box());
+  wiw = ( w() - fltk3::box_dw(box())); tow = wiw; tiw = tow - fltk3::box_dw(table->box());
+  wih = ( h() - fltk3::box_dh(box())); toh = wih; tih = toh - fltk3::box_dh(table->box());
   // Trim window if headers enabled
   if ( col_header() ) {
     tiy += col_header_height(); toy += col_header_height();
@@ -678,7 +678,7 @@
   damage_zone(current_row, current_col, select_row, select_col, R, C);
   select_row = R;
   select_col = C;
-  if (!Fl::event_state(fltk3::SHIFT)) {
+  if (!fltk3::event_state(fltk3::SHIFT)) {
     current_row = R;
     current_col = C;
   }
@@ -701,8 +701,8 @@
   PRINTEVENT;
   int ret = fltk3::Group::handle(event);	// let FLTK group handle events first
   if (ret) {
-    if (Fl::event_inside(hscrollbar) || Fl::event_inside(vscrollbar)) return 1;
-    if (Fl::focus() != this && contains(Fl::focus())) return 1;
+    if (fltk3::event_inside(hscrollbar) || fltk3::event_inside(vscrollbar)) return 1;
+    if (fltk3::focus() != this && contains(fltk3::focus())) return 1;
   }
   // Which row/column are we over?
   int R, C;  				// row/column being worked on
@@ -710,8 +710,8 @@
   TableContext context = cursor2rowcol(R, C, resizeflag);
   switch ( event ) {
     case fltk3::PUSH:
-      if (Fl::event_button() == 1 && !Fl::event_clicks()) {
-        if (Fl::focus() != this) {
+      if (fltk3::event_button() == 1 && !fltk3::event_clicks()) {
+        if (fltk3::focus() != this) {
           take_focus();
           do_callback(CONTEXT_TABLE, -1, -1);
           ret = 1;
@@ -739,8 +739,8 @@
           
         case CONTEXT_NONE:
           // fltk3::PUSH on table corner?
-          if ( Fl::event_button() == 1 && 
-              Fl::event_x() < x() + row_header_width()) {
+          if ( fltk3::event_button() == 1 && 
+              fltk3::event_x() < x() + row_header_width()) {
             current_col = 0;
             select_col = cols() - 1;
             current_row = 0;
@@ -752,7 +752,7 @@
           
         case CONTEXT_COL_HEADER:
           // fltk3::PUSH on a column header?
-          if ( Fl::event_button() == 1) {
+          if ( fltk3::event_button() == 1) {
             // Resizing? Handle it
             if ( resizeflag ) {
               // Start resize if left click on column border.
@@ -762,7 +762,7 @@
               //
               _resizing_col = ( resizeflag & RESIZE_COL_LEFT ) ? C-1 : C; 
               _resizing_row = -1;
-              _dragging_x = Fl::event_x(); 
+              _dragging_x = fltk3::event_x(); 
               ret = 1;
             } else {
               // Not resizing? Select the column
@@ -778,7 +778,7 @@
           
         case CONTEXT_ROW_HEADER:
           // fltk3::PUSH on a row header?
-          if ( Fl::event_button() == 1 ) {
+          if ( fltk3::event_button() == 1 ) {
             // Resizing? Handle it
             if ( resizeflag ) {
               // Start resize if left mouse clicked on row border.
@@ -788,7 +788,7 @@
               //
               _resizing_row = ( resizeflag & RESIZE_ROW_ABOVE ) ? R-1 : R; 
               _resizing_col = -1;
-              _dragging_y = Fl::event_y(); 
+              _dragging_y = fltk3::event_y(); 
               ret = 1;
             } else {
               // Not resizing? Select the row
@@ -821,11 +821,11 @@
         //    Don't allow column width smaller than 1.
         //    Continue to show fltk3::CURSOR_WE at all times during drag.
         //
-        int offset = _dragging_x - Fl::event_x();
+        int offset = _dragging_x - fltk3::event_x();
         int new_w = col_width(_resizing_col) - offset;
         if ( new_w < _col_resize_min ) new_w = _col_resize_min;
         col_width(_resizing_col, new_w);
-        _dragging_x = Fl::event_x();
+        _dragging_x = fltk3::event_x();
         table_resized();
         redraw();
         change_cursor(fltk3::CURSOR_WE);
@@ -841,11 +841,11 @@
         //    Don't allow row width smaller than 1.
         //    Continue to show fltk3::CURSOR_NS at all times during drag.
         //
-        int offset = _dragging_y - Fl::event_y();
+        int offset = _dragging_y - fltk3::event_y();
         int new_h = row_height(_resizing_row) - offset;
         if ( new_h < _row_resize_min ) new_h = _row_resize_min;
         row_height(_resizing_row, new_h);
-        _dragging_y = Fl::event_y();
+        _dragging_y = fltk3::event_y();
         table_resized();
         redraw();
         change_cursor(fltk3::CURSOR_NS);
@@ -854,7 +854,7 @@
           do_callback(CONTEXT_RC_RESIZE, R, C);
         }
       } else {
-        if (Fl::event_button() == 1 && 
+        if (fltk3::event_button() == 1 && 
             _selecting == CONTEXT_CELL &&
             context == CONTEXT_CELL) {
           if (select_row != R || select_col != C) {
@@ -864,7 +864,7 @@
           select_col = C;
           ret = 1;
         }
-        else if (Fl::event_button() == 1 && 
+        else if (fltk3::event_button() == 1 && 
                  _selecting == CONTEXT_ROW_HEADER && 
                  context & (CONTEXT_ROW_HEADER|CONTEXT_COL_HEADER|CONTEXT_CELL)) {
           if (select_row != R) {
@@ -873,7 +873,7 @@
           select_row = R;
           ret = 1;
         }
-        else if (Fl::event_button() == 1 && 
+        else if (fltk3::event_button() == 1 && 
                  _selecting == CONTEXT_COL_HEADER 
                  && context & (CONTEXT_ROW_HEADER|CONTEXT_COL_HEADER|CONTEXT_CELL)) {
           if (select_col != C) {
@@ -885,10 +885,10 @@
       }
       // Enable autodrag if not resizing, and mouse has moved off table edge
       if ( _resizing_row < 0 && _resizing_col < 0 && _auto_drag == 0 && 
-          ( Fl::event_x() > x() + w() - 20 ||
-           Fl::event_x() < x() + row_header_width() || 
-           Fl::event_y() > y() + h() - 20 ||
-           Fl::event_y() < y() + col_header_height()
+          ( fltk3::event_x() > x() + w() - 20 ||
+           fltk3::event_x() < x() + row_header_width() || 
+           fltk3::event_y() > y() + h() - 20 ||
+           fltk3::event_y() < y() + col_header_height()
            ) ) {
             _start_auto_drag();
           }
@@ -914,7 +914,7 @@
         default:
           break;
       }
-      if ( Fl::event_button() == 1 ) {
+      if ( fltk3::event_button() == 1 ) {
         change_cursor(fltk3::CURSOR_DEFAULT);
         _resizing_col = -1;
         _resizing_row = -1;
@@ -952,7 +952,7 @@
       break;
       
     case fltk3::FOCUS:
-      Fl::focus(this);
+      fltk3::focus(this);
       //FALLTHROUGH
       
     case fltk3::UNFOCUS:
@@ -964,7 +964,7 @@
       ret = 0;
       int is_row = select_row;
       int is_col = select_col;
-      switch(Fl::event_key()) {
+      switch(fltk3::event_key()) {
         case fltk3::HomeKey:
           ret = move_cursor(0, -1000000);
           break;
@@ -990,14 +990,14 @@
           ret = move_cursor(1, 0);
           break;
 	case fltk3::TabKey:
-	  if ( Fl::event_state() & fltk3::SHIFT ) {
+	  if ( fltk3::event_state() & fltk3::SHIFT ) {
             ret = move_cursor(0, -1);		// shift-tab -> left
 	  } else {
 	    ret = move_cursor(0, 1);		// tab -> right
 	  }
           break;
       }
-      if (ret && Fl::focus() != this) {
+      if (ret && fltk3::focus() != this) {
         do_callback(CONTEXT_TABLE, -1, -1);
         take_focus();
       }
@@ -1198,10 +1198,10 @@
       // Table has a boxtype? Close those few dead pixels
       if ( table->box() ) {
         if ( col_header() ) {
-          fl_rectf(tox, wiy, Fl::box_dx(table->box()), col_header_height(), color());
+          fl_rectf(tox, wiy, fltk3::box_dx(table->box()), col_header_height(), color());
         }
         if ( row_header() ) {
-          fl_rectf(wix, toy, row_header_width(), Fl::box_dx(table->box()), color());
+          fl_rectf(wix, toy, row_header_width(), fltk3::box_dx(table->box()), color());
         }
       }
       
@@ -1213,8 +1213,8 @@
           fl_rectf(tix + table_w, 
                    wiy, 
                    // get that corner just right..
-                   (tiw - table_w + Fl::box_dw(table->box()) - 
-                    Fl::box_dx(table->box())),
+                   (tiw - table_w + fltk3::box_dw(table->box()) - 
+                    fltk3::box_dx(table->box())),
                    col_header_height(),
                    color());
         }

Modified: branches/branch-3.0/src/Fl_Table_Row.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Table_Row.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Table_Row.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -168,16 +168,16 @@
 int Fl_Table_Row::handle(int event) {
   
   //  fprintf(stderr, "** EVENT: %s: EVENT XY=%d,%d\n", 
-  //      eventnames[event], Fl::event_x(), Fl::event_y());	// debugging
+  //      eventnames[event], fltk3::event_x(), fltk3::event_y());	// debugging
   
   // Let base class handle event
   int ret = Fl_Table::handle(event);
   
   // The following code disables cell selection.. why was it added? -erco 05/18/03
-  // if ( ret ) { _last_y = Fl::event_y(); return(1); }	// base class 'handled' it (eg. column resize)
+  // if ( ret ) { _last_y = fltk3::event_y(); return(1); }	// base class 'handled' it (eg. column resize)
   
-  int shiftstate = (Fl::event_state() & fltk3::CTRL) ? fltk3::CTRL :
-  (Fl::event_state() & fltk3::SHIFT) ? fltk3::SHIFT : 0;
+  int shiftstate = (fltk3::event_state() & fltk3::CTRL) ? fltk3::CTRL :
+  (fltk3::event_state() & fltk3::SHIFT) ? fltk3::SHIFT : 0;
   
   // Which row/column are we over?
   int R, C;  				// row/column being worked on
@@ -185,9 +185,9 @@
   TableContext context = cursor2rowcol(R, C, resizeflag);
   switch ( event ) {
     case fltk3::PUSH:
-      if ( Fl::event_button() == 1 ) {
-        _last_push_x = Fl::event_x();	// save regardless of context
-        _last_push_y = Fl::event_y();	// " "
+      if ( fltk3::event_button() == 1 ) {
+        _last_push_x = fltk3::event_x();	// save regardless of context
+        _last_push_y = fltk3::event_y();	// " "
         
         // Handle selection in table.
         //     Select cell under cursor, and enable drag selection mode.
@@ -236,7 +236,7 @@
         
         if ( offtop > 0 && row_position() > 0 ) {
           // Only scroll in upward direction
-          int diff = _last_y - Fl::event_y();
+          int diff = _last_y - fltk3::event_y();
           if ( diff < 1 ) {
             ret = 1;
             break;
@@ -247,7 +247,7 @@
         }
         else if ( offbot > 0 && botrow < rows() ) {
           // Only scroll in downward direction
-          int diff = Fl::event_y() - _last_y;
+          int diff = fltk3::event_y() - _last_y;
           if ( diff < 1 ) {
             ret = 1;
             break;
@@ -287,7 +287,7 @@
     }
       
     case fltk3::RELEASE:
-      if ( Fl::event_button() == 1 ) {
+      if ( fltk3::event_button() == 1 ) {
         _dragging_select = 0;
         ret = 1;			// release handled
         // Clicked off edges of data table? 
@@ -296,8 +296,8 @@
         int databot = tiy + table_h,
         dataright = tix + table_w;
         if ( 
-            ( _last_push_x > dataright && Fl::event_x() > dataright ) ||
-            ( _last_push_y > databot && Fl::event_y() > databot )
+            ( _last_push_x > dataright && fltk3::event_x() > dataright ) ||
+            ( _last_push_y > databot && fltk3::event_y() > databot )
             ) {
           select_all_rows(0);			// clear previous selections
         }
@@ -307,7 +307,7 @@
     default:
       break;
   }
-  _last_y = Fl::event_y();
+  _last_y = fltk3::event_y();
   return(ret);
 }
 

Modified: branches/branch-3.0/src/Fl_Tabs.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tabs.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tabs.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -67,7 +67,7 @@
   char prev_draw_shortcut = fl_draw_shortcut;
   fl_draw_shortcut = 1;
 
-  tab_pos[0] = Fl::box_dx(box());
+  tab_pos[0] = fltk3::box_dx(box());
   for (i=0; i<nc; i++) {
     fltk3::Widget* o = *a++;
     if (o->visible()) selected = i;
@@ -150,10 +150,10 @@
 {
   int H = tab_height();
   if (H >= 0) {
-    H += Fl::box_dy(box());
+    H += fltk3::box_dy(box());
     damage(fltk3::DAMAGE_SCROLL, x(), y(), w(), H);
   } else {
-    H = Fl::box_dy(box()) - H;
+    H = fltk3::box_dy(box()) - H;
     damage(fltk3::DAMAGE_SCROLL, x(), y() + h() - H, w(), H);
   }
 }
@@ -168,18 +168,18 @@
   case fltk3::PUSH: {
     int H = tab_height();
     if (H >= 0) {
-      if (Fl::event_y() > y()+H) return fltk3::Group::handle(event);
+      if (fltk3::event_y() > y()+H) return fltk3::Group::handle(event);
     } else {
-      if (Fl::event_y() < y()+h()+H) return fltk3::Group::handle(event);
+      if (fltk3::event_y() < y()+h()+H) return fltk3::Group::handle(event);
     }}
     /* FALLTHROUGH */
   case fltk3::DRAG:
   case fltk3::RELEASE:
-    o = which(Fl::event_x(), Fl::event_y());
+    o = which(fltk3::event_x(), fltk3::event_y());
     if (event == fltk3::RELEASE) {
       push(0);
-      if (o && Fl::visible_focus() && Fl::focus()!=this) { 
-        Fl::focus(this);
+      if (o && fltk3::visible_focus() && fltk3::focus()!=this) { 
+        fltk3::focus(this);
         redraw_tabs();
       }
       if (o && value(o)) {
@@ -197,12 +197,12 @@
     int ret = fltk3::Group::handle(event);
     fltk3::Widget *o = Fl_Tooltip::current(), *n = o;
     int H = tab_height();
-    if ( (H>=0) && (Fl::event_y()>y()+H) )
+    if ( (H>=0) && (fltk3::event_y()>y()+H) )
       return ret;
-    else if ( (H<0) && (Fl::event_y() < y()+h()+H) )
+    else if ( (H<0) && (fltk3::event_y() < y()+h()+H) )
       return ret;
     else { 
-      n = which(Fl::event_x(), Fl::event_y());
+      n = which(fltk3::event_x(), fltk3::event_y());
       if (!n) n = this;
     }
     if (n!=o)
@@ -210,19 +210,19 @@
     return ret; }
   case fltk3::FOCUS:
   case fltk3::UNFOCUS:
-    if (!Fl::visible_focus()) return fltk3::Group::handle(event);
-    if (Fl::event() == fltk3::RELEASE ||
-	Fl::event() == fltk3::SHORTCUT ||
-	Fl::event() == fltk3::KEYBOARD ||
-	Fl::event() == fltk3::FOCUS ||
-	Fl::event() == fltk3::UNFOCUS) {
+    if (!fltk3::visible_focus()) return fltk3::Group::handle(event);
+    if (fltk3::event() == fltk3::RELEASE ||
+	fltk3::event() == fltk3::SHORTCUT ||
+	fltk3::event() == fltk3::KEYBOARD ||
+	fltk3::event() == fltk3::FOCUS ||
+	fltk3::event() == fltk3::UNFOCUS) {
       redraw_tabs();
-      if (Fl::event() == fltk3::FOCUS) return fltk3::Group::handle(event);
-      if (Fl::event() == fltk3::UNFOCUS) return 0;
+      if (fltk3::event() == fltk3::FOCUS) return fltk3::Group::handle(event);
+      if (fltk3::event() == fltk3::UNFOCUS) return 0;
       else return 1;
     } else return fltk3::Group::handle(event);
   case fltk3::KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case fltk3::LeftKey:
         if (child(0)->visible()) return 0;
 	for (i = 1; i < children(); i ++)
@@ -357,8 +357,8 @@
 
 void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, fltk3::Widget* o, int what) {
   int sel = (what == SELECTED);
-  int dh = Fl::box_dh(box());
-  int dy = Fl::box_dy(box());
+  int dh = fltk3::box_dh(box());
+  int dy = fltk3::box_dy(box());
   char prev_draw_shortcut = fl_draw_shortcut;
   fl_draw_shortcut = 1;
 
@@ -389,7 +389,7 @@
     // Restore the original label color...
     o->labelcolor(oc);
 
-    if (Fl::focus() == this && o->visible())
+    if (fltk3::focus() == this && o->visible())
       draw_focus(box(), x1, y(), W, H);
 
     fl_pop_clip();
@@ -415,7 +415,7 @@
     // Restore the original label color...
     o->labelcolor(oc);
 
-    if (Fl::focus() == this && o->visible())
+    if (fltk3::focus() == this && o->visible())
       draw_focus(box(), x1, y() + h() - H, W, H);
 
     fl_pop_clip();

Modified: branches/branch-3.0/src/Fl_Text_Buffer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Buffer.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Text_Buffer.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -692,7 +692,7 @@
     }
   }
   if (toRemove == -1) {
-    Fl::error
+    fltk3::error
     ("Fl_Text_Buffer::remove_modify_callback(): Can't find modify CB to remove");
     return;
   }
@@ -767,7 +767,7 @@
     }
   }
   if (toRemove == -1) {
-    Fl::error
+    fltk3::error
     ("Fl_Text_Buffer::remove_predelete_callback(): Can't find pre-delete CB to remove");
     return;
   }

Modified: branches/branch-3.0/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Display.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Text_Display.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -121,7 +121,7 @@
   
   end();
   
-  scrollbar_width(Fl::scrollbar_size());
+  scrollbar_width(fltk3::scrollbar_size());
   scrollbar_align(fltk3::ALIGN_BOTTOM_RIGHT);
   
   mCursorOn = 0;
@@ -173,7 +173,7 @@
  */
 Fl_Text_Display::~Fl_Text_Display() {
   if (scroll_direction) {
-    Fl::remove_timeout(scroll_timer_cb, this);
+    fltk3::remove_timeout(scroll_timer_cb, this);
     scroll_direction = 0;
   }
   if (mBuffer) {
@@ -295,10 +295,10 @@
 #endif // DEBUG
   fltk3::Widget::resize(X,Y,W,H);
   if (!buffer()) return;
-  X += Fl::box_dx(box());
-  Y += Fl::box_dy(box());
-  W -= Fl::box_dw(box());
-  H -= Fl::box_dh(box());
+  X += fltk3::box_dx(box());
+  Y += fltk3::box_dy(box());
+  W -= fltk3::box_dw(box());
+  H -= fltk3::box_dh(box());
   
   text_area.x = X+LEFT_MARGIN;
   text_area.y = Y+TOP_MARGIN;
@@ -1644,7 +1644,7 @@
     if ( empty_vlines() ) {
       if ( mLastChar < mBuffer->length() ) {
         if ( !position_to_line( mLastChar, lineNum ) ) {
-          Fl::error("Fl_Text_Display::position_to_line(): Consistency check ptvl failed");
+          fltk3::error("Fl_Text_Display::position_to_line(): Consistency check ptvl failed");
           return 0;
         }
         return ++( *lineNum ) <= mNVisibleLines - 1;
@@ -1940,19 +1940,19 @@
     fsize = styleRec->size;
     
     if (style & PRIMARY_MASK) {
-      if (Fl::focus() == (fltk3::Widget*)this) background = selection_color();
+      if (fltk3::focus() == (fltk3::Widget*)this) background = selection_color();
       else background = fltk3::color_average(color(), selection_color(), 0.4f);
     } else if (style & HIGHLIGHT_MASK) {
-      if (Fl::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
+      if (fltk3::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
       else background = fltk3::color_average(color(), selection_color(), 0.6f);
     } else background = color();
     foreground = fltk3::contrast(styleRec->color, background);
   } else if (style & PRIMARY_MASK) {
-    if (Fl::focus() == (fltk3::Widget*)this) background = selection_color();
+    if (fltk3::focus() == (fltk3::Widget*)this) background = selection_color();
     else background = fltk3::color_average(color(), selection_color(), 0.4f);
     foreground = fltk3::contrast(textcolor(), background);
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
+    if (fltk3::focus() == (fltk3::Widget*)this) background = fltk3::color_average(color(), selection_color(), 0.5f);
     else background = fltk3::color_average(color(), selection_color(), 0.6f);
     foreground = fltk3::contrast(textcolor(), background);
   } else {
@@ -2013,13 +2013,13 @@
     return;
   
   if (style & PRIMARY_MASK) {
-    if (Fl::focus()==(fltk3::Widget*)this) {
+    if (fltk3::focus()==(fltk3::Widget*)this) {
       fl_color(selection_color());
     } else {
       fl_color(fltk3::color_average(color(), selection_color(), 0.4f));
     }
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus()==(fltk3::Widget*)this) {
+    if (fltk3::focus()==(fltk3::Widget*)this) {
       fl_color(fltk3::color_average(color(), selection_color(), 0.5f));
     } else {
       fl_color(fltk3::color_average(color(), selection_color(), 0.6f));
@@ -3454,7 +3454,7 @@
   // draw the text cursor
   if (damage() & (fltk3::DAMAGE_ALL | fltk3::DAMAGE_SCROLL | fltk3::DAMAGE_EXPOSE)
       && !buffer()->primary_selection()->selected() &&
-      mCursorOn && Fl::focus() == (fltk3::Widget*)this ) {
+      mCursorOn && fltk3::focus() == (fltk3::Widget*)this ) {
     fl_push_clip(text_area.x-LEFT_MARGIN,
                  text_area.y,
                  text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
@@ -3537,7 +3537,7 @@
       return;
   }
   fl_text_drag_me(pos, w);
-  Fl::repeat_timeout(.1, scroll_timer_cb, user_data);
+  fltk3::repeat_timeout(.1, scroll_timer_cb, user_data);
 }
 
 
@@ -3548,7 +3548,7 @@
 int Fl_Text_Display::handle(int event) {
   if (!buffer()) return 0;
   // This isn't very elegant!
-  if (!Fl::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) &&
+  if (!fltk3::event_inside(text_area.x, text_area.y, text_area.w, text_area.h) &&
       !dragging && event != fltk3::LEAVE && event != fltk3::ENTER &&
       event != fltk3::MOVE && event != fltk3::FOCUS && event != fltk3::UNFOCUS &&
       event != fltk3::KEYBOARD && event != fltk3::KEYUP) {
@@ -3559,7 +3559,7 @@
     case fltk3::ENTER:
     case fltk3::MOVE:
       if (active_r()) {
-        if (Fl::event_inside(text_area.x, text_area.y, text_area.w,
+        if (fltk3::event_inside(text_area.x, text_area.y, text_area.w,
 	                     text_area.h)) window()->cursor(fltk3::CURSOR_INSERT);
 	else window()->cursor(fltk3::CURSOR_DEFAULT);
 	return 1;
@@ -3579,28 +3579,28 @@
       
     case fltk3::PUSH: {
       if (active_r() && window()) {
-        if (Fl::event_inside(text_area.x, text_area.y, text_area.w,
+        if (fltk3::event_inside(text_area.x, text_area.y, text_area.w,
                              text_area.h)) window()->cursor(fltk3::CURSOR_INSERT);
         else window()->cursor(fltk3::CURSOR_DEFAULT);
       }
       
-      if (Fl::focus() != this) {
-        Fl::focus(this);
+      if (fltk3::focus() != this) {
+        fltk3::focus(this);
         handle(fltk3::FOCUS);
       }
       if (fltk3::Group::handle(event)) return 1;
-      if (Fl::event_state()&fltk3::SHIFT) return handle(fltk3::DRAG);
+      if (fltk3::event_state()&fltk3::SHIFT) return handle(fltk3::DRAG);
       dragging = 1;
-      int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS);
+      int pos = xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS);
       dragPos = pos;
       if (buffer()->primary_selection()->includes(pos)) {
         dragType = DRAG_START_DND;
         return 1;
       }
-      dragType = Fl::event_clicks();
+      dragType = fltk3::event_clicks();
       if (dragType == DRAG_CHAR) {
         buffer()->unselect();
-	Fl::copy("", 0, 0);
+	fltk3::copy("", 0, 0);
       }
       else if (dragType == DRAG_WORD) {
         buffer()->select(word_start(pos), word_end(pos));
@@ -3619,47 +3619,47 @@
       if (dragType==DRAG_NONE)
         return 1;
       if (dragType==DRAG_START_DND) {
-        if (!Fl::event_is_click() && Fl::dnd_text_ops()) {
+        if (!fltk3::event_is_click() && fltk3::dnd_text_ops()) {
           const char* copy = buffer()->selection_text();
-          Fl::dnd();
+          fltk3::dnd();
           free((void*)copy);
         }
         return 1;
       }
-      int X = Fl::event_x(), Y = Fl::event_y(), pos = insert_position();
+      int X = fltk3::event_x(), Y = fltk3::event_y(), pos = insert_position();
       // if we leave the text_area, we start a timer event
       // that will take care of scrolling and selecting
       if (Y < text_area.y) {
         scroll_x = X;
         scroll_amount = (Y - text_area.y) / 5 - 1;
         if (!scroll_direction) {
-          Fl::add_timeout(.01, scroll_timer_cb, this);
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
         }
         scroll_direction = 3;
       } else if (Y >= text_area.y+text_area.h) {
         scroll_x = X;
         scroll_amount = (Y - text_area.y - text_area.h) / 5 + 1;
         if (!scroll_direction) {
-          Fl::add_timeout(.01, scroll_timer_cb, this);
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
         }
         scroll_direction = 4;
       } else if (X < text_area.x) {
         scroll_y = Y;
         scroll_amount = (X - text_area.x) / 2 - 1;
         if (!scroll_direction) {
-          Fl::add_timeout(.01, scroll_timer_cb, this);
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
         }
         scroll_direction = 2;
       } else if (X >= text_area.x+text_area.w) {
         scroll_y = Y;
         scroll_amount = (X - text_area.x - text_area.w) / 2 + 1;
         if (!scroll_direction) {
-          Fl::add_timeout(.01, scroll_timer_cb, this);
+          fltk3::add_timeout(.01, scroll_timer_cb, this);
         }
         scroll_direction = 1;
       } else {
         if (scroll_direction) {
-          Fl::remove_timeout(scroll_timer_cb, this);
+          fltk3::remove_timeout(scroll_timer_cb, this);
           scroll_direction = 0;
         }
         pos = xy_to_position(X, Y, CURSOR_POS);
@@ -3670,19 +3670,19 @@
     }
       
     case fltk3::RELEASE: {
-      if (Fl::event_is_click() && (! Fl::event_clicks()) && 
-	  buffer()->primary_selection()->includes(dragPos) && !(Fl::event_state()&fltk3::SHIFT) ) {
+      if (fltk3::event_is_click() && (! fltk3::event_clicks()) && 
+	  buffer()->primary_selection()->includes(dragPos) && !(fltk3::event_state()&fltk3::SHIFT) ) {
 	buffer()->unselect(); // clicking in the selection: unselect and move cursor
 	insert_position(dragPos);
 	return 1;
-      } else if (Fl::event_clicks() == DRAG_LINE && Fl::event_button() == fltk3::LEFT_MOUSE) {
+      } else if (fltk3::event_clicks() == DRAG_LINE && fltk3::event_button() == fltk3::LEFT_MOUSE) {
         buffer()->select(buffer()->line_start(dragPos), buffer()->next_char(buffer()->line_end(dragPos)));
 	dragPos = line_start(dragPos);
 	dragType = DRAG_CHAR;
       } else {
 	dragging = 0;
 	if (scroll_direction) {
-	  Fl::remove_timeout(scroll_timer_cb, this);
+	  fltk3::remove_timeout(scroll_timer_cb, this);
 	  scroll_direction = 0;
 	}
 	
@@ -3695,13 +3695,13 @@
       }
       
       const char* copy = buffer()->selection_text();
-      if (*copy) Fl::copy(copy, strlen(copy), 0);
+      if (*copy) fltk3::copy(copy, strlen(copy), 0);
       free((void*)copy);
       return 1;
     }
       
     case fltk3::MOUSEWHEEL:
-      if (Fl::event_dy()) return mVScrollBar->handle(event);
+      if (fltk3::event_dy()) return mVScrollBar->handle(event);
       else return mHScrollBar->handle(event);
       
     case fltk3::UNFOCUS:
@@ -3726,19 +3726,19 @@
       
     case fltk3::KEYBOARD:
       // Copy?
-      if ((Fl::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && Fl::event_key()=='c') {
+      if ((fltk3::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && fltk3::event_key()=='c') {
         if (!buffer()->selected()) return 1;
         const char *copy = buffer()->selection_text();
-        if (*copy) Fl::copy(copy, strlen(copy), 1);
+        if (*copy) fltk3::copy(copy, strlen(copy), 1);
         free((void*)copy);
         return 1;
       }
       
       // Select all ?
-      if ((Fl::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && Fl::event_key()=='a') {
+      if ((fltk3::event_state()&(fltk3::CTRL|fltk3::COMMAND)) && fltk3::event_key()=='a') {
         buffer()->select(0,buffer()->length());
         const char *copy = buffer()->selection_text();
-        if (*copy) Fl::copy(copy, strlen(copy), 0);
+        if (*copy) fltk3::copy(copy, strlen(copy), 0);
         free((void*)copy);
         return 1;
       }
@@ -3749,10 +3749,10 @@
       break;
       
     case fltk3::SHORTCUT:
-      if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut()))
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
         return 0;
-      if (Fl::visible_focus() && handle(fltk3::FOCUS)) {
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
         return 1;
       }
       break;

Modified: branches/branch-3.0/src/Fl_Text_Editor.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Editor.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Text_Editor.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -281,7 +281,7 @@
   if (!selected)
     e->dragPos = e->insert_position();
   e->buffer()->unselect();
-  Fl::copy("", 0, 0);
+  fltk3::copy("", 0, 0);
   switch (c) {
   case fltk3::HomeKey:
       e->insert_position(e->buffer()->line_start(e->insert_position()));
@@ -318,7 +318,7 @@
   fl_text_drag_me(e->insert_position(), e);
   char *copy = e->buffer()->selection_text();
   if (copy) {
-    Fl::copy(copy, strlen(copy), 0);
+    fltk3::copy(copy, strlen(copy), 0);
     free(copy);
     }
   return 1;
@@ -329,7 +329,7 @@
     e->dragPos = e->insert_position();
   if (c != fltk3::UpKey && c != fltk3::DownKey) {
     e->buffer()->unselect();
-    Fl::copy("", 0, 0);
+    fltk3::copy("", 0, 0);
     e->show_insert_position();
   }
   switch (c) {
@@ -369,7 +369,7 @@
     e->dragPos = e->insert_position();
   if (c != fltk3::UpKey && c != fltk3::DownKey) {
     e->buffer()->unselect();
-    Fl::copy("", 0, 0);
+    fltk3::copy("", 0, 0);
     e->show_insert_position();
   }
   switch (c) {
@@ -468,7 +468,7 @@
 int Fl_Text_Editor::kf_copy(int, Fl_Text_Editor* e) {
   if (!e->buffer()->selected()) return 1;
   const char *copy = e->buffer()->selection_text();
-  if (*copy) Fl::copy(copy, strlen(copy), 1);
+  if (*copy) fltk3::copy(copy, strlen(copy), 1);
   free((void*)copy);
   e->show_insert_position();
   return 1;
@@ -486,7 +486,7 @@
 /**  Does a paste of selected text in the current buffer.*/
 int Fl_Text_Editor::kf_paste(int, Fl_Text_Editor* e) {
   kill_selection(e);
-  Fl::paste(*e, 1);
+  fltk3::paste(*e, 1);
   e->show_insert_position();
   e->set_changed();
   if (e->when()&fltk3::WHEN_CHANGED) e->do_callback();
@@ -497,14 +497,14 @@
 int Fl_Text_Editor::kf_select_all(int, Fl_Text_Editor* e) {
   e->buffer()->select(0, e->buffer()->length());
   const char *copy = e->buffer()->selection_text();
-  if (*copy) Fl::copy(copy, strlen(copy), 0);
+  if (*copy) fltk3::copy(copy, strlen(copy), 0);
   free((void*)copy);
   return 1;
 }
 /**  Undo last edit in the current buffer. Also deselect previous selection. */
 int Fl_Text_Editor::kf_undo(int , Fl_Text_Editor* e) {
   e->buffer()->unselect();
-  Fl::copy("", 0, 0);
+  fltk3::copy("", 0, 0);
   int crsr;
   int ret = e->buffer()->undo(&crsr);
   e->insert_position(crsr);
@@ -521,16 +521,16 @@
   // the changes that should be made to the text, as a number of
   // bytes to delete and a string to insert:
   int del = 0;
-  if (Fl::compose(del)) {
+  if (fltk3::compose(del)) {
     if (del) {
       int dp = insert_position(), di = del;
       while (di--) dp = buffer()->prev_char_clipped(dp);
       buffer()->select(dp, insert_position());
     }
     kill_selection(this);
-    if (Fl::event_length()) {
-      if (insert_mode()) insert(Fl::event_text());
-      else overstrike(Fl::event_text());
+    if (fltk3::event_length()) {
+      if (insert_mode()) insert(fltk3::event_text());
+      else overstrike(fltk3::event_text());
     }
     show_insert_position();
     set_changed();
@@ -538,7 +538,7 @@
     return 1;
   }
 
-  int key = Fl::event_key(), state = Fl::event_state(), c = Fl::event_text()[0];
+  int key = fltk3::event_key(), state = fltk3::event_state(), c = fltk3::event_text()[0];
   state &= fltk3::SHIFT|fltk3::CTRL|fltk3::ALT|fltk3::META; // only care about these states
   Key_Func f;
   f = bound_key_function(key, state, global_key_bindings);
@@ -564,7 +564,7 @@
     case fltk3::FOCUS:
       show_cursor(mCursorOn); // redraws the cursor
       if (buffer()->selected()) redraw(); // Redraw selections...
-      Fl::focus(this);
+      fltk3::focus(this);
       return 1;
 
     case fltk3::UNFOCUS:
@@ -575,18 +575,18 @@
       return 1;
 
     case fltk3::KEYBOARD:
-      if (active_r() && window() && this == Fl::belowmouse()) 
+      if (active_r() && window() && this == fltk3::belowmouse()) 
         window()->cursor(fltk3::CURSOR_NONE);
       return handle_key();
 
     case fltk3::PASTE:
-      if (!Fl::event_text()) {
+      if (!fltk3::event_text()) {
         fl_beep();
 	return 1;
       }
       buffer()->remove_selection();
-      if (insert_mode()) insert(Fl::event_text());
-      else overstrike(Fl::event_text());
+      if (insert_mode()) insert(fltk3::event_text());
+      else overstrike(fltk3::event_text());
       show_insert_position();
       set_changed();
       if (when()&fltk3::WHEN_CHANGED) do_callback();
@@ -599,17 +599,17 @@
       return 1;
 
     case fltk3::PUSH:
-      if (Fl::event_button() == 2) {
+      if (fltk3::event_button() == 2) {
         // don't let the text_display see this event
         if (fltk3::Group::handle(event)) return 1;
         dragType = DRAG_NONE;
 	if(buffer()->selected()) {
 	  buffer()->unselect();
 	  }
-	int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS);
+	int pos = xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS);
         insert_position(pos);
-        Fl::paste(*this, 0);
-        Fl::focus(this);
+        fltk3::paste(*this, 0);
+        fltk3::focus(this);
         set_changed();
         if (when()&fltk3::WHEN_CHANGED) do_callback();
         return 1;
@@ -617,10 +617,10 @@
       break;
 
     case fltk3::SHORTCUT:
-      if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut()))
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
         return 0;
-      if (Fl::visible_focus() && handle(fltk3::FOCUS)) {
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
         return 1;
       }
       break;
@@ -628,13 +628,13 @@
       // Handle drag'n'drop attempt by the user. This is a simplified 
       // implementation which allows dnd operations onto the scroll bars.
     case fltk3::DND_ENTER: // save the current cursor position
-      if (Fl::visible_focus() && handle(fltk3::FOCUS))
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS))
+        fltk3::focus(this);
       show_cursor(mCursorOn);
       dndCursorPos = insert_position();
       /* fall through */
     case fltk3::DND_DRAG: // show a temporary insertion cursor
-      insert_position(xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS));
+      insert_position(xy_to_position(fltk3::event_x(), fltk3::event_y(), CURSOR_POS));
       return 1;      
     case fltk3::DND_LEAVE: // restore original cursor
       insert_position(dndCursorPos);

Modified: branches/branch-3.0/src/Fl_Tile.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tile.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tile.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -129,8 +129,8 @@
 #define DRAGV 2
 #define GRABAREA 4
 
-  int mx = Fl::event_x();
-  int my = Fl::event_y();
+  int mx = fltk3::event_x();
+  int my = fltk3::event_y();
 
   switch (event) {
 
@@ -187,14 +187,14 @@
     fltk3::Widget* r = resizable(); if (!r) r = this;
     int newx;
     if (sdrag&DRAGH) {
-      newx = Fl::event_x()-sdx;
+      newx = fltk3::event_x()-sdx;
       if (newx < r->x()) newx = r->x();
       else if (newx > r->x()+r->w()) newx = r->x()+r->w();
     } else
       newx = sx;
     int newy;
     if (sdrag&DRAGV) {
-      newy = Fl::event_y()-sdy;
+      newy = fltk3::event_y()-sdy;
       if (newy < r->y()) newy = r->y();
       else if (newy > r->y()+r->h()) newy = r->y()+r->h();
     } else

Modified: branches/branch-3.0/src/Fl_Tiled_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tiled_Image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tiled_Image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -41,8 +41,8 @@
   image_       = i;
   alloc_image_ = 0;
 
-  if (W == 0) w(Fl::w());
-  if (H == 0) h(Fl::h());
+  if (W == 0) w(fltk3::w());
+  if (H == 0) h(fltk3::h());
 }
 /**
   The destructor frees all memory and server resources that are used by
@@ -108,8 +108,8 @@
 		     int cx,	// I - "Source" X position
 		     int cy) {	// I - "Source" Y position
   if (!image_->w() || !image_->h()) return;
-  if (W == 0) W = Fl::w();
-  if (H == 0) H = Fl::h();
+  if (W == 0) W = fltk3::w();
+  if (H == 0) H = fltk3::h();
 
   fl_push_clip(X, Y, W, H);
 

Modified: branches/branch-3.0/src/Fl_Tooltip.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tooltip.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tooltip.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -83,17 +83,17 @@
   ww += 6; hh += 6;
 
   // find position on the screen of the widget:
-  int ox = Fl::event_x_root();
+  int ox = fltk3::event_x_root();
   int oy = Y + H+2;
   for (fltk3::Widget* p = Fl_Tooltip::current(); p; p = p->window()) {
     oy += p->y();
   }
   int scr_x, scr_y, scr_w, scr_h;
-  Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
   if (ox+ww > scr_x+scr_w) ox = scr_x+scr_w - ww;
   if (ox < scr_x) ox = scr_x;
   if (H > 30) {
-    oy = Fl::event_y_root()+13;
+    oy = fltk3::event_y_root()+13;
     if (oy+hh > scr_y+scr_h) oy -= 23+hh;
   } else {
     if (oy+hh > scr_y+scr_h) oy -= (4+hh+H);
@@ -134,7 +134,7 @@
   } else {
     int condition = 1;
 #if !(defined(__APPLE__) || defined(WIN32))
-    condition = (Fl::grab() == NULL);
+    condition = (fltk3::grab() == NULL);
 #endif
     if ( condition ) {
       if (!window) window = new Fl_TooltipBox;
@@ -148,7 +148,7 @@
     }
   }
 
-  Fl::remove_timeout(recent_timeout);
+  fltk3::remove_timeout(recent_timeout);
   recent_tooltip = 1;
   recursion = 0;
 }
@@ -212,12 +212,12 @@
 
   if (!widget_ || (w && w == window)) return;
   widget_ = 0;
-  Fl::remove_timeout(tooltip_timeout);
-  Fl::remove_timeout(recent_timeout);
+  fltk3::remove_timeout(tooltip_timeout);
+  fltk3::remove_timeout(recent_timeout);
   if (window && window->visible()) window->hide();
   if (recent_tooltip) {
-    if (Fl::event_state() & fltk3::BUTTONS) recent_tooltip = 0;
-    else Fl::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout);
+    if (fltk3::event_state() & fltk3::BUTTONS) recent_tooltip = 0;
+    else fltk3::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout);
   }
 }
 
@@ -227,7 +227,7 @@
 // inside or near the box).
 /**
   You may be able to use this to provide tooltips for internal pieces
-  of your widget. Call this after setting Fl::belowmouse() to
+  of your widget. Call this after setting fltk3::belowmouse() to
   your widget (because that calls the above enter() method). Then figure
   out what thing the mouse is pointing at, and call this with the widget
   (this pointer is used to remove the tooltip if the widget is deleted
@@ -254,14 +254,14 @@
   }
   // do nothing if it is the same:
   if (wid==widget_ /*&& x==X && y==Y && w==W && h==H*/ && t==tip) return;
-  Fl::remove_timeout(tooltip_timeout);
-  Fl::remove_timeout(recent_timeout);
+  fltk3::remove_timeout(tooltip_timeout);
+  fltk3::remove_timeout(recent_timeout);
   // remember it:
   widget_ = wid; Y = y; H = h; tip = t;
   // popup the tooltip immediately if it was recently up:
   if (recent_tooltip) {
     if (window) window->hide();
-    Fl::add_timeout(Fl_Tooltip::hoverdelay(), tooltip_timeout);
+    fltk3::add_timeout(Fl_Tooltip::hoverdelay(), tooltip_timeout);
   } else if (Fl_Tooltip::delay() < .1) {
 #ifdef WIN32
     // possible fix for the Windows titlebar, it seems to want the
@@ -271,7 +271,7 @@
     tooltip_timeout(0);
   } else {
     if (window && window->visible()) window->hide();
-    Fl::add_timeout(Fl_Tooltip::delay(), tooltip_timeout);
+    fltk3::add_timeout(Fl_Tooltip::delay(), tooltip_timeout);
   }
 
 #ifdef DEBUG

Modified: branches/branch-3.0/src/Fl_Tree.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tree.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -102,7 +102,7 @@
   _item_focus      = 0;
   _callback_item   = 0;
   _callback_reason = FL_TREE_REASON_NONE;
-  _scrollbar_size  = 0;				// 0: uses Fl::scrollbar_size()
+  _scrollbar_size  = 0;				// 0: uses fltk3::scrollbar_size()
   box(fltk3::DOWN_BOX);
   color(fltk3::BACKGROUND2_COLOR, fltk3::SELECTION_COLOR);
   when(fltk3::WHEN_CHANGED);
@@ -272,10 +272,10 @@
   fltk3::Group::draw_label();
   // Handle tree
   if ( ! _root ) return;
-  int cx = x() + Fl::box_dx(box());
-  int cy = y() + Fl::box_dy(box());
-  int cw = w() - Fl::box_dw(box());
-  int ch = h() - Fl::box_dh(box());
+  int cx = x() + fltk3::box_dx(box());
+  int cy = y() + fltk3::box_dy(box());
+  int cw = w() - fltk3::box_dw(box());
+  int ch = h() - fltk3::box_dh(box());
   // These values are changed during drawing
   // 'Y' will be the lowest point on the tree
   int X = cx + _prefs.marginleft();
@@ -286,7 +286,7 @@
   {
     fl_font(_prefs.labelfont(), _prefs.labelsize());
     _root->draw(X, Y, W, this,
-                (Fl::focus()==this)?_item_focus:0,	// show focus item ONLY if Fl_Tree has focus
+                (fltk3::focus()==this)?_item_focus:0,	// show focus item ONLY if Fl_Tree has focus
 		_prefs);
   }
   fl_pop_clip();
@@ -302,11 +302,11 @@
   if ( Ysave<cy || ydiff > ch || int(_vscroll->value()) > 1 ) {
     _vscroll->visible();
     
-    int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
-    int sx = x()+w()-Fl::box_dx(box())-scrollsize;
-    int sy = y()+Fl::box_dy(box());
+    int scrollsize = _scrollbar_size ? _scrollbar_size : fltk3::scrollbar_size();
+    int sx = x()+w()-fltk3::box_dx(box())-scrollsize;
+    int sy = y()+fltk3::box_dy(box());
     int sw = scrollsize;
-    int sh = h()-Fl::box_dh(box());
+    int sh = h()-fltk3::box_dh(box());
     _vscroll->show();
     _vscroll->range(0.0,ydiff-ch);
     _vscroll->resize(sx,sy,sw,sh);
@@ -357,7 +357,7 @@
 /// and is meant to be used within a callback to determine the item clicked.
 ///
 /// This method walks the entire tree looking for the first item that is
-/// under the mouse (ie. at Fl::event_x()/Fl:event_y().
+/// under the mouse (ie. at fltk3::event_x()/Fl:event_y().
 ///
 /// Use this method /only/ if you've subclassed Fl_Tree, and are receiving
 /// events before Fl_Tree has been able to process and update callback_item().
@@ -511,9 +511,9 @@
       //     focus widget, determine which item gets focus depending on nav key.
       //
       if ( ! _item_focus ) {					// no focus established yet?
-	switch (Fl::event_key()) {				// determine if focus was navigated..
+	switch (fltk3::event_key()) {				// determine if focus was navigated..
 	  case fltk3::TabKey: {					// received focus via TAB?
-	    if ( Fl::event_state(fltk3::SHIFT) ) {			// SHIFT-TAB similar to fltk3::UpKey
+	    if ( fltk3::event_state(fltk3::SHIFT) ) {			// SHIFT-TAB similar to fltk3::UpKey
 	      set_item_focus(next_visible_item(0, fltk3::UpKey));
 	    } else {						// TAB similar to fltk3::DownKey
 	      set_item_focus(next_visible_item(0, fltk3::DownKey));
@@ -547,7 +547,7 @@
 	  set_item_focus(first());
 	}
 	if ( _item_focus ) {
-	  int ekey = Fl::event_key();
+	  int ekey = fltk3::event_key();
 	  switch (ekey) {
 	    case fltk3::EnterKey:	// ENTER: selects current item only
 	    case fltk3::KPEnterKey:
@@ -601,7 +601,7 @@
 		if ( itembot > y()+h() ) { show_item_bottom(_item_focus); }
 		// Extend selection
 		if ( _prefs.selectmode() == FL_TREE_SELECT_MULTI &&	// multiselect on?
-                    (Fl::event_state() & fltk3::SHIFT) &&			// shift key?
+                    (fltk3::event_state() & fltk3::SHIFT) &&			// shift key?
                     ! _item_focus->is_selected() ) {			// not already selected?
                   select(_item_focus);				// extend selection..
 		}
@@ -628,8 +628,8 @@
   if ( ! _root ) return(ret);
   switch ( e ) {
     case fltk3::PUSH: {					// clicked on a tree item?
-      if (Fl::visible_focus() && handle(fltk3::FOCUS)) {
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(fltk3::FOCUS)) {
+        fltk3::focus(this);
       }
       lastselect = 0;
       Fl_Tree_Item *o = _root->find_clicked(_prefs);
@@ -637,12 +637,12 @@
       set_item_focus(o);				// becomes new focus widget
       redraw();
       ret |= 1;						// handled
-      if ( Fl::event_button() == fltk3::LEFT_MOUSE ) {
+      if ( fltk3::event_button() == fltk3::LEFT_MOUSE ) {
 	if ( o->event_on_collapse_icon(_prefs) ) {	// collapse icon clicked?
 	  open_toggle(o);
 	} else if ( o->event_on_label(_prefs) && 	// label clicked?
-                   (!o->widget() || !Fl::event_inside(o->widget())) &&		// not inside widget
-                   (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) {	// not on scroller
+                   (!o->widget() || !fltk3::event_inside(o->widget())) &&		// not inside widget
+                   (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {	// not on scroller
 	  switch ( _prefs.selectmode() ) {
 	    case FL_TREE_SELECT_NONE:
 	      break;
@@ -650,9 +650,9 @@
 	      select_only(o);
 	      break;
 	    case FL_TREE_SELECT_MULTI: {
-	      if ( Fl::event_state() & fltk3::SHIFT ) {		// SHIFT+PUSH?
+	      if ( fltk3::event_state() & fltk3::SHIFT ) {		// SHIFT+PUSH?
 	        select(o);					// add to selection
-	      } else if ( Fl::event_state() & fltk3::CTRL ) {	// CTRL+PUSH?
+	      } else if ( fltk3::event_state() & fltk3::CTRL ) {	// CTRL+PUSH?
 		select_toggle(o);				// toggle selection state
 		lastselect = o;					// save toggled item (prevent oscillation)
 	      } else {
@@ -667,7 +667,7 @@
     }
     case fltk3::DRAG: {
       // do the scrolling first:
-      int my = Fl::event_y();
+      int my = fltk3::event_y();
       if ( my < y() ) {				// above top?
         int p = vposition()-(y()-my);
 	if ( p < 0 ) p = 0;
@@ -677,7 +677,7 @@
 	if ( p > (int)_vscroll->maximum() ) p = (int)_vscroll->maximum();
         vposition(p);
       }
-      if ( Fl::event_button() != fltk3::LEFT_MOUSE ) break;
+      if ( fltk3::event_button() != fltk3::LEFT_MOUSE ) break;
       Fl_Tree_Item *o = _root->find_clicked(_prefs);
       if ( ! o ) break;
       set_item_focus(o);			// becomes new focus widget
@@ -685,8 +685,8 @@
       ret |= 1;
       // Item's label clicked?
       if ( o->event_on_label(_prefs) && 
-          (!o->widget() || !Fl::event_inside(o->widget())) &&
-          (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) {
+          (!o->widget() || !fltk3::event_inside(o->widget())) &&
+          (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {
 	// Handle selection behavior
 	switch ( _prefs.selectmode() ) {
 	  case FL_TREE_SELECT_NONE: break;	// no selection changes
@@ -694,7 +694,7 @@
 	    select_only(o);
 	    break;
 	  case FL_TREE_SELECT_MULTI:
-	    if ( Fl::event_state() & fltk3::CTRL &&	// CTRL-DRAG: toggle?
+	    if ( fltk3::event_state() & fltk3::CTRL &&	// CTRL-DRAG: toggle?
                 lastselect != o ) {		// not already toggled from last microdrag?
 	      select_toggle(o);			// toggle selection
 	      lastselect = o;			// save we toggled it (prevents oscillation)

Modified: branches/branch-3.0/src/Fl_Tree_Item.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree_Item.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tree_Item.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -34,7 +34,7 @@
 
 // Was the last event inside the specified xywh?
 static int event_inside(const int xywh[4]) {
-  return(Fl::event_inside(xywh[0],xywh[1],xywh[2],xywh[3]));
+  return(fltk3::event_inside(xywh[0],xywh[1],xywh[2],xywh[3]));
 }
 
 /// Constructor.
@@ -508,7 +508,7 @@
 }
 
 static void draw_item_focus(fltk3::Boxtype B, fltk3::Color C, int X, int Y, int W, int H) {
-  if (!Fl::visible_focus()) return;
+  if (!fltk3::visible_focus()) return;
   switch (B) {
     case fltk3::DOWN_BOX:
     case fltk3::DOWN_FRAME:
@@ -523,8 +523,8 @@
 
 #if defined(USE_X11) || defined(__APPLE_QUARTZ__)
   fl_line_style(FL_DOT);
-  fl_rect(X + Fl::box_dx(B), Y + Fl::box_dy(B),
-          W - Fl::box_dw(B) - 1, H - Fl::box_dh(B) - 1);
+  fl_rect(X + fltk3::box_dx(B), Y + fltk3::box_dy(B),
+          W - fltk3::box_dw(B) - 1, H - fltk3::box_dh(B) - 1);
   fl_line_style(FL_SOLID);
 #else
   // Some platforms don't implement dotted line style, so draw
@@ -535,10 +535,10 @@
   // on odd-numbered rows...
   int i, xx, yy;
 
-  X += Fl::box_dx(B);
-  Y += Fl::box_dy(B);
-  W -= Fl::box_dw(B) + 2;
-  H -= Fl::box_dh(B) + 2;
+  X += fltk3::box_dx(B);
+  Y += fltk3::box_dy(B);
+  W -= fltk3::box_dw(B) + 2;
+  H -= fltk3::box_dh(B) + 2;
 
   for (xx = 0, i = 1; xx < W; xx ++, i ++) if (i & 1) fl_point(X + xx, Y);
   for (yy = 0; yy < H; yy ++, i ++) if (i & 1) fl_point(X + W, Y + yy);
@@ -673,7 +673,7 @@
         fl_draw(_label, X+useroff, Y+H-fl_descent()-1);
       }
     }
-    if ( this == itemfocus && Fl::visible_focus() && Fl::focus() == tree) {
+    if ( this == itemfocus && fltk3::visible_focus() && fltk3::focus() == tree) {
       // Draw focus box around this item
       draw_item_focus(fltk3::NO_BOX,bg,bx+1,by+1,bw-1,bh-1);
     }

Modified: branches/branch-3.0/src/Fl_Tree_Prefs.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree_Prefs.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Tree_Prefs.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -154,10 +154,10 @@
   _selectbox              = fltk3::FLAT_BOX;
   _selectmode             = FL_TREE_SELECT_SINGLE;
   // Let fltk's current 'scheme' affect defaults
-  if ( Fl::scheme() ) {
-    if ( strcmp(Fl::scheme(), "gtk+") == 0 ) {
+  if ( fltk3::scheme() ) {
+    if ( strcmp(fltk3::scheme(), "gtk+") == 0 ) {
       _selectbox = fltk3::GTK_THIN_UP_BOX;
-    } else if ( strcmp(Fl::scheme(), "plastic") == 0 ) {
+    } else if ( strcmp(fltk3::scheme(), "plastic") == 0 ) {
       _selectbox = fltk3::PLASTIC_THIN_UP_BOX;
     }
   }

Modified: branches/branch-3.0/src/Fl_Value_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Input.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Value_Input.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -71,14 +71,14 @@
 int Fl_Value_Input::handle(int event) {
   double v;
   int delta;
-  int mx = Fl::event_x_root();
+  int mx = fltk3::event_x_root();
   static int ix, drag;
   input.when(when());
   switch (event) {
   case fltk3::PUSH:
     if (!step()) goto DEFAULT;
     ix = mx;
-    drag = Fl::event_button();
+    drag = fltk3::event_button();
     handle_push();
     return 1;
   case fltk3::DRAG:
@@ -97,7 +97,7 @@
     return 1;
   case fltk3::RELEASE:
     if (!step()) goto DEFAULT;
-    if (value() != previous_value() || !Fl::event_is_click())
+    if (value() != previous_value() || !fltk3::event_is_click())
       handle_release();
     else {
       fltk3::WidgetTracker wp(&input);

Modified: branches/branch-3.0/src/Fl_Value_Output.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Output.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Value_Output.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -35,10 +35,10 @@
 
 void Fl_Value_Output::draw() {
   fltk3::Boxtype b = box() ? box() : fltk3::DOWN_BOX;
-  int X = x()+Fl::box_dx(b);
-  int Y = y()+Fl::box_dy(b);
-  int W = w()-Fl::box_dw(b);
-  int H = h()-Fl::box_dh(b);
+  int X = x()+fltk3::box_dx(b);
+  int Y = y()+fltk3::box_dy(b);
+  int W = w()-fltk3::box_dw(b);
+  int H = h()-fltk3::box_dh(b);
   if (damage()&~fltk3::DAMAGE_CHILD)
     draw_box(b, color());
   else {
@@ -56,16 +56,16 @@
   if (!step()) return 0;
   double v;
   int delta;
-  int mx = Fl::event_x();
+  int mx = fltk3::event_x();
   static int ix, drag;
   switch (event) {
   case fltk3::PUSH:
     ix = mx;
-    drag = Fl::event_button();
+    drag = fltk3::event_button();
     handle_push();
     return 1;
   case fltk3::DRAG:
-    delta = Fl::event_x()-ix;
+    delta = fltk3::event_x()-ix;
     if (delta > 5) delta -= 5;
     else if (delta < -5) delta += 5;
     else delta = 0;

Modified: branches/branch-3.0/src/Fl_Value_Slider.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Slider.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Value_Slider.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -51,10 +51,10 @@
     syy += 25; bhh = 25; shh -= 25;
   }
   if (damage()&fltk3::DAMAGE_ALL) draw_box(box(),sxx,syy,sww,shh,color());
-  Fl_Slider::draw(sxx+Fl::box_dx(box()),
-		  syy+Fl::box_dy(box()),
-		  sww-Fl::box_dw(box()),
-		  shh-Fl::box_dh(box()));
+  Fl_Slider::draw(sxx+fltk3::box_dx(box()),
+		  syy+fltk3::box_dy(box()),
+		  sww-fltk3::box_dw(box()),
+		  shh-fltk3::box_dh(box()));
   draw_box(box(),bxx,byy,bww,bhh,color());
   char buf[128];
   format(buf);
@@ -64,8 +64,8 @@
 }
 
 int Fl_Value_Slider::handle(int event) {
-  if (event == fltk3::PUSH && Fl::visible_focus()) {
-    Fl::focus(this);
+  if (event == fltk3::PUSH && fltk3::visible_focus()) {
+    fltk3::focus(this);
     redraw();
   }
   int sxx = x(), syy = y(), sww = w(), shh = h();
@@ -75,10 +75,10 @@
     syy += 25; shh -= 25;
   }
   return Fl_Slider::handle(event,
-			   sxx+Fl::box_dx(box()),
-			   syy+Fl::box_dy(box()),
-			   sww-Fl::box_dw(box()),
-			   shh-Fl::box_dh(box()));
+			   sxx+fltk3::box_dx(box()),
+			   syy+fltk3::box_dy(box()),
+			   sww-fltk3::box_dw(box()),
+			   shh-fltk3::box_dh(box()));
 }
 
 //

Modified: branches/branch-3.0/src/Fl_Widget.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Widget.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Widget.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -68,7 +68,7 @@
     default callback that puts a pointer to the widget in this queue,
     and this method reads the oldest widget out of this queue.
 */
-fltk3::Widget *Fl::readqueue() {
+fltk3::Widget *fltk3::readqueue() {
   if (obj_tail==obj_head) return 0;
   fltk3::Widget *o = obj_queue[obj_tail++];
   if (obj_tail >= QUEUE_SIZE) obj_tail = 0;
@@ -76,10 +76,10 @@
 }
 /*
     This static internal function removes all pending callbacks for a
-    specific widget from the default callback queue (Fl::readqueue()).
+    specific widget from the default callback queue (fltk3::readqueue()).
     It is only called from fltk3::Widget's destructor if the widget
     doesn't have an own callback.
-    Note: There's no need to have this in the Fl:: namespace.
+    Note: There's no need to have this in the fltk3:: namespace.
 */
 static void cleanup_readqueue(fltk3::Widget *w) {
 
@@ -154,8 +154,8 @@
   if (!takesevents()) return 0;
   if (!visible_focus()) return 0;
   if (!handle(fltk3::FOCUS)) return 0; // see if it wants it
-  if (contains(Fl::focus())) return 1; // it called Fl::focus for us
-  Fl::focus(this);
+  if (contains(fltk3::focus())) return 1; // it called fltk3::focus for us
+  fltk3::focus(this);
   return 1;
 }
 
@@ -167,7 +167,7 @@
    destroyed destroy all their children. This is convenient and fast.
 */
 fltk3::Widget::~Widget() {
-  Fl::clear_widget_pointer(this);
+  fltk3::clear_widget_pointer(this);
   if (flags() & COPIED_LABEL) free((void *)(label_.value));
   if (flags() & COPIED_TOOLTIP) free((void *)(tooltip_));
   // remove from parent group
@@ -179,14 +179,14 @@
 #endif // DEBUG_DELETE
   parent_ = 0; // Don't throw focus to a parent widget.
   fl_throw_focus(this);
-  // remove stale entries from default callback queue (Fl::readqueue())
+  // remove stale entries from default callback queue (fltk3::readqueue())
   if (callback_ == default_callback) cleanup_readqueue(this);
 }
 
 /** Draws a focus box for the widget at the given position and size */
 void
 fltk3::Widget::draw_focus(fltk3::Boxtype B, int X, int Y, int W, int H) const {
-  if (!Fl::visible_focus()) return;
+  if (!fltk3::visible_focus()) return;
   switch (B) {
     case fltk3::DOWN_BOX:
     case fltk3::DOWN_FRAME:
@@ -202,8 +202,8 @@
 
 #if defined(USE_X11) || defined(__APPLE_QUARTZ__)
   fl_line_style(FL_DOT);
-  fl_rect(X + Fl::box_dx(B), Y + Fl::box_dy(B),
-          W - Fl::box_dw(B) - 1, H - Fl::box_dh(B) - 1);
+  fl_rect(X + fltk3::box_dx(B), Y + fltk3::box_dy(B),
+          W - fltk3::box_dw(B) - 1, H - fltk3::box_dh(B) - 1);
   fl_line_style(FL_SOLID);
 #elif defined(WIN32) 
   // Windows 95/98/ME do not implement the dotted line style, so draw
@@ -214,10 +214,10 @@
   // on odd-numbered rows...
   int i, xx, yy;
 
-  X += Fl::box_dx(B);
-  Y += Fl::box_dy(B);
-  W -= Fl::box_dw(B) + 2;
-  H -= Fl::box_dh(B) + 2;
+  X += fltk3::box_dx(B);
+  Y += fltk3::box_dy(B);
+  W -= fltk3::box_dw(B) + 2;
+  H -= fltk3::box_dh(B) + 2;
 
   for (xx = 0, i = 1; xx < W; xx ++, i ++) if (i & 1) fl_point(X + xx, Y);
   for (yy = 0; yy < H; yy ++, i ++) if (i & 1) fl_point(X + W, Y + yy);
@@ -236,7 +236,7 @@
       redraw();
       redraw_label();
       handle(fltk3::ACTIVATE);
-      if (inside(Fl::focus())) Fl::focus()->take_focus();
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
     }
   }
 }
@@ -266,7 +266,7 @@
       redraw();
       redraw_label();
       handle(fltk3::SHOW);
-      if (inside(Fl::focus())) Fl::focus()->take_focus();
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
     }
   }
 }

Modified: branches/branch-3.0/src/Fl_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Window.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -45,10 +45,10 @@
 void fltk3::Window::_Fl_Window() {
   type(FL_WINDOW);
   box(fltk3::FLAT_BOX);
-  if (Fl::scheme_bg_) {
+  if (fltk3::scheme_bg_) {
     labeltype(fltk3::NORMAL_LABEL);
     align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
-    image(Fl::scheme_bg_);
+    image(fltk3::scheme_bg_);
   } else {
     labeltype(fltk3::NO_LABEL);
   }
@@ -117,8 +117,8 @@
   // corner. This code draws a little ribbed triangle for dragging.
   extern CGContextRef fl_gc;
   if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) {
-    int dx = Fl::box_dw(box())-Fl::box_dx(box());
-    int dy = Fl::box_dh(box())-Fl::box_dy(box());
+    int dx = fltk3::box_dw(box())-fltk3::box_dx(box());
+    int dy = fltk3::box_dh(box())-fltk3::box_dy(box());
     if (dx<=0) dx = 1;
     if (dy<=0) dy = 1;
     int x1 = w()-dx-1, x2 = x1, y1 = h()-dx-1, y2 = y1;
@@ -137,7 +137,7 @@
 #endif
 
 # if defined(FLTK_USE_CAIRO)
-  Fl::cairo_make_current(this); // checkout if an update is necessary
+  fltk3::cairo_make_current(this); // checkout if an update is necessary
 # endif
 }
 
@@ -160,19 +160,19 @@
   label(label(), iname);
 }
 
-// the Fl::atclose pointer is provided for back compatibility.  You
+// the fltk3::atclose pointer is provided for back compatibility.  You
 // can now just change the callback for the window instead.
 
 /** Default callback for window widgets. It hides the window and then calls the default widget callback. */
-void Fl::default_atclose(fltk3::Window* window, void* v) {
+void fltk3::default_atclose(fltk3::Window* window, void* v) {
   window->hide();
-  fltk3::Widget::default_callback(window, v); // put on Fl::read_queue()
+  fltk3::Widget::default_callback(window, v); // put on fltk3::read_queue()
 }
-/** Back compatibility: default window callback handler \see Fl::set_atclose() */
-void (*Fl::atclose)(fltk3::Window*, void*) = default_atclose;
+/** Back compatibility: default window callback handler \see fltk3::set_atclose() */
+void (*fltk3::atclose)(fltk3::Window*, void*) = default_atclose;
 /** Back compatibility: Sets the default callback v for win to call on close event */
 void fltk3::Window::default_callback(fltk3::Window* win, void* v) {
-  Fl::atclose(win, v);
+  fltk3::atclose(win, v);
 }
 
 /**  Returns the last window that was made current. \see fltk3::Window::make_current() */

Modified: branches/branch-3.0/src/Fl_Window_fullscreen.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window_fullscreen.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Window_fullscreen.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -68,11 +68,11 @@
 #endif
 #if defined(__APPLE__) || defined(WIN32) || defined(USE_X11)
   int sx, sy, sw, sh;
-  Fl::screen_xywh(sx, sy, sw, sh, x(), y(), w(), h());
+  fltk3::screen_xywh(sx, sy, sw, sh, x(), y(), w(), h());
   // if we are on the main screen, we will leave the system menu bar unobstructed
-  if (Fl::x()>=sx && Fl::y()>=sy && Fl::x()+Fl::w()<=sx+sw && Fl::y()+Fl::h()<=sy+sh) {
-    sx = Fl::x(); sy = Fl::y(); 
-    sw = Fl::w(); sh = Fl::h();
+  if (fltk3::x()>=sx && fltk3::y()>=sy && fltk3::x()+fltk3::w()<=sx+sw && fltk3::y()+fltk3::h()<=sy+sh) {
+    sx = fltk3::x(); sy = fltk3::y(); 
+    sw = fltk3::w(); sh = fltk3::h();
   }
   if (x()==sx) x(sx+1); // make sure that we actually execute the resize
 #if defined(USE_X11)
@@ -81,7 +81,7 @@
   resize(sx, sy, sw, sh);
 #else
   if (!x()) x(1); // make sure that we actually execute the resize
-  resize(0,0,Fl::w(),Fl::h());
+  resize(0,0,fltk3::w(),fltk3::h());
 #endif
 }
 

Modified: branches/branch-3.0/src/Fl_Window_hotspot.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window_hotspot.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_Window_hotspot.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -34,14 +34,14 @@
   int mx,my;
 
   // Update the screen position based on the mouse position.
-  Fl::get_mouse(mx,my);
+  fltk3::get_mouse(mx,my);
   X = mx-X; Y = my-Y;
 
   // If offscreen is 0 (the default), make sure that the window
   // stays on the screen, if possible.
   if (!offscreen) {
     int scr_x, scr_y, scr_w, scr_h;
-    Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
 
     int top = 0;
     int left = 0;

Modified: branches/branch-3.0/src/Fl_abort.cxx
===================================================================
--- branches/branch-3.0/src/Fl_abort.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_abort.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -93,9 +93,9 @@
 
 #endif
 
-void (*Fl::warning)(const char* format, ...) = ::warning;
-void (*Fl::error)(const char* format, ...) = ::error;
-void (*Fl::fatal)(const char* format, ...) = ::fatal;
+void (*fltk3::warning)(const char* format, ...) = ::warning;
+void (*fltk3::error)(const char* format, ...) = ::error;
+void (*fltk3::fatal)(const char* format, ...) = ::fatal;
 
 //
 // End of "$Id$".

Modified: branches/branch-3.0/src/Fl_add_idle.cxx
===================================================================
--- branches/branch-3.0/src/Fl_add_idle.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_add_idle.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -50,23 +50,23 @@
 }
 
 /**
-  Adds a callback function that is called every time by Fl::wait() and also
-  makes it act as though the timeout is zero (this makes Fl::wait() return
+  Adds a callback function that is called every time by fltk3::wait() and also
+  makes it act as though the timeout is zero (this makes fltk3::wait() return
   immediately, so if it is in a loop it is called repeatedly, and thus the
   idle fucntion is called repeatedly).  The idle function can be used to get
   background processing done.
     
   You can have multiple idle callbacks. To remove an idle callback use
-  Fl::remove_idle().
+  fltk3::remove_idle().
     
-  Fl::wait() and Fl::check() call idle callbacks, but Fl::ready() does not.
+  fltk3::wait() and fltk3::check() call idle callbacks, but fltk3::ready() does not.
     
-  The idle callback can call any FLTK functions, including Fl::wait(),
-  Fl::check(), and Fl::ready().
+  The idle callback can call any FLTK functions, including fltk3::wait(),
+  fltk3::check(), and fltk3::ready().
 
   FLTK will not recursively call the idle callback.
 */
-void Fl::add_idle(Fl_Idle_Handler cb, void* data) {
+void fltk3::add_idle(fltk3::IdleHandler cb, void* data) {
   idle_cb* p = freelist;
   if (p) freelist = p->next;
   else p = new idle_cb;
@@ -86,7 +86,7 @@
 /**
   Returns true if the specified idle callback is currently installed.
 */
-int Fl::has_idle(Fl_Idle_Handler cb, void* data) {
+int fltk3::has_idle(fltk3::IdleHandler cb, void* data) {
   idle_cb* p = first;
   if (!p) return 0;
   for (;; p = p->next) {
@@ -98,7 +98,7 @@
 /**
   Removes the specified idle callback, if it is installed.
 */
-void Fl::remove_idle(Fl_Idle_Handler cb, void* data) {
+void fltk3::remove_idle(fltk3::IdleHandler cb, void* data) {
   idle_cb* p = first;
   if (!p) return;
   idle_cb* l = last;

Modified: branches/branch-3.0/src/Fl_arg.cxx
===================================================================
--- branches/branch-3.0/src/Fl_arg.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_arg.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -72,7 +72,7 @@
   Returns the number of words eaten (1 or 2, or 0 if it is not
   recognized) and adds the same value to \p i. 
   
-  This is the default argument handler used internally by Fl::args(...),
+  This is the default argument handler used internally by fltk3::args(...),
   but you can use this function if you prefer to step through the
   standard FLTK switches yourself.
   
@@ -81,11 +81,11 @@
   
   \li -bg color or -background color
   <br>
-  Sets the background color using Fl::background().
+  Sets the background color using fltk3::background().
   
   \li -bg2 color or -background2 color
   <br>
-  Sets the secondary background color using Fl::background2().
+  Sets the secondary background color using fltk3::background2().
   
   \li -display host:n.n
   <br>
@@ -95,11 +95,11 @@
   \li -dnd and -nodnd
   <br>
   Enables or disables drag and drop text operations
-  using Fl::dnd_text_ops().
+  using fltk3::dnd_text_ops().
   
   \li -fg color or -foreground color
   <br>
-  Sets the foreground color using Fl::foreground().
+  Sets the foreground color using fltk3::foreground().
   
   \li -geometry WxH+X+Y
   <br>
@@ -113,7 +113,7 @@
   \li -kbd and -nokbd
   <br>
   Enables or disables visible keyboard focus for
-  non-text widgets using Fl::visible_focus().
+  non-text widgets using fltk3::visible_focus().
   
   \li -name string
   <br>
@@ -121,7 +121,7 @@
   
   \li -scheme string
   <br>
-  Sets the widget scheme using Fl::scheme().
+  Sets the widget scheme using fltk3::scheme().
   
   \li -title string
   <br>
@@ -134,9 +134,9 @@
   
   If your program requires other switches in addition to the standard
   FLTK options, you will need to pass your own argument handler to
-  Fl::args(int,char**,int&,Fl_Args_Handler) explicitly.
+  fltk3::args(int,char**,int&,fltk3::ArgsHandler) explicitly.
 */
-int Fl::arg(int argc, char **argv, int &i) {
+int fltk3::arg(int argc, char **argv, int &i) {
   arg_called = 1;
   const char *s = argv[i];
 
@@ -155,19 +155,19 @@
     i++;
     return 1;
   } else if (fl_match(s, "kbd")) {
-    Fl::visible_focus(1);
+    fltk3::visible_focus(1);
     i++;
     return 1;
   } else if (fl_match(s, "nokbd", 3)) {
-    Fl::visible_focus(0);
+    fltk3::visible_focus(0);
     i++;
     return 1;
   } else if (fl_match(s, "dnd", 2)) {
-    Fl::dnd_text_ops(1);
+    fltk3::dnd_text_ops(1);
     i++;
     return 1;
   } else if (fl_match(s, "nodnd", 3)) {
-    Fl::dnd_text_ops(0);
+    fltk3::dnd_text_ops(0);
     i++;
     return 1;
   } else if (fl_match(s, "tooltips", 2)) {
@@ -201,7 +201,7 @@
 
 #if !defined(WIN32) && !defined(__APPLE__)
   } else if (fl_match(s, "display", 2)) {
-    Fl::display(v);
+    fltk3::display(v);
 #endif
 
   } else if (fl_match(s, "title", 2)) {
@@ -220,7 +220,7 @@
     fl_fg = v;
 
   } else if (fl_match(s, "scheme", 1)) {
-    Fl::scheme(v);
+    fltk3::scheme(v);
 
   } else return 0; // unrecognized
 
@@ -238,7 +238,7 @@
   switch parser. You don't have to call it if you don't want to.
   Everything it can do can be done with other calls to FLTK.
   
-  To use the switch parser, call Fl::args(...) near the start
+  To use the switch parser, call fltk3::args(...) near the start
   of your program.  This does \b not open the display, instead
   switches that need the display open are stashed into static
   variables. Then you \b must display your first window by calling
@@ -258,7 +258,7 @@
   <i>you can also override any standard FLTK switch</i>
   (this is why FLTK can use very short switches instead of
   the long ones all other toolkits force you to use).
-  See Fl::arg() for descriptions of the standard switches.
+  See fltk3::arg() for descriptions of the standard switches.
  
   On return \p i is set to the index of the first non-switch.
   This is either:
@@ -274,17 +274,17 @@
   than \p argc.
   
   
-  A usage string is displayed if Fl::args() detects an invalid argument
+  A usage string is displayed if fltk3::args() detects an invalid argument
   on the command-line. You can change the message by setting the
-  Fl::help pointer.
+  fltk3::help pointer.
   
   A very simple command line parser can be found in <tt>examples/howto-parse-args.cxx</tt>
   
-  The simpler Fl::args(int argc, char **argv) form is useful if your program
+  The simpler fltk3::args(int argc, char **argv) form is useful if your program
   does not have command line switches of its own.
 */
 
-int Fl::args(int argc, char** argv, int& i, Fl_Args_Handler cb) {
+int fltk3::args(int argc, char** argv, int& i, fltk3::ArgsHandler cb) {
   arg_called = 1;
   i = 1; // skip argv[0]
   while (i < argc) {
@@ -296,19 +296,19 @@
 
 // show a main window, use any parsed arguments
 void fltk3::Window::show(int argc, char **argv) {
-  if (argc && !arg_called) Fl::args(argc,argv);
+  if (argc && !arg_called) fltk3::args(argc,argv);
 
-  Fl::get_system_colors();
+  fltk3::get_system_colors();
 
 #if !defined(WIN32) && !defined(__APPLE__)
   // Get defaults for drag-n-drop and focus...
   const char *key = 0, *val;
 
-  if (Fl::first_window()) key = Fl::first_window()->xclass();
+  if (fltk3::first_window()) key = fltk3::first_window()->xclass();
   if (!key) key = "fltk";
 
   val = XGetDefault(fl_display, key, "dndTextOps");
-  if (val) Fl::dnd_text_ops(strcasecmp(val, "true") == 0 ||
+  if (val) fltk3::dnd_text_ops(strcasecmp(val, "true") == 0 ||
                             strcasecmp(val, "on") == 0 ||
                             strcasecmp(val, "yes") == 0);
 
@@ -318,7 +318,7 @@
                               strcasecmp(val, "yes") == 0);
 
   val = XGetDefault(fl_display, key, "visibleFocus");
-  if (val) Fl::visible_focus(strcasecmp(val, "true") == 0 ||
+  if (val) fltk3::visible_focus(strcasecmp(val, "true") == 0 ||
                              strcasecmp(val, "on") == 0 ||
                              strcasecmp(val, "yes") == 0);
 #endif // !WIN32 && !__APPLE__
@@ -329,8 +329,8 @@
     if (geometry) {
       int fl = 0, gx = x(), gy = y(); unsigned int gw = w(), gh = h();
       fl = XParseGeometry(geometry, &gx, &gy, &gw, &gh);
-      if (fl & XNegative) gx = Fl::w()-w()+gx;
-      if (fl & YNegative) gy = Fl::h()-h()+gy;
+      if (fl & XNegative) gx = fltk3::w()-w()+gx;
+      if (fl & YNegative) gy = fltk3::h()-h()+gy;
       //  int mw,mh; minsize(mw,mh);
       //  if (mw > gw) gw = mw;
       //  if (mh > gh) gh = mh;
@@ -354,7 +354,7 @@
 
   if (!beenhere) {
     beenhere = 1;
-    Fl::scheme(Fl::scheme()); // opens display!  May call Fl::fatal()
+    fltk3::scheme(fltk3::scheme()); // opens display!  May call fltk3::fatal()
   }
 
   // Show the window AFTER we have set the colors and scheme.
@@ -393,18 +393,18 @@
 " -ti[tle] windowtitle\n"
 " -to[oltips]";
 
-const char * const Fl::help = helpmsg+13;
+const char * const fltk3::help = helpmsg+13;
 
 /**
  Parse all command line switches matching standard FLTK options only.
  
  It parses all the switches, and if any are not recognized it calls
- Fl::abort(Fl::help), i.e. unlike the long form, an unrecognized
+ fltk3::abort(fltk3::help), i.e. unlike the long form, an unrecognized
  switch generates an error message and causes the program to exit.
  
  */
-void Fl::args(int argc, char **argv) {
-  int i; if (Fl::args(argc,argv,i) < argc) Fl::error(helpmsg);
+void fltk3::args(int argc, char **argv) {
+  int i; if (fltk3::args(argc,argv,i) < argc) fltk3::error(helpmsg);
 }
 
 #if defined(WIN32) || defined(__APPLE__)

Modified: branches/branch-3.0/src/Fl_cocoa.mm
===================================================================
--- branches/branch-3.0/src/Fl_cocoa.mm	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_cocoa.mm	2011-05-17 15:17:01 UTC (rev 8680)
@@ -184,13 +184,13 @@
   if ( mods & NSControlKeyMask ) state |= fltk3::CTRL;
   if ( mods & NSShiftKeyMask ) state |= fltk3::SHIFT;
   if ( mods & NSAlphaShiftKeyMask ) state |= fltk3::CAPS_LOCK;
-  unsigned int ret = ( Fl::e_state & 0xff000000 ) | state;
-  Fl::e_state = ret;
-  //printf( "State 0x%08x (%04x)\n", Fl::e_state, mods );
+  unsigned int ret = ( fltk3::e_state & 0xff000000 ) | state;
+  fltk3::e_state = ret;
+  //printf( "State 0x%08x (%04x)\n", fltk3::e_state, mods );
   return ret;
 }
 
-// these pointers are set by the Fl::lock() function:
+// these pointers are set by the fltk3::lock() function:
 static void nothing() {}
 void (*fl_lock_function)() = nothing;
 void (*fl_unlock_function)() = nothing;
@@ -198,7 +198,7 @@
 //
 // Select interface -- how it's implemented:
 //     When the user app configures one or more file descriptors to monitor
-//     with Fl::add_fd(), we start a separate thread to select() the  data,
+//     with fltk3::add_fd(), we start a separate thread to select() the  data,
 //     sending a custom OSX 'FLTK data ready event' to the parent  thread's
 //     RunApplicationLoop(), so that it triggers the data  ready  callbacks
 //     in the parent thread.                               -erco 04/04/04
@@ -441,22 +441,22 @@
   DataUnlock();
 }
 
-void Fl::add_fd( int n, int events, void (*cb)(int, void*), void *v )
+void fltk3::add_fd( int n, int events, void (*cb)(int, void*), void *v )
 {
   dataready.AddFD(n, events, cb, v);
 }
 
-void Fl::add_fd(int fd, void (*cb)(int, void*), void* v)
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v)
 {
   dataready.AddFD(fd, POLLIN, cb, v);
 }
 
-void Fl::remove_fd(int n, int events)
+void fltk3::remove_fd(int n, int events)
 {
   dataready.RemoveFD(n, events);
 }
 
-void Fl::remove_fd(int n)
+void fltk3::remove_fd(int n)
 {
   dataready.RemoveFD(n, -1);
 }
@@ -516,7 +516,7 @@
 //
 
 struct MacTimeout {
-  Fl_Timeout_Handler callback;
+  fltk3::TimeoutHandler callback;
   void* data;
   CFRunLoopTimerRef timer;
   char pending; 
@@ -598,10 +598,10 @@
 - (BOOL)windowShouldClose:(FLWindow *)fl
 {
   fl_lock_function();
-  Fl::handle( fltk3::CLOSE, [fl getFl_Window] ); // this might or might not close the window
+  fltk3::handle( fltk3::CLOSE, [fl getFl_Window] ); // this might or might not close the window
   if (!Fl_X::first) return YES;
-  fltk3::Window *l = Fl::first_window();
-  while( l != NULL && l != [fl getFl_Window]) l = Fl::next_window(l);
+  fltk3::Window *l = fltk3::first_window();
+  while( l != NULL && l != [fl getFl_Window]) l = fltk3::next_window(l);
   fl_unlock_function();
   return (l == NULL ? YES : NO);
 }
@@ -653,7 +653,7 @@
 #if CONSOLIDATE_MOTION
   if (send_motion && send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(fltk3::MOVE, fl_xmousewin);
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
   }
 #endif
   
@@ -675,24 +675,24 @@
 
 double fl_mac_flush_and_wait(double time_to_wait, char in_idle) {
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-  Fl::flush();
-  if (Fl::idle && !in_idle) // 'idle' may have been set within flush()
+  fltk3::flush();
+  if (fltk3::idle && !in_idle) // 'idle' may have been set within flush()
     time_to_wait = 0.0;
   double retval = fl_wait(time_to_wait);
   [pool release];
   return retval;
 }
 
-// updates Fl::e_x, Fl::e_y, Fl::e_x_root, and Fl::e_y_root
+// updates fltk3::e_x, fltk3::e_y, fltk3::e_x_root, and fltk3::e_y_root
 static void update_e_xy_and_e_xy_root(NSWindow *nsw)
 {
   NSPoint pt;
   pt = [nsw mouseLocationOutsideOfEventStream];
-  Fl::e_x = int(pt.x);
-  Fl::e_y = int([[nsw contentView] frame].size.height - pt.y);
+  fltk3::e_x = int(pt.x);
+  fltk3::e_y = int([[nsw contentView] frame].size.height - pt.y);
   pt = [NSEvent mouseLocation];
-  Fl::e_x_root = int(pt.x);
-  Fl::e_y_root = int([[nsw screen] frame].size.height - pt.y);
+  fltk3::e_x_root = int(pt.x);
+  fltk3::e_y_root = int([[nsw screen] frame].size.height - pt.y);
 }
 
 /*
@@ -710,7 +710,7 @@
     fl_unlock_function();
     return;
   }
-  Fl::first_window(window);
+  fltk3::first_window(window);
   
   // Under OSX, single mousewheel increments are 0.1,
   // so make sure they show up as at least 1..
@@ -718,13 +718,13 @@
   float dx = [theEvent deltaX]; if ( fabs(dx) < 1.0 ) dx = (dx > 0) ? 1.0 : -1.0;
   float dy = [theEvent deltaY]; if ( fabs(dy) < 1.0 ) dy = (dy > 0) ? 1.0 : -1.0;
   if ([theEvent deltaX] != 0) {
-    Fl::e_dx = (int)-dx;
-    Fl::e_dy = 0;
-    if ( Fl::e_dx) Fl::handle( fltk3::MOUSEWHEEL, window );
+    fltk3::e_dx = (int)-dx;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( fltk3::MOUSEWHEEL, window );
   } else if ([theEvent deltaY] != 0) {
-    Fl::e_dx = 0;
-    Fl::e_dy = (int)-dy;
-    if ( Fl::e_dy) Fl::handle( fltk3::MOUSEWHEEL, window );
+    fltk3::e_dx = 0;
+    fltk3::e_dy = (int)-dy;
+    if ( fltk3::e_dy) fltk3::handle( fltk3::MOUSEWHEEL, window );
   } else {
     fl_unlock_function();
     return;
@@ -751,8 +751,8 @@
     fl_unlock_function();
     return;
   }
-  fltk3::Window *first = Fl::first_window();
-  if (first != window && !(first->modal() || first->non_modal())) Fl::first_window(window);
+  fltk3::Window *first = fltk3::first_window();
+  if (first != window && !(first->modal() || first->non_modal())) fltk3::first_window(window);
   NSPoint pos = [theEvent locationInWindow];
   pos.y = window->h() - pos.y;
   NSInteger btn = [theEvent buttonNumber]  + 1;
@@ -761,14 +761,14 @@
   
   NSEventType etype = [theEvent type];
   if (etype == NSLeftMouseDown || etype == NSRightMouseDown || etype == NSOtherMouseDown) {
-    if (btn == 1) Fl::e_state |= fltk3::BUTTON1;
-    else if (btn == 3) Fl::e_state |= fltk3::BUTTON2;
-    else if (btn == 2) Fl::e_state |= fltk3::BUTTON3;
+    if (btn == 1) fltk3::e_state |= fltk3::BUTTON1;
+    else if (btn == 3) fltk3::e_state |= fltk3::BUTTON2;
+    else if (btn == 2) fltk3::e_state |= fltk3::BUTTON3;
   }
   else if (etype == NSLeftMouseUp || etype == NSRightMouseUp || etype == NSOtherMouseUp) {
-    if (btn == 1) Fl::e_state &= ~fltk3::BUTTON1;
-    else if (btn == 3) Fl::e_state &= ~fltk3::BUTTON2;
-    else if (btn == 2) Fl::e_state &= ~fltk3::BUTTON3;
+    if (btn == 1) fltk3::e_state &= ~fltk3::BUTTON1;
+    else if (btn == 3) fltk3::e_state &= ~fltk3::BUTTON2;
+    else if (btn == 2) fltk3::e_state &= ~fltk3::BUTTON3;
     }
     
   switch ( etype ) {
@@ -777,12 +777,12 @@
     case NSOtherMouseDown:
       suppressed = 0;
       sendEvent = fltk3::PUSH;
-      Fl::e_is_click = 1; 
+      fltk3::e_is_click = 1; 
       px = (int)pos.x; py = (int)pos.y;
       if ([theEvent clickCount] > 1) 
-        Fl::e_clicks++;
+        fltk3::e_clicks++;
       else
-        Fl::e_clicks = 0;
+        fltk3::e_clicks = 0;
       // fall through
     case NSLeftMouseUp:
     case NSRightMouseUp:
@@ -795,7 +795,7 @@
       if ( !sendEvent ) {
         sendEvent = fltk3::RELEASE; 
       }
-      Fl::e_keysym = keysym[ btn ];
+      fltk3::e_keysym = keysym[ btn ];
       // fall through
     case NSMouseMoved:
       suppressed = 0;
@@ -808,13 +808,13 @@
     case NSOtherMouseDragged: {
       if (suppressed) break;
       if ( !sendEvent ) {
-        sendEvent = fltk3::MOVE; // Fl::handle will convert into fltk3::DRAG
+        sendEvent = fltk3::MOVE; // fltk3::handle will convert into fltk3::DRAG
         if (fabs(pos.x-px)>5 || fabs(pos.y-py)>5) 
-          Fl::e_is_click = 0;
+          fltk3::e_is_click = 0;
       }
       mods_to_e_state( mods );
       update_e_xy_and_e_xy_root([theEvent window]);
-      Fl::handle( sendEvent, window );
+      fltk3::handle( sendEvent, window );
       }
       break;
     default:
@@ -871,7 +871,7 @@
   maskedKeyCode = keyCode & 0x7f;
 
   if ([theEvent type] == NSKeyUp) {
-    Fl::e_state &= 0xbfffffff; // clear the deadkey flag
+    fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
   }
 
   mods_to_e_state( mods ); // process modifier keys
@@ -885,14 +885,14 @@
     if(one >= 'A' && one <= 'Z') one += 32;
     if (one > 0 && one <= 0x7f && (sym<'0' || sym>'9') ) sym = one;
   }
-  Fl::e_keysym = Fl::e_original_keysym = sym;
+  fltk3::e_keysym = fltk3::e_original_keysym = sym;
 
   //NSLog(@"cocoaKeyboardHandler: keycode=%08x keysym=%08x mods=%08x symbol=%@ (%@)",
   //  keyCode, sym, mods, [theEvent characters], [theEvent charactersIgnoringModifiers]);
 
   // If there is text associated with this key, it will be filled in later.
-  Fl::e_length = 0;
-  Fl::e_text = (char*)"";
+  fltk3::e_length = 0;
+  fltk3::e_text = (char*)"";
 }
 
 
@@ -1032,7 +1032,7 @@
   fl_lock_function();
   FLWindow *nsw = (FLWindow*)[notif object];
   fltk3::Window *window = [nsw getFl_Window];
-  Fl::handle( fltk3::UNFOCUS, window);
+  fltk3::handle( fltk3::UNFOCUS, window);
   fl_unlock_function();
 }
 - (void)windowDidBecomeKey:(NSNotification *)notif
@@ -1040,7 +1040,7 @@
   fl_lock_function();
   FLWindow *nsw = (FLWindow*)[notif object];
   fltk3::Window *w = [nsw getFl_Window];
-  if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle( fltk3::FOCUS, w);
+  if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle( fltk3::FOCUS, w);
   fl_unlock_function();
 }
 - (void)windowDidBecomeMain:(NSNotification *)notif
@@ -1048,7 +1048,7 @@
   fl_lock_function();
   FLWindow *nsw = (FLWindow*)[notif object];
   fltk3::Window *window = [nsw getFl_Window];
-  Fl::first_window(window);
+  fltk3::first_window(window);
   update_e_xy_and_e_xy_root(nsw);
   fl_unlock_function();
 }
@@ -1057,7 +1057,7 @@
   fl_lock_function();
   FLWindow *nsw = (FLWindow*)[notif object];
   fltk3::Window *window = [nsw getFl_Window];
-  Fl::handle(fltk3::SHOW, window);
+  fltk3::handle(fltk3::SHOW, window);
   update_e_xy_and_e_xy_root(nsw);
   fl_unlock_function();
 }
@@ -1066,20 +1066,20 @@
   fl_lock_function();
   FLWindow *nsw = (FLWindow*)[notif object];
   fltk3::Window *window = [nsw getFl_Window];
-  Fl::handle(fltk3::HIDE, window);
+  fltk3::handle(fltk3::HIDE, window);
   fl_unlock_function();
 }
 - (void)windowWillClose:(NSNotification *)notif
 {
   fl_lock_function();
-  fltk3::Window *w = Fl::first_window();
+  fltk3::Window *w = fltk3::first_window();
   if (w) {
     NSWindow *cw = (NSWindow*)Fl_X::i(w)->xid;
     if ( ![cw isMiniaturized] && ([cw styleMask] & NSTitledWindowMask) ) {
-      if (![cw isKeyWindow]) {	// always make Fl::first_window() the key widow
+      if (![cw isKeyWindow]) {	// always make fltk3::first_window() the key widow
 	[cw makeKeyAndOrderFront:nil];
       }
-      if (![cw isMainWindow]) {	// always make Fl::first_window() the main widow
+      if (![cw isMainWindow]) {	// always make fltk3::first_window() the main widow
 	[cw makeMainWindow];
       }
     }
@@ -1104,7 +1104,7 @@
   NSApplicationTerminateReply reply = NSTerminateNow;
   while ( Fl_X::first ) {
     Fl_X *x = Fl_X::first;
-    Fl::handle( fltk3::CLOSE, x->w );
+    fltk3::handle( fltk3::CLOSE, x->w );
     if ( Fl_X::first == x ) {
       reply = NSTerminateCancel; // FLTK has not closed all windows, so we return to the main program now
       break;
@@ -1196,7 +1196,7 @@
   Fl_X *x;
   for (x = Fl_X::first;x;x = x->next) {
     fltk3::Window *window = x->w;
-    if ( !window->parent() ) Fl::handle( fltk3::HIDE, window);
+    if ( !window->parent() ) fltk3::handle( fltk3::HIDE, window);
     }
   fl_unlock_function();
 }
@@ -1207,8 +1207,8 @@
   for (x = Fl_X::first;x;x = x->next) {
     fltk3::Window *w = x->w;
     if ( !w->parent() ) {
-      if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle( fltk3::FOCUS, w);
-      Fl::handle( fltk3::SHOW, w);
+      if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle( fltk3::FOCUS, w);
+      fltk3::handle( fltk3::SHOW, w);
       }
   }
   fl_unlock_function();
@@ -1233,7 +1233,7 @@
   NSEventType type = [theEvent type];  
   if (type == NSLeftMouseDown) {
     fl_lock_function();
-    fltk3::Window *grab = Fl::grab();
+    fltk3::Window *grab = fltk3::grab();
     if (grab) {
       FLWindow *win = (FLWindow *)[theEvent window];
       if ( [win isKindOfClass:[FLWindow class]] && grab != [win getFl_Window]) {
@@ -1369,7 +1369,7 @@
 /*
  * smallest x ccordinate in screen space
  */
-int Fl::x() {
+int fltk3::x() {
   return int([[NSScreen mainScreen] visibleFrame].origin.x);
 }
 
@@ -1377,7 +1377,7 @@
 /*
  * smallest y coordinate in screen space
  */
-int Fl::y() {
+int fltk3::y() {
   NSRect all = [[NSScreen mainScreen] frame];
   NSRect visible = [[NSScreen mainScreen] visibleFrame];
   return int(all.size.height - (visible.origin.y + visible.size.height));
@@ -1387,7 +1387,7 @@
 /*
  * screen width
  */
-int Fl::w() {
+int fltk3::w() {
   return int([[NSScreen mainScreen] visibleFrame].size.width);
 }
 
@@ -1395,7 +1395,7 @@
 /*
  * screen height
  */
-int Fl::h() {
+int fltk3::h() {
   return int([[NSScreen mainScreen] visibleFrame].size.height);
 }
 
@@ -1403,7 +1403,7 @@
 /*
  * get the current mouse pointer world coordinates
  */
-void Fl::get_mouse(int &x, int &y) 
+void fltk3::get_mouse(int &x, int &y) 
 {
   fl_open_display();
   NSPoint pt = [NSEvent mouseLocation];
@@ -1639,7 +1639,7 @@
 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent
 {   
   fltk3::Window *w = [(FLWindow*)[theEvent window] getFl_Window];
-  fltk3::Window *first = Fl::first_window();
+  fltk3::Window *first = fltk3::first_window();
   return (first == w || !first->modal());
 }
 - (void)mouseUp:(NSEvent *)theEvent {
@@ -1680,7 +1680,7 @@
   fl_lock_function();
 
   fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
-  Fl::first_window(window);
+  fltk3::first_window(window);
 
   next_compose_length = -1;
   // First let's process the raw key press
@@ -1694,14 +1694,14 @@
     fltk3::MenuKey, fltk3::NumLockKey, fltk3::HelpKey 
   };
   static const int count = sizeof(notext)/sizeof(int);
-  if (Fl::e_keysym > fltk3::FKey && Fl::e_keysym <= fltk3::FLastKey) no_text_key = true;
+  if (fltk3::e_keysym > fltk3::FKey && fltk3::e_keysym <= fltk3::FLastKey) no_text_key = true;
   else for (int i=0; i < count; i++) {
-    if (notext[i] == Fl::e_keysym) {
+    if (notext[i] == fltk3::e_keysym) {
       no_text_key = true;
       break;
     }
   }
-  if (!no_text_key && !(Fl::e_state & fltk3::META) ) {
+  if (!no_text_key && !(fltk3::e_state & fltk3::META) ) {
     // Don't send cmd-<key> to interpretKeyEvents because it beeps.
     // Then we can let the OS have a stab at it and see if it thinks it
     // should result in some text
@@ -1710,12 +1710,12 @@
     [edit interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
     in_key_event = false;
   }
-  //NSLog(@"to text=%@ l=%d", [NSString stringWithUTF8String:Fl::e_text], Fl::e_length);
-  int handled = Fl::handle(fltk3::KEYDOWN, window);
-  // We have to update this after Fl::handle as it says what to do on the
+  //NSLog(@"to text=%@ l=%d", [NSString stringWithUTF8String:fltk3::e_text], fltk3::e_length);
+  int handled = fltk3::handle(fltk3::KEYDOWN, window);
+  // We have to update this after fltk3::handle as it says what to do on the
   // _next_ input
   if (next_compose_length != -1)
-    Fl::compose_state = next_compose_length;
+    fltk3::compose_state = next_compose_length;
 
   fl_unlock_function();
   return (handled ? YES : NO);
@@ -1728,9 +1728,9 @@
   //NSLog(@"keyUp: ");
   fl_lock_function();
   fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
-  Fl::first_window(window);
+  fltk3::first_window(window);
   cocoaKeyboardHandler(theEvent);
-  Fl::handle(fltk3::KEYUP,window);
+  fltk3::handle(fltk3::KEYUP,window);
   fl_unlock_function();
 }
 - (void)flagsChanged:(NSEvent *)theEvent {
@@ -1744,16 +1744,16 @@
   if ( tMods )
   {
     unsigned short keycode = [theEvent keyCode];
-    Fl::e_keysym = macKeyLookUp[keycode & 0x7f];
-    if ( Fl::e_keysym ) 
+    fltk3::e_keysym = macKeyLookUp[keycode & 0x7f];
+    if ( fltk3::e_keysym ) 
       sendEvent = ( prevMods<mods ) ? fltk3::KEYBOARD : fltk3::KEYUP;
-    Fl::e_length = 0;
-    Fl::e_text = (char*)"";
+    fltk3::e_length = 0;
+    fltk3::e_text = (char*)"";
     prevMods = mods;
   }
   mods_to_e_state( mods );
   while (window->parent()) window = window->window();
-  if (sendEvent) Fl::handle(sendEvent,window);
+  if (sendEvent) fltk3::handle(sendEvent,window);
   fl_unlock_function();
 }
 - (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)sender
@@ -1762,7 +1762,7 @@
   fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
   update_e_xy_and_e_xy_root([self window]);
   fl_dnd_target_window = target;
-  int ret = Fl::handle( fltk3::DND_ENTER, target );
+  int ret = fltk3::handle( fltk3::DND_ENTER, target );
   breakMacEventLoop();
   fl_unlock_function();
   return ret ? NSDragOperationCopy : NSDragOperationNone;
@@ -1773,7 +1773,7 @@
   fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
   update_e_xy_and_e_xy_root([self window]);
   fl_dnd_target_window = target;
-  int ret = Fl::handle( fltk3::DND_DRAG, target );
+  int ret = fltk3::handle( fltk3::DND_DRAG, target );
   breakMacEventLoop();
   fl_unlock_function();
   return ret ? NSDragOperationCopy : NSDragOperationNone;
@@ -1783,7 +1783,7 @@
   static char *DragData = NULL;
   fl_lock_function();
   fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
-  if ( !Fl::handle( fltk3::DND_RELEASE, target ) ) { 
+  if ( !fltk3::handle( fltk3::DND_RELEASE, target ) ) { 
     breakMacEventLoop();
     fl_unlock_function();
     return NO;
@@ -1814,14 +1814,14 @@
     fl_unlock_function();
     return NO;
   }
-  Fl::e_text = DragData;
-  Fl::e_length = strlen(DragData);
-  int old_event = Fl::e_number;
-  Fl::belowmouse()->handle(Fl::e_number = fltk3::PASTE);
-  Fl::e_number = old_event;
+  fltk3::e_text = DragData;
+  fltk3::e_length = strlen(DragData);
+  int old_event = fltk3::e_number;
+  fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE);
+  fltk3::e_number = old_event;
   if (DragData) { free(DragData); DragData = NULL; }
-  Fl::e_text = NULL;
-  Fl::e_length = 0;
+  fltk3::e_text = NULL;
+  fltk3::e_length = 0;
   fl_dnd_target_window = NULL;
   breakMacEventLoop();
   fl_unlock_function();
@@ -1831,7 +1831,7 @@
 {
   fl_lock_function();
   if ( fl_dnd_target_window ) {
-    Fl::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+    fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
     fl_dnd_target_window = 0;
   }
   fl_unlock_function();
@@ -1842,7 +1842,7 @@
 }
 
 + (void)prepareEtext:(NSString*)aString {
-  // fills Fl::e_text with UTF-8 encoded aString using an adequate memory allocation
+  // fills fltk3::e_text with UTF-8 encoded aString using an adequate memory allocation
   static char *received_utf8 = NULL;
   static int lreceived = 0;
   char *p = (char*)[aString UTF8String];
@@ -1857,9 +1857,9 @@
       lreceived = l;
     }
     strcpy(received_utf8, p);
-    Fl::e_text = received_utf8;
+    fltk3::e_text = received_utf8;
   }
-  Fl::e_length = l;
+  fltk3::e_length = l;
 }
 
 // These functions implement text input.
@@ -1884,10 +1884,10 @@
   // palette). Transform such actions to fltk3::PASTE events.
   if (!in_key_event) {
     fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
-    Fl::handle(fltk3::PASTE, target);
+    fltk3::handle(fltk3::PASTE, target);
     // for some reason, the window does not redraw until the next mouse move or button push
     // sending a 'redraw()' or 'awake()' does not solve the issue!
-    Fl::flush();
+    fltk3::flush();
   }
   if (!in_key_event) fl_unlock_function();
 }
@@ -1908,12 +1908,12 @@
   // are being composed.
   next_compose_length = newSelection.location;
   [FLView prepareEtext:received];
-  //NSLog(@"Fl::e_text=%@ Fl::e_length=%d next_compose_length=%d", received, Fl::e_length, next_compose_length);
+  //NSLog(@"fltk3::e_text=%@ fltk3::e_length=%d next_compose_length=%d", received, fltk3::e_length, next_compose_length);
 }
 
 - (void)unmarkText {
   fl_lock_function();
-  Fl::compose_state = 0;
+  fltk3::compose_state = 0;
   fl_unlock_function();
   //NSLog(@"unmarkText");
 }
@@ -1924,12 +1924,12 @@
 
 - (NSRange)markedRange {
   //NSLog(@"markedRange ?");
-  return NSMakeRange(NSNotFound, Fl::compose_state);
+  return NSMakeRange(NSNotFound, fltk3::compose_state);
 }
 
 - (BOOL)hasMarkedText {
-  //NSLog(@"hasMarkedText %s", Fl::compose_state > 0?"YES":"NO");
-  return (Fl::compose_state > 0);
+  //NSLog(@"hasMarkedText %s", fltk3::compose_state > 0?"YES":"NO");
+  return (fltk3::compose_state > 0);
 }
 
 - (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange {
@@ -1944,7 +1944,7 @@
 - (NSRect)firstRectForCharacterRange:(NSRange)aRange {
   NSRect glyphRect;
   fl_lock_function();
-  fltk3::Widget *focus = Fl::focus();
+  fltk3::Widget *focus = fltk3::focus();
   fltk3::Window *wfocus = focus->window();
   while (wfocus->window()) wfocus = wfocus->window();
   glyphRect.size.width = 0;
@@ -2009,9 +2009,9 @@
 	xo->next = x;
 	x->next = z;
       }
-      int old_event = Fl::e_number;
-      w->handle(Fl::e_number = fltk3::SHOW);
-      Fl::e_number = old_event;
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = fltk3::SHOW);
+      fltk3::e_number = old_event;
       w->redraw();		// force draw to happen
     }
     if (w->as_gl_window()) { // if creating a sub-GL-window
@@ -2071,12 +2071,12 @@
     }
     if (!(w->flags() & fltk3::Window::FORCE_POSITION)) {
       // use the Carbon functions below for default window positioning
-      w->x(xyPos+Fl::x());
-      w->y(xyPos+Fl::y());
+      w->x(xyPos+fltk3::x());
+      w->y(xyPos+fltk3::y());
       xyPos += 25;
       if (xyPos>200) xyPos = 100;
     } else {
-      if (!Fl::grab()) {
+      if (!fltk3::grab()) {
         xp = xwm; yp = ywm;
         w->x(xp);w->y(yp);
       }
@@ -2149,8 +2149,8 @@
       Fl_Tooltip::enter(0);
     }
     w->set_visible();
-    if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle(fltk3::FOCUS, w);
-    Fl::first_window(w);
+    if ( w->border() || (!w->modal() && !w->tooltip_window()) ) fltk3::handle(fltk3::FOCUS, w);
+    fltk3::first_window(w);
     [cw setDelegate:mydelegate];
     if (fl_show_iconic) { 
       fl_show_iconic = 0;
@@ -2167,11 +2167,11 @@
     srect = [[cw screen] frame];
     w->y(int(srect.size.height - (crect.origin.y + w->h())));
     
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = fltk3::SHOW);
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW);
+    fltk3::e_number = old_event;
     
-    if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
+    if (w->modal()) { fltk3::modal_ = w; fl_fix_focus(); }
   }
 }
 
@@ -2230,8 +2230,8 @@
  * make a window visible
  */
 void fltk3::Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(fltk3::NORMAL_LABEL);
     align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
   } else {
@@ -2357,13 +2357,13 @@
 // this is the context with origin at top left of (sub)window clipped out of its subwindows if any
   CGContextSaveGState(fl_gc); 
 #if defined(FLTK_USE_CAIRO)
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
 #endif
   fl_clip_region( 0 );
   
 #if defined(FLTK_USE_CAIRO)
   // update the cairo_t context
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
 #endif
 }
 
@@ -2398,7 +2398,7 @@
   CGContextRestoreGState(fl_gc); // matches the CGContextSaveGState of make_current
   fl_gc = 0;
 #if defined(FLTK_USE_CAIRO)
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
 #endif
 }
 
@@ -2460,7 +2460,7 @@
  * stuff: pointer to selected data
  * size of selected data
  */
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void fltk3::copy(const char *stuff, int len, int clipboard) {
   if (!stuff || len<0) return;
   if (len+1 > fl_selection_buffer_length[clipboard]) {
     delete[] fl_selection_buffer[clipboard];
@@ -2483,7 +2483,7 @@
 }
 
 // Call this when a "paste" operation happens:
-void Fl::paste(fltk3::Widget &receiver, int clipboard) {
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
   if (clipboard) {
     // see if we own the selection, if not go get it:
     fl_selection_length[1] = 0;
@@ -2543,13 +2543,13 @@
       }
     }
   }
-  Fl::e_text = fl_selection_buffer[clipboard];
-  Fl::e_length = fl_selection_length[clipboard];
-  if (!Fl::e_text) Fl::e_text = (char *)"";
+  fltk3::e_text = fl_selection_buffer[clipboard];
+  fltk3::e_length = fl_selection_length[clipboard];
+  if (!fltk3::e_text) fltk3::e_text = (char *)"";
   receiver.handle(fltk3::PASTE);
 }
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
   // check, if this timer slot exists already
   for (int i = 0; i < mac_timer_used; ++i) {
@@ -2600,13 +2600,13 @@
   }
 }
 
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
   // currently, repeat_timeout does not subtract the trigger time of the previous timer event as it should.
   add_timeout(time, cb, data);
 }
 
-int Fl::has_timeout(Fl_Timeout_Handler cb, void* data)
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
 {
   for (int i = 0; i < mac_timer_used; ++i) {
     MacTimeout& t = mac_timers[i];
@@ -2617,7 +2617,7 @@
   return 0;
 }
 
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
 {
   for (int i = 0; i < mac_timer_used; ++i) {
     MacTimeout& t = mac_timers[i];
@@ -2874,7 +2874,7 @@
   Fl_Printer printer;
   //Fl_PostScript_File_Device printer;
   int w, h, ww, wh;
-  fltk3::Window *win = Fl::first_window();
+  fltk3::Window *win = fltk3::first_window();
   if(!win) return;
   if( printer.start_job(1) ) return;
   if( printer.start_page() ) return;
@@ -3270,7 +3270,7 @@
   return image;
 }
 
-int Fl::dnd(void)
+int fltk3::dnd(void)
 {
   CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[0], fl_selection_length[0]);
   if (text==NULL) return false;
@@ -3280,7 +3280,7 @@
   [mypasteboard declareTypes:[NSArray arrayWithObjects:@"public.utf8-plain-text", nil] owner:nil];
   [mypasteboard setData:(NSData*)text forType:@"public.utf8-plain-text"];
   CFRelease(text);
-  fltk3::Widget *w = Fl::pushed();
+  fltk3::Widget *w = fltk3::pushed();
   fltk3::Window *win = w->window();
   if (win == NULL) {
     win = (fltk3::Window*)w;
@@ -3307,10 +3307,10 @@
               event:theEvent  pasteboard:mypasteboard  
              source:myview  slideBack:YES];
   if ( w ) {
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = fltk3::RELEASE);
-    Fl::e_number = old_event;
-    Fl::pushed( 0 );
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
   }
   [localPool release];
   return true;
@@ -3416,7 +3416,7 @@
   Fl_Display_Device::display_device()->set_current(); // send win to front and make it current
   win->show();
   fl_gc = NULL;
-  Fl::check();
+  fltk3::check();
   win->make_current();
   // capture the window title bar from screen
   CGImageRef img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
@@ -3433,7 +3433,7 @@
 
 /* Returns the address of a Carbon function after dynamically loading the Carbon library if needed.
  Supports old Mac OS X versions that may use a couple of Carbon calls:
- GetKeys used by OS X 10.3 or before (in Fl::get_key())
+ GetKeys used by OS X 10.3 or before (in fltk3::get_key())
  PMSessionPageSetupDialog and PMSessionPrintDialog used by 10.4 or before (in Fl_Printer::start_job())
  GetWindowPort used by 10.4 or before (in Fl_Gl_Choice.cxx)
  */

Modified: branches/branch-3.0/src/Fl_compose.cxx
===================================================================
--- branches/branch-3.0/src/Fl_compose.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_compose.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -29,7 +29,7 @@
 #include <fltk3/x.h>
 
 #ifndef FL_DOXYGEN
-int Fl::compose_state = 0;
+int fltk3::compose_state = 0;
 #endif
 
 #if !defined(WIN32) && !defined(__APPLE__)
@@ -40,11 +40,11 @@
  Use of this function is very simple.
  
  <p>If <i>true</i> is returned, then it has modified the
- Fl::event_text() and Fl::event_length() to a set of <i>bytes</i> to
+ fltk3::event_text() and fltk3::event_length() to a set of <i>bytes</i> to
  insert (it may be of zero length!).  In will also set the "del"
  parameter to the number of <i>bytes</i> to the left of the cursor to
  delete, this is used to delete the results of the previous call to
- Fl::compose().
+ fltk3::compose().
  
  <p>If <i>false</i> is returned, the keys should be treated as function
  keys, and del is set to zero. You could insert the text anyways, if
@@ -54,13 +54,13 @@
  versions may take quite awhile, as they may pop up a window or do
  other user-interface things to allow characters to be selected.
  */
-int Fl::compose(int& del) {
+int fltk3::compose(int& del) {
   // character composition is now handled by the OS
   del = 0;
 #if defined(__APPLE__)
   // this stuff is to be treated as a function key
-  if(Fl::e_length == 0 || Fl::e_keysym == fltk3::EnterKey || Fl::e_keysym == fltk3::KPEnterKey || 
-     Fl::e_keysym == fltk3::TabKey || Fl::e_keysym == fltk3::EscapeKey || Fl::e_state&(fltk3::META | fltk3::CTRL) ) {
+  if(fltk3::e_length == 0 || fltk3::e_keysym == fltk3::EnterKey || fltk3::e_keysym == fltk3::KPEnterKey || 
+     fltk3::e_keysym == fltk3::TabKey || fltk3::e_keysym == fltk3::EscapeKey || fltk3::e_state&(fltk3::META | fltk3::CTRL) ) {
     return 0;
   }
 #elif defined(WIN32)
@@ -70,9 +70,9 @@
   unsigned char ascii = (unsigned)e_text[0];
   if ((e_state & (fltk3::ALT | fltk3::META | fltk3::CTRL)) && !(ascii & 128)) return 0;
 #endif
-  if(Fl::compose_state) {
-    del = Fl::compose_state;
-    Fl::compose_state = 0;
+  if(fltk3::compose_state) {
+    del = fltk3::compose_state;
+    fltk3::compose_state = 0;
 #ifndef __APPLE__
   } else {
     // Only insert non-control characters:
@@ -83,14 +83,14 @@
 }
 
 /**
- If the user moves the cursor, be sure to call Fl::compose_reset().
- The next call to Fl::compose() will start out in an initial state. In
+ If the user moves the cursor, be sure to call fltk3::compose_reset().
+ The next call to fltk3::compose() will start out in an initial state. In
  particular it will not set "del" to non-zero. This call is very fast
  so it is ok to call it many times and in many places.
  */
-void Fl::compose_reset()
+void fltk3::compose_reset()
 {
-  Fl::compose_state = 0;
+  fltk3::compose_state = 0;
 #if !defined(WIN32) && !defined(__APPLE__)
   if (fl_xim_ic) XmbResetIC(fl_xim_ic);
 #endif

Modified: branches/branch-3.0/src/Fl_display.cxx
===================================================================
--- branches/branch-3.0/src/Fl_display.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_display.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -38,7 +38,7 @@
     works before you show() the first window or otherwise open the display,
     and does nothing useful under WIN32.
 */
-void Fl::display(const char *d) {
+void fltk3::display(const char *d) {
 #if defined(__APPLE__) || defined(WIN32)
   (void)d;
 #else

Modified: branches/branch-3.0/src/Fl_get_key.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_key.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_get_key.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -40,9 +40,9 @@
 
 extern char fl_key_vector[32]; // in Fl_x.cxx
 
-int Fl::event_key(int k) {
+int fltk3::event_key(int k) {
   if (k > fltk3::MouseButton && k <= fltk3::MouseButton+8)
-    return Fl::event_state(8<<(k-fltk3::MouseButton));
+    return fltk3::event_state(8<<(k-fltk3::MouseButton));
   int i;
 #  ifdef __sgi
   // get some missing PC keyboard keys:
@@ -56,7 +56,7 @@
   return fl_key_vector[i/8] & (1 << (i%8));
 }
 
-int Fl::get_key(int k) {
+int fltk3::get_key(int k) {
   fl_open_display();
   XQueryKeymap(fl_display, fl_key_vector);
   return event_key(k);

Modified: branches/branch-3.0/src/Fl_get_key_mac.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_key_mac.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_get_key_mac.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -82,12 +82,12 @@
 }
 
 //: returns true, if that key was pressed during the last event
-int Fl::event_key(int k) {
+int fltk3::event_key(int k) {
   return get_key(k);
 }
 
 //: returns true, if that key is pressed right now
-int Fl::get_key(int k) {
+int fltk3::get_key(int k) {
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
   if(CGEventSourceKeyState != NULL) {
     return (int)CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, fltk2mac(k) );

Modified: branches/branch-3.0/src/Fl_get_key_win32.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_key_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_get_key_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -123,11 +123,11 @@
   return 0;
 }
 
-int Fl::event_key(int k) {
+int fltk3::event_key(int k) {
   return GetKeyState(fltk2ms(k))&~1;
 }
 
-int Fl::get_key(int k) {
+int fltk3::get_key(int k) {
   uchar foo[256];
   GetKeyboardState(foo);
   return foo[fltk2ms(k)]&~1;

Modified: branches/branch-3.0/src/Fl_get_system_colors.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_system_colors.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_get_system_colors.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -53,7 +53,7 @@
     the colors used as backgrounds by almost all widgets and used to draw 
     the edges of all the boxtypes.
 */
-void Fl::background(uchar r, uchar g, uchar b) {
+void fltk3::background(uchar r, uchar g, uchar b) {
   fl_bg_set = 1;
 
   // replace the gray ramp so that fltk3::GRAY is this color
@@ -65,17 +65,17 @@
   double powb = log(b/255.0)/log((fltk3::GRAY-fltk3::GRAY_RAMP)/(fltk3::NUM_GRAY-1.0));
   for (int i = 0; i < fltk3::NUM_GRAY; i++) {
     double gray = i/(fltk3::NUM_GRAY-1.0);
-    Fl::set_color(fltk3::gray_ramp(i),
+    fltk3::set_color(fltk3::gray_ramp(i),
 		  uchar(pow(gray,powr)*255+.5),
 		  uchar(pow(gray,powg)*255+.5),
 		  uchar(pow(gray,powb)*255+.5));
   }
 }
 /** Changes fl_color(fltk3::FOREGROUND_COLOR). */
-void Fl::foreground(uchar r, uchar g, uchar b) {
+void fltk3::foreground(uchar r, uchar g, uchar b) {
   fl_fg_set = 1;
 
-  Fl::set_color(fltk3::FOREGROUND_COLOR,r,g,b);
+  fltk3::set_color(fltk3::FOREGROUND_COLOR,r,g,b);
 }
 
 /**
@@ -84,21 +84,21 @@
     <P>This call may change fl_color(fltk3::FOREGROUND_COLOR) if it 
     does not provide sufficient contrast to fltk3::BACKGROUND2_COLOR.
 */
-void Fl::background2(uchar r, uchar g, uchar b) {
+void fltk3::background2(uchar r, uchar g, uchar b) {
   fl_bg2_set = 1;
 
-  Fl::set_color(fltk3::BACKGROUND2_COLOR,r,g,b);
-  Fl::set_color(fltk3::FOREGROUND_COLOR,
+  fltk3::set_color(fltk3::BACKGROUND2_COLOR,r,g,b);
+  fltk3::set_color(fltk3::FOREGROUND_COLOR,
                 get_color(fltk3::contrast(fltk3::FOREGROUND_COLOR,fltk3::BACKGROUND2_COLOR)));
 }
 
-// these are set by Fl::args() and override any system colors:
+// these are set by fltk3::args() and override any system colors:
 const char *fl_fg = NULL;
 const char *fl_bg = NULL;
 const char *fl_bg2 = NULL;
 
 static void set_selection_color(uchar r, uchar g, uchar b) {
-  Fl::set_color(fltk3::SELECTION_COLOR,r,g,b);
+  fltk3::set_color(fltk3::SELECTION_COLOR,r,g,b);
 }
 
 #if defined(WIN32) || defined(__APPLE__)
@@ -139,10 +139,10 @@
   } else return 0;
 }
 #endif // WIN32 || __APPLE__
-/** \fn Fl::get_system_colors()
+/** \fn fltk3::get_system_colors()
     Read the user preference colors from the system and use them to call
-    Fl::foreground(), Fl::background(), and 
-    Fl::background2().  This is done by
+    fltk3::foreground(), fltk3::background(), and 
+    fltk3::background2().  This is done by
     fltk3::Window::show(argc,argv) before applying the -fg and -bg
     switches.
     
@@ -158,7 +158,7 @@
   if (arg) {
     uchar r,g,b;
     if (!fl_parse_color(arg, r,g,b))
-      Fl::error("Unknown color: %s", arg);
+      fltk3::error("Unknown color: %s", arg);
     else
       func(r,g,b);
   } else {
@@ -167,10 +167,10 @@
   }
 }
 
-void Fl::get_system_colors() {
-  if (!fl_bg2_set) getsyscolor(COLOR_WINDOW,	fl_bg2,Fl::background2);
-  if (!fl_fg_set) getsyscolor(COLOR_WINDOWTEXT,	fl_fg, Fl::foreground);
-  if (!fl_bg_set) getsyscolor(COLOR_BTNFACE,	fl_bg, Fl::background);
+void fltk3::get_system_colors() {
+  if (!fl_bg2_set) getsyscolor(COLOR_WINDOW,	fl_bg2,fltk3::background2);
+  if (!fl_fg_set) getsyscolor(COLOR_WINDOWTEXT,	fl_fg, fltk3::foreground);
+  if (!fl_bg_set) getsyscolor(COLOR_BTNFACE,	fl_bg, fltk3::background);
   getsyscolor(COLOR_HIGHLIGHT,	0,     set_selection_color);
 }
 
@@ -178,9 +178,9 @@
 // MacOS X currently supports two color schemes - Blue and Graphite.
 // Since we aren't emulating the Aqua interface (even if Apple would
 // let us), we use some defaults that are similar to both.  The
-// Fl::scheme("plastic") color/box scheme provides a usable Aqua-like
+// fltk3::scheme("plastic") color/box scheme provides a usable Aqua-like
 // look-n-feel...
-void Fl::get_system_colors()
+void fltk3::get_system_colors()
 {
   fl_open_display();
 
@@ -223,27 +223,27 @@
   }
   XColor x;
   if (!XParseColor(fl_display, fl_colormap, arg, &x))
-    Fl::error("Unknown color: %s", arg);
+    fltk3::error("Unknown color: %s", arg);
   else
     func(x.red>>8, x.green>>8, x.blue>>8);
 }
 
-void Fl::get_system_colors()
+void fltk3::get_system_colors()
 {
   fl_open_display();
   const char* key1 = 0;
-  if (Fl::first_window()) key1 = Fl::first_window()->xclass();
+  if (fltk3::first_window()) key1 = fltk3::first_window()->xclass();
   if (!key1) key1 = "fltk";
-  if (!fl_bg2_set) getsyscolor("Text","background",	fl_bg2,	"#ffffff", Fl::background2);
-  if (!fl_fg_set) getsyscolor(key1,  "foreground",	fl_fg,	"#000000", Fl::foreground);
-  if (!fl_bg_set) getsyscolor(key1,  "background",	fl_bg,	"#c0c0c0", Fl::background);
+  if (!fl_bg2_set) getsyscolor("Text","background",	fl_bg2,	"#ffffff", fltk3::background2);
+  if (!fl_fg_set) getsyscolor(key1,  "foreground",	fl_fg,	"#000000", fltk3::foreground);
+  if (!fl_bg_set) getsyscolor(key1,  "background",	fl_bg,	"#c0c0c0", fltk3::background);
   getsyscolor("Text", "selectBackground", 0, "#000080", set_selection_color);
 }
 
 #endif
 
 
-//// Simple implementation of 2.0 Fl::scheme() interface...
+//// Simple implementation of 2.0 fltk3::scheme() interface...
 #define D1 BORDER_WIDTH
 #define D2 (BORDER_WIDTH+BORDER_WIDTH)
 
@@ -260,8 +260,8 @@
 extern void	fl_thin_down_frame(int, int, int, int, fltk3::Color);
 
 #ifndef FL_DOXYGEN
-const char	*Fl::scheme_ = (const char *)0;	    // current scheme 
-Fl_Image	*Fl::scheme_bg_ = (Fl_Image *)0;    // current background image for the scheme
+const char	*fltk3::scheme_ = (const char *)0;	    // current scheme 
+Fl_Image	*fltk3::scheme_bg_ = (Fl_Image *)0;    // current background image for the scheme
 #endif
 
 static Fl_Pixmap	tile(tile_xpm);
@@ -285,12 +285,12 @@
     
     </ul>
 */
-int Fl::scheme(const char *s) {
+int fltk3::scheme(const char *s) {
   if (!s) {
     if ((s = getenv("FLTK_SCHEME")) == NULL) {
 #if !defined(WIN32) && !defined(__APPLE__)
       const char* key = 0;
-      if (Fl::first_window()) key = Fl::first_window()->xclass();
+      if (fltk3::first_window()) key = fltk3::first_window()->xclass();
       if (!key) key = "fltk";
       fl_open_display();
       s = XGetDefault(fl_display, key, "scheme");
@@ -316,7 +316,7 @@
   return reload_scheme();
 }
 
-int Fl::reload_scheme() {
+int fltk3::reload_scheme() {
   fltk3::Window *win;
 
   if (scheme_ && !strcasecmp(scheme_, "plastic")) {
@@ -364,7 +364,7 @@
     set_boxtype(fltk3::ROUND_DOWN_BOX, fltk3::PLASTIC_ROUND_DOWN_BOX);
 
     // Use standard size scrollbars...
-    Fl::scrollbar_size(16);
+    fltk3::scrollbar_size(16);
   } else if (scheme_ && !strcasecmp(scheme_, "gtk+")) {
     // Use a GTK+ inspired look-n-feel...
     if (scheme_bg_) {
@@ -385,7 +385,7 @@
     set_boxtype(fltk3::ROUND_DOWN_BOX, fltk3::GTK_ROUND_DOWN_BOX);
 
     // Use slightly thinner scrollbars...
-    Fl::scrollbar_size(15);
+    fltk3::scrollbar_size(15);
   } else {
     // Use the standard FLTK look-n-feel...
     if (scheme_bg_) {
@@ -406,7 +406,7 @@
     set_boxtype(fltk3::ROUND_DOWN_BOX, fl_round_down_box, 3, 3, 6, 6);
 
     // Use standard size scrollbars...
-    Fl::scrollbar_size(16);
+    fltk3::scrollbar_size(16);
   }
 
   // Set (or clear) the background tile for all windows...

Modified: branches/branch-3.0/src/Fl_grab.cxx
===================================================================
--- branches/branch-3.0/src/Fl_grab.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_grab.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -50,7 +50,7 @@
 extern void *fl_capture;
 #endif
 
-void Fl::grab(fltk3::Window* win) {
+void fltk3::grab(fltk3::Window* win) {
   if (win) {
     if (!grab_) {
 #ifdef WIN32

Modified: branches/branch-3.0/src/Fl_lock.cxx
===================================================================
--- branches/branch-3.0/src/Fl_lock.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_lock.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -48,31 +48,31 @@
 
    The API:
 
-   Fl::lock() - recursive lock.  You must call this before the
-   first call to Fl::wait()/run() to initialize the thread
+   fltk3::lock() - recursive lock.  You must call this before the
+   first call to fltk3::wait()/run() to initialize the thread
    system. The lock is locked all the time except when
-   Fl::wait() is waiting for events.
+   fltk3::wait() is waiting for events.
 
-   Fl::unlock() - release the recursive lock.
+   fltk3::unlock() - release the recursive lock.
 
-   Fl::awake(void*) - Causes Fl::wait() to return (with the lock
+   fltk3::awake(void*) - Causes fltk3::wait() to return (with the lock
    locked) even if there are no events ready.
 
-   Fl::awake(void (*cb)(void *), void*) - Call a function
+   fltk3::awake(void (*cb)(void *), void*) - Call a function
    in the main thread from within another thread of execution.
 
-   Fl::thread_message() - returns an argument sent to an
-   Fl::awake() call, or returns NULL if none.  WARNING: the
+   fltk3::thread_message() - returns an argument sent to an
+   fltk3::awake() call, or returns NULL if none.  WARNING: the
    current implementation only has a one-entry queue and only
    returns the most recent value!
 */
 
 #ifndef FL_DOXYGEN
-Fl_Awake_Handler *Fl::awake_ring_;
-void **Fl::awake_data_;
-int Fl::awake_ring_size_;
-int Fl::awake_ring_head_;
-int Fl::awake_ring_tail_;
+fltk3::AwakeHandler *fltk3::awake_ring_;
+void **fltk3::awake_data_;
+int fltk3::awake_ring_size_;
+int fltk3::awake_ring_head_;
+int fltk3::awake_ring_tail_;
 #endif
 
 static const int AWAKE_RING_SIZE = 1024;
@@ -81,13 +81,13 @@
 
 
 /** Adds an awake handler for use in awake(). */
-int Fl::add_awake_handler_(Fl_Awake_Handler func, void *data)
+int fltk3::add_awake_handler_(fltk3::AwakeHandler func, void *data)
 {
   int ret = 0;
   lock_ring();
   if (!awake_ring_) {
     awake_ring_size_ = AWAKE_RING_SIZE;
-    awake_ring_ = (Fl_Awake_Handler*)malloc(awake_ring_size_*sizeof(Fl_Awake_Handler));
+    awake_ring_ = (fltk3::AwakeHandler*)malloc(awake_ring_size_*sizeof(fltk3::AwakeHandler));
     awake_data_ = (void**)malloc(awake_ring_size_*sizeof(void*));
   }
   if (awake_ring_head_==awake_ring_tail_-1 || awake_ring_head_+1==awake_ring_tail_) {
@@ -104,7 +104,7 @@
   return ret;
 }
 /** Gets the last stored awake handler for use in awake(). */
-int Fl::get_awake_handler_(Fl_Awake_Handler &func, void *&data)
+int fltk3::get_awake_handler_(fltk3::AwakeHandler &func, void *&data)
 {
   int ret = 0;
   lock_ring();
@@ -129,17 +129,17 @@
  and -1 if registration failed. Over a thousand awake callbacks can be
  registered simultaneously.
  
- \see Fl::awake(void* message=0)
+ \see fltk3::awake(void* message=0)
 */
-int Fl::awake(Fl_Awake_Handler func, void *data) {
+int fltk3::awake(fltk3::AwakeHandler func, void *data) {
   int ret = add_awake_handler_(func, data);
-  Fl::awake();
+  fltk3::awake();
   return ret;
 }
 
 ////////////////////////////////////////////////////////////////
 // Windows threading...
-/** \fn int Fl::lock()
+/** \fn int fltk3::lock()
     The lock() method blocks the current thread until it
     can safely access FLTK widgets and data. Child threads should
     call this method prior to updating any widgets or accessing
@@ -161,7 +161,7 @@
     
     See also: \ref advanced_multithreading
 */
-/** \fn void Fl::unlock()
+/** \fn void fltk3::unlock()
     The unlock() method releases the lock that was set
     using the lock() method. Child
     threads should call this method as soon as they are finished
@@ -169,22 +169,22 @@
     
     See also: \ref advanced_multithreading
 */
-/** \fn void Fl::awake(void* msg)
+/** \fn void fltk3::awake(void* msg)
     Sends a message pointer to the main thread, 
-    causing any pending Fl::wait() call to 
+    causing any pending fltk3::wait() call to 
     terminate so that the main thread can retrieve the message and any pending 
     redraws can be processed.
     
-    Multiple calls to Fl::awake() will queue multiple pointers 
+    Multiple calls to fltk3::awake() will queue multiple pointers 
     for the main thread to process, up to a system-defined (typically several 
     thousand) depth. The default message handler saves the last message which 
     can be accessed using the 
-    Fl::thread_message() function.
+    fltk3::thread_message() function.
 
-    In the context of a threaded application, a call to Fl::awake() with no
+    In the context of a threaded application, a call to fltk3::awake() with no
     argument will trigger event loop handling in the main thread. Since
-    it is not possible to call Fl::flush() from a subsidiary thread,
-    Fl::awake() is the best (and only, really) substitute.
+    it is not possible to call fltk3::flush() from a subsidiary thread,
+    fltk3::awake() is the best (and only, really) substitute.
     
     See also: \ref advanced_multithreading
 */
@@ -232,7 +232,7 @@
   EnterCriticalSection(&cs);
 }
 
-int Fl::lock() {
+int fltk3::lock() {
   if (!main_thread) InitializeCriticalSection(&cs);
 
   lock_function();
@@ -245,11 +245,11 @@
   return 0;
 }
 
-void Fl::unlock() {
+void fltk3::unlock() {
   unlock_function();
 }
 
-void Fl::awake(void* msg) {
+void fltk3::awake(void* msg) {
   PostThreadMessage( main_thread, fl_wake_msg, (WPARAM)msg, 0);
 }
 
@@ -260,10 +260,10 @@
 #  include <fcntl.h>
 #  include <pthread.h>
 
-// Pipe for thread messaging via Fl::awake()...
+// Pipe for thread messaging via fltk3::awake()...
 static int thread_filedes[2];
 
-// Mutex and state information for Fl::lock() and Fl::unlock()...
+// Mutex and state information for fltk3::lock() and fltk3::unlock()...
 static pthread_mutex_t fltk_mutex;
 static pthread_t owner;
 static int counter;
@@ -306,12 +306,12 @@
 }
 #  endif // PTHREAD_MUTEX_RECURSIVE
 
-void Fl::awake(void* msg) {
+void fltk3::awake(void* msg) {
   if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ }
 }
 
 static void* thread_message_;
-void* Fl::thread_message() {
+void* fltk3::thread_message() {
   void* r = thread_message_;
   thread_message_ = 0;
   return r;
@@ -321,9 +321,9 @@
   if (read(fd, &thread_message_, sizeof(void*))==0) { 
     /* This should never happen */
   }
-  Fl_Awake_Handler func;
+  fltk3::AwakeHandler func;
   void *data;
-  while (Fl::get_awake_handler_(func, data)==0) {
+  while (fltk3::get_awake_handler_(func, data)==0) {
     (*func)(data);
   }
 }
@@ -332,10 +332,10 @@
 extern void (*fl_lock_function)();
 extern void (*fl_unlock_function)();
 
-int Fl::lock() {
+int fltk3::lock() {
   if (!thread_filedes[1]) {
     // Initialize thread communication pipe to let threads awake FLTK
-    // from Fl::wait()
+    // from fltk3::wait()
     if (pipe(thread_filedes)==-1) {
       /* this should not happen */
     }
@@ -346,9 +346,9 @@
           fcntl(thread_filedes[1], F_GETFL) | O_NONBLOCK);
 
     // Monitor the read side of the pipe so that messages sent via
-    // Fl::awake() from a thread will "wake up" the main thread in
-    // Fl::wait().
-    Fl::add_fd(thread_filedes[0], fltk3::READ, thread_awake_cb);
+    // fltk3::awake() from a thread will "wake up" the main thread in
+    // fltk3::wait().
+    fltk3::add_fd(thread_filedes[0], fltk3::READ, thread_awake_cb);
 
     // Set lock/unlock functions for this system, using a system-supplied
     // recursive mutex if supported...
@@ -370,7 +370,7 @@
   return 0;
 }
 
-void Fl::unlock() {
+void fltk3::unlock() {
   fl_unlock_function();
 }
 
@@ -397,17 +397,17 @@
 void lock_ring() {
 }
 
-void Fl::awake(void*) {
+void fltk3::awake(void*) {
 }
 
-int Fl::lock() {
+int fltk3::lock() {
   return 1;
 }
 
-void Fl::unlock() {
+void fltk3::unlock() {
 }
 
-void* Fl::thread_message() {
+void* fltk3::thread_message() {
   return NULL;
 }
 

Modified: branches/branch-3.0/src/Fl_mac.cxx
===================================================================
--- branches/branch-3.0/src/Fl_mac.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_mac.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -100,7 +100,7 @@
 CursHandle fl_default_cursor;
 WindowRef fl_capture = 0;            // we need this to compensate for a missing(?) mouse capture
 ulong fl_event_time;                 // the last timestamp from an x event
-char fl_key_vector[32];              // used by Fl::get_key()
+char fl_key_vector[32];              // used by fltk3::get_key()
 bool fl_show_iconic;                 // true if called from iconize() - shows the next created window in collapsed state
 int fl_disable_transient_for;        // secret method of removing TRANSIENT_FOR
 const fltk3::Window* fl_modal_for;       // parent of modal() window
@@ -181,9 +181,9 @@
   if ( mods & (controlKey|rightControlKey) ) state |= fltk3::CTRL;
   if ( mods & (shiftKey|rightShiftKey) ) state |= fltk3::SHIFT;
   if ( mods & alphaLock ) state |= fltk3::CAPS_LOCK;
-  unsigned int ret = ( Fl::e_state & 0xff000000 ) | state;
-  Fl::e_state = ret;
-  //printf( "State 0x%08x (%04x)\n", Fl::e_state, mods );
+  unsigned int ret = ( fltk3::e_state & 0xff000000 ) | state;
+  fltk3::e_state = ret;
+  //printf( "State 0x%08x (%04x)\n", fltk3::e_state, mods );
   return ret;
 }
 
@@ -193,19 +193,19 @@
  */
 static void mods_to_e_keysym( UInt32 mods )
 {
-  if ( mods & cmdKey ) Fl::e_keysym = fltk3::MetaLKey;
-  else if ( mods & kEventKeyModifierNumLockMask ) Fl::e_keysym = fltk3::NumLockKey;
-  else if ( mods & optionKey ) Fl::e_keysym = fltk3::AltLKey;
-  else if ( mods & rightOptionKey ) Fl::e_keysym = fltk3::AltRKey;
-  else if ( mods & controlKey ) Fl::e_keysym = fltk3::ControlLKey;
-  else if ( mods & rightControlKey ) Fl::e_keysym = fltk3::ControlRKey;
-  else if ( mods & shiftKey ) Fl::e_keysym = fltk3::ShiftLKey;
-  else if ( mods & rightShiftKey ) Fl::e_keysym = fltk3::ShiftRKey;
-  else if ( mods & alphaLock ) Fl::e_keysym = fltk3::CapsLockKey;
-  else Fl::e_keysym = 0;
-  //printf( "to sym 0x%08x (%04x)\n", Fl::e_keysym, mods );
+  if ( mods & cmdKey ) fltk3::e_keysym = fltk3::MetaLKey;
+  else if ( mods & kEventKeyModifierNumLockMask ) fltk3::e_keysym = fltk3::NumLockKey;
+  else if ( mods & optionKey ) fltk3::e_keysym = fltk3::AltLKey;
+  else if ( mods & rightOptionKey ) fltk3::e_keysym = fltk3::AltRKey;
+  else if ( mods & controlKey ) fltk3::e_keysym = fltk3::ControlLKey;
+  else if ( mods & rightControlKey ) fltk3::e_keysym = fltk3::ControlRKey;
+  else if ( mods & shiftKey ) fltk3::e_keysym = fltk3::ShiftLKey;
+  else if ( mods & rightShiftKey ) fltk3::e_keysym = fltk3::ShiftRKey;
+  else if ( mods & alphaLock ) fltk3::e_keysym = fltk3::CapsLockKey;
+  else fltk3::e_keysym = 0;
+  //printf( "to sym 0x%08x (%04x)\n", fltk3::e_keysym, mods );
 }
-// these pointers are set by the Fl::lock() function:
+// these pointers are set by the fltk3::lock() function:
 static void nothing() {}
 void (*fl_lock_function)() = nothing;
 void (*fl_unlock_function)() = nothing;
@@ -213,7 +213,7 @@
 //
 // Select interface -- how it's implemented:
 //     When the user app configures one or more file descriptors to monitor
-//     with Fl::add_fd(), we start a separate thread to select() the  data,
+//     with fltk3::add_fd(), we start a separate thread to select() the  data,
 //     sending a custom OSX 'FLTK data ready event' to the parent  thread's
 //     RunApplicationLoop(), so that it triggers the data  ready  callbacks
 //     in the parent thread.                               -erco 04/04/04
@@ -462,16 +462,16 @@
   DataUnlock();
 }
 
-void Fl::add_fd( int n, int events, void (*cb)(int, void*), void *v )
+void fltk3::add_fd( int n, int events, void (*cb)(int, void*), void *v )
     { dataready.AddFD(n, events, cb, v); }
 
-void Fl::add_fd(int fd, void (*cb)(int, void*), void* v)
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v)
     { dataready.AddFD(fd, POLLIN, cb, v); }
 
-void Fl::remove_fd(int n, int events)
+void fltk3::remove_fd(int n, int events)
     { dataready.RemoveFD(n, events); }
 
-void Fl::remove_fd(int n)
+void fltk3::remove_fd(int n)
     { dataready.RemoveFD(n, -1); }
 
 /**
@@ -633,7 +633,7 @@
 //
 
 struct MacTimeout {
-    Fl_Timeout_Handler callback;
+    fltk3::TimeoutHandler callback;
     void* data;
     EventLoopTimerRef timer;
     EventLoopTimerUPP upp;
@@ -775,7 +775,7 @@
 #if CONSOLIDATE_MOTION
   if (send_motion && send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(fltk3::MOVE, fl_xmousewin);
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
   }
 #endif
 
@@ -807,7 +807,7 @@
 
   while ( Fl_X::first ) {
     Fl_X *x = Fl_X::first;
-    Fl::handle( fltk3::CLOSE, x->w );
+    fltk3::handle( fltk3::CLOSE, x->w );
     if ( Fl_X::first == x ) {
       fl_unlock_function();
       return noErr; // FLTK has not close all windows, so we return to the main program now
@@ -829,7 +829,7 @@
   UInt32 kind = GetEventKind( event );
   OSStatus ret = eventNotHandledErr;
   fltk3::Window *window = (fltk3::Window*)userData;
-  Fl::first_window(window);
+  fltk3::first_window(window);
 
   Rect currentBounds, originalBounds;
   WindowClass winClass;
@@ -866,22 +866,22 @@
     {
       GetWindowClass( fl_xid( window ), &winClass );
       if ( winClass != kHelpWindowClass ) {	// help windows can't get the focus!
-        Fl::handle( fltk3::FOCUS, window);
+        fltk3::handle( fltk3::FOCUS, window);
         activeWindow = window;
       }
-      Fl::handle( fltk3::SHOW, window);
+      fltk3::handle( fltk3::SHOW, window);
       mods_to_e_state(GetCurrentKeyModifiers());
     }
     break;
   case kEventWindowHidden:
-    if ( !window->parent() ) Fl::handle( fltk3::HIDE, window);
+    if ( !window->parent() ) fltk3::handle( fltk3::HIDE, window);
     break;
   case kEventWindowActivated:
     if ( window->shown() && window!=activeWindow )
     {
       GetWindowClass( fl_xid( window ), &winClass );
       if ( winClass != kHelpWindowClass ) {	// help windows can't get the focus!
-        Fl::handle( fltk3::FOCUS, window);
+        fltk3::handle( fltk3::FOCUS, window);
         activeWindow = window;
       }
     }
@@ -889,12 +889,12 @@
   case kEventWindowDeactivated:
     if ( window==activeWindow ) 
     {
-      Fl::handle( fltk3::UNFOCUS, window);
+      fltk3::handle( fltk3::UNFOCUS, window);
       activeWindow = 0;
     }
     break;
   case kEventWindowClose:
-    Fl::handle( fltk3::CLOSE, window ); // this might or might not close the window
+    fltk3::handle( fltk3::CLOSE, window ); // this might or might not close the window
     // if there are no more windows, send a high-level quit event
     if (!Fl_X::first) QuitAppleEventHandler( 0, 0, 0 );
     ret = noErr; // returning noErr tells Carbon to stop following up on this event
@@ -931,7 +931,7 @@
     fl_unlock_function();
     return noErr;
   }
-  Fl::first_window(window);
+  fltk3::first_window(window);
 
   EventMouseWheelAxis axis;
   GetEventParameter( event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(EventMouseWheelAxis), NULL, &axis );
@@ -939,13 +939,13 @@
   GetEventParameter( event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(long), NULL, &delta );
 //  fprintf(stderr, "axis=%d, delta=%d\n", axis, delta);
   if ( axis == kEventMouseWheelAxisX ) {
-    Fl::e_dx = -delta;
-    Fl::e_dy = 0;
-    if ( Fl::e_dx) Fl::handle( fltk3::MOUSEWHEEL, window );
+    fltk3::e_dx = -delta;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( fltk3::MOUSEWHEEL, window );
   } else if ( axis == kEventMouseWheelAxisY ) {
-    Fl::e_dx = 0;
-    Fl::e_dy = -delta;
-    if ( Fl::e_dy) Fl::handle( fltk3::MOUSEWHEEL, window );
+    fltk3::e_dx = 0;
+    fltk3::e_dy = -delta;
+    if ( fltk3::e_dy) fltk3::handle( fltk3::MOUSEWHEEL, window );
   } else {
     fl_unlock_function();
 
@@ -969,7 +969,7 @@
     fltk3::BUTTON2|fltk3::BUTTON1, fltk3::BUTTON2|fltk3::BUTTON3, 
     fltk3::BUTTON2|fltk3::BUTTON1|fltk3::BUTTON3
   };
-  Fl::e_state = ( Fl::e_state & 0xff0000 ) | state[ chord & 0x07 ];
+  fltk3::e_state = ( fltk3::e_state & 0xff0000 ) | state[ chord & 0x07 ];
 }
 
 
@@ -991,7 +991,7 @@
     fl_unlock_function();
     return noErr;
   }
-  Fl::first_window(window);
+  fltk3::first_window(window);
   Point pos;
   GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &pos );
   EventMouseButton btn;
@@ -1006,7 +1006,7 @@
   {
   case kEventMouseDown:
     part = FindWindow( pos, &tempXid );
-    if (!(Fl::grab() && window!=Fl::grab())) {
+    if (!(fltk3::grab() && window!=fltk3::grab())) {
       if ( part == inGrow ) {
         fl_unlock_function();
         suppressed = 1;
@@ -1028,11 +1028,11 @@
     // normal handling of mouse-down follows
     fl_os_capture = xid;
     sendEvent = fltk3::PUSH;
-    Fl::e_is_click = 1; px = pos.h; py = pos.v;
+    fltk3::e_is_click = 1; px = pos.h; py = pos.v;
     if (clickCount>1) 
-      Fl::e_clicks++;
+      fltk3::e_clicks++;
     else
-      Fl::e_clicks = 0;
+      fltk3::e_clicks = 0;
     // fall through
   case kEventMouseUp:
     if (suppressed) {
@@ -1043,7 +1043,7 @@
     if ( !sendEvent ) {
       sendEvent = fltk3::RELEASE; 
     }
-    Fl::e_keysym = keysym[ btn ];
+    fltk3::e_keysym = keysym[ btn ];
     // fall through
   case kEventMouseMoved:
     suppressed = 0;
@@ -1054,28 +1054,28 @@
   case kEventMouseDragged:
     if (suppressed) break;
     if ( !sendEvent ) {
-      sendEvent = fltk3::MOVE; // Fl::handle will convert into fltk3::DRAG
+      sendEvent = fltk3::MOVE; // fltk3::handle will convert into fltk3::DRAG
       if (abs(pos.h-px)>5 || abs(pos.v-py)>5) 
-        Fl::e_is_click = 0;
+        fltk3::e_is_click = 0;
     }
     chord_to_e_state( chord );
     GrafPtr oldPort;
     GetPort( &oldPort );
     SetPort( GetWindowPort(xid) ); // \todo replace this! There must be some GlobalToLocal call that has a port as an argument
     SetOrigin(0, 0);
-    Fl::e_x_root = pos.h;
-    Fl::e_y_root = pos.v;
+    fltk3::e_x_root = pos.h;
+    fltk3::e_y_root = pos.v;
     GlobalToLocal( &pos );
-    Fl::e_x = pos.h;
-    Fl::e_y = pos.v;
+    fltk3::e_x = pos.h;
+    fltk3::e_y = pos.v;
     SetPort( oldPort );
     if (GetEventKind(event)==kEventMouseDown && part!=inContent) {
-      int used = Fl::handle( sendEvent, window );
+      int used = fltk3::handle( sendEvent, window );
       CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
       if (!used) 
         suppressed = 1;
     } else {
-      Fl::handle( sendEvent, window );
+      fltk3::handle( sendEvent, window );
     }
     break;
   }
@@ -1242,7 +1242,7 @@
   EventHandlerCallRef nextHandler, EventRef event, void *userData )
 {
   fltk3::Window *window = (fltk3::Window*)userData;
-  Fl::first_window(window);
+  fltk3::first_window(window);
   fl_lock_function();
   //int kind = GetEventKind(event);
   unsigned short buf[200];
@@ -1254,17 +1254,17 @@
   unsigned ucs = buf[0];
   char utf8buf[20];
   int len = fl_utf8encode(ucs, utf8buf);
-  Fl::e_length = len;
-  Fl::e_text = utf8buf;
+  fltk3::e_length = len;
+  fltk3::e_text = utf8buf;
   while (window->parent()) window = window->window();
-  Fl::handle(fltk3::KEYBOARD, window);
+  fltk3::handle(fltk3::KEYBOARD, window);
   fl_unlock_function();
   fl_lock_function();
-  Fl::handle(fltk3::KEYUP, window);
+  fltk3::handle(fltk3::KEYUP, window);
   fl_unlock_function();
   // for some reason, the window does not redraw until the next mouse move or button push
   // sending a 'redraw()' or 'awake()' does not solve the issue!
-  Fl::flush();
+  fltk3::flush();
   return noErr;
 }  
 
@@ -1277,7 +1277,7 @@
   static char buffer[32];
   int sendEvent = 0;
   fltk3::Window *window = (fltk3::Window*)userData;
-  Fl::first_window(window);
+  fltk3::first_window(window);
   UInt32 mods;
   static UInt32 prevMods = mods_to_e_state( GetCurrentKeyModifiers() );
 
@@ -1331,9 +1331,9 @@
       const void *kchar = 0; KLGetKeyboardLayoutProperty(klr, kKLKCHRData, &kchar);
       KeyTranslate(kchar, (mods&0xff00) | keyCode, &ktState); // send the dead key
       key = KeyTranslate(kchar, 0x31, &ktState); // fake a space key press
-      Fl::e_state |= 0x40000000; // mark this as a dead key
+      fltk3::e_state |= 0x40000000; // mark this as a dead key
     } else {
-      Fl::e_state &= 0xbfffffff; // clear the deadkey flag
+      fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
     }
 */
     sendEvent = fltk3::KEYBOARD;
@@ -1341,18 +1341,18 @@
   case kEventRawKeyUp:
     if ( !sendEvent ) {
       sendEvent = fltk3::KEYUP;
-      Fl::e_state &= 0xbfffffff; // clear the deadkey flag
+      fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
     }
     // if the user pressed alt/option, event_key should have the keycap, 
     // but event_text should generate the international symbol
     sym = macKeyLookUp[maskedKeyCode];
     if ( isalpha(key) )
       sym = tolower(key);
-    else if ( Fl::e_state&fltk3::CTRL && key<32 && sym<0xff00)
+    else if ( fltk3::e_state&fltk3::CTRL && key<32 && sym<0xff00)
       sym = key+96;
-    else if ( Fl::e_state&fltk3::ALT && sym<0xff00) // find the keycap of this key
+    else if ( fltk3::e_state&fltk3::ALT && sym<0xff00) // find the keycap of this key
       sym = keycode_to_sym( maskedKeyCode, 0, macKeyLookUp[ maskedKeyCode ] );
-    Fl::e_keysym = Fl::e_original_keysym = sym;
+    fltk3::e_keysym = fltk3::e_original_keysym = sym;
     // Handle fltk3::KPEnterKey on regular keyboards and on Powerbooks
     if ( maskedKeyCode==0x4c || maskedKeyCode==0x34) key=0x0d;    
     // Handle the Delete key on the keypad
@@ -1365,18 +1365,18 @@
     // imm:  keycode_function function pointer added to allow us to use different functions
     // imm:  depending on which OS version we are running on (tested and set in fl_open_display)
     static UInt32 deadKeyState = 0; // must be cleared when losing focus
-    Fl::e_length = (*keycode_function)(buffer, 31, kind, keyCode, mods, &deadKeyState, key, sym);
-    Fl::e_text = buffer;
-    buffer[Fl::e_length] = 0; // just in case...
+    fltk3::e_length = (*keycode_function)(buffer, 31, kind, keyCode, mods, &deadKeyState, key, sym);
+    fltk3::e_text = buffer;
+    buffer[fltk3::e_length] = 0; // just in case...
     break;
   case kEventRawKeyModifiersChanged: {
     UInt32 tMods = prevMods ^ mods;
     if ( tMods )
     {
       mods_to_e_keysym( tMods );
-      if ( Fl::e_keysym ) 
+      if ( fltk3::e_keysym ) 
         sendEvent = ( prevMods<mods ) ? fltk3::KEYBOARD : fltk3::KEYUP;
-      Fl::e_length = 0;
+      fltk3::e_length = 0;
       buffer[0] = 0;
       prevMods = mods;
     }
@@ -1384,7 +1384,7 @@
     break; }
   }
   while (window->parent()) window = window->window();
-  if (sendEvent && Fl::handle(sendEvent,window)) {
+  if (sendEvent && fltk3::handle(sendEvent,window)) {
     fl_unlock_function();  
     return noErr; // return noErr if FLTK handled the event
   } else {
@@ -1577,7 +1577,7 @@
 /**
  * smallest x ccordinate in screen space
  */
-int Fl::x() {
+int fltk3::x() {
   BitMap r;
   GetQDGlobalsScreenBits(&r);
   return r.bounds.left;
@@ -1587,7 +1587,7 @@
 /**
  * smallest y ccordinate in screen space
  */
-int Fl::y() {
+int fltk3::y() {
   BitMap r;
   GetQDGlobalsScreenBits(&r);
   return r.bounds.top + 20; // \todo 20 pixel menu bar?
@@ -1597,7 +1597,7 @@
 /**
  * screen width (single monitor!?)
  */
-int Fl::w() {
+int fltk3::w() {
   BitMap r;
   GetQDGlobalsScreenBits(&r);
   return r.bounds.right - r.bounds.left;
@@ -1607,7 +1607,7 @@
 /**
  * screen height (single monitor!?)
  */
-int Fl::h() {
+int fltk3::h() {
   BitMap r;
   GetQDGlobalsScreenBits(&r);
   return r.bounds.bottom - r.bounds.top - 20;
@@ -1617,7 +1617,7 @@
 /**
  * get the current mouse pointer world coordinates
  */
-void Fl::get_mouse(int &x, int &y) 
+void fltk3::get_mouse(int &x, int &y) 
 {
   fl_open_display();
   Point loc; 
@@ -1655,7 +1655,7 @@
  * Handle all clipping and redraw for the given port
  * There are two different callers for this event:
  * 1: the OS can request a redraw and provides all clipping itself
- * 2: Fl::flush() wants all redraws now
+ * 2: fltk3::flush() wants all redraws now
  */    
 void handleUpdateEvent( WindowPtr xid ) 
 {
@@ -1980,25 +1980,25 @@
 static pascal OSErr dndTrackingHandler( DragTrackingMessage msg, WindowPtr w, void *userData, DragReference dragRef )
 {
   fltk3::Window *target = (fltk3::Window*)userData;
-  Fl::first_window(target);
+  fltk3::first_window(target);
   Point mp;
   static int px, py;
   
   fillCurrentDragData(dragRef);
-  Fl::e_length = currDragSize;
-  Fl::e_text = currDragData;
+  fltk3::e_length = currDragSize;
+  fltk3::e_text = currDragData;
   
   switch ( msg )
   {
   case kDragTrackingEnterWindow:
     // check if 'TEXT' is available
     GetDragMouse( dragRef, &mp, 0 );
-    Fl::e_x_root = px = mp.h;
-    Fl::e_y_root = py = mp.v;
-    Fl::e_x = px - target->x();
-    Fl::e_y = py - target->y();
+    fltk3::e_x_root = px = mp.h;
+    fltk3::e_y_root = py = mp.v;
+    fltk3::e_x = px - target->x();
+    fltk3::e_y = py - target->y();
     fl_dnd_target_window = target;
-    if ( Fl::handle( fltk3::DND_ENTER, target ) )
+    if ( fltk3::handle( fltk3::DND_ENTER, target ) )
       fl_cursor( fltk3::CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
     else
       fl_cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
@@ -2008,12 +2008,12 @@
     GetDragMouse( dragRef, &mp, 0 );
     if ( mp.h==px && mp.v==py )
       break;	//+ return previous condition for dnd hiliting
-    Fl::e_x_root = px = mp.h;
-    Fl::e_y_root = py = mp.v;
-    Fl::e_x = px - target->x();
-    Fl::e_y = py - target->y();
+    fltk3::e_x_root = px = mp.h;
+    fltk3::e_y_root = py = mp.v;
+    fltk3::e_x = px - target->x();
+    fltk3::e_y = py - target->y();
     fl_dnd_target_window = target;
-    if ( Fl::handle( fltk3::DND_DRAG, target ) )
+    if ( fltk3::handle( fltk3::DND_DRAG, target ) )
       fl_cursor( fltk3::CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
     else
       fl_cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
@@ -2025,7 +2025,7 @@
     fl_cursor( fltk3::CURSOR_DEFAULT ); //HideDragHilite( dragRef );
     if ( fl_dnd_target_window )
     {
-      Fl::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+      fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
       fl_dnd_target_window = 0;
     }
     breakMacEventLoop();
@@ -2044,33 +2044,33 @@
   OSErr ret;
   
   fltk3::Window *target = fl_dnd_target_window = (fltk3::Window*)userData;
-  Fl::first_window(target);
+  fltk3::first_window(target);
   GetDragMouse( dragRef, &mp, 0 );
-  Fl::e_x_root = mp.h;
-  Fl::e_y_root = mp.v;
-  Fl::e_x = Fl::e_x_root - target->x();
-  Fl::e_y = Fl::e_y_root - target->y();
-  if ( !Fl::handle( fltk3::DND_RELEASE, target ) )
+  fltk3::e_x_root = mp.h;
+  fltk3::e_y_root = mp.v;
+  fltk3::e_x = fltk3::e_x_root - target->x();
+  fltk3::e_y = fltk3::e_y_root - target->y();
+  if ( !fltk3::handle( fltk3::DND_RELEASE, target ) )
     return userCanceledErr;
 
   ret = fillCurrentDragData(dragRef);
   if (ret==userCanceledErr)
     return userCanceledErr;
   
-  Fl::e_length = currDragSize;
-  Fl::e_text = currDragData;
-//  printf("Sending following text to widget %p:\n%s\n", Fl::belowmouse(), Fl::e_text);
-  int old_event = Fl::e_number;
-  Fl::belowmouse()->handle(Fl::e_number = fltk3::PASTE);
-  Fl::e_number = old_event;
+  fltk3::e_length = currDragSize;
+  fltk3::e_text = currDragData;
+//  printf("Sending following text to widget %p:\n%s\n", fltk3::belowmouse(), fltk3::e_text);
+  int old_event = fltk3::e_number;
+  fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE);
+  fltk3::e_number = old_event;
   
   if (currDragData) {
     free(currDragData);
   }
   currDragData = 0L;
   currDragRef = 0;
-  Fl::e_text = 0L;
-  Fl::e_length = 0;
+  fltk3::e_text = 0L;
+  fltk3::e_length = 0;
   fl_dnd_target_window = 0L;
   
   breakMacEventLoop();
@@ -2128,9 +2128,9 @@
       x->wait_for_expose = 0;
       x->next = Fl_X::first; // must be in the list for ::flush()
       Fl_X::first = x;
-      int old_event = Fl::e_number;
-      w->handle(Fl::e_number = fltk3::SHOW);
-      Fl::e_number = old_event;
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = fltk3::SHOW);
+      fltk3::e_number = old_event;
       w->redraw(); // force draw to happen
     }
     fl_show_iconic = 0;
@@ -2179,12 +2179,12 @@
     }
     if (!(w->flags() & fltk3::Widget::FORCE_POSITION)) {
       // use the Carbon functions below for default window positioning
-      w->x(xyPos+Fl::x());
-      w->y(xyPos+Fl::y());
+      w->x(xyPos+fltk3::x());
+      w->y(xyPos+fltk3::y());
       xyPos += 25;
       if (xyPos>200) xyPos = 100;
     } else {
-      if (!Fl::grab()) {
+      if (!fltk3::grab()) {
         xp = xwm; yp = ywm;
         w->x(xp);w->y(yp);
       }
@@ -2311,12 +2311,12 @@
     w->x(rect.left); w->y(rect.top);
     w->w(rect.right-rect.left); w->h(rect.bottom-rect.top);
 
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = fltk3::SHOW);
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW);
+    fltk3::e_number = old_event;
     w->redraw(); // force draw to happen
     
-    if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
+    if (w->modal()) { fltk3::modal_ = w; fl_fix_focus(); }
   }
 }
 
@@ -2372,8 +2372,8 @@
  * make a window visible
  */
 void fltk3::Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(fltk3::NORMAL_LABEL);
     align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
   } else {
@@ -2484,7 +2484,7 @@
   CGContextSaveGState(fl_gc);
   Fl_X::q_fill_context();
 #if defined(USE_CAIRO)
-   if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
+   if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
 #endif
 
   fl_clip_region( 0 );
@@ -2492,7 +2492,7 @@
 
 #if defined(USE_CAIRO)
   // update the cairo_t context
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
 #endif
 }
 
@@ -2541,7 +2541,7 @@
   }
   fl_gc = 0;
 #if defined(USE_CAIRO)
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0); // capture gc changes automatically to update the cairo context adequately
 #endif
 }
 
@@ -2604,7 +2604,7 @@
  * stuff: pointer to selected data
  * size of selected data
  */
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void fltk3::copy(const char *stuff, int len, int clipboard) {
   if (!stuff || len<0) return;
   if (len+1 > fl_selection_buffer_length[clipboard]) {
     delete[] fl_selection_buffer[clipboard];
@@ -2643,7 +2643,7 @@
 }
 
 // Call this when a "paste" operation happens:
-void Fl::paste(fltk3::Widget &receiver, int clipboard) {
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
     if (clipboard) {
 	// see if we own the selection, if not go get it:
 	fl_selection_length[1] = 0;
@@ -2720,13 +2720,13 @@
 	}
 #endif
     }
-    Fl::e_text = fl_selection_buffer[clipboard];
-    Fl::e_length = fl_selection_length[clipboard];
-    if (!Fl::e_text) Fl::e_text = (char *)"";
+    fltk3::e_text = fl_selection_buffer[clipboard];
+    fltk3::e_length = fl_selection_length[clipboard];
+    if (!fltk3::e_text) fltk3::e_text = (char *)"";
     receiver.handle(fltk3::PASTE);
 }
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
    // check, if this timer slot exists already
    for (int i = 0;  i < mac_timer_used;  ++i) {
@@ -2775,13 +2775,13 @@
     }
 }
 
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
     // currently, repeat_timeout does not subtract the trigger time of the previous timer event as it should.
     add_timeout(time, cb, data);
 }
 
-int Fl::has_timeout(Fl_Timeout_Handler cb, void* data)
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
 {
    for (int i = 0;  i < mac_timer_used;  ++i) {
         MacTimeout& t = mac_timers[i];
@@ -2792,7 +2792,7 @@
     return 0;
 }
 
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
 {
    for (int i = 0;  i < mac_timer_used;  ++i) {
         MacTimeout& t = mac_timers[i];

Modified: branches/branch-3.0/src/Fl_own_colormap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_own_colormap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_own_colormap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -37,7 +37,7 @@
 #include <fltk3/run.h>
 #include <fltk3/x.h>
 
-/** \fn Fl::own_colormap()
+/** \fn fltk3::own_colormap()
     Makes FLTK use its own colormap.  This may make FLTK display better
     and will reduce conflicts with other programs that want lots of colors.
     However the colors may flash as you move the cursor between windows.
@@ -48,16 +48,16 @@
 // There is probably something relevant to do on MSWindows 8-bit displays
 // but I don't know what it is
 
-void Fl::own_colormap() {}
+void fltk3::own_colormap() {}
 
 #elif defined(__APPLE__)
 // MacOS X always provides a TrueColor interface...
 
-void Fl::own_colormap() {}
+void fltk3::own_colormap() {}
 #else
 // X version
 
-void Fl::own_colormap() {
+void fltk3::own_colormap() {
   fl_open_display();
 #if USE_COLORMAP
   switch (fl_visual->c_class) {

Modified: branches/branch-3.0/src/Fl_visual.cxx
===================================================================
--- branches/branch-3.0/src/Fl_visual.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_visual.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -31,7 +31,7 @@
 #include <fltk3/run.h>
 #include <fltk3/x.h>
 
-/** \fn  Fl::visual(int flags)
+/** \fn  fltk3::visual(int flags)
     Selects a visual so that your graphics are drawn correctly.  This is
     only allowed before you call show() on any windows.  This does nothing
     if the default visual satisfies the capabilities, or if no visual
@@ -41,23 +41,23 @@
     <P>Only the following combinations do anything useful:
     
     <UL>
-    <LI>Fl::visual(fltk3::RGB)
+    <LI>fltk3::visual(fltk3::RGB)
     <BR>Full/true color (if there are several depths FLTK chooses  the
     largest).  Do this if you use fl_draw_image
     for much better (non-dithered)  output.
     <BR>&nbsp; </LI>
-    <LI>Fl::visual(fltk3::RGB8)
+    <LI>fltk3::visual(fltk3::RGB8)
     <BR>Full color with at least 24 bits of color. fltk3::RGB will
     always  pick this if available, but if not it will happily return a
     less-than-24 bit deep visual.  This call fails if 24 bits are not
     available.
     <BR>&nbsp; </LI>
-    <LI>Fl::visual(fltk3::DOUBLE|fltk3::INDEX)
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::INDEX)
     <BR>Hardware double buffering.  Call this if you are going to use 
     Fl_Double_Window.
     <BR>&nbsp; </LI>
-    <LI>Fl::visual(fltk3::DOUBLE|fltk3::RGB)</LI>
-    <LI>Fl::visual(fltk3::DOUBLE|fltk3::RGB8)
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::RGB)</LI>
+    <LI>fltk3::visual(fltk3::DOUBLE|fltk3::RGB8)
     <BR>Hardware double buffering and full color.
     </UL>
     
@@ -66,7 +66,7 @@
     this returns false (it just won't look as good).
 */
 #ifdef WIN32
-int Fl::visual(int flags) {
+int fltk3::visual(int flags) {
   fl_GetDC(0);
   if (flags & fltk3::DOUBLE) return 0;
   if (!(flags & fltk3::INDEX) &&
@@ -77,7 +77,7 @@
 #elif defined(__APPLE__)
 
 // \todo Mac : need to implement Visual flags
-int Fl::visual(int flags) {
+int fltk3::visual(int flags) {
   (void)flags;
   return 1;
 }
@@ -124,7 +124,7 @@
   return 1;
 }
 
-int Fl::visual(int flags) {
+int fltk3::visual(int flags) {
 #if USE_XDBE == 0
   if (flags & fltk3::DOUBLE) return 0;
 #endif

Modified: branches/branch-3.0/src/Fl_win32.cxx
===================================================================
--- branches/branch-3.0/src/Fl_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -117,7 +117,7 @@
   if (!s_wsock_mod) {
     s_wsock_mod = LoadLibrary(WSCK_DLL_NAME);
     if (s_wsock_mod==NULL)
-      Fl::fatal("FLTK Lib Error: %s file not found! Please check your winsock dll accessibility.\n",WSCK_DLL_NAME);
+      fltk3::fatal("FLTK Lib Error: %s file not found! Please check your winsock dll accessibility.\n",WSCK_DLL_NAME);
     s_wsock_select = (fl_wsk_select_f) GetProcAddress(s_wsock_mod, "select");
     fl_wsk_fd_is_set = (fl_wsk_fd_is_set_f) GetProcAddress(s_wsock_mod, "__WSAFDIsSet");
   }
@@ -144,7 +144,7 @@
   if (!s_imm_module) {
     s_imm_module = LoadLibrary("IMM32.DLL");
     if (!s_imm_module)
-      Fl::fatal("FLTK Lib Error: IMM32.DLL file not found!\n\n"
+      fltk3::fatal("FLTK Lib Error: IMM32.DLL file not found!\n\n"
         "Please check your input method manager library accessibility.");
     flImmGetContext = (flTypeImmGetContext)GetProcAddress(s_imm_module, "ImmGetContext");
     flImmSetCompositionWindow = (flTypeImmSetCompositionWindow)GetProcAddress(s_imm_module, "ImmSetCompositionWindow");
@@ -241,7 +241,7 @@
 // POLLIN, POLLOUT, and POLLERR with conflicting values WRT what we
 // used before (STR #2301).  Therefore we must not use these values
 // for our internal purposes, but use fltk3::READ, fltk3::WRITE, and
-// fltk3::EXCEPT, as defined for use in Fl::add_fd().
+// fltk3::EXCEPT, as defined for use in fltk3::add_fd().
 //
 static int maxfd = 0;
 static fd_set fdsets[3];
@@ -287,7 +287,7 @@
 {
 }
 
-void Fl::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
+void fltk3::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
   remove_fd(n,events);
   int i = nfds++;
   if (i >= fd_array_size) {
@@ -305,11 +305,11 @@
   if (n > maxfd) maxfd = n;
 }
 
-void Fl::add_fd(int fd, void (*cb)(int, void*), void* v) {
-  Fl::add_fd(fd, fltk3::READ, cb, v);
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v) {
+  fltk3::add_fd(fd, fltk3::READ, cb, v);
 }
 
-void Fl::remove_fd(int n, int events) {
+void fltk3::remove_fd(int n, int events) {
   int i,j;
   for (i=j=0; i<nfds; i++) {
     if (fd[i].fd == n) {
@@ -330,17 +330,17 @@
   if (events & fltk3::EXCEPT) FD_CLR(unsigned(n), &fdsets[2]);
 }
 
-void Fl::remove_fd(int n) {
+void fltk3::remove_fd(int n) {
   remove_fd(n, -1);
 }
 
-// these pointers are set by the Fl::lock() function:
+// these pointers are set by the fltk3::lock() function:
 static void nothing() {}
 void (*fl_lock_function)() = nothing;
 void (*fl_unlock_function)() = nothing;
 
 static void* thread_message_;
-void* Fl::thread_message() {
+void* fltk3::thread_message() {
   void* r = thread_message_;
   thread_message_ = 0;
   return r;
@@ -361,9 +361,9 @@
 
   // idle processing
   static char in_idle;
-  if (Fl::idle && !in_idle) {
+  if (fltk3::idle && !in_idle) {
     in_idle = 1;
-    Fl::idle();
+    fltk3::idle();
     in_idle = 0;
   }
   
@@ -393,12 +393,12 @@
     }
   }
 
-  if (Fl::idle || Fl::damage()) 
+  if (fltk3::idle || fltk3::damage()) 
     time_to_wait = 0.0;
 
   // if there are no more windows and this timer is set
   // to FOREVER, continue through or look up indefinitely
-  if (!Fl::first_window() && time_to_wait==1e20)
+  if (!fltk3::first_window() && time_to_wait==1e20)
     time_to_wait = 0.0;
 
   fl_unlock_function();
@@ -417,9 +417,9 @@
       if (fl_msg.message == fl_wake_msg) {
         // Used for awaking wait() from another thread
 	thread_message_ = (void*)fl_msg.wParam;
-        Fl_Awake_Handler func;
+        fltk3::AwakeHandler func;
         void *data;
-        while (Fl::get_awake_handler_(func, data)==0) {
+        while (fltk3::get_awake_handler_(func, data)==0) {
           func(data);
         }
       }
@@ -429,7 +429,7 @@
       have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE);
     }
   }
-  Fl::flush();
+  fltk3::flush();
 
   // This should return 0 if only timer events were handled:
   return 1;
@@ -449,7 +449,7 @@
 
 ////////////////////////////////////////////////////////////////
 
-int Fl::x()
+int fltk3::x()
 {
   RECT r;
 
@@ -457,7 +457,7 @@
   return r.left;
 }
 
-int Fl::y()
+int fltk3::y()
 {
   RECT r;
 
@@ -465,7 +465,7 @@
   return r.top;
 }
 
-int Fl::h()
+int fltk3::h()
 {
   RECT r;
 
@@ -473,7 +473,7 @@
   return r.bottom - r.top;
 }
 
-int Fl::w()
+int fltk3::w()
 {
   RECT r;
 
@@ -481,7 +481,7 @@
   return r.right - r.left;
 }
 
-void Fl::get_mouse(int &x, int &y) {
+void fltk3::get_mouse(int &x, int &y) {
   POINT p;
   GetCursorPos(&p);
   x = p.x;
@@ -543,7 +543,7 @@
 };
 
 // call this when you create a selection:
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void fltk3::copy(const char *stuff, int len, int clipboard) {
   if (!stuff || len<0) return;
 
   // Convert \n -> \r\n (for old apps like Notepad, DOS)
@@ -581,7 +581,7 @@
 }
 
 // Call this when a "paste" operation happens:
-void Fl::paste(fltk3::Widget &receiver, int clipboard) {
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
   if (!clipboard || fl_i_own_selection[clipboard]) {
     // We already have it, do it quickly without window server.
     // Notice that the text is clobbered if set_selection is
@@ -590,41 +590,41 @@
     // Convert \r\n -> \n
     char *i = fl_selection_buffer[clipboard];
     if (i==0L) {
-      Fl::e_text = 0; 
+      fltk3::e_text = 0; 
       return;
     }
-    Fl::e_text = new char[fl_selection_length[clipboard]+1];
-    char *o = Fl::e_text;
+    fltk3::e_text = new char[fl_selection_length[clipboard]+1];
+    char *o = fltk3::e_text;
     while (*i) {
       if ( *i == '\r' && *(i+1) == '\n') i++;
       else *o++ = *i++;
     }
     *o = 0;
-    Fl::e_length = o - Fl::e_text;
+    fltk3::e_length = o - fltk3::e_text;
     receiver.handle(fltk3::PASTE);
-    delete [] Fl::e_text;
-    Fl::e_text = 0;
+    delete [] fltk3::e_text;
+    fltk3::e_text = 0;
   } else {
     if (!OpenClipboard(NULL)) return;
     HANDLE h = GetClipboardData(CF_UNICODETEXT);
     if (h) {
       wchar_t *memLock = (wchar_t*) GlobalLock(h);
       int utf16_len = wcslen(memLock);
-      Fl::e_text = (char*) malloc (utf16_len * 4 + 1);
-      int utf8_len = fl_utf8fromwc(Fl::e_text, utf16_len * 4, memLock, utf16_len);
-      *(Fl::e_text + utf8_len) = 0;
+      fltk3::e_text = (char*) malloc (utf16_len * 4 + 1);
+      int utf8_len = fl_utf8fromwc(fltk3::e_text, utf16_len * 4, memLock, utf16_len);
+      *(fltk3::e_text + utf8_len) = 0;
       LPSTR a,b;
-      a = b = Fl::e_text;
+      a = b = fltk3::e_text;
       while (*a) { // strip the CRLF pairs ($%$#@^)
         if (*a == '\r' && a[1] == '\n') a++;
         else *b++ = *a++;
       }
       *b = 0;
-      Fl::e_length = b - Fl::e_text;
+      fltk3::e_length = b - fltk3::e_text;
       receiver.handle(fltk3::PASTE);
       GlobalUnlock(h);
-      free(Fl::e_text);
-      Fl::e_text = 0;
+      free(fltk3::e_text);
+      fltk3::e_text = 0;
     }
     CloseClipboard();
   }
@@ -656,21 +656,21 @@
 {
   static int px, py, pmx, pmy;
   POINT pt;
-  Fl::e_x = pt.x = (signed short)LOWORD(lParam);
-  Fl::e_y = pt.y = (signed short)HIWORD(lParam);
+  fltk3::e_x = pt.x = (signed short)LOWORD(lParam);
+  fltk3::e_y = pt.y = (signed short)HIWORD(lParam);
   ClientToScreen(fl_xid(window), &pt);
-  Fl::e_x_root = pt.x;
-  Fl::e_y_root = pt.y;
+  fltk3::e_x_root = pt.x;
+  fltk3::e_y_root = pt.y;
 #ifdef USE_CAPTURE_MOUSE_WIN
   fltk3::Window *mouse_window = window;	// save "mouse window"
 #endif
   while (window->parent()) {
-    Fl::e_x += window->x();
-    Fl::e_y += window->y();
+    fltk3::e_x += window->x();
+    fltk3::e_y += window->y();
     window = window->window();
   }
 
-  ulong state = Fl::e_state & 0xff0000; // keep shift key states
+  ulong state = fltk3::e_state & 0xff0000; // keep shift key states
 #if 0
   // mouse event reports some shift flags, perhaps save them?
   if (wParam & MK_SHIFT) state |= fltk3::SHIFT;
@@ -679,36 +679,36 @@
   if (wParam & MK_LBUTTON) state |= fltk3::BUTTON1;
   if (wParam & MK_MBUTTON) state |= fltk3::BUTTON2;
   if (wParam & MK_RBUTTON) state |= fltk3::BUTTON3;
-  Fl::e_state = state;
+  fltk3::e_state = state;
 
   switch (what) {
   case 1: // double-click
-    if (Fl::e_is_click) {Fl::e_clicks++; goto J1;}
+    if (fltk3::e_is_click) {fltk3::e_clicks++; goto J1;}
   case 0: // single-click
-    Fl::e_clicks = 0;
+    fltk3::e_clicks = 0;
   J1:
 #ifdef USE_CAPTURE_MOUSE_WIN
     if (!fl_capture) SetCapture(fl_xid(mouse_window));  // use mouse window
 #else
     if (!fl_capture) SetCapture(fl_xid(window));	// use main window
 #endif
-    Fl::e_keysym = fltk3::MouseButton + button;
-    Fl::e_is_click = 1;
-    px = pmx = Fl::e_x_root; py = pmy = Fl::e_y_root;
-    return Fl::handle(fltk3::PUSH,window);
+    fltk3::e_keysym = fltk3::MouseButton + button;
+    fltk3::e_is_click = 1;
+    px = pmx = fltk3::e_x_root; py = pmy = fltk3::e_y_root;
+    return fltk3::handle(fltk3::PUSH,window);
 
   case 2: // release:
     if (!fl_capture) ReleaseCapture();
-    Fl::e_keysym = fltk3::MouseButton + button;
-    return Fl::handle(fltk3::RELEASE,window);
+    fltk3::e_keysym = fltk3::MouseButton + button;
+    return fltk3::handle(fltk3::RELEASE,window);
 
   case 3: // move:
   default: // avoid compiler warning
     // MSWindows produces extra events even if mouse does not move, ignore em:
-    if (Fl::e_x_root == pmx && Fl::e_y_root == pmy) return 1;
-    pmx = Fl::e_x_root; pmy = Fl::e_y_root;
-    if (abs(Fl::e_x_root-px)>5 || abs(Fl::e_y_root-py)>5) Fl::e_is_click = 0;
-    return Fl::handle(fltk3::MOVE,window);
+    if (fltk3::e_x_root == pmx && fltk3::e_y_root == pmy) return 1;
+    pmx = fltk3::e_x_root; pmy = fltk3::e_y_root;
+    if (abs(fltk3::e_x_root-px)>5 || abs(fltk3::e_y_root-py)>5) fltk3::e_is_click = 0;
+    return fltk3::handle(fltk3::MOVE,window);
 
   }
 }
@@ -790,7 +790,7 @@
 struct Win32Timer
 {
   UINT_PTR handle;
-  Fl_Timeout_Handler callback;
+  fltk3::TimeoutHandler callback;
   void *data;
 };
 static Win32Timer* win32_timers;
@@ -844,10 +844,10 @@
   if (window) switch (uMsg) {
 
   case WM_QUIT: // this should not happen?
-    Fl::fatal("WM_QUIT message");
+    fltk3::fatal("WM_QUIT message");
 
   case WM_CLOSE: // user clicked close box
-    Fl::handle(fltk3::CLOSE, window);
+    fltk3::handle(fltk3::CLOSE, window);
     PostQuitMessage(0);
     return 0;
 
@@ -889,7 +889,7 @@
 
     window->clear_damage((uchar)(window->damage()|fltk3::DAMAGE_EXPOSE));
     // These next two statements should not be here, so that all update
-    // is deferred until Fl::flush() is called during idle.  However WIN32
+    // is deferred until fltk3::flush() is called during idle.  However WIN32
     // apparently is very unhappy if we don't obey it and draw right now.
     // Very annoying!
     fl_GetDC(hWnd); // Make sure we have a DC for this window...
@@ -927,24 +927,24 @@
     if (track_mouse_win == window) { // we left the top level window !
       fltk3::Window *tw = window;
       while (tw->parent()) tw = tw->window(); // find top level window
-      Fl::belowmouse(0);
-      Fl::handle(fltk3::LEAVE, tw);
+      fltk3::belowmouse(0);
+      fltk3::handle(fltk3::LEAVE, tw);
     }
     track_mouse_win = 0; // force TrackMouseEvent() restart
     break;
 
   case WM_SETFOCUS:
-    Fl::handle(fltk3::FOCUS, window);
+    fltk3::handle(fltk3::FOCUS, window);
     break;
 
   case WM_KILLFOCUS:
-    Fl::handle(fltk3::UNFOCUS, window);
-    Fl::flush(); // it never returns to main loop when deactivated...
+    fltk3::handle(fltk3::UNFOCUS, window);
+    fltk3::flush(); // it never returns to main loop when deactivated...
     break;
 
   case WM_SHOWWINDOW:
     if (!window->parent()) {
-      Fl::handle(wParam ? fltk3::SHOW : fltk3::HIDE, window);
+      fltk3::handle(wParam ? fltk3::SHOW : fltk3::HIDE, window);
     }
     break;
 
@@ -964,7 +964,7 @@
       if (GetAsyncKeyState(VK_SHIFT)&~1) state |= fltk3::SHIFT;
       if (GetAsyncKeyState(VK_MENU)) state |= fltk3::ALT;
       if ((GetAsyncKeyState(VK_LWIN)|GetAsyncKeyState(VK_RWIN))&~1) state |= fltk3::META;
-      Fl::e_state = state;
+      fltk3::e_state = state;
       return 0;
     }
     break;
@@ -987,7 +987,7 @@
   case WM_KEYUP:
   case WM_SYSKEYUP:
     // save the keysym until we figure out the characters:
-    Fl::e_keysym = Fl::e_original_keysym = ms2fltk(wParam,lParam&(1<<24));
+    fltk3::e_keysym = fltk3::e_original_keysym = ms2fltk(wParam,lParam&(1<<24));
     // See if TranslateMessage turned it into a WM_*CHAR message:
     if (PeekMessageW(&fl_msg, hWnd, WM_CHAR, WM_SYSDEADCHAR, PM_REMOVE))
     {
@@ -999,7 +999,7 @@
   case WM_SYSDEADCHAR:
   case WM_CHAR:
   case WM_SYSCHAR: {
-    ulong state = Fl::e_state & 0xff000000; // keep the mouse button state
+    ulong state = fltk3::e_state & 0xff000000; // keep the mouse button state
     // if GetKeyState is expensive we might want to comment some of these out:
     if (GetKeyState(VK_SHIFT)&~1) state |= fltk3::SHIFT;
     if (GetKeyState(VK_CAPITAL)) state |= fltk3::CAPS_LOCK;
@@ -1016,62 +1016,62 @@
 	state |= fltk3::META;
     }
     if (GetKeyState(VK_SCROLL)) state |= fltk3::SCROLL_LOCK;
-    Fl::e_state = state;
+    fltk3::e_state = state;
     static char buffer[1024];
     if (uMsg == WM_CHAR || uMsg == WM_SYSCHAR) {
 
       xchar u = (xchar) wParam;
-//    Fl::e_length = fl_unicode2utf(&u, 1, buffer);
-      Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
-      buffer[Fl::e_length] = 0;
+//    fltk3::e_length = fl_unicode2utf(&u, 1, buffer);
+      fltk3::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
+      buffer[fltk3::e_length] = 0;
 
 
-    } else if (Fl::e_keysym >= fltk3::KPKey && Fl::e_keysym <= fltk3::KPLastKey) {
+    } else if (fltk3::e_keysym >= fltk3::KPKey && fltk3::e_keysym <= fltk3::KPLastKey) {
       if (state & fltk3::NUM_LOCK) {
         // Convert to regular keypress...
-	buffer[0] = Fl::e_keysym-fltk3::KPKey;
-	Fl::e_length = 1;
+	buffer[0] = fltk3::e_keysym-fltk3::KPKey;
+	fltk3::e_length = 1;
       } else {
         // Convert to special keypress...
 	buffer[0] = 0;
-	Fl::e_length = 0;
-	switch (Fl::e_keysym) {
+	fltk3::e_length = 0;
+	switch (fltk3::e_keysym) {
 	  case fltk3::KPKey + '0' :
-	    Fl::e_keysym = fltk3::InsertKey;
+	    fltk3::e_keysym = fltk3::InsertKey;
 	    break;
 	  case fltk3::KPKey + '1' :
-	    Fl::e_keysym = fltk3::EndKey;
+	    fltk3::e_keysym = fltk3::EndKey;
 	    break;
 	  case fltk3::KPKey + '2' :
-	    Fl::e_keysym = fltk3::DownKey;
+	    fltk3::e_keysym = fltk3::DownKey;
 	    break;
 	  case fltk3::KPKey + '3' :
-	    Fl::e_keysym = fltk3::PageDownKey;
+	    fltk3::e_keysym = fltk3::PageDownKey;
 	    break;
 	  case fltk3::KPKey + '4' :
-	    Fl::e_keysym = fltk3::LeftKey;
+	    fltk3::e_keysym = fltk3::LeftKey;
 	    break;
 	  case fltk3::KPKey + '6' :
-	    Fl::e_keysym = fltk3::RightKey;
+	    fltk3::e_keysym = fltk3::RightKey;
 	    break;
 	  case fltk3::KPKey + '7' :
-	    Fl::e_keysym = fltk3::HomeKey;
+	    fltk3::e_keysym = fltk3::HomeKey;
 	    break;
 	  case fltk3::KPKey + '8' :
-	    Fl::e_keysym = fltk3::UpKey;
+	    fltk3::e_keysym = fltk3::UpKey;
 	    break;
 	  case fltk3::KPKey + '9' :
-	    Fl::e_keysym = fltk3::PageUpKey;
+	    fltk3::e_keysym = fltk3::PageUpKey;
 	    break;
 	  case fltk3::KPKey + '.' :
-	    Fl::e_keysym = fltk3::DeleteKey;
+	    fltk3::e_keysym = fltk3::DeleteKey;
 	    break;
 	  case fltk3::KPKey + '/' :
 	  case fltk3::KPKey + '*' :
 	  case fltk3::KPKey + '-' :
 	  case fltk3::KPKey + '+' :
-	    buffer[0] = Fl::e_keysym-fltk3::KPKey;
-	    Fl::e_length = 1;
+	    buffer[0] = fltk3::e_keysym-fltk3::KPKey;
+	    fltk3::e_length = 1;
 	    break;
 	}
       }
@@ -1079,27 +1079,27 @@
 #ifdef FLTK_PREVIEW_DEAD_KEYS
       if ((lParam & (1<<24))==0) { // clear if dead key (always?)
         xchar u = (xchar) wParam;
-        Fl::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
-        buffer[Fl::e_length] = 0;
+        fltk3::e_length = fl_utf8fromwc(buffer, 1024, &u, 1);
+        buffer[fltk3::e_length] = 0;
       } else { // set if "extended key" (never printable?)
         buffer[0] = 0;
-        Fl::e_length = 0;
+        fltk3::e_length = 0;
       }
 #else
       buffer[0] = 0;
-      Fl::e_length = 0;
+      fltk3::e_length = 0;
 #endif
     }
-    Fl::e_text = buffer;
+    fltk3::e_text = buffer;
     if (lParam & (1<<31)) { // key up events.
-      if (Fl::handle(fltk3::KEYUP, window)) return 0;
+      if (fltk3::handle(fltk3::KEYUP, window)) return 0;
       break;
     }
     // for (int i = lParam&0xff; i--;)
     while (window->parent()) window = window->window();
-    if (Fl::handle(fltk3::KEYBOARD,window)) {
+    if (fltk3::handle(fltk3::KEYBOARD,window)) {
 	  if (uMsg==WM_DEADCHAR || uMsg==WM_SYSDEADCHAR)
-		Fl::compose_state = 1;
+		fltk3::compose_state = 1;
 	  return 0;
 	}
     break;}
@@ -1107,9 +1107,9 @@
   case WM_MOUSEWHEEL: {
     static int delta = 0; // running total of all motion
     delta += (SHORT)(HIWORD(wParam));
-    Fl::e_dy = -delta / WHEEL_DELTA;
-    delta += Fl::e_dy * WHEEL_DELTA;
-    if (Fl::e_dy) Fl::handle(fltk3::MOUSEWHEEL, window);
+    fltk3::e_dy = -delta / WHEEL_DELTA;
+    delta += fltk3::e_dy * WHEEL_DELTA;
+    if (fltk3::e_dy) fltk3::handle(fltk3::MOUSEWHEEL, window);
     return 0;
   }
 
@@ -1120,9 +1120,9 @@
   case WM_SIZE:
     if (!window->parent()) {
       if (wParam == SIZE_MINIMIZED || wParam == SIZE_MAXHIDE) {
-	Fl::handle(fltk3::HIDE, window);
+	fltk3::handle(fltk3::HIDE, window);
       } else {
-	Fl::handle(fltk3::SHOW, window);
+	fltk3::handle(fltk3::SHOW, window);
 	resize_bug_fix = window;
 	window->size(LOWORD(lParam), HIWORD(lParam));
       }
@@ -1196,7 +1196,7 @@
     return 1;}
 
   default:
-    if (Fl::handle(0,0)) return 0;
+    if (fltk3::handle(0,0)) return 0;
     break;
   }
 
@@ -1286,7 +1286,7 @@
   //Proceed to positioning the window fully inside the screen, if possible
   //Make border's lower right corner visible
   int scr_x, scr_y, scr_w, scr_h;
-  Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
+  fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
   if (scr_x+scr_w < X+W) X = scr_x+scr_w - W;
   if (scr_y+scr_h < Y+H) Y = scr_y+scr_h - H;
   //Make border's upper left corner visible
@@ -1439,7 +1439,7 @@
       w->icon((void *)LoadIcon(NULL, IDI_APPLICATION));
     wcw.hIcon = wcw.hIconSm = (HICON)w->icon();
     wcw.hCursor = fl_default_cursor = LoadCursor(NULL, IDC_ARROW);
-    //uchar r,g,b; Fl::get_color(fltk3::GRAY,r,g,b);
+    //uchar r,g,b; fltk3::get_color(fltk3::GRAY,r,g,b);
     //wc.hbrBackground = (HBRUSH)CreateSolidBrush(RGB(r,g,b));
     wcw.hbrBackground = NULL;
     wcw.lpszMenuName = NULL;
@@ -1499,7 +1499,7 @@
     if (!w->force_position()) {
       xp = yp = CW_USEDEFAULT;
     } else {
-      if (!Fl::grab()) {
+      if (!fltk3::grab()) {
 	xp = xwm; yp = ywm;
         w->x(xp);w->y(yp);
       }
@@ -1514,7 +1514,7 @@
       while (w->parent()) w = w->window();
       parent = fl_xid(w);
       if (!w->visible()) showit = 0;
-    } else if (Fl::grab()) parent = fl_xid(Fl::grab());
+    } else if (fltk3::grab()) parent = fl_xid(fltk3::grab());
   }
 
   Fl_X* x = new Fl_X;
@@ -1555,15 +1555,15 @@
   if (fl_show_iconic) {showit = 0; fl_show_iconic = 0;}
   if (showit) {
     w->set_visible();
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = fltk3::SHOW); // get child windows to appear
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::SHOW); // get child windows to appear
+    fltk3::e_number = old_event;
     w->redraw(); // force draw to happen
   }
   // If we've captured the mouse, we dont want to activate any
   // other windows from the code, or we lose the capture.
   ShowWindow(x->xid, !showit ? SW_SHOWMINNOACTIVE :
-	     (Fl::grab() || (style & WS_POPUP)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
+	     (fltk3::grab() || (style & WS_POPUP)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
 
   // Register all windows for potential drag'n'drop operations
   fl_OleInitialize();
@@ -1577,7 +1577,7 @@
     }
   }
 
-  if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
+  if (w->modal()) {fltk3::modal_ = w; fl_fix_focus();}
   return x;
 }
 
@@ -1597,7 +1597,7 @@
     {
       unsigned int id = wParam - 1;
       if (id < (unsigned int)win32_timer_used && win32_timers[id].handle) {
-        Fl_Timeout_Handler cb   = win32_timers[id].callback;
+        fltk3::TimeoutHandler cb   = win32_timers[id].callback;
         void*              data = win32_timers[id].data;
         delete_timer(win32_timers[id]);
         if (cb) {
@@ -1614,12 +1614,12 @@
   return DefWindowProc(hwnd, msg, wParam, lParam);
 }
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::add_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
   repeat_timeout(time, cb, data);
 }
 
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::repeat_timeout(double time, fltk3::TimeoutHandler cb, void* data)
 {
   int timer_id = -1;
   for (int i = 0;  i < win32_timer_used;  ++i) {
@@ -1669,7 +1669,7 @@
     SetTimer(s_TimerWnd, timer_id + 1, elapsed, NULL);
 }
 
-int Fl::has_timeout(Fl_Timeout_Handler cb, void* data)
+int fltk3::has_timeout(fltk3::TimeoutHandler cb, void* data)
 {
   for (int i = 0;  i < win32_timer_used;  ++i) {
     Win32Timer& t = win32_timers[i];
@@ -1680,7 +1680,7 @@
   return 0;
 }
 
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
+void fltk3::remove_timeout(fltk3::TimeoutHandler cb, void* data)
 {
   int i;
   for (i = 0;  i < win32_timer_used;  ++i) {
@@ -1773,8 +1773,8 @@
 //static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
 
 void fltk3::Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(fltk3::NORMAL_LABEL);
     align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
   } else {
@@ -1839,7 +1839,7 @@
 }
 
 /* Make sure that all allocated fonts are released. This works only if 
-   Fl::run() is allowed to exit by closing all windows. Calling 'exit(int)'
+   fltk3::run() is allowed to exit by closing all windows. Calling 'exit(int)'
    will not automatically free any fonts. */
 void fl_free_fonts(void)
 {
@@ -1974,7 +1974,7 @@
   wh = win->h() + bt + 2 * by;
   Fl_Display_Device::display_device()->set_current(); // make window current
   win->show();
-  Fl::check();
+  fltk3::check();
   win->make_current();
   HDC save_gc = fl_gc;
   fl_gc = GetDC(NULL); // get the screen device context
@@ -2010,7 +2010,7 @@
 {
   Fl_Printer printer;
   o->window()->hide();
-  fltk3::Window *win = Fl::first_window();
+  fltk3::Window *win = fltk3::first_window();
   if(!win) return;
   int w, h;
   if( printer.start_job(1) ) { o->window()->show(); return; }

Modified: branches/branch-3.0/src/Fl_x.cxx
===================================================================
--- branches/branch-3.0/src/Fl_x.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/Fl_x.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -96,7 +96,7 @@
 
 static FD *fd = 0;
 
-void Fl::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
+void fltk3::add_fd(int n, int events, void (*cb)(int, void*), void *v) {
   remove_fd(n,events);
   int i = nfds++;
   if (i >= fd_array_size) {
@@ -134,11 +134,11 @@
 #  endif
 }
 
-void Fl::add_fd(int n, void (*cb)(int, void*), void* v) {
-  Fl::add_fd(n, POLLIN, cb, v);
+void fltk3::add_fd(int n, void (*cb)(int, void*), void* v) {
+  fltk3::add_fd(n, POLLIN, cb, v);
 }
 
-void Fl::remove_fd(int n, int events) {
+void fltk3::remove_fd(int n, int events) {
   int i,j;
 # if !USE_POLL
   maxfd = -1; // recalculate maxfd on the fly
@@ -175,7 +175,7 @@
 #  endif
 }
 
-void Fl::remove_fd(int n) {
+void fltk3::remove_fd(int n) {
   remove_fd(n, -1);
 }
 
@@ -192,16 +192,16 @@
     fl_handle(xevent);
   }
   // we send fltk3::LEAVE only if the mouse did not enter some other window:
-  if (!in_a_window) Fl::handle(fltk3::LEAVE, 0);
+  if (!in_a_window) fltk3::handle(fltk3::LEAVE, 0);
 #if CONSOLIDATE_MOTION
   else if (send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(fltk3::MOVE, fl_xmousewin);
+    fltk3::handle(fltk3::MOVE, fl_xmousewin);
   }
 #endif
 }
 
-// these pointers are set by the Fl::lock() function:
+// these pointers are set by the fltk3::lock() function:
 static void nothing() {}
 void (*fl_lock_function)() = nothing;
 void (*fl_unlock_function)() = nothing;
@@ -343,7 +343,7 @@
 
 extern "C" {
   static int io_error_handler(Display*) {
-    Fl::fatal("X I/O error");
+    fltk3::fatal("X I/O error");
     return 0;
   }
 
@@ -352,7 +352,7 @@
     sprintf(buf1, "XRequest.%d", e->request_code);
     XGetErrorDatabaseText(d,"",buf1,buf1,buf2,128);
     XGetErrorText(d, e->error_code, buf1, 128);
-    Fl::warning("%s: %s 0x%lx", buf2, buf1, e->resourceid);
+    fltk3::warning("%s: %s 0x%lx", buf2, buf1, e->resourceid);
     return 0;
   }
 }
@@ -554,7 +554,7 @@
                   &xim_styles, NULL, NULL);
   } else {
     if (xim_warning)
-      Fl::warning("XOpenIM() failed");
+      fltk3::warning("XOpenIM() failed");
     // if xim_styles is allocated, free it now
     if (xim_styles) XFree(xim_styles);
     return;
@@ -564,7 +564,7 @@
     fl_new_ic();
    } else {
      if (xim_warning)
-       Fl::warning("No XIM style found");
+       fltk3::warning("No XIM style found");
      XCloseIM(fl_xim_im);
      fl_xim_im = NULL;
      // if xim_styles is allocated, free it now
@@ -573,7 +573,7 @@
   }
   if (!fl_xim_ic) {
     if (xim_warning)
-      Fl::warning("XCreateIC() failed");
+      fltk3::warning("XCreateIC() failed");
     XCloseIM(fl_xim_im);
     fl_xim_im = NULL;
   }
@@ -591,7 +591,7 @@
   XSetErrorHandler(xerror_handler);
 
   Display *d = XOpenDisplay(0);
-  if (!d) Fl::fatal("Can't open display: %s",XDisplayName(0));
+  if (!d) fltk3::fatal("Can't open display: %s",XDisplayName(0));
 
   fl_open_display(d);
 }
@@ -629,7 +629,7 @@
   if (sizeof(Atom) < 4)
     atom_bits = sizeof(Atom) * 8;
 
-  Fl::add_fd(ConnectionNumber(d), POLLIN, fd_callback);
+  fltk3::add_fd(ConnectionNumber(d), POLLIN, fd_callback);
 
   fl_screen = DefaultScreen(d);
 
@@ -644,12 +644,12 @@
   fl_init_xim();
 
 #if !USE_COLORMAP
-  Fl::visual(fltk3::RGB);
+  fltk3::visual(fltk3::RGB);
 #endif
 }
 
 void fl_close_display() {
-  Fl::remove_fd(ConnectionNumber(fl_display));
+  fltk3::remove_fd(ConnectionNumber(fl_display));
   XCloseDisplay(fl_display);
 }
 
@@ -685,27 +685,27 @@
   }
 }
 
-int Fl::x() {
+int fltk3::x() {
   if (fl_workarea_xywh[0] < 0) fl_init_workarea();
   return fl_workarea_xywh[0];
 }
 
-int Fl::y() {
+int fltk3::y() {
   if (fl_workarea_xywh[0] < 0) fl_init_workarea();
   return fl_workarea_xywh[1];
 }
 
-int Fl::w() {
+int fltk3::w() {
   if (fl_workarea_xywh[0] < 0) fl_init_workarea();
   return fl_workarea_xywh[2];
 }
 
-int Fl::h() {
+int fltk3::h() {
   if (fl_workarea_xywh[0] < 0) fl_init_workarea();
   return fl_workarea_xywh[3];
 }
 
-void Fl::get_mouse(int &xx, int &yy) {
+void fltk3::get_mouse(int &xx, int &yy) {
   fl_open_display();
   Window root = RootWindow(fl_display, fl_screen);
   Window c; int mx,my,cx,cy; unsigned int mask;
@@ -724,14 +724,14 @@
 char fl_i_own_selection[2] = {0,0};
 
 // Call this when a "paste" operation happens:
-void Fl::paste(fltk3::Widget &receiver, int clipboard) {
+void fltk3::paste(fltk3::Widget &receiver, int clipboard) {
   if (fl_i_own_selection[clipboard]) {
     // We already have it, do it quickly without window server.
     // Notice that the text is clobbered if set_selection is
     // called in response to fltk3::PASTE!
-    Fl::e_text = fl_selection_buffer[clipboard];
-    Fl::e_length = fl_selection_length[clipboard];
-    if (!Fl::e_text) Fl::e_text = (char *)"";
+    fltk3::e_text = fl_selection_buffer[clipboard];
+    fltk3::e_length = fl_selection_length[clipboard];
+    if (!fltk3::e_text) fltk3::e_text = (char *)"";
     receiver.handle(fltk3::PASTE);
     return;
   }
@@ -739,7 +739,7 @@
   fl_selection_requestor = &receiver;
   Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
   XConvertSelection(fl_display, property, TARGETS, property,
-                    fl_xid(Fl::first_window()), fl_event_time);
+                    fl_xid(fltk3::first_window()), fl_event_time);
 }
 
 Window fl_dnd_source_window;
@@ -771,7 +771,7 @@
 ////////////////////////////////////////////////////////////////
 // Code for copying to clipboard and DnD out of the program:
 
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void fltk3::copy(const char *stuff, int len, int clipboard) {
   if (!stuff || len<0) return;
   if (len+1 > fl_selection_buffer_length[clipboard]) {
     delete[] fl_selection_buffer[clipboard];
@@ -791,7 +791,7 @@
 const XEvent* fl_xevent; // the current x event
 ulong fl_event_time; // the last timestamp from an x event
 
-char fl_key_vector[32]; // used by Fl::get_key()
+char fl_key_vector[32]; // used by fltk3::get_key()
 
 // Record event mouse position and state from an XEvent:
 
@@ -802,32 +802,32 @@
 #  if CONSOLIDATE_MOTION
   send_motion = 0;
 #  endif
-  Fl::e_x_root  = fl_xevent->xbutton.x_root;
-  Fl::e_x       = fl_xevent->xbutton.x;
-  Fl::e_y_root  = fl_xevent->xbutton.y_root;
-  Fl::e_y       = fl_xevent->xbutton.y;
-  Fl::e_state   = fl_xevent->xbutton.state << 16;
+  fltk3::e_x_root  = fl_xevent->xbutton.x_root;
+  fltk3::e_x       = fl_xevent->xbutton.x;
+  fltk3::e_y_root  = fl_xevent->xbutton.y_root;
+  fltk3::e_y       = fl_xevent->xbutton.y;
+  fltk3::e_state   = fl_xevent->xbutton.state << 16;
   fl_event_time = fl_xevent->xbutton.time;
 #  ifdef __sgi
   // get the meta key off PC keyboards:
-  if (fl_key_vector[18]&0x18) Fl::e_state |= fltk3::META;
+  if (fl_key_vector[18]&0x18) fltk3::e_state |= fltk3::META;
 #  endif
   // turn off is_click if enough time or mouse movement has passed:
-  if (abs(Fl::e_x_root-px)+abs(Fl::e_y_root-py) > 3 ||
+  if (abs(fltk3::e_x_root-px)+abs(fltk3::e_y_root-py) > 3 ||
       fl_event_time >= ptime+1000)
-    Fl::e_is_click = 0;
+    fltk3::e_is_click = 0;
 }
 
 // if this is same event as last && is_click, increment click count:
 static inline void checkdouble() {
-  if (Fl::e_is_click == Fl::e_keysym)
-    Fl::e_clicks++;
+  if (fltk3::e_is_click == fltk3::e_keysym)
+    fltk3::e_clicks++;
   else {
-    Fl::e_clicks = 0;
-    Fl::e_is_click = Fl::e_keysym;
+    fltk3::e_clicks = 0;
+    fltk3::e_is_click = fltk3::e_keysym;
   }
-  px = Fl::e_x_root;
-  py = Fl::e_y_root;
+  px = fltk3::e_x_root;
+  py = fltk3::e_y_root;
   ptime = fl_event_time;
 }
 
@@ -899,8 +899,8 @@
         }
         fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
 #else
-    if (Fl::first_window() && Fl::first_window()->modal()) {
-      Window x  = fl_xid(Fl::first_window());
+    if (fltk3::first_window() && fltk3::first_window()->modal()) {
+      Window x  = fl_xid(fltk3::first_window());
       if (x != xim_win) {
         xim_win  = x;
         XSetICValues(fl_xim_ic,
@@ -967,7 +967,7 @@
 	XFree(portion);
 	Atom property = xevent.xselection.property;
 	XConvertSelection(fl_display, property, type, property,
-	      fl_xid(Fl::first_window()),
+	      fl_xid(fltk3::first_window()),
 	      fl_event_time);
 	return true;
       }
@@ -989,11 +989,11 @@
       buffer[bytesread] = 0;
       convert_crlf(buffer, bytesread);
     }
-    Fl::e_text = buffer ? (char*)buffer : (char *)"";
-    Fl::e_length = bytesread;
-    int old_event = Fl::e_number;
-    fl_selection_requestor->handle(Fl::e_number = fltk3::PASTE);
-    Fl::e_number = old_event;
+    fltk3::e_text = buffer ? (char*)buffer : (char *)"";
+    fltk3::e_length = bytesread;
+    int old_event = fltk3::e_number;
+    fl_selection_requestor->handle(fltk3::e_number = fltk3::PASTE);
+    fltk3::e_number = old_event;
     // Detect if this paste is due to Xdnd by the property name (I use
     // XA_SECONDARY for that) and send an XdndFinished message. It is not
     // clear if this has to be delayed until now or if it can be done
@@ -1126,26 +1126,26 @@
         fl_dnd_type = fl_dnd_source_types[0];
 
       event = fltk3::DND_ENTER;
-      Fl::e_text = unknown;
-      Fl::e_length = unknown_len;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
       break;
 
     } else if (message == fl_XdndPosition) {
       fl_xmousewin = window;
       in_a_window = true;
       fl_dnd_source_window = data[0];
-      Fl::e_x_root = data[2]>>16;
-      Fl::e_y_root = data[2]&0xFFFF;
+      fltk3::e_x_root = data[2]>>16;
+      fltk3::e_y_root = data[2]&0xFFFF;
       if (window) {
-        Fl::e_x = Fl::e_x_root-window->x();
-        Fl::e_y = Fl::e_y_root-window->y();
+        fltk3::e_x = fltk3::e_x_root-window->x();
+        fltk3::e_y = fltk3::e_y_root-window->y();
       }
       fl_event_time = data[3];
       fl_dnd_source_action = data[4];
       fl_dnd_action = fl_XdndActionCopy;
-      Fl::e_text = unknown;
-      Fl::e_length = unknown_len;
-      int accept = Fl::handle(fltk3::DND_DRAG, window);
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      int accept = fltk3::handle(fltk3::DND_DRAG, window);
       fl_sendClientMessage(data[0], fl_XdndStatus,
                            fl_xevent->xclient.window,
                            accept ? 1 : 0,
@@ -1157,8 +1157,8 @@
     } else if (message == fl_XdndLeave) {
       fl_dnd_source_window = 0; // don't send a finished message to it
       event = fltk3::DND_LEAVE;
-      Fl::e_text = unknown;
-      Fl::e_length = unknown_len;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
       break;
 
     } else if (message == fl_XdndDrop) {
@@ -1167,10 +1167,10 @@
       fl_dnd_source_window = data[0];
       fl_event_time = data[2];
       Window to_window = fl_xevent->xclient.window;
-      Fl::e_text = unknown;
-      Fl::e_length = unknown_len;
-      if (Fl::handle(fltk3::DND_RELEASE, window)) {
-        fl_selection_requestor = Fl::belowmouse();
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      if (fltk3::handle(fltk3::DND_RELEASE, window)) {
+        fl_selection_requestor = fltk3::belowmouse();
         XConvertSelection(fl_display, fl_XdndSelection,
                           fl_dnd_type, XA_SECONDARY,
                           to_window, fl_event_time);
@@ -1196,8 +1196,8 @@
 #  if 0
     // try to keep windows on top even if WM_TRANSIENT_FOR does not work:
     // opaque move/resize window managers do not like this, so I disabled it.
-    if (Fl::first_window()->non_modal() && window != Fl::first_window())
-      Fl::first_window()->show();
+    if (fltk3::first_window()->non_modal() && window != fltk3::first_window())
+      fltk3::first_window()->show();
 #  endif
 
   case GraphicsExpose:
@@ -1258,12 +1258,12 @@
           keysym = XKeycodeToKeysym(fl_display, keycode, 0);
         }
       }
-      // MRS: Can't use Fl::event_state(fltk3::CTRL) since the state is not
+      // MRS: Can't use fltk3::event_state(fltk3::CTRL) since the state is not
       //      set until set_event_xy() is called later...
       if ((xevent.xkey.state & ControlMask) && keysym == '-') buffer[0] = 0x1f; // ^_
       buffer[len] = 0;
-      Fl::e_text = buffer;
-      Fl::e_length = len;
+      fltk3::e_text = buffer;
+      fltk3::e_length = len;
     } else {
       // Stupid X sends fake key-up events when a repeating key is held
       // down, probably due to some back compatibility problem. Fortunately
@@ -1345,7 +1345,7 @@
       // numlock state...
       unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
       if (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= fltk3::KPLastKey))
-        Fl::e_original_keysym = (int)(keysym1 | fltk3::KPKey);
+        fltk3::e_original_keysym = (int)(keysym1 | fltk3::KPKey);
       if ((xevent.xkey.state & Mod2Mask) &&
           (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= fltk3::KPLastKey))) {
         // Store ASCII numeric keypad value...
@@ -1363,28 +1363,28 @@
       }
     } else {
       // Store this so we can later know if the KP was used
-      Fl::e_original_keysym = (int)keysym;
+      fltk3::e_original_keysym = (int)keysym;
     }
-    Fl::e_keysym = int(keysym);
+    fltk3::e_keysym = int(keysym);
 
     // replace XK_ISO_Left_Tab (Shift-TAB) with fltk3::TabKey (modifier flags are set correctly by X11)
-    if (Fl::e_keysym == 0xfe20) Fl::e_keysym = fltk3::TabKey;
+    if (fltk3::e_keysym == 0xfe20) fltk3::e_keysym = fltk3::TabKey;
 
     set_event_xy();
-    Fl::e_is_click = 0;
+    fltk3::e_is_click = 0;
     break;}
 
   case ButtonPress:
-    Fl::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
+    fltk3::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
     set_event_xy();
     if (xevent.xbutton.button == Button4) {
-      Fl::e_dy = -1; // Up
+      fltk3::e_dy = -1; // Up
       event = fltk3::MOUSEWHEEL;
     } else if (xevent.xbutton.button == Button5) {
-      Fl::e_dy = +1; // Down
+      fltk3::e_dy = +1; // Down
       event = fltk3::MOUSEWHEEL;
     } else {
-      Fl::e_state |= (fltk3::BUTTON1 << (xevent.xbutton.button-1));
+      fltk3::e_state |= (fltk3::BUTTON1 << (xevent.xbutton.button-1));
       event = fltk3::PUSH;
       checkdouble();
     }
@@ -1407,9 +1407,9 @@
 #  endif
 
   case ButtonRelease:
-    Fl::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
+    fltk3::e_keysym = fltk3::MouseButton + xevent.xbutton.button;
     set_event_xy();
-    Fl::e_state &= ~(fltk3::BUTTON1 << (xevent.xbutton.button-1));
+    fltk3::e_state &= ~(fltk3::BUTTON1 << (xevent.xbutton.button-1));
     if (xevent.xbutton.button == Button4 ||
         xevent.xbutton.button == Button5) return 0;
     event = fltk3::RELEASE;
@@ -1422,7 +1422,7 @@
     if (xevent.xcrossing.detail == NotifyInferior) break;
     // XInstallColormap(fl_display, Fl_X::i(window)->colormap);
     set_event_xy();
-    Fl::e_state = xevent.xcrossing.state << 16;
+    fltk3::e_state = xevent.xcrossing.state << 16;
     event = fltk3::ENTER;
 
     fl_xmousewin = window;
@@ -1438,7 +1438,7 @@
   case LeaveNotify:
     if (xevent.xcrossing.detail == NotifyInferior) break;
     set_event_xy();
-    Fl::e_state = xevent.xcrossing.state << 16;
+    fltk3::e_state = xevent.xcrossing.state << 16;
     fl_xmousewin = 0;
     in_a_window = false; // make do_queued_events produce fltk3::LEAVE event
     return 0;
@@ -1493,7 +1493,7 @@
     }
   }
 
-  return Fl::handle(event, window);
+  return fltk3::handle(event, window);
 }
 
 ////////////////////////////////////////////////////////////////
@@ -1547,7 +1547,7 @@
   xp->wait_for_expose = 1;
   xp->backbuffer_bad = 1;
   Fl_X::first = xp;
-  if (win->modal()) {Fl::modal_ = win; fl_fix_focus();}
+  if (win->modal()) {fltk3::modal_ = win; fl_fix_focus();}
   return xp;
 }
 
@@ -1579,7 +1579,7 @@
   if (W <= 0) W = 1; // X don't like zero...
   int H = win->h();
   if (H <= 0) H = 1; // X don't like zero...
-  if (!win->parent() && !Fl::grab()) {
+  if (!win->parent() && !fltk3::grab()) {
     // center windows in case window manager does not do anything:
 #ifdef FL_CENTER_WINDOWS
     if (!(win->flags() & fltk3::Widget::FORCE_POSITION)) {
@@ -1591,7 +1591,7 @@
     // force the window to be on-screen.  Usually the X window manager
     // does this, but a few don't, so we do it here for consistency:
     int scr_x, scr_y, scr_w, scr_h;
-    Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
 
     if (win->border()) {
       // ensure border is on screen:
@@ -1634,7 +1634,7 @@
     attr.save_under = 1;
     mask |= CWOverrideRedirect | CWSaveUnder;
   } else attr.override_redirect = 0;
-  if (Fl::grab()) {
+  if (fltk3::grab()) {
     attr.save_under = 1; mask |= CWSaveUnder;
     if (!win->border()) {attr.override_redirect = 1; mask |= CWOverrideRedirect;}
   }
@@ -1729,9 +1729,9 @@
   XMapWindow(fl_display, xp->xid);
   if (showit) {
     win->set_visible();
-    int old_event = Fl::e_number;
-    win->handle(Fl::e_number = fltk3::SHOW); // get child windows to appear
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    win->handle(fltk3::e_number = fltk3::SHOW); // get child windows to appear
+    fltk3::e_number = old_event;
     win->redraw();
   }
 }
@@ -1778,8 +1778,8 @@
       // unfortunately we can't set just one maximum size.  Guess a
       // value for the other one.  Some window managers will make the
       // window fit on screen when maximized, others will put it off screen:
-      if (hints->max_width < hints->min_width) hints->max_width = Fl::w();
-      if (hints->max_height < hints->min_height) hints->max_height = Fl::h();
+      if (hints->max_width < hints->min_width) hints->max_width = fltk3::w();
+      if (hints->max_height < hints->min_height) hints->max_height = fltk3::h();
     }
     if (hints->width_inc && hints->height_inc) hints->flags |= PResizeInc;
     if (w->aspect) {
@@ -1859,8 +1859,8 @@
 static inline int can_boxcheat(uchar b) {return (b==1 || ((b&2) && b<=15));}
 
 void fltk3::Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(fltk3::NORMAL_LABEL);
     align(fltk3::ALIGN_CENTER | fltk3::ALIGN_INSIDE | fltk3::ALIGN_CLIP);
   } else {
@@ -1898,7 +1898,7 @@
 
 #ifdef FLTK_USE_CAIRO
   // update the cairo_t context
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
+  if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current(this);
 #endif
 }
 
@@ -1938,7 +1938,7 @@
     }
   Fl_Display_Device::display_device()->set_current();
   win->show();
-  Fl::check();
+  fltk3::check();
   win->make_current();
   Window root, parent, *children, child_win, from;
   unsigned n;
@@ -1979,7 +1979,7 @@
 {
   Fl_Printer printer;
   o->window()->hide();
-  fltk3::Window *win = Fl::first_window();
+  fltk3::Window *win = fltk3::first_window();
   if(!win) return;
   int w, h;
   if( printer.start_job(1) ) { o->window()->show(); return; }

Modified: branches/branch-3.0/src/cmap.cxx
===================================================================
--- branches/branch-3.0/src/cmap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/cmap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -111,7 +111,7 @@
 // The rest of the colormap is a gray ramp and table, filled in below:
 };
 
-// This is Fl::background from Fl_get_system_colors.cxx, with modifications:
+// This is fltk3::background from Fl_get_system_colors.cxx, with modifications:
 
 namespace fltk3 {
   const unsigned int GRAY_RAMP = 32;

Modified: branches/branch-3.0/src/fl_ask.cxx
===================================================================
--- branches/branch-3.0/src/fl_ask.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_ask.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -204,7 +204,7 @@
   const char *b1,
   const char *b2)
 {
-  Fl::pushed(0); // stop dragging (STR #2159)
+  fltk3::pushed(0); // stop dragging (STR #2159)
 
   avoidRecursion = 1;
 
@@ -246,13 +246,13 @@
   if (!message_form->label() && message_title_default)
     message_form->label(message_title_default);
 
-  // deactivate Fl::grab(), because it is incompatible with modal windows
-  fltk3::Window* g = Fl::grab();
-  if (g) Fl::grab(0);
+  // deactivate fltk3::grab(), because it is incompatible with modal windows
+  fltk3::Window* g = fltk3::grab();
+  if (g) fltk3::grab(0);
   message_form->show();
-  while (message_form->shown()) Fl::wait();
+  while (message_form->shown()) fltk3::wait();
   if (g) // regrab the previous popup menu, if there was one
-    Fl::grab(g);
+    fltk3::grab(g);
   icon->label(prev_icon_label);
   message_form->label(0); // reset window title
 

Modified: branches/branch-3.0/src/fl_boxtype.cxx
===================================================================
--- branches/branch-3.0/src/fl_boxtype.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_boxtype.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -61,7 +61,7 @@
   Determines if the current draw box is active or inactive. 
   If inactive, the box color is changed by the inactive color.
 */
-int Fl::draw_box_active() { return draw_it_active; }
+int fltk3::draw_box_active() { return draw_it_active; }
 
 namespace fltk3 {
   uchar *gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
@@ -251,7 +251,7 @@
 ////////////////////////////////////////////////////////////////
 
 static struct {
-  Fl_Box_Draw_F *f;
+  fltk3::BoxDrawF *f;
   uchar dx, dy, dw, dh;
   int set;
 } fl_box_table[256] = {
@@ -318,7 +318,7 @@
   Returns the X offset for the given boxtype.
   \see box_dy()
 */
-int Fl::box_dx(fltk3::Boxtype t) {return fl_box_table[t].dx;}
+int fltk3::box_dx(fltk3::Boxtype t) {return fl_box_table[t].dx;}
 
 /**
     Returns the Y offset for the given boxtype.
@@ -334,35 +334,35 @@
 
     An example to compute the area inside a widget's box():
     \code
-         int X = yourwidget->x() + Fl::box_dx(yourwidget->box());
-         int Y = yourwidget->y() + Fl::box_dy(yourwidget->box());
-         int W = yourwidget->w() - Fl::box_dw(yourwidget->box());
-         int H = yourwidget->h() - Fl::box_dh(yourwidget->box());
+         int X = yourwidget->x() + fltk3::box_dx(yourwidget->box());
+         int Y = yourwidget->y() + fltk3::box_dy(yourwidget->box());
+         int W = yourwidget->w() - fltk3::box_dw(yourwidget->box());
+         int H = yourwidget->h() - fltk3::box_dh(yourwidget->box());
     \endcode
     These functions are mainly useful in the draw() code 
     for deriving custom widgets, where one wants to avoid drawing 
     over the widget's own border box().
 */
-int Fl::box_dy(fltk3::Boxtype t) {return fl_box_table[t].dy;}
+int fltk3::box_dy(fltk3::Boxtype t) {return fl_box_table[t].dy;}
 
 /**
   Returns the width offset for the given boxtype.
   \see box_dy().
 */
-int Fl::box_dw(fltk3::Boxtype t) {return fl_box_table[t].dw;}
+int fltk3::box_dw(fltk3::Boxtype t) {return fl_box_table[t].dw;}
 
 /**
   Returns the height offset for the given boxtype.
   \see box_dy().
 */
-int Fl::box_dh(fltk3::Boxtype t) {return fl_box_table[t].dh;}
+int fltk3::box_dh(fltk3::Boxtype t) {return fl_box_table[t].dh;}
 
 /**
   Sets the drawing function for a given box type.
   \param[in] t box type
   \param[in] f box drawing function
 */
-void fl_internal_boxtype(fltk3::Boxtype t, Fl_Box_Draw_F* f) {
+void fl_internal_boxtype(fltk3::Boxtype t, fltk3::BoxDrawF* f) {
   if (!fl_box_table[t].set) {
     fl_box_table[t].f   = f;
     fl_box_table[t].set = 1;
@@ -370,11 +370,11 @@
 }
 
 /** Gets the current box drawing function for the specified box type. */
-Fl_Box_Draw_F *Fl::get_boxtype(fltk3::Boxtype t) {
+fltk3::BoxDrawF *fltk3::get_boxtype(fltk3::Boxtype t) {
   return fl_box_table[t].f;
 }
 /** Sets the function to call to draw a specific boxtype. */
-void Fl::set_boxtype(fltk3::Boxtype t, Fl_Box_Draw_F* f,
+void fltk3::set_boxtype(fltk3::Boxtype t, fltk3::BoxDrawF* f,
 		      uchar a, uchar b, uchar c, uchar d) {
   fl_box_table[t].f   = f;
   fl_box_table[t].set = 1;
@@ -384,7 +384,7 @@
   fl_box_table[t].dh  = d;
 }
 /** Copies the from boxtype. */
-void Fl::set_boxtype(fltk3::Boxtype to, fltk3::Boxtype from) {
+void fltk3::set_boxtype(fltk3::Boxtype to, fltk3::Boxtype from) {
   fl_box_table[to] = fl_box_table[from];
 }
 

Modified: branches/branch-3.0/src/fl_color.cxx
===================================================================
--- branches/branch-3.0/src/fl_color.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_color.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -72,7 +72,7 @@
     fl_redmask = 0;
     return;
 #  else
-    Fl::fatal("Requires true color visual");
+    fltk3::fatal("Requires true color visual");
 #  endif
   }
 
@@ -322,7 +322,7 @@
   \param[in] i color index
   \param[in] overlay 0 for normal, 1 for overlay color
 */
-void Fl::free_color(fltk3::Color i, int overlay) {
+void fltk3::free_color(fltk3::Color i, int overlay) {
 #  if HAVE_OVERLAY
 #  else
   if (overlay) return;
@@ -346,7 +346,7 @@
   \param[in] i color index
   \param[in] c color
 */
-void Fl::set_color(fltk3::Color i, unsigned c) {
+void fltk3::set_color(fltk3::Color i, unsigned c) {
   if (fl_cmap[i] != c) {
     free_color(i,0);
 #  if HAVE_OVERLAY
@@ -365,7 +365,7 @@
     in the next 8 bits, and the blue value in bits 8-15.  The lower
     8 bits will always be 0.
 */
-unsigned Fl::get_color(fltk3::Color i) {
+unsigned fltk3::get_color(fltk3::Color i) {
   if (i & 0xffffff00) return (i);
   else return fl_cmap[i];
 }
@@ -374,8 +374,8 @@
     any 8-bit RGB color.  The color is not allocated until fl_color(i)
     is used.
 */
-void Fl::set_color(fltk3::Color i, uchar red, uchar green, uchar blue) {
-  Fl::set_color((fltk3::Color)(i & 255),
+void fltk3::set_color(fltk3::Color i, uchar red, uchar green, uchar blue) {
+  fltk3::set_color((fltk3::Color)(i & 255),
 	((unsigned)red<<24)+((unsigned)green<<16)+((unsigned)blue<<8));
 }
 /**
@@ -386,7 +386,7 @@
 
     See also unsigned get_color(fltk3::Color c)
  */
-void Fl::get_color(fltk3::Color i, uchar &red, uchar &green, uchar &blue) {
+void fltk3::get_color(fltk3::Color i, uchar &red, uchar &green, uchar &blue) {
   unsigned c;
 
   if (i & 0xffffff00) c = (unsigned)i;

Modified: branches/branch-3.0/src/fl_color_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_color_mac.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_color_mac.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -81,7 +81,7 @@
   CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
 }
 
-void Fl::set_color(fltk3::Color i, unsigned c) {
+void fltk3::set_color(fltk3::Color i, unsigned c) {
   if (fl_cmap[i] != c) {
     fl_cmap[i] = c;
   }

Modified: branches/branch-3.0/src/fl_color_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_color_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_color_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -189,12 +189,12 @@
   return brushes[i].brush;
 }
 
-void Fl::free_color(fltk3::Color i, int overlay) {
+void fltk3::free_color(fltk3::Color i, int overlay) {
   if (overlay) return; // do something about GL overlay?
   clear_xmap(fl_xmap[i]);
 }
 
-void Fl::set_color(fltk3::Color i, unsigned c) {
+void fltk3::set_color(fltk3::Color i, unsigned c) {
   if (fl_cmap[i] != c) {
     clear_xmap(fl_xmap[i]);
     fl_cmap[i] = c;

Modified: branches/branch-3.0/src/fl_cursor.cxx
===================================================================
--- branches/branch-3.0/src/fl_cursor.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_cursor.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -44,7 +44,7 @@
   The cursors are defined in the <fltk3/enumerations.h> header file. 
   */
 void fl_cursor(fltk3::Cursor c, fltk3::Color fg, fltk3::Color bg) {
-  if (Fl::first_window()) Fl::first_window()->cursor(c,fg,bg);
+  if (fltk3::first_window()) fltk3::first_window()->cursor(c,fg,bg);
 }
 /** 
     Sets the default window cursor as well as its color.
@@ -315,10 +315,10 @@
     }
     XColor fgc;
     uchar r,g,b;
-    Fl::get_color(fg,r,g,b);
+    fltk3::get_color(fg,r,g,b);
     fgc.red = r<<8; fgc.green = g<<8; fgc.blue = b<<8;
     XColor bgc;
-    Fl::get_color(bg,r,g,b);
+    fltk3::get_color(bg,r,g,b);
     bgc.red = r<<8; bgc.green = g<<8; bgc.blue = b<<8;
     XRecolorCursor(fl_display, xc, &fgc, &bgc);
   }

Modified: branches/branch-3.0/src/fl_dnd_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_dnd_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_dnd_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -90,19 +90,19 @@
     // set e_modifiers here from grfKeyState, set e_x and e_root_x
     // check if FLTK handles this drag and return if it can't (i.e. BMP drag without filename)
     POINT ppt;
-    Fl::e_x_root = ppt.x = pt.x;
-    Fl::e_y_root = ppt.y = pt.y;
+    fltk3::e_x_root = ppt.x = pt.x;
+    fltk3::e_y_root = ppt.y = pt.y;
     HWND hWnd = WindowFromPoint( ppt );
     fltk3::Window *target = fl_find( hWnd );
     if (target) {
-      Fl::e_x = Fl::e_x_root-target->x();
-      Fl::e_y = Fl::e_y_root-target->y();
+      fltk3::e_x = fltk3::e_x_root-target->x();
+      fltk3::e_y = fltk3::e_y_root-target->y();
     }
     fl_dnd_target_window = target;
     px = pt.x; py = pt.y;
     if (fillCurrentDragData(pDataObj)) {
       // FLTK has no mechanism yet for the different drop effects, so we allow move and copy
-      if ( target && Fl::handle( fltk3::DND_ENTER, target ) )
+      if ( target && fltk3::handle( fltk3::DND_ENTER, target ) )
         *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
       else
         *pdwEffect = DROPEFFECT_NONE;
@@ -124,15 +124,15 @@
       return S_OK;
     }
     // set e_modifiers here from grfKeyState, set e_x and e_root_x
-    Fl::e_x_root = pt.x;
-    Fl::e_y_root = pt.y;
+    fltk3::e_x_root = pt.x;
+    fltk3::e_y_root = pt.y;
     if (fl_dnd_target_window) {
-      Fl::e_x = Fl::e_x_root-fl_dnd_target_window->x();
-      Fl::e_y = Fl::e_y_root-fl_dnd_target_window->y();
+      fltk3::e_x = fltk3::e_x_root-fl_dnd_target_window->x();
+      fltk3::e_y = fltk3::e_y_root-fl_dnd_target_window->y();
     }
     if (fillCurrentDragData(0)) {
       // fltk3::Group will change DND_DRAG into DND_ENTER and DND_LEAVE if needed
-      if ( Fl::handle( fltk3::DND_DRAG, fl_dnd_target_window ) )
+      if ( fltk3::handle( fltk3::DND_DRAG, fl_dnd_target_window ) )
         *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
       else
         *pdwEffect = DROPEFFECT_NONE;
@@ -146,7 +146,7 @@
   HRESULT STDMETHODCALLTYPE DragLeave() {
     if ( fl_dnd_target_window && fillCurrentDragData(0))
     {
-      Fl::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
+      fltk3::handle( fltk3::DND_LEAVE, fl_dnd_target_window );
       fl_dnd_target_window = 0;
       clearCurrentDragData();
     }
@@ -157,21 +157,21 @@
       return S_OK;
     fltk3::Window *target = fl_dnd_target_window;
     fl_dnd_target_window = 0;
-    Fl::e_x_root = pt.x;
-    Fl::e_y_root = pt.y;
+    fltk3::e_x_root = pt.x;
+    fltk3::e_y_root = pt.y;
     if (target) {
-      Fl::e_x = Fl::e_x_root-target->x();
-      Fl::e_y = Fl::e_y_root-target->y();
+      fltk3::e_x = fltk3::e_x_root-target->x();
+      fltk3::e_y = fltk3::e_y_root-target->y();
     }
     // tell FLTK that the user released an object on this widget
-    if ( !Fl::handle( fltk3::DND_RELEASE, target ) )
+    if ( !fltk3::handle( fltk3::DND_RELEASE, target ) )
       return S_OK;
 
     fltk3::Widget *w = target;
     while (w->parent()) w = w->window();
     HWND hwnd = fl_xid( (fltk3::Window*)w );
     if (fillCurrentDragData(data)) {
-      int old_event = Fl::e_number;
+      int old_event = fltk3::e_number;
       char *a, *b;
       a = b = currDragData;
       while (*a) { // strip the CRLF pairs
@@ -179,10 +179,10 @@
 	else *b++ = *a++;
       }
       *b = 0;
-      Fl::e_text = currDragData;
-      Fl::e_length = b - currDragData;
-      Fl::belowmouse()->handle(Fl::e_number = fltk3::PASTE); // e_text will be invalid after this call
-      Fl::e_number = old_event;
+      fltk3::e_text = currDragData;
+      fltk3::e_length = b - currDragData;
+      fltk3::belowmouse()->handle(fltk3::e_number = fltk3::PASTE); // e_text will be invalid after this call
+      fltk3::e_number = old_event;
       SetForegroundWindow( hwnd );
       clearCurrentDragData();
       return S_OK;
@@ -291,13 +291,13 @@
          *dst=0;
 
         currDragData = (char*) malloc(nn * 5 + 1);
-//      Fl::e_length = fl_unicode2utf(bu, nn, Fl::e_text);
+//      fltk3::e_length = fl_unicode2utf(bu, nn, fltk3::e_text);
         currDragSize = fl_utf8fromwc(currDragData, (nn*5+1), bu, nn);
         currDragData[currDragSize] = 0;
         free(bu);
 
-//    Fl::belowmouse()->handle(FL_DROP);
-//      free( Fl::e_text );
+//    fltk3::belowmouse()->handle(FL_DROP);
+//      free( fltk3::e_text );
       ReleaseStgMedium( &medium );
       currDragResult = 1;
       return currDragResult;
@@ -523,7 +523,7 @@
 };
 
 
-int Fl::dnd()
+int fltk3::dnd()
 {
   DWORD dropEffect;
   ReleaseCapture();
@@ -538,13 +538,13 @@
   fdo->Release();
   fds->Release();
 
-  fltk3::Widget *w = Fl::pushed();
+  fltk3::Widget *w = fltk3::pushed();
   if ( w )
   {
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = fltk3::RELEASE);
-    Fl::e_number = old_event;
-    Fl::pushed( 0 );
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = fltk3::RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
   }
   if ( ret==DRAGDROP_S_DROP ) return 1; // or DD_S_CANCEL
   return 0;

Modified: branches/branch-3.0/src/fl_dnd_x.cxx
===================================================================
--- branches/branch-3.0/src/fl_dnd_x.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_dnd_x.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -70,7 +70,7 @@
 }
 
 static int grabfunc(int event) {
-  if (event == fltk3::RELEASE) Fl::pushed(0);
+  if (event == fltk3::RELEASE) fltk3::pushed(0);
   return 0;
 }
 
@@ -79,24 +79,24 @@
 // send an event to an fltk window belonging to this program:
 static int local_handle(int event, fltk3::Window* window) {
   fl_local_grab = 0;
-  Fl::e_x = Fl::e_x_root-window->x();
-  Fl::e_y = Fl::e_y_root-window->y();
-  int ret = Fl::handle(event,window);
+  fltk3::e_x = fltk3::e_x_root-window->x();
+  fltk3::e_y = fltk3::e_y_root-window->y();
+  int ret = fltk3::handle(event,window);
   fl_local_grab = grabfunc;
   return ret;
 }
 
-int Fl::dnd() {
-  fltk3::Window *source_fl_win = Fl::first_window();
-  Fl::first_window()->cursor(fltk3::CURSOR_MOVE);
-  Window source_window = fl_xid(Fl::first_window());
+int fltk3::dnd() {
+  fltk3::Window *source_fl_win = fltk3::first_window();
+  fltk3::first_window()->cursor(fltk3::CURSOR_MOVE);
+  Window source_window = fl_xid(fltk3::first_window());
   fl_local_grab = grabfunc;
   Window target_window = 0;
   fltk3::Window* local_window = 0;
   int dndversion = 4; int dest_x, dest_y;
   XSetSelectionOwner(fl_display, fl_XdndSelection, fl_message_window, fl_event_time);
 
-  while (Fl::pushed()) {
+  while (fltk3::pushed()) {
 
     // figure out what window we are pointing at:
     Window new_window = 0; int new_version = 0;
@@ -161,7 +161,7 @@
 			   0, (e_x_root<<16)|e_y_root, fl_event_time,
 			   fl_XdndActionCopy);
     }
-    Fl::wait();
+    fltk3::wait();
   }
 
   if (local_window) {
@@ -180,8 +180,8 @@
     msg.time = fl_event_time+1;
     msg.x = dest_x;
     msg.y = dest_y;
-    msg.x_root = Fl::e_x_root;
-    msg.y_root = Fl::e_y_root;
+    msg.x_root = fltk3::e_x_root;
+    msg.y_root = fltk3::e_y_root;
     msg.state = 0x0;
     msg.button = Button2;
     XSendEvent(fl_display, target_window, False, 0L, (XEvent*)&msg);

Modified: branches/branch-3.0/src/fl_draw_image.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_draw_image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -373,7 +373,7 @@
 
   unsigned int n = pfv->scanline_pad/8;
   if (pfv->scanline_pad & 7 || (n&(n-1)))
-    Fl::fatal("Can't do scanline_pad of %d",pfv->scanline_pad);
+    fltk3::fatal("Can't do scanline_pad of %d",pfv->scanline_pad);
   if (n < sizeof(STORETYPE)) n = sizeof(STORETYPE);
   scanline_add = n-1;
   scanline_mask = -n;
@@ -385,7 +385,7 @@
     return;
   }
   if (!fl_visual->red_mask)
-    Fl::fatal("Can't do %d bits_per_pixel colormap",xi.bits_per_pixel);
+    fltk3::fatal("Can't do %d bits_per_pixel colormap",xi.bits_per_pixel);
 #  endif
 
   // otherwise it is a TrueColor visual:
@@ -422,7 +422,7 @@
       converter = bgr_converter;
       mono_converter = rrr_converter;
     } else {
-      Fl::fatal("Can't do arbitrary 24bit color");
+      fltk3::fatal("Can't do arbitrary 24bit color");
     }
     break;
 
@@ -449,7 +449,7 @@
     break;
 
   default:
-    Fl::fatal("Can't do %d bits_per_pixel",xi.bits_per_pixel);
+    fltk3::fatal("Can't do %d bits_per_pixel",xi.bits_per_pixel);
   }
 
 }

Modified: branches/branch-3.0/src/fl_draw_pixmap.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_pixmap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_draw_pixmap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -238,7 +238,7 @@
 #  endif
 #endif
       transparent_index = ' ';
-      Fl::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
+      fltk3::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
       transparent_c = c;
       p += 4;
       ncolors--;
@@ -320,7 +320,7 @@
       else {
         // assume "None" or "#transparent" for any errors
 	// "bg" should be transparent...
-	Fl::get_color(bg, c[0], c[1], c[2]);
+	fltk3::get_color(bg, c[0], c[1], c[2]);
 #ifdef __APPLE_QUARTZ__
         c[3] = 0;
 #endif

Modified: branches/branch-3.0/src/fl_file_dir.cxx
===================================================================
--- branches/branch-3.0/src/fl_file_dir.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_file_dir.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -142,7 +142,7 @@
   fc->show();
 
   while (fc->shown())
-    Fl::wait();
+    fltk3::wait();
 
   if (fc->value() && relative) {
     fl_filename_relative(retname, sizeof(retname), fc->value());
@@ -183,7 +183,7 @@
   fc->show();
 
   while (fc->shown())
-    Fl::wait();
+    fltk3::wait();
 
   if (fc->value() && relative) {
     fl_filename_relative(retname, sizeof(retname), fc->value());

Modified: branches/branch-3.0/src/fl_font_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_mac.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_font_mac.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -457,7 +457,7 @@
 static CGColorRef flcolortocgcolor(fltk3::Color i)
 {
   uchar r, g, b;
-  Fl::get_color(i, r, g, b);
+  fltk3::get_color(i, r, g, b);
   CGFloat components[4] = {r/255.0f, g/255.0f, b/255.0f, 1.};
   static CGColorSpaceRef cspace = NULL;
   if (cspace == NULL) {

Modified: branches/branch-3.0/src/fl_font_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_font_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -223,11 +223,11 @@
     HWND hWnd = 0;
     if (!gc) { // We have no valid gc, try and obtain one
       // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
-      hWnd = Fl::first_window() ? fl_xid(Fl::first_window()) : NULL;
+      hWnd = fltk3::first_window() ? fl_xid(fltk3::first_window()) : NULL;
       gc = GetDC(hWnd);
     }
     if (!gc)
-	Fl::fatal("Invalid graphic context: fl_width() failed because no valid HDC was found!");
+	fltk3::fatal("Invalid graphic context: fl_width() failed because no valid HDC was found!");
     SelectObject(gc, fl_fontsize->fid);
     for (; i < 0x400; i++) {
       GetTextExtentPoint32W(gc, (WCHAR*)&ii, 1, &s);
@@ -307,7 +307,7 @@
   // See description in fl_width() above for an explanation.
   if (!gc) { // We have no valid gc, try and obtain one
     // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
-    hWnd = Fl::first_window() ? fl_xid(Fl::first_window()) : NULL;
+    hWnd = fltk3::first_window() ? fl_xid(fltk3::first_window()) : NULL;
     gc = GetDC(hWnd);
   }
   if (!gc) goto exit_error; // no valid gc, attempt to use fallback measure

Modified: branches/branch-3.0/src/fl_font_x.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_x.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_font_x.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -29,7 +29,7 @@
 Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name) {
   font = XCreateUtf8FontStruct(fl_display, name);
   if (!font) {
-    Fl::warning("bad font: %s", name);
+    fltk3::warning("bad font: %s", name);
     font = XCreateUtf8FontStruct(fl_display, "fixed");
   }
 #  if HAVE_GL

Modified: branches/branch-3.0/src/fl_font_xft.cxx
===================================================================
--- branches/branch-3.0/src/fl_font_xft.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_font_xft.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -172,7 +172,7 @@
      * by 'I' (italic) 'B' (bold) 'P' (bold italic) or ' ' (regular) modifiers.
      * This gives a fairly limited font selection ability, but is retained for
      * compatibility reasons. If you really need a more complex choice, you are best
-     * calling Fl::set_fonts(*) then selecting the font by font-index rather than by
+     * calling fltk3::set_fonts(*) then selecting the font by font-index rather than by
      * name anyway. Probably.
      * If you want to load a font who's name does actually begin with I, B or P, you
      * MUST use a leading space OR simply use lowercase for the name...
@@ -287,7 +287,7 @@
                         NULL);
       XftPatternDestroy(fnt_pat);
       if (!the_font) {
-        Fl::error("Unable to find fonts. Check your FontConfig configuration.\n");
+        fltk3::error("Unable to find fonts. Check your FontConfig configuration.\n");
         exit(1);
       }
       return the_font;
@@ -607,7 +607,7 @@
   // XftCollorAllocValue returns:
   XftColor color;
   color.pixel = fl_xpixel(Fl_Graphics_Driver::color());
-  uchar r,g,b; Fl::get_color(Fl_Graphics_Driver::color(), r,g,b);
+  uchar r,g,b; fltk3::get_color(Fl_Graphics_Driver::color(), r,g,b);
   color.color.red   = ((int)r)*0x101;
   color.color.green = ((int)g)*0x101;
   color.color.blue  = ((int)b)*0x101;
@@ -652,7 +652,7 @@
   // XftCollorAllocValue returns:
   XftColor color;
   color.pixel = fl_xpixel(driver->color());
-  uchar r,g,b; Fl::get_color(driver->color(), r,g,b);
+  uchar r,g,b; fltk3::get_color(driver->color(), r,g,b);
   color.color.red   = ((int)r)*0x101;
   color.color.green = ((int)g)*0x101;
   color.color.blue  = ((int)b)*0x101;

Modified: branches/branch-3.0/src/fl_gtk.cxx
===================================================================
--- branches/branch-3.0/src/fl_gtk.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_gtk.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -35,11 +35,11 @@
 #include <fltk3/run.h>
 #include <fltk3/draw.h>
 
-extern void fl_internal_boxtype(fltk3::Boxtype, Fl_Box_Draw_F*);
+extern void fl_internal_boxtype(fltk3::Boxtype, fltk3::BoxDrawF*);
 
 
 static void gtk_color(fltk3::Color c) {
-  if (Fl::draw_box_active()) fl_color(c);
+  if (fltk3::draw_box_active()) fl_color(c);
   else fl_color(fltk3::inactive(c));
 }
 

Modified: branches/branch-3.0/src/fl_labeltype.cxx
===================================================================
--- branches/branch-3.0/src/fl_labeltype.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_labeltype.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -58,7 +58,7 @@
 
 #define MAX_LABELTYPE 16
 
-static Fl_Label_Draw_F* table[MAX_LABELTYPE] = {
+static fltk3::LabelDrawF* table[MAX_LABELTYPE] = {
   fl_normal_label,
   fl_no_label,
   fl_normal_label,	// _FL_SHADOW_LABEL,
@@ -72,10 +72,10 @@
   fl_no_label, fl_no_label, fl_no_label
 };
 
-static Fl_Label_Measure_F* measure[MAX_LABELTYPE];
+static fltk3::LabelMeasureF* measure[MAX_LABELTYPE];
 
 /** Sets the functions to call to draw and measure a specific labeltype. */
-void Fl::set_labeltype(fltk3::Labeltype t,Fl_Label_Draw_F* f,Fl_Label_Measure_F*m) 
+void fltk3::set_labeltype(fltk3::Labeltype t,fltk3::LabelDrawF* f,fltk3::LabelMeasureF*m) 
 {
   table[t] = f; measure[t] = m;
 }
@@ -98,7 +98,7 @@
     return;
   }
 
-  Fl_Label_Measure_F* f = ::measure[type]; if (!f) f = fl_normal_measure;
+  fltk3::LabelMeasureF* f = ::measure[type]; if (!f) f = fl_normal_measure;
   f(this, W, H);
 }
 
@@ -106,10 +106,10 @@
     This is the normal call for a widget's draw() method.
  */
 void fltk3::Widget::draw_label() const {
-  int X = x_+Fl::box_dx(box());
-  int W = w_-Fl::box_dw(box());
+  int X = x_+fltk3::box_dx(box());
+  int W = w_-fltk3::box_dw(box());
   if (W > 11 && align()&(fltk3::ALIGN_LEFT|fltk3::ALIGN_RIGHT)) {X += 3; W -= 6;}
-  draw_label(X, y_+Fl::box_dy(box()), W, h_-Fl::box_dh(box()));
+  draw_label(X, y_+fltk3::box_dy(box()), W, h_-fltk3::box_dh(box()));
 }
 
 /** Draws the label in an arbitrary bounding box.

Modified: branches/branch-3.0/src/fl_line_style.cxx
===================================================================
--- branches/branch-3.0/src/fl_line_style.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_line_style.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -39,7 +39,7 @@
 
 // We save the current line width (absolute value) here.
 // This is currently used only for X11 clipping, see src/fl_rect.cxx.
-// FIXME: this would probably better be in class Fl::
+// FIXME: this would probably better be in class fltk3::
 int fl_line_width_ = 0;
 
 #ifdef __APPLE_QUARTZ__
@@ -111,7 +111,7 @@
   LOGBRUSH penbrush = {BS_SOLID,fl_RGB(),0}; // can this be fl_brush()?
   HPEN newpen = ExtCreatePen(s1, width, &penbrush, n, n ? a : 0);
   if (!newpen) {
-    Fl::error("fl_line_style(): Could not create GDI pen object.");
+    fltk3::error("fl_line_style(): Could not create GDI pen object.");
     return;
   }
   HPEN oldpen = (HPEN)SelectObject(fl_gc, newpen);

Modified: branches/branch-3.0/src/fl_plastic.cxx
===================================================================
--- branches/branch-3.0/src/fl_plastic.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_plastic.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -53,8 +53,8 @@
 #ifdef USE_OLD_PLASTIC_COLOR
   return fltk3::color_average((fltk3::Color)gc, bc, 0.75f);
 #else
-  unsigned	grgb = Fl::get_color((fltk3::Color)gc),
-		brgb = Fl::get_color(bc);
+  unsigned	grgb = fltk3::get_color((fltk3::Color)gc),
+		brgb = fltk3::get_color(bc);
   int		red, green, blue, gray;
 
 
@@ -74,7 +74,7 @@
   if (blue > 255)
     blue = 255;
 
-  if (Fl::draw_box_active())
+  if (fltk3::draw_box_active())
     return fltk3::rgb_color(red, green, blue);
   else
     return fltk3::color_average(fltk3::GRAY, fltk3::rgb_color(red, green, blue), 0.75f);

Modified: branches/branch-3.0/src/fl_read_image.cxx
===================================================================
--- branches/branch-3.0/src/fl_read_image.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_read_image.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -142,7 +142,7 @@
       XTranslateCoordinates(fl_display, fl_window,
           RootWindow(fl_display, fl_screen), X, Y, &dx, &dy, &child_win);
       // screen dimensions
-      Fl::screen_xywh(sx, sy, sw, sh, fl_screen);
+      fltk3::screen_xywh(sx, sy, sw, sh, fl_screen);
     }
     if (!win || (dx >= sx && dy >= sy && dx + w <= sw && dy + h <= sh)) {
       // the image is fully contained, we can use the traditional method

Modified: branches/branch-3.0/src/fl_rect.cxx
===================================================================
--- branches/branch-3.0/src/fl_rect.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_rect.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -597,14 +597,14 @@
 #endif
   }
   if (rstackptr < region_stack_max) rstack[++rstackptr] = r;
-  else Fl::warning("fl_push_clip: clip stack overflow!\n");
+  else fltk3::warning("fl_push_clip: clip stack overflow!\n");
   fl_restore_clip();
 }
 
 // make there be no clip (used by fl_begin_offscreen() only!)
 void Fl_Graphics_Driver::push_no_clip() {
   if (rstackptr < region_stack_max) rstack[++rstackptr] = 0;
-  else Fl::warning("fl_push_no_clip: clip stack overflow!\n");
+  else fltk3::warning("fl_push_no_clip: clip stack overflow!\n");
   fl_restore_clip();
 }
 
@@ -613,7 +613,7 @@
   if (rstackptr > 0) {
     Fl_Region oldr = rstack[rstackptr--];
     if (oldr) XDestroyRegion(oldr);
-  } else Fl::warning("fl_pop_clip: clip stack underflow!\n");
+  } else fltk3::warning("fl_pop_clip: clip stack underflow!\n");
   fl_restore_clip();
 }
 

Modified: branches/branch-3.0/src/fl_set_font.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_font.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_set_font.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -40,7 +40,7 @@
   Changes a face.  The string pointer is simply stored,
   the string is not copied, so the string must be in static memory.
 */    
-void Fl::set_font(fltk3::Font fnum, const char* name) {
+void fltk3::set_font(fltk3::Font fnum, const char* name) {
   while (fnum >= table_size) {
     int i = table_size;
     if (!i) {	// don't realloc the built-in table
@@ -82,15 +82,15 @@
   fl_font(-1, 0);
 }
 /** Copies one face to another. */
-void Fl::set_font(fltk3::Font fnum, fltk3::Font from) {
-  Fl::set_font(fnum, get_font(from));
+void fltk3::set_font(fltk3::Font fnum, fltk3::Font from) {
+  fltk3::set_font(fnum, get_font(from));
 }
 /**
     Gets the string for this face.  This string is different for each
     face. Under X this value is passed to XListFonts to get all the sizes
     of this face.
 */
-const char* Fl::get_font(fltk3::Font fnum) {return fl_fonts[fnum].name;}
+const char* fltk3::get_font(fltk3::Font fnum) {return fl_fonts[fnum].name;}
 
 //
 // End of "$Id$".

Modified: branches/branch-3.0/src/fl_set_fonts_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_fonts_mac.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_set_fonts_mac.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -41,7 +41,7 @@
 #define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(fltk3::Font fnum, int* ap) {
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
   Fl_Fontdesc *f = fl_fonts + fnum;
   if (!f->fontname[0]) {
     const char* p = f->name;
@@ -65,7 +65,7 @@
 
 static int fl_free_font = fltk3::FREE_FONT;
 
-fltk3::Font Fl::set_fonts(const char* xstarname) {
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
 #pragma unused ( xstarname )
 if (fl_free_font > fltk3::FREE_FONT) return (fltk3::Font)fl_free_font; // if already called
 
@@ -96,7 +96,7 @@
   CFRelease(arrayref);
   qsort(tabfontnames, count, sizeof(char*), name_compare);
   for (i = 0; i < count; i++) {
-    Fl::set_font((fltk3::Font)(fl_free_font++), tabfontnames[i]);
+    fltk3::set_font((fltk3::Font)(fl_free_font++), tabfontnames[i]);
     }
   delete[] tabfontnames;
   return (fltk3::Font)fl_free_font;
@@ -133,7 +133,7 @@
       oName[511] = 0;
     else
       oName[actualLength] = 0;
-	Fl::set_font((fltk3::Font)(fl_free_font++), strdup(oName));
+	fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(oName));
 //	free(oName);
   }
   free(oFontIDs);
@@ -146,7 +146,7 @@
 }
 
 static int array[128];
-int Fl::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
   Fl_Fontdesc *s = fl_fonts+fnum;
   if (!s->name) s = fl_fonts; // empty slot in table, use entry 0
   int cnt = 0;

Modified: branches/branch-3.0/src/fl_set_fonts_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_fonts_win32.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_set_fonts_win32.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -41,7 +41,7 @@
 #define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(fltk3::Font fnum, int* ap) {
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
   Fl_Fontdesc *f = fl_fonts + fnum;
   if (!f->fontname[0]) {
     const char* p = f->name;
@@ -78,20 +78,20 @@
   dstlen = fl_utf8fromwc(n, dstlen, (xchar*)lpelf->lfFaceName, l); // convert the string
   n[dstlen] = 0;
   for (int i=0; i<fltk3::FREE_FONT; i++) // skip if one of our built-in fonts
-	  if (!strcmp(Fl::get_font_name((fltk3::Font)i),n)) {free(n);return 1;}
+	  if (!strcmp(fltk3::get_font_name((fltk3::Font)i),n)) {free(n);return 1;}
   char buffer[LF_FACESIZE + 1];
   strcpy(buffer+1, n);
-  buffer[0] = ' '; Fl::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  buffer[0] = ' '; fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
   if (lpelf->lfWeight <= 400)
-    buffer[0] = 'B', Fl::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
-  buffer[0] = 'I'; Fl::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+    buffer[0] = 'B', fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+  buffer[0] = 'I'; fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
   if (lpelf->lfWeight <= 400)
-    buffer[0] = 'P', Fl::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
+    buffer[0] = 'P', fltk3::set_font((fltk3::Font)(fl_free_font++), strdup(buffer));
   free(n);
   return 1;
 } /* enumcbw */
 
-fltk3::Font Fl::set_fonts(const char* xstarname) {
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
   if (fl_free_font == fltk3::FREE_FONT) {// if not already been called
     if (!fl_gc) fl_GetDC(0);
 
@@ -142,7 +142,7 @@
 
 
 int
-Fl::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
   nbSize = 0;
   Fl_Fontdesc *s = fl_fonts+fnum;
   if (!s->name) s = fl_fonts; // empty slot in table, use entry 0

Modified: branches/branch-3.0/src/fl_set_fonts_x.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_fonts_x.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_set_fonts_x.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -49,7 +49,7 @@
 // By default fl_set_fonts() only does iso8859-1 encoded fonts.  You can
 // do all normal X fonts by passing "-*" or every possible font with "*".
 
-// Fl::set_font will take strings other than the ones this stores
+// fltk3::set_font will take strings other than the ones this stores
 // and can identify any font on X that way.  You may want to write your
 // own system of font management and not use this code.
 
@@ -88,7 +88,7 @@
 #define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
 
 // turn a stored (with *'s) X font name into a pretty name:
-const char* Fl::get_font_name(fltk3::Font fnum, int* ap) {
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
   Fl_Fontdesc *f = fl_fonts + fnum;
   if (!f->fontname[0]) {
     int type = 0;
@@ -259,7 +259,7 @@
 
 static unsigned int fl_free_font = fltk3::FREE_FONT;
 
-fltk3::Font Fl::set_fonts(const char* xstarname) {
+fltk3::Font fltk3::set_fonts(const char* xstarname) {
   if (fl_free_font > (unsigned)fltk3::FREE_FONT) // already been here
     return (fltk3::Font)fl_free_font;
   fl_open_display();
@@ -298,7 +298,7 @@
       } else */{
 	j = fl_free_font++;
 	if (p == canon) p = strdup(p); else used_xlist = 1;
-	Fl::set_font((fltk3::Font)j, p);
+	fltk3::set_font((fltk3::Font)j, p);
 	break;
       }
     }
@@ -312,7 +312,7 @@
   return (fltk3::Font)fl_free_font;
 }
 
-int Fl::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
   Fl_Fontdesc *s = fl_fonts+fnum;
   if (!s->name) s = fl_fonts; // empty slot in table, use entry 0
   if (!s->xlist) {

Modified: branches/branch-3.0/src/fl_set_fonts_xft.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_fonts_xft.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_set_fonts_xft.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -39,7 +39,7 @@
 #define ENDOFBUFFER 127 // sizeof(fltk3::Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(fltk3::Font fnum, int* ap) {
+const char* fltk3::get_font_name(fltk3::Font fnum, int* ap) {
   Fl_Fontdesc *f = fl_fonts + fnum;
   if (!f->fontname[0]) {
     const char* p = f->name;
@@ -207,7 +207,7 @@
 // Also, for now I'm ignoring the "pattern_name" and just getting everything...
 // AND I don't try and skip the fonts we've already loaded in the defaults.
 // Blimey! What a hack!
-fltk3::Font Fl::set_fonts(const char* pattern_name)
+fltk3::Font fltk3::set_fonts(const char* pattern_name)
 {
   FcFontSet  *fnt_set;     // Will hold the list of fonts we find
   FcPattern   *fnt_pattern; // Holds the generic "match all names" pattern
@@ -325,7 +325,7 @@
         // NOTE: This just adds on AFTER the default fonts - no attempt is made
         // to identify already loaded fonts. Is this bad?
         stored_name = strdup(xft_name);
-        Fl::set_font((fltk3::Font)(j + fltk3::FREE_FONT), stored_name);
+        fltk3::set_font((fltk3::Font)(j + fltk3::FREE_FONT), stored_name);
         fl_free_font ++;
         
         free(full_list[j]); // release that name from our internal array
@@ -350,7 +350,7 @@
 // Return all the point sizes supported by this font:
 // Suprisingly enough Xft works exactly like fltk does and returns
 // the same list. Except there is no way to tell if the font is scalable.
-int Fl::get_font_sizes(fltk3::Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(fltk3::Font fnum, int*& sizep) {
   Fl_Fontdesc *s = fl_fonts+fnum;
   if (!s->name) s = fl_fonts; // empty slot in table, use entry 0
 

Modified: branches/branch-3.0/src/fl_shortcut.cxx
===================================================================
--- branches/branch-3.0/src/fl_shortcut.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_shortcut.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -36,7 +36,7 @@
 // Only fltk3::META, fltk3::ALT, fltk3::SHIFT, and fltk3::CTRL must be "off".  A
 // zero in the other shift flags indicates "don't care".
 //
-// It also checks against the first character of Fl::event_text(),
+// It also checks against the first character of fltk3::event_text(),
 // and zero for fltk3::SHIFT means "don't care".
 // This allows punctuation shortcuts like "#" to work (rather than
 // calling it "shift+3" on a US keyboard)
@@ -59,7 +59,7 @@
 
   \return non-zero if there is a match.
 */
-int Fl::test_shortcut(unsigned int shortcut) {
+int fltk3::test_shortcut(unsigned int shortcut) {
   if (!shortcut) return 0;
 
   unsigned int v = shortcut & fltk3::KEY_MASK;
@@ -67,7 +67,7 @@
     shortcut |= fltk3::SHIFT;
   }
 
-  int shift = Fl::event_state();
+  int shift = fltk3::event_state();
   // see if any required shift flags are off:
   if ((shortcut&shift) != (shortcut&0x7fff0000)) return 0;
   // record shift flags that are wrong:
@@ -78,10 +78,10 @@
   unsigned int key = shortcut & fltk3::KEY_MASK;
 
   // if shift is also correct, check for exactly equal keysyms:
-  if (!(mismatch&(fltk3::SHIFT)) && key == (unsigned)Fl::event_key()) return 1;
+  if (!(mismatch&(fltk3::SHIFT)) && key == (unsigned)fltk3::event_key()) return 1;
 
   // try matching utf8, ignore shift:
-  unsigned int firstChar = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0);
+  unsigned int firstChar = fl_utf8decode(fltk3::event_text(), fltk3::event_text()+fltk3::event_length(), 0);
   if ( ! (fltk3::CAPS_LOCK&shift) && key==firstChar) return 1;
 
   // kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'):
@@ -326,8 +326,8 @@
   \p t (usually a widget's label or menu text) is searched for a '&x'
   shortcut, and if found, this is compared with the entered key value.
 
-  Fl::event_text() is used to get the entered key value.
-  Fl::event_state() is used to get the Alt modifier, if \p require_alt
+  fltk3::event_text() is used to get the entered key value.
+  fltk3::event_state() is used to get the Alt modifier, if \p require_alt
   is true.
 
   \param t text or label to search for '&x' shortcut.
@@ -341,13 +341,13 @@
 int fltk3::Widget::test_shortcut(const char *t, const bool require_alt) {
   if (!t) return 0;
   // for menubars etc. shortcuts must work only if the Alt modifier is pressed
-  if (require_alt && Fl::event_state(fltk3::ALT)==0) return 0;
-  unsigned int c = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0);
+  if (require_alt && fltk3::event_state(fltk3::ALT)==0) return 0;
+  unsigned int c = fl_utf8decode(fltk3::event_text(), fltk3::event_text()+fltk3::event_length(), 0);
 #ifdef __APPLE__
   // this line makes underline shortcuts work the same way they do on MSWindow
   // and Linux. 
-  if (c && Fl::event_state(fltk3::ALT)) 
-    c = Fl::event_key();
+  if (c && fltk3::event_state(fltk3::ALT)) 
+    c = fltk3::event_key();
 #endif
   if (!c) return 0;
   unsigned int ls = label_shortcut(t);
@@ -355,7 +355,7 @@
     return 1;
 #ifdef __APPLE__
   // On OS X, we need to simulate the upper case keystroke as well
-  if (Fl::event_state(fltk3::ALT) && c<128 && isalpha(c) && (unsigned)toupper(c)==ls)
+  if (fltk3::event_state(fltk3::ALT) && c<128 && isalpha(c) && (unsigned)toupper(c)==ls)
     return 1;
 #endif
   return 0;
@@ -368,7 +368,7 @@
   The widget's label is searched for a '&x'
   shortcut, and if found, this is compared with the entered key value.
 
-  Fl::event_text() is used to get the entered key value.
+  fltk3::event_text() is used to get the entered key value.
 
   \return true, if the entered text matches the widget's'&x' shortcut,
 	  false (0) otherwise.

Modified: branches/branch-3.0/src/fl_show_colormap.cxx
===================================================================
--- branches/branch-3.0/src/fl_show_colormap.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_show_colormap.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -86,9 +86,9 @@
   switch (e) {
   case fltk3::PUSH:
   case fltk3::DRAG: {
-    int X = (Fl::event_x_root() - x() - BORDER);
+    int X = (fltk3::event_x_root() - x() - BORDER);
     if (X >= 0) X = X/BOXSIZE;
-    int Y = (Fl::event_y_root() - y() - BORDER);
+    int Y = (fltk3::event_y_root() - y() - BORDER);
     if (Y >= 0) Y = Y/BOXSIZE;
     if (X >= 0 && X < 8 && Y >= 0 && Y < 32)
       c = 8*Y + X;
@@ -99,7 +99,7 @@
     done = 1;
     return 1;
   case fltk3::KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
     case fltk3::UpKey: if (c > 7) c -= 8; break;
     case fltk3::DownKey: if (c < 256-8) c += 8; break;
     case fltk3::LeftKey: if (c > 0) c--; break;
@@ -120,7 +120,7 @@
     int px = x();
     int py = y();
     int scr_x, scr_y, scr_w, scr_h;
-    Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
     if (px < scr_x) px = scr_x;
     if (px+bx+BOXSIZE+BORDER >= scr_x+scr_w) px = scr_x+scr_w-bx-BOXSIZE-BORDER;
     if (py < scr_y) py = scr_y;
@@ -139,16 +139,16 @@
 #endif
 fltk3::Color ColorMenu::run() {
   if (which < 0 || which > 255) {
-    position(Fl::event_x_root()-w()/2, Fl::event_y_root()-y()/2);
+    position(fltk3::event_x_root()-w()/2, fltk3::event_y_root()-y()/2);
   } else {
-    position(Fl::event_x_root()-(initial%8)*BOXSIZE-BOXSIZE/2-BORDER,
-	     Fl::event_y_root()-(initial/8)*BOXSIZE-BOXSIZE/2-BORDER);
+    position(fltk3::event_x_root()-(initial%8)*BOXSIZE-BOXSIZE/2-BORDER,
+	     fltk3::event_y_root()-(initial/8)*BOXSIZE-BOXSIZE/2-BORDER);
   }
   show();
-  Fl::grab(*this);
+  fltk3::grab(*this);
   done = 0;
-  while (!done) Fl::wait();
-  Fl::grab(0);
+  while (!done) fltk3::wait();
+  fltk3::grab(0);
   return which;
 }
 

Modified: branches/branch-3.0/src/fl_vertex.cxx
===================================================================
--- branches/branch-3.0/src/fl_vertex.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/fl_vertex.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -46,14 +46,14 @@
 
 void Fl_Graphics_Driver::push_matrix() {
   if (sptr==matrix_stack_size)
-    Fl::error("fl_push_matrix(): matrix stack overflow.");
+    fltk3::error("fl_push_matrix(): matrix stack overflow.");
   else
     stack[sptr++] = m;
 }
 
 void Fl_Graphics_Driver::pop_matrix() {
   if (sptr==0)
-    Fl::error("fl_pop_matrix(): matrix stack underflow.");
+    fltk3::error("fl_pop_matrix(): matrix stack underflow.");
   else 
     m = stack[--sptr];
 }

Modified: branches/branch-3.0/src/forms_compatability.cxx
===================================================================
--- branches/branch-3.0/src/forms_compatability.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/forms_compatability.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -79,7 +79,7 @@
   int i,j;
   for (i=0; i<=*argc; i++) initargv[i] = argv[i];
   for (i=j=1; i<*argc; ) {
-    if (Fl::arg(*argc,argv,i));
+    if (fltk3::arg(*argc,argv,i));
     else argv[j++] = argv[i++];
   }
   argv[j] = 0;
@@ -99,7 +99,7 @@
 
   if (place & FL_PLACE_CENTER) {
     int scr_x, scr_y, scr_w, scr_h;
-    Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h);
+    fltk3::screen_xywh(scr_x, scr_y, scr_w, scr_h);
     f->position(scr_x+(scr_w-f->w())/2, scr_y+(scr_h-f->h())/2);
   }
 
@@ -108,8 +108,8 @@
 
   if (place & (FL_PLACE_POSITION | FL_PLACE_GEOMETRY))
     f->position(
-      (f->x() < 0) ? Fl::w()-f->w()+f->x()-1 : f->x(),
-      (f->y() < 0) ? Fl::h()-f->h()+f->y()-1 : f->y());
+      (f->x() < 0) ? fltk3::w()-f->w()+f->x()-1 : f->x(),
+      (f->y() < 0) ? fltk3::h()-f->h()+f->y()-1 : f->y());
 
 // if (place & FL_PLACE_ASPECT) {
 // this is not yet implemented
@@ -127,13 +127,13 @@
 
 fltk3::Widget *fl_do_forms(void) {
   fltk3::Widget *obj;
-  while (!(obj = Fl::readqueue())) if (!Fl::wait()) exit(0);
+  while (!(obj = fltk3::readqueue())) if (!fltk3::wait()) exit(0);
   return obj;
 }
 
 fltk3::Widget *fl_check_forms() {
-  Fl::check();
-  return Fl::readqueue();
+  fltk3::check();
+  return fltk3::readqueue();
 }
 
 void fl_set_graphics_mode(int /*r*/,int /*d*/) {}

Modified: branches/branch-3.0/src/forms_free.cxx
===================================================================
--- branches/branch-3.0/src/forms_free.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/forms_free.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -35,10 +35,10 @@
 
 void Fl_Free::step(void *v) {
   Fl_Free *f = (Fl_Free *)v;
-  int old_event = Fl::e_number;
-  f->handle(Fl::e_number == FL_STEP);
-  Fl::e_number = old_event;
-  Fl::add_timeout(.01,step,v);
+  int old_event = fltk3::e_number;
+  f->handle(fltk3::e_number == FL_STEP);
+  fltk3::e_number = old_event;
+  fltk3::add_timeout(.01,step,v);
 }
 
 /**
@@ -78,21 +78,21 @@
   hfunc = hdl;
   if (t == FL_SLEEPING_FREE) set_flag(INACTIVE);
   if (t == FL_CONTINUOUS_FREE || t == FL_ALL_FREE)
-    Fl::add_timeout(.01,step,this);
+    fltk3::add_timeout(.01,step,this);
 }
 
 /**
   The destructor will call the handle function with the event FL_FREE_MEM.
 */
 Fl_Free::~Fl_Free() {
-  Fl::remove_timeout(step,this);
+  fltk3::remove_timeout(step,this);
   hfunc(this,FL_FREEMEM,0,0,0);
 }
 
 void Fl_Free::draw() {hfunc(this,FL_DRAW,0,0,0);}
 
 int Fl_Free::handle(int e) {
-  char key = Fl::event_key();
+  char key = fltk3::event_key();
   switch (e) {
   case fltk3::FOCUS:
     if (type()!=FL_INPUT_FREE && type()!=FL_ALL_FREE) return 0;
@@ -100,12 +100,12 @@
   case fltk3::PUSH:
   case fltk3::DRAG:
   case fltk3::RELEASE:
-    key = 4-Fl::event_button();
+    key = 4-fltk3::event_button();
     break;
   case fltk3::SHORTCUT:
     return 0;
   }
-  if (hfunc(this, e, float(Fl::event_x()), float(Fl::event_y()), key)) do_callback();
+  if (hfunc(this, e, float(fltk3::event_x()), float(fltk3::event_y()), key)) do_callback();
   return 1;
 }
 

Modified: branches/branch-3.0/src/forms_timer.cxx
===================================================================
--- branches/branch-3.0/src/forms_timer.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/forms_timer.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -27,7 +27,7 @@
 
 // Emulate the Forms Timer object
 // You don't want to use this if you just want a timeout, call
-// Fl::add_timeout directly!
+// fltk3::add_timeout directly!
 
 #include <fltk3/run.h>
 #include <fltk3/Timer.h>
@@ -111,13 +111,13 @@
       delay = 0;
     } else {
       redraw();
-      Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+      fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
     }
     set_changed();
     do_callback();
   } else {
     if (type() == FL_VALUE_TIMER) redraw();
-    Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+    fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
   }
 }
 
@@ -130,7 +130,7 @@
  Destroys the timer and removes the timeout.
 */
 Fl_Timer::~Fl_Timer() {
-  Fl::remove_timeout(stepcb, this);
+  fltk3::remove_timeout(stepcb, this);
 }
 
 /**
@@ -163,8 +163,8 @@
   on = (d > 0.0);
   fl_gettime(&(lastsec), &(lastusec));
   if (type() != FL_HIDDEN_TIMER) redraw();
-  Fl::remove_timeout(stepcb, this);
-  if (on) Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+  fltk3::remove_timeout(stepcb, this);
+  if (on) fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
 }
 
 /** Gets or sets whether the timer is suspended.*/
@@ -173,11 +173,11 @@
     if (on) return;
     on = (delay > 0.0);
     fl_gettime(&(lastsec), &(lastusec));
-    if (on) Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
+    if (on) fltk3::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
   } else {
     if (!on) return;
     on = 0;
-    Fl::remove_timeout(stepcb, this);
+    fltk3::remove_timeout(stepcb, this);
   }
 }
 

Modified: branches/branch-3.0/src/gl_draw.cxx
===================================================================
--- branches/branch-3.0/src/gl_draw.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/gl_draw.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -346,7 +346,7 @@
 #endif
 #endif
   uchar red, green, blue;
-  Fl::get_color(i, red, green, blue);
+  fltk3::get_color(i, red, green, blue);
   glColor3ub(red, green, blue);
 }
 

Modified: branches/branch-3.0/src/gl_start.cxx
===================================================================
--- branches/branch-3.0/src/gl_start.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/gl_start.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -66,7 +66,7 @@
 #if defined(USE_X11)
     context = fl_create_gl_context(fl_visual);
 #elif defined(WIN32)
-    if (!gl_choice) Fl::gl_visual(0);
+    if (!gl_choice) fltk3::gl_visual(0);
     context = fl_create_gl_context(fltk3::Window::current(), gl_choice);
 #elif defined(__APPLE_QUARTZ__)
     // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
@@ -109,7 +109,7 @@
 #endif
 }
 
-int Fl::gl_visual(int mode, int *alist) {
+int fltk3::gl_visual(int mode, int *alist) {
   Fl_Gl_Choice *c = Fl_Gl_Choice::find(mode,alist);
   if (!c) return 0;
 #if defined(USE_X11)

Modified: branches/branch-3.0/src/glut_compatability.cxx
===================================================================
--- branches/branch-3.0/src/glut_compatability.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/glut_compatability.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -87,14 +87,14 @@
 
 int Fl_Glut_Window::handle(int event) {
   make_current();
-  int ex = Fl::event_x();
-  int ey = Fl::event_y();
+  int ex = fltk3::event_x();
+  int ey = fltk3::event_y();
   int button;
   switch (event) {
 
   case fltk3::PUSH:
-    if (keyboard || special) Fl::focus(this);
-    button = Fl::event_button()-1;
+    if (keyboard || special) fltk3::focus(this);
+    button = fltk3::event_button()-1;
     if (button<0) button = 0;
     if (button>2) button = 2;
     if (menu[button]) {domenu(menu[button],ex,ey); return 1;}
@@ -104,7 +104,7 @@
     break;
 
   case fltk3::MOUSEWHEEL:
-    button = Fl::event_dy();
+    button = fltk3::event_dy();
     while (button < 0) {if (mouse) mouse(3,GLUT_DOWN,ex,ey); ++button;}
     while (button > 0) {if (mouse) mouse(4,GLUT_DOWN,ex,ey); --button;}
     return 1;
@@ -142,12 +142,12 @@
     if (!keyboard && !special) break;
 
   case fltk3::KEYBOARD:
-    if (Fl::event_text()[0]) {
-      if (keyboard) {keyboard(Fl::event_text()[0],ex,ey); return 1;}
+    if (fltk3::event_text()[0]) {
+      if (keyboard) {keyboard(fltk3::event_text()[0],ex,ey); return 1;}
       break;
     } else {
       if (special) {
-	int k = Fl::event_key();
+	int k = fltk3::event_key();
 	if (k > fltk3::FKey && k <= fltk3::FLastKey) k -= fltk3::FKey;
 	special(k,ex,ey);
 	return 1;
@@ -204,7 +204,7 @@
   int i,j;
   for (i=0; i<=*argc; i++) initargv[i] = argv[i];
   for (i=j=1; i<*argc; ) {
-    if (Fl::arg(*argc,argv,i));
+    if (fltk3::arg(*argc,argv,i));
     else argv[j++] = argv[i++];
   }
   argv[j] = 0;
@@ -215,7 +215,7 @@
   glut_mode = mode;
 }
 
-void glutMainLoop() {Fl::run();}
+void glutMainLoop() {fltk3::run();}
 
 ////////////////////////////////////////////////////////////////
 
@@ -298,7 +298,7 @@
   menu *m = &menus[n];
   if (glut_menustate_function) glut_menustate_function(1);
   if (glut_menustatus_function) glut_menustatus_function(1,ex,ey);
-  const Fl_Menu_Item* g = m->m->popup(Fl::event_x(), Fl::event_y(), 0);
+  const Fl_Menu_Item* g = m->m->popup(fltk3::event_x(), fltk3::event_y(), 0);
   if (g && g->callback_) ((void (*)(int))(g->callback_))(int(g->argument()));
   if (glut_menustatus_function) glut_menustatus_function(0,ex,ey);
   if (glut_menustate_function) glut_menustate_function(0);
@@ -395,8 +395,8 @@
       return 0;
 //case GLUT_WINDOW_NUM_CHILDREN:
 //case GLUT_WINDOW_CURSOR: return 
-  case GLUT_SCREEN_WIDTH: return Fl::w();
-  case GLUT_SCREEN_HEIGHT: return Fl::h();
+  case GLUT_SCREEN_WIDTH: return fltk3::w();
+  case GLUT_SCREEN_HEIGHT: return fltk3::h();
 //case GLUT_SCREEN_WIDTH_MM:
 //case GLUT_SCREEN_HEIGHT_MM:
   case GLUT_MENU_NUM_ITEMS: return menus[glut_menu].size;
@@ -508,9 +508,9 @@
   // no change
   if(glut_idle_func == f) return;
   // remove current idle
-  if(glut_idle_func) Fl::remove_idle((void (*)(void *))glut_idle_func);
+  if(glut_idle_func) fltk3::remove_idle((void (*)(void *))glut_idle_func);
   // install new idle func - if one was passed
-  if(f) Fl::add_idle((void (*)(void *))f);
+  if(f) fltk3::add_idle((void (*)(void *))f);
   // record new idle func - even if it is NULL
   glut_idle_func = f;
 } // glutIdleFunc

Modified: branches/branch-3.0/src/screen_xywh.cxx
===================================================================
--- branches/branch-3.0/src/screen_xywh.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/src/screen_xywh.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -160,9 +160,9 @@
   } else { // ! XineramaIsActive()
     num_screens = 1;
     int mm = DisplayWidthMM(fl_display, fl_screen);
-    dpi[0][0] = mm ? Fl::w()*25.4f/mm : 0.0f;
+    dpi[0][0] = mm ? fltk3::w()*25.4f/mm : 0.0f;
     mm = DisplayHeightMM(fl_display, fl_screen);
-    dpi[0][1] = mm ? Fl::h()*25.4f/mm : dpi[0][0];
+    dpi[0][1] = mm ? fltk3::h()*25.4f/mm : dpi[0][0];
   }
 }
 #else
@@ -171,9 +171,9 @@
   num_screens = 1;
   if (!fl_display) fl_open_display();
   int mm = DisplayWidthMM(fl_display, fl_screen);
-  dpi[0] = mm ? Fl::w()*25.4f/mm : 0.0f;
+  dpi[0] = mm ? fltk3::w()*25.4f/mm : 0.0f;
   mm = DisplayHeightMM(fl_display, fl_screen);
-  dpi[1] = mm ? Fl::h()*25.4f/mm : dpi[0];  
+  dpi[1] = mm ? fltk3::h()*25.4f/mm : dpi[0];  
 }
 #endif // WIN32
 
@@ -181,7 +181,7 @@
 /**
   Gets the number of available screens.
 */
-int Fl::screen_count() {
+int fltk3::screen_count() {
   if (!num_screens) screen_init();
 
   return num_screens;
@@ -193,7 +193,7 @@
   \param[out]  X,Y,W,H the corresponding screen bounding box
   \param[in] mx, my the absolute screen position
 */
-void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
   if (!num_screens) screen_init();
 
 #ifdef WIN32
@@ -250,19 +250,19 @@
   (void)my;
 #endif // WIN32
 
-  X = Fl::x();
-  Y = Fl::y();
-  W = Fl::w();
-  H = Fl::h();
+  X = fltk3::x();
+  Y = fltk3::y();
+  W = fltk3::w();
+  H = fltk3::h();
 }
 
 /**
   Gets the screen bounding rect for the given screen. 
   \param[out]  X,Y,W,H the corresponding screen bounding box
-  \param[in] n the screen number (0 to Fl::screen_count() - 1)
+  \param[in] n the screen number (0 to fltk3::screen_count() - 1)
   \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
 */
-void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
   if (!num_screens) screen_init();
 
 #ifdef WIN32
@@ -293,10 +293,10 @@
   (void)n;
 #endif // WIN32
 
-  X = Fl::x();
-  Y = Fl::y();
-  W = Fl::w();
-  H = Fl::h();
+  X = fltk3::x();
+  Y = fltk3::y();
+  W = fltk3::w();
+  H = fltk3::h();
 }
 
 static inline float fl_intersection(int x1, int y1, int w1, int h1,
@@ -318,12 +318,12 @@
   \param[in] mx, my, mw, mh the rectangle to search for intersection with
   \see void screen_xywh(int &X, int &Y, int &W, int &H, int n)
   */
-void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
+void fltk3::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
   int best_screen = 0;
   float best_intersection = 0.;
-  for(int i = 0; i < Fl::screen_count(); i++) {
+  for(int i = 0; i < fltk3::screen_count(); i++) {
     int sx, sy, sw, sh;
-    Fl::screen_xywh(sx, sy, sw, sh, i);
+    fltk3::screen_xywh(sx, sy, sw, sh, i);
     float sintersection = fl_intersection(mx, my, mw, mh, sx, sy, sw, sh);
     if(sintersection > best_intersection) {
       best_screen = i;
@@ -338,10 +338,10 @@
 /**
  Gets the screen resolution in dots-per-inch for the given screen. 
  \param[out]  h, v  horizontal and vertical resolution
- \param[in]   n     the screen number (0 to Fl::screen_count() - 1)
+ \param[in]   n     the screen number (0 to fltk3::screen_count() - 1)
  \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) 
  */
-void Fl::screen_dpi(float &h, float &v, int n)
+void fltk3::screen_dpi(float &h, float &v, int n)
 {
   if (!num_screens) screen_init();
   h = v = 0.0f;

Modified: branches/branch-3.0/test/hello.cxx
===================================================================
--- branches/branch-3.0/test/hello.cxx	2011-05-17 14:27:45 UTC (rev 8679)
+++ branches/branch-3.0/test/hello.cxx	2011-05-17 15:17:01 UTC (rev 8680)
@@ -40,7 +40,7 @@
   box->labeltype(SHADOW_LABEL);
   window->end();
   window->show(argc, argv);
-  return Fl::run();
+  return run();
 }
 
 //

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'.