FLTK logo

[Library] r7365 - in branches/branch-3.0: FL src src/xutf8 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] r7365 - in branches/branch-3.0: FL src src/xutf8 test fltk-dev Mar 30, 2010  
 
Author: matt
Date: 2010-03-30 08:18:29 -0700 (Tue, 30 Mar 2010)
New Revision: 7365
Log:
Replaced a hand full of Fl_ names with fltk3.

Modified:
   branches/branch-3.0/FL/Enumerations.H
   branches/branch-3.0/FL/Fl.H
   branches/branch-3.0/FL/Fl_Abstract_Printer.H
   branches/branch-3.0/FL/Fl_Bitmap.H
   branches/branch-3.0/FL/Fl_Box.H
   branches/branch-3.0/FL/Fl_Browser.H
   branches/branch-3.0/FL/Fl_Browser_.H
   branches/branch-3.0/FL/Fl_Button.H
   branches/branch-3.0/FL/Fl_Cairo.H
   branches/branch-3.0/FL/Fl_Cairo_Window.H
   branches/branch-3.0/FL/Fl_Chart.H
   branches/branch-3.0/FL/Fl_Choice.H
   branches/branch-3.0/FL/Fl_Clock.H
   branches/branch-3.0/FL/Fl_Color_Chooser.H
   branches/branch-3.0/FL/Fl_Device.H
   branches/branch-3.0/FL/Fl_Double_Window.H
   branches/branch-3.0/FL/Fl_File_Chooser.H
   branches/branch-3.0/FL/Fl_File_Icon.H
   branches/branch-3.0/FL/Fl_FormsBitmap.H
   branches/branch-3.0/FL/Fl_FormsPixmap.H
   branches/branch-3.0/FL/Fl_Free.H
   branches/branch-3.0/FL/Fl_Gl_Window.H
   branches/branch-3.0/FL/Fl_Group.H
   branches/branch-3.0/FL/Fl_Help_View.H
   branches/branch-3.0/FL/Fl_Image.H
   branches/branch-3.0/FL/Fl_Input_.H
   branches/branch-3.0/FL/Fl_Input_Choice.H
   branches/branch-3.0/FL/Fl_Menu_.H
   branches/branch-3.0/FL/Fl_Menu_Bar.H
   branches/branch-3.0/FL/Fl_Menu_Button.H
   branches/branch-3.0/FL/Fl_Menu_Item.H
   branches/branch-3.0/FL/Fl_Multi_Label.H
   branches/branch-3.0/FL/Fl_Native_File_Chooser_MAC.H
   branches/branch-3.0/FL/Fl_Object.H
   branches/branch-3.0/FL/Fl_Overlay_Window.H
   branches/branch-3.0/FL/Fl_Pixmap.H
   branches/branch-3.0/FL/Fl_Positioner.H
   branches/branch-3.0/FL/Fl_Printer.H
   branches/branch-3.0/FL/Fl_Progress.H
   branches/branch-3.0/FL/Fl_Repeat_Button.H
   branches/branch-3.0/FL/Fl_Scroll.H
   branches/branch-3.0/FL/Fl_Single_Window.H
   branches/branch-3.0/FL/Fl_Slider.H
   branches/branch-3.0/FL/Fl_Spinner.H
   branches/branch-3.0/FL/Fl_Table.H
   branches/branch-3.0/FL/Fl_Tabs.H
   branches/branch-3.0/FL/Fl_Text_Display.H
   branches/branch-3.0/FL/Fl_Tile.H
   branches/branch-3.0/FL/Fl_Timer.H
   branches/branch-3.0/FL/Fl_Tooltip.H
   branches/branch-3.0/FL/Fl_Tree.H
   branches/branch-3.0/FL/Fl_Tree_Item.H
   branches/branch-3.0/FL/Fl_Valuator.H
   branches/branch-3.0/FL/Fl_Value_Input.H
   branches/branch-3.0/FL/Fl_Widget.H
   branches/branch-3.0/FL/Fl_Window.H
   branches/branch-3.0/FL/Fl_Wizard.H
   branches/branch-3.0/FL/fl_ask.H
   branches/branch-3.0/FL/fl_draw.H
   branches/branch-3.0/FL/forms.H
   branches/branch-3.0/FL/glut.H
   branches/branch-3.0/FL/mac.H
   branches/branch-3.0/FL/names.h
   branches/branch-3.0/FL/win32.H
   branches/branch-3.0/FL/x.H
   branches/branch-3.0/src/Fl.cxx
   branches/branch-3.0/src/Fl_Abstract_Printer.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_Icon.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_Choice.H
   branches/branch-3.0/src/Fl_Gl_Choice.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_Dialog_Dox.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_.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_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.cxx
   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_PS_Printer.cxx
   branches/branch-3.0/src/Fl_Pack.cxx
   branches/branch-3.0/src/Fl_Pixmap.cxx
   branches/branch-3.0/src/Fl_Positioner.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_Single_Window.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_Valuator.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_Window_iconize.cxx
   branches/branch-3.0/src/Fl_Wizard.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_mac.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.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_engraved_label.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_read_image_mac.cxx
   branches/branch-3.0/src/fl_rect.cxx
   branches/branch-3.0/src/fl_scroll_area.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_bitmap.cxx
   branches/branch-3.0/src/forms_compatability.cxx
   branches/branch-3.0/src/forms_free.cxx
   branches/branch-3.0/src/forms_pixmap.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/src/xutf8/test.c
   branches/branch-3.0/src/xutf8/test2.c
   branches/branch-3.0/test/hello.cxx

Modified: branches/branch-3.0/FL/Enumerations.H
===================================================================
--- branches/branch-3.0/FL/Enumerations.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Enumerations.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -92,33 +92,33 @@
  *  window manager.
  * 
  *  Events are identified by the integer argument passed to the 
- *  Fl_Widget::handle() virtual method. Other information about 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()
  */
 enum Fl_Event {	// events
   /** No event. */
   FL_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 Fl_Widget::handle() method. It will then become the 
-   *  Fl::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events.  
-   *  If Fl_Widget::handle() returns zero then FLTK will try sending the FL_PUSH 
+   *  from its fltk3::Widget::handle() method. It will then become the 
+   *  fltk3::pushed() widget and will get FL_DRAG and the matching FL_RELEASE events.  
+   *  If fltk3::Widget::handle() returns zero then FLTK will try sending the FL_PUSH 
    *  to another widget. 
    */
   FL_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 FL_RELEASE event, the widget must return 
    *  non-zero when handling FL_PUSH.
@@ -129,7 +129,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 
    *  FL_MOVE and FL_LEAVE events.
    */
   FL_ENTER		= 3,
@@ -141,8 +141,8 @@
   FL_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 FL_DRAG events, the widget must return non-zero 
    *  when handling FL_PUSH.
@@ -153,25 +153,25 @@
    *
    *  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, FL_KEYUP, 
+   *  It then becomes the fltk3::focus() widget and gets FL_KEYDOWN, FL_KEYUP, 
    *  and FL_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 interaction 
    *  with the window manager it will be zero.
    */
   FL_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.
    */
   FL_UNFOCUS		= 7,
 
-  /** A key was pressed or released. 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()
+  /** A key was pressed or released. 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 FL_SHORTCUT event.
@@ -180,7 +180,7 @@
    *  and FL_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 
    *  foreign characters.
    *
    *  FL_KEYUP events are sent to the widget that currently has focus. This 
@@ -201,75 +201,75 @@
 
   /** The user clicked the close button of a window.
    *  This event is used internally only to trigger the callback of
-   *  Fl_Window derived classed. The default callback closes the 
-   *  window calling Fl_Window::hide().
+   *  fltk3::Window derived classed. The default callback closes the 
+   *  window calling fltk3::Window::hide().
    */
   FL_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 FL_MOVE events, the widget must return 
    *  non-zero when handling FL_ENTER.
    */
   FL_MOVE		= 11,
 
-  /** If the Fl::focus() widget is zero or ignores an FL_KEYBOARD
+  /** If the fltk3::focus() widget is zero or ignores an FL_KEYBOARD
    *  event then FLTK tries sending this event to every widget it 
    *  can, until one of them returns non-zero. FL_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.
    */
   FL_SHORTCUT		= 12,
 
-  /** This widget is no longer active, due to Fl_Widget::deactivate() 
-   *  being called on it or one of its parents. Fl_Widget::active() may 
-   *  still be true after this, the widget is only active if Fl_Widget::active()
-   *  is true on it and all its parents (use Fl_Widget::active_r() to check this).
+  /** This widget is no longer active, due to fltk3::Widget::deactivate() 
+   *  being called on it or one of its parents. fltk3::Widget::active() may 
+   *  still be true after this, the widget is only active if fltk3::Widget::active()
+   *  is true on it and all its parents (use fltk3::Widget::active_r() to check this).
    */
   FL_DEACTIVATE		= 13,
 
-  /** This widget is now active, due to Fl_Widget::activate() being 
+  /** This widget is now active, due to fltk3::Widget::activate() being 
    *  called on it or one of its parents.
    */
   FL_ACTIVATE		= 14,
 
-  /** This widget is no longer visible, due to Fl_Widget::hide() being 
+  /** This widget is no longer visible, due to fltk3::Widget::hide() being 
    *  called on it or one of its parents, or due to a parent window being 
-   *  minimized.  Fl_Widget::visible() may still be true after this, but the 
+   *  minimized.  fltk3::Widget::visible() may still be true after this, but the 
    *  widget is visible only if visible() is true for it and all its 
-   *  parents (use Fl_Widget::visible_r() to check this).
+   *  parents (use fltk3::Widget::visible_r() to check this).
    */
   FL_HIDE		= 15,
 
-  /** This widget is visible again, due to Fl_Widget::show() being called on 
+  /** This widget is visible again, due to fltk3::Widget::show() being called on 
    *  it or one of its parents, or due to a parent window being restored. 
    *  Child Fl_Windows respond to this by actually creating the window if not 
    *  done already, so if you subclass a window, be sure to pass FL_SHOW 
-   *  to the base class Fl_Widget::handle() method!
+   *  to the base class fltk3::Widget::handle() method!
    */
   FL_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().
    */
   FL_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.
    */
   FL_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.
    */
   FL_MOUSEWHEEL		= 19,
@@ -301,10 +301,10 @@
 /*@{*/
 /** These constants determine when a callback is performed.
  *
- *  \sa Fl_Widget::when();
+ *  \sa fltk3::Widget::when();
  *  \todo doxygen comments for values are incomplete and maybe wrong or unclear
  */
-enum Fl_When { // Fl_Widget::when():
+enum Fl_When { // fltk3::Widget::when():
   FL_WHEN_NEVER		= 0,	///< Never call the callback
   FL_WHEN_CHANGED	= 1,	///< Do the callback only when the widget value changes
   FL_WHEN_NOT_CHANGED	= 2,	///< Do the callback whenever the user interacts with the widget
@@ -325,7 +325,7 @@
 	\todo	FL_Button 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):
  */
 
 /*@{*/
@@ -374,7 +374,7 @@
 
 	These constants define the button numbers for FL_PUSH and FL_RELEASE events.
 	
-	\sa Fl::event_button()
+	\sa fltk3::event_button()
 */
 
 /*@{*/
@@ -388,7 +388,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
@@ -808,7 +808,7 @@
     are provided by system-defined cursors.
     
     \todo	enum Fl_Cursor needs some more comments for values
-    		(and maybe an image), see Fl/Enumerations.H
+    		(and maybe an image), see fltk3/Enumerations.H
 */
 enum Fl_Cursor {	// standard cursors
   FL_CURSOR_DEFAULT	= 0,
@@ -838,7 +838,7 @@
   //FL_CURSOR_WE	= 55,
 };
 
-enum { // values for "when" passed to Fl::add_fd()
+enum { // values for "when" passed to fltk3::add_fd()
   FL_READ = 1,
   FL_WRITE = 4,
   FL_EXCEPT = 8

Modified: branches/branch-3.0/FL/Fl.H
===================================================================
--- branches/branch-3.0/FL/Fl.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -39,16 +39,18 @@
 #  include "fl_utf8.h"
 #  include "Enumerations.H"
 #  ifndef Fl_Object
-#    define Fl_Object Fl_Widget	/**< for back compatibility - use Fl_Widget! */
+#    define Fl_Object fltk3::Widget	/**< for back compatibility - use fltk3::Widget! */
 #  endif
 
 #  ifdef check
 #    undef check
 #  endif
 
+namespace fltk3 {
+  class Window;
+  class Widget;
+}
 
-class Fl_Widget;
-class Fl_Window;
 class Fl_Image;
 struct Fl_Label;
 
@@ -57,15 +59,15 @@
     \brief Typedefs 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.
+    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 Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
-	 Fl::remove_timeout() and others
+    \see fltk3::add_handler(), fltk3::add_timeout(), fltk3::repeat_timeout(),
+	 fltk3::remove_timeout() and others
   @{ */
 
 /** signature of some label drawing functions passed as parameters */
@@ -99,7 +101,7 @@
 typedef void (*Fl_Abort_Handler)(const char *format,...);
 
 /** signature of set_atclose functions passed as parameters */
-typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data);
+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);
@@ -107,42 +109,40 @@
 /** @} */ /* group callback_functions */
 
 /**
-  The Fl is the FLTK global (static) containing
+  The fltk3 is the FLTK global (static) containing
   state information and global methods for the current application.
 */
-class FL_EXPORT Fl {
-  Fl() {}; // no constructor!
-
-public: // should be private!
+namespace fltk3 {
+  
 #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_Widget* belowmouse_;
-  static Fl_Widget* pushed_;
-  static Fl_Widget* focus_;
-  static int damage_;
-  static Fl_Widget* selection_owner_;
-  static Fl_Window* modal_;
-  static Fl_Window* grab_;
-  static int compose_state;
-  static int visible_focus_;
-  static int dnd_text_ops_;
+  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::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;
+  extern int visible_focus_;
+  extern int dnd_text_ops_;
 #endif
   /**
     If true then flush() will do something.
   */
-  static void damage(int d) {damage_ = d;}
+  inline void damage(int d) {damage_ = d;}
 
   /**
     The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
@@ -151,45 +151,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 Fl_Awake_Handler *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*&);
+  extern int add_awake_handler_(Fl_Awake_Handler, void*);
+  extern int get_awake_handler_(Fl_Awake_Handler&, void*&);
 
-public:
+/* public: */
 
   // API version number
-  static double version();
+  extern double version();
 
   // argument parsers:
-  static int arg(int, char**, int&);
-  static int args(int, char**, int&, Fl_Args_Handler ah = 0);
-  static void args(int, char**);
+  extern int arg(int, char**, int&);
+  extern int args(int, char**, int&, Fl_Args_Handler ah = 0);
+  extern void args(int, char**);
   /**
-    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);
+  extern void display(const char*);
+  extern 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
@@ -197,42 +197,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);
+  extern int gl_visual(int, int *alist=0); // platform dependent
+  extern void own_colormap();
+  extern void get_system_colors();
+  extern void foreground(uchar, uchar, uchar);
+  extern void background(uchar, uchar, uchar);
+  extern void background2(uchar, uchar, uchar);
 
   // schemes:
-  static int scheme(const char*);
+  extern 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);
+  extern int reload_scheme(); // platform dependent
+  extern int scrollbar_size();
+  extern void scrollbar_size(int W);
 
   // execution:
-  static int wait();
-  static double wait(double time);
-  static int check();
-  static int ready();
-  static int run();
-  static Fl_Widget* readqueue();
+  extern int wait();
+  extern double wait(double time);
+  extern int check();
+  extern int ready();
+  extern int run();
+  extern 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
@@ -241,16 +241,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
+  extern void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent
   /**
   Repeats a timeout callback from the expiration of the
   previous timeout, allowing for more accurate timing. You may only call
@@ -262,25 +262,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);
+  extern void repeat_timeout(double t, Fl_Timeout_Handler, void* = 0); // platform dependent
+  extern int  has_timeout(Fl_Timeout_Handler, void* = 0);
+  extern void remove_timeout(Fl_Timeout_Handler, void* = 0);
+  extern void add_check(Fl_Timeout_Handler, void* = 0);
+  extern int  has_check(Fl_Timeout_Handler, void* = 0);
+  extern void remove_check(Fl_Timeout_Handler, void* = 0);
   /**
     Adds file descriptor fd to listen to.
     
-    When the fd becomes ready for reading Fl::wait() will call the
+    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.
     
@@ -289,32 +289,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
+  extern 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
+  extern void add_fd(int fd, Fl_FD_Handler cb, void* = 0); // platform dependent
   /** Removes a file descriptor handler. */
-  static void remove_fd(int, int when); // platform dependent
+  extern void remove_fd(int, int when); // platform dependent
   /** Removes a file descriptor handler. */
-  static void remove_fd(int); // platform dependent
+  extern 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);
+  extern void add_idle(Fl_Idle_Handler cb, void* data = 0);
+  extern int  has_idle(Fl_Idle_Handler cb, void* data = 0);
+  extern void remove_idle(Fl_Idle_Handler 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_;}
+  extern void redraw();
+  extern 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
@@ -325,14 +325,14 @@
   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.
   */
-  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.
 
@@ -341,12 +341,12 @@
   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.
   */
-  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.
 
@@ -355,20 +355,20 @@
   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.
   */
-  static void (*fatal)(const char*, ...);
+  extern void (*fatal)(const char*, ...);
   /** @} */
 
   /** \defgroup  fl_windows Windows handling functions
       Windows and standard dialogs handling
     @{ */
-  static Fl_Window* first_window();
-  static void first_window(Fl_Window*);
-  static Fl_Window* next_window(const Fl_Window*);
+  extern fltk3::Window* first_window();
+  extern void first_window(fltk3::Window*);
+  extern fltk3::Window* next_window(const fltk3::Window*);
 
   /**
     Returns the top-most modal() window currently shown.
@@ -379,7 +379,7 @@
     for all events, and no other windows will have handle()
     called (grab() overrides this).
   */
-  static Fl_Window* modal() {return modal_;}
+  inline fltk3::Window* modal() {return modal_;}
   /**
     This is used when pop-up menu systems are active.
     
@@ -396,7 +396,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>
@@ -404,13 +404,13 @@
     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 Fl_Window* grab() {return grab_;}
-  /** Selects the window to grab. See Fl_Window* Fl::grab() */
-  static void grab(Fl_Window*); // platform dependent
+  inline fltk3::Window* grab() {return grab_;}
+  /** Selects the window to grab. See fltk3::Window* fltk3::grab() */
+  extern void grab(fltk3::Window*); // platform dependent
   /** @} */
 
   /** \defgroup fl_events Events handling functions
-	Fl class events handling API
+	fltk3 class events handling API
 	@{
   */
   // event information:
@@ -419,50 +419,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 Fl_Window
+    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 Fl_Window
+    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 Fl_Window on the screen, use 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 Fl_Window on the screen, use 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
     FL_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
     FL_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
+  extern void get_mouse(int &,int &); // platform dependent
   /**
     Returns non zero if we had a double click event.
     \retval Non-zero if the most recent FL_PUSH or FL_KEYBOARD was a "double click".  
@@ -471,37 +471,37 @@
     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;}
   /**
     The first form returns non-zero if the mouse has not moved far enough
     and not enough time has passed since the last FL_PUSH or 
     FL_KEYBOARD event for it to be considered a "drag" rather than a
     "click".  You can test this on FL_DRAG, FL_RELEASE,
     and FL_MOVE events.  The second form clears the value returned
-    by Fl::event_is_click().  Useful to prevent the <I>next</I>
+    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 int event_is_click()	{return e_is_click;}
+  inline int event_is_click()	{return e_is_click;}
   /**
     Only i=0 works! See int event_is_click(). 
   */
-  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 FL_PUSH or FL_RELEASE event.
     \retval FL_LEFT_MOUSE \retval FL_MIDDLE_MOUSE \retval FL_RIGHT_MOUSE.
-    \see Fl::event_buttons()
+    \see fltk3::event_buttons()
   */
-  static int event_button()	{return e_keysym-FL_Button;}
+  inline int event_button()	{return e_keysym-FL_Button;}
   /**
     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
@@ -525,21 +525,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.
       
@@ -548,15 +548,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
@@ -581,69 +581,69 @@
 	FL_Control_L, FL_Control_R, FL_Caps_Lock, FL_Alt_L, FL_Alt_R,
 	FL_Meta_L, FL_Meta_R, FL_Menu, FL_Num_Lock, FL_KP_Enter.  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(FL_Button+n) does not work.
+    On X fltk3::get_key(FL_Button+n) does not work.
     
-    On WIN32 Fl::get_key(FL_KP_Enter) and Fl::event_key(FL_KP_Enter) do not work.
+    On WIN32 fltk3::get_key(FL_KP_Enter) and fltk3::event_key(FL_KP_Enter) do not work.
   */
-  static int event_key(int key);
+  extern 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
+  extern int get_key(int key); // platform dependent
   /** 
     Returns the text associated with the current event, including FL_PASTE or FL_DND_RELEASE events.
     This can be used in response to FL_KEYUP, FL_KEYDOWN, FL_PASTE, FL_DND_RELEASE.
 
-    When responding to FL_KEYUP/FL_KEYDOWN, use this function instead of Fl::event_key()
+    When responding to FL_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);
+  extern int compose(int &del);
   /**
-    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.
   */
-  static void compose_reset() {compose_state = 0;}
-  static int event_inside(int,int,int,int);
-  static int event_inside(const Fl_Widget*);
-  static int test_shortcut(Fl_Shortcut);
+  inline void compose_reset() {compose_state = 0;}
+  extern int event_inside(int,int,int,int);
+  extern int event_inside(const fltk3::Widget*);
+  extern int test_shortcut(Fl_Shortcut);
 
   // event destinations:
-  static int handle(int, Fl_Window*);
+  extern int handle(int, fltk3::Window*);
   /**  Gets the widget that is below the mouse. 
-       \see  belowmouse(Fl_Widget*) */
-  static Fl_Widget* belowmouse() {return belowmouse_;}
-  static void belowmouse(Fl_Widget*);
+       \see  belowmouse(fltk3::Widget*) */
+  inline fltk3::Widget* belowmouse() {return belowmouse_;}
+  extern void belowmouse(fltk3::Widget*);
   /** Gets the widget that is being pushed.
-      \see void pushed(Fl_Widget*) */
-  static Fl_Widget* pushed()	{return pushed_;}
-  static void pushed(Fl_Widget*);
-  /** Gets the current Fl::focus() widget. \sa Fl::focus(Fl_Widget*) */
-  static Fl_Widget* focus()	{return focus_;}
-  static void focus(Fl_Widget*);
-  static void add_handler(Fl_Event_Handler h);
-  static void remove_handler(Fl_Event_Handler h);
+      \see void pushed(fltk3::Widget*) */
+  inline fltk3::Widget* pushed()	{return pushed_;}
+  extern void pushed(fltk3::Widget*);
+  /** Gets the current fltk3::focus() widget. \sa fltk3::focus(fltk3::Widget*) */
+  inline fltk3::Widget* focus()	{return focus_;}
+  extern void focus(fltk3::Widget*);
+  extern void add_handler(Fl_Event_Handler h);
+  extern void remove_handler(Fl_Event_Handler h);
   /** @} */
 
   /** \defgroup  fl_clipboard  Selection & Clipboard functions
@@ -656,56 +656,56 @@
     middle-mouse pastes and for drag-and-drop selections. The primary
     clipboard is used for traditional copy/cut/paste operations.
   */
-  static void copy(const char* stuff, int len, int clipboard = 0); // platform dependent
+  extern void copy(const char* stuff, int len, int clipboard = 0); // platform dependent
   /**
     Pastes the data from the selection (0) or primary (1) clipboard into receiver.  
     The selection clipboard is used for middle-mouse pastes and for 
     drag-and-drop selections. The primary clipboard is used for 
     traditional copy/cut/paste operations.
   */
-  static void paste(Fl_Widget &receiver, int clipboard /*=0*/); // platform dependent
+  extern void paste(fltk3::Widget &receiver, int clipboard /*=0*/); // platform dependent
   /**
     Initiate a Drag And Drop operation. The clipboard should be
     filled with relevant data before calling this method. FLTK will
     then initiate the system wide drag and drop handling. Dropped data
     will be marked as <i>text</i>.
   */
-  static int dnd(); // platform dependent
+  extern int dnd(); // platform dependent
 
   // These are for back-compatibility only:
   /**  back-compatibility only: Gets the widget owning the current selection  
-       \see Fl_Widget* selection_owner(Fl_Widget*) */
-  static Fl_Widget* selection_owner() {return selection_owner_;}
-  static void selection_owner(Fl_Widget*);
-  static void selection(Fl_Widget &owner, const char*, int len);
-  static void paste(Fl_Widget &receiver);
+       \see fltk3::Widget* selection_owner(fltk3::Widget*) */
+  inline fltk3::Widget* selection_owner() {return selection_owner_;}
+  extern void selection_owner(fltk3::Widget*);
+  extern void selection(fltk3::Widget &owner, const char*, int len);
+  extern void paste(fltk3::Widget &receiver);
 /** @} */
 /** \defgroup  fl_screen  Screen functions
 	fl global screen functions
      @{ */
   // screen size:
   /** Returns the origin of the current screen, where 0 indicates the left side of the screen. */
-  static int x(); // platform dependent
+  extern 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
+  extern int y(); // platform dependent
   /** Returns the width of the screen in pixels. */
-  static int w(); // platform dependent
+  extern int w(); // platform dependent
   /** Returns the height of the screen in pixels. */
-  static int h(); // platform dependent
+  extern int h(); // platform dependent
 
   // multi-head support:
-  static int screen_count();
+  extern 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) {
+  extern void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
+  extern void screen_xywh(int &X, int &Y, int &W, int &H, int n);
+  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);
-
+  
   /**   @} */
 
   /** \defgroup  fl_attributes  Color & Font functions
@@ -713,23 +713,23 @@
      @{ */
  
   // color map:
-  static void	set_color(Fl_Color, uchar, uchar, uchar);
+  extern void	set_color(Fl_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(Fl_Color, unsigned); // platform dependent
-  static Fl_Color get_color(Fl_Color);
-  static void	get_color(Fl_Color, uchar&, uchar&, uchar&);
+  extern void	set_color(Fl_Color, unsigned); // platform dependent
+  extern Fl_Color get_color(Fl_Color);
+  extern void	get_color(Fl_Color, uchar&, uchar&, uchar&);
   /**
     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(Fl_Color, int overlay = 0); // platform dependent
+  extern void	free_color(Fl_Color, int overlay = 0); // platform dependent
 
   // fonts:
-  static const char* get_font(Fl_Font);
+  extern const char* get_font(Fl_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
@@ -742,7 +742,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(Fl_Font, int* attributes = 0);
+  extern const char* get_font_name(Fl_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
@@ -754,9 +754,9 @@
     points at a static buffer that is overwritten each call.  Under X this
     will open the display.
   */
-  static int get_font_sizes(Fl_Font, int*& sizep);
-  static void set_font(Fl_Font, const char*);
-  static void set_font(Fl_Font, Fl_Font);
+  extern int get_font_sizes(Fl_Font, int*& sizep);
+  extern void set_font(Fl_Font, const char*);
+  extern void set_font(Fl_Font, Fl_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
@@ -775,7 +775,7 @@
     
     The return value is how many faces are in the table after this is done.
   */
-  static Fl_Font set_fonts(const char* = 0); // platform dependent
+  extern Fl_Font set_fonts(const char* = 0); // platform dependent
 
   /**   @} */
  /** \defgroup  fl_drawings  Drawing functions
@@ -785,67 +785,67 @@
  /** @} */
 
   // labeltypes:
-  static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
+  extern void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
   /** Sets the functions to call to draw and measure a specific labeltype. */
-  static void set_labeltype(Fl_Labeltype, Fl_Labeltype from); // is it defined ?
+  extern void set_labeltype(Fl_Labeltype, Fl_Labeltype from); // is it defined ?
 
   // boxtypes:
-  static Fl_Box_Draw_F *get_boxtype(Fl_Boxtype);
-  static void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
-  static void set_boxtype(Fl_Boxtype, Fl_Boxtype from);
-  static int box_dx(Fl_Boxtype);
-  static int box_dy(Fl_Boxtype);
-  static int box_dw(Fl_Boxtype);
-  static int box_dh(Fl_Boxtype);
-  static int draw_box_active();
+  extern Fl_Box_Draw_F *get_boxtype(Fl_Boxtype);
+  extern void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
+  extern void set_boxtype(Fl_Boxtype, Fl_Boxtype from);
+  extern int box_dx(Fl_Boxtype);
+  extern int box_dy(Fl_Boxtype);
+  extern int box_dw(Fl_Boxtype);
+  extern int box_dh(Fl_Boxtype);
+  extern 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)(Fl_Window*,void*);
-  static void default_atclose(Fl_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(Fl_Abort_Handler f) {fatal = f;}
+  extern void (*atclose)(fltk3::Window*,void*);
+  extern 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 Fl_Window::callback(Fl_Callback*) */
-  static void set_atclose(Fl_Atclose_Handler f) {atclose = f;}
+      \see fltk3::Window::callback(Fl_Callback*) */
+  inline void set_atclose(Fl_Atclose_Handler f) {atclose = f;}
   /**   @} */
 
   /** \addtogroup fl_events 
     @{ */
   /** Returns non-zero if the Shift key is pressed. */
-  static int event_shift() {return e_state&FL_SHIFT;}
+  inline int event_shift() {return e_state&FL_SHIFT;}
   /** Returns non-zero if the Control key is pressed. */
-  static int event_ctrl() {return e_state&FL_CTRL;}
+  inline int event_ctrl() {return e_state&FL_CTRL;}
   /** Returns non-zero if the FL_COMMAND key is pressed, either FL_CTRL or on OSX FL_META. */
-  static int event_command() {return e_state&FL_COMMAND;}
+  inline int event_command() {return e_state&FL_COMMAND;}
   /** Returns non-zero if the Alt key is pressed. */
-  static int event_alt() {return e_state&FL_ALT;}
+  inline int event_alt() {return e_state&FL_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 FL_RELEASE event, the state 
     of the released button will be 0. To find out, which button 
-    caused an FL_RELEASE event, you can use Fl::event_button() instead.
+    caused an FL_RELEASE event, you can use fltk3::event_button() instead.
     \return a bit mask value like { [FL_BUTTON1] | [FL_BUTTON2] | [FL_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&FL_BUTTON1;}
+  inline int event_button1() {return e_state&FL_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&FL_BUTTON2;}
+  inline int event_button2() {return e_state&FL_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&FL_BUTTON3;}
+  inline int event_button3() {return e_state&FL_BUTTON3;}
   /**   @} */
 
   /**
@@ -853,13 +853,13 @@
 
     \deprecated This method is obsolete - use the add_idle() method instead.
   */
-  static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
-  /** See Fl_Window* grab() */
-  static void grab(Fl_Window&win) {grab(&win);}
+  inline void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
+  /** See fltk3::Window* grab() */
+  inline void grab(fltk3::Window&win) {grab(&win);}
   /** Releases the current grabbed window, equals grab(0).
-  \deprecated Use Fl::grab(0) instead.
-  \see Fl_Window* grab() */
-  static void release() {grab(0);}
+  \deprecated Use fltk3::grab(0) instead.
+  \see fltk3::Window* grab() */
+  inline void release() {grab(0);}
 
   // Visible focus methods...
   /**
@@ -867,13 +867,13 @@
     non-text widgets. The default mode is to enable keyboard focus
     for all widgets.
   */
-  static void visible_focus(int v) { visible_focus_ = v; }
+  inline void visible_focus(int v) { visible_focus_ = v; }
   /**
     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 visible_focus_; }
+  inline int  visible_focus() { return visible_focus_; }
 
   // Drag-n-drop text operation methods...
   /**
@@ -882,39 +882,39 @@
     be dragged from text fields or dragged within a text field as a
     cut/paste shortcut.
   */
-  static void dnd_text_ops(int v) { dnd_text_ops_ = v; }
+  inline void dnd_text_ops(int v) { dnd_text_ops_ = v; }
   /**
     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 dnd_text_ops_; }
+  inline int  dnd_text_ops() { return dnd_text_ops_; }
   /** \defgroup fl_multithread Multithreading support functions
 	fl multithreading support functions
    @{ */
 
   // Multithreading support:
-  static void lock();
-  static void unlock();
-  static void awake(void* message = 0);
+  extern void lock();
+  extern void unlock();
+  extern void awake(void* message = 0);
   /** See void awake(void* message=0). */
-  static int awake(Fl_Awake_Handler cb, void* message = 0);
+  extern int awake(Fl_Awake_Handler cb, void* message = 0);
   /**
     The thread_message() method returns the last message
     that was sent from a child by the awake() method.
     
     See also: multithreading
   */
-  static void* thread_message(); // platform dependent
+  extern void* thread_message(); // platform dependent
   /** @} */
 
   /** \defgroup fl_del_widget Safe widget deletion support functions
 
     These functions support deletion of widgets inside callbacks.
 
-    Fl::delete_widget() should be called when deleting widgets
-    or complete widget trees (Fl_Group, Fl_Window, ...) inside
+    fltk3::delete_widget() should be called when deleting widgets
+    or complete widget trees (Fl_Group, fltk3::Window, ...) inside
     callbacks.
 
     The other functions are intended for internal use. The preferred
@@ -925,49 +925,49 @@
     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 Fl_Widget_Tracker:
-	- 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 Fl_Widget_Tracker.
 
    @{ */
   // Widget deletion:
-  static void delete_widget(Fl_Widget *w);
-  static void do_widget_deletion();
-  static void watch_widget_pointer(Fl_Widget *&w);
-  static void release_widget_pointer(Fl_Widget *&w);
-  static void clear_widget_pointer(Fl_Widget const *w);
+  extern void delete_widget(fltk3::Widget *w);
+  extern void do_widget_deletion();
+  extern void watch_widget_pointer(fltk3::Widget *&w);
+  extern void release_widget_pointer(fltk3::Widget *&w);
+  extern void clear_widget_pointer(fltk3::Widget const *w);
   /** @} */
 
 #ifdef HAVE_CAIRO
   /** \defgroup group_cairo Cairo support functions and classes 
       @{ 
   */
-public:
+/* public: */
   // Cairo support API
-  static cairo_t * cairo_make_current(Fl_Window* w);
+  extern cairo_t * cairo_make_current(fltk3::Window* w);
    /** when HAVE_CAIRO is defined and cairo_autolink_context() is true, 
       any current window dc is linked to a current context.
       This is not the default, because it may not be necessary
       to add cairo support to all fltk supported windows.
       When you wish to associate a cairo context in this mode,
       you need to call explicitly in your draw() overridden method,
-      FL::cairo_make_current(Fl_Window*). This will create a cairo context
+      FL::cairo_make_current(fltk3::Window*). This will create a cairo context
       but only for this Window. 
       Still in custom cairo application it is possible to handle 
       completely this process automatically by setting \p alink to true.
-      In this last case, you don't need anymore to call Fl::cairo_make_current().
-      You can use Fl::cairo_cc() to get the current cairo context anytime.
+      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. 
@@ -975,20 +975,20 @@
     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: */
+  extern cairo_t * cairo_make_current(void* gc);
+  extern cairo_t * cairo_make_current(void* gc, int W, int H);
+  extern Fl_Cairo_State cairo_state_;
+/* public: */
   /** @} */ 
 
 #endif // HAVE_CAIRO
@@ -1002,7 +1002,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.
 
@@ -1037,11 +1037,11 @@
 */
 class FL_EXPORT Fl_Widget_Tracker {
 
-  Fl_Widget* wp_;
+  fltk3::Widget* wp_;
 
 public:
 
-  Fl_Widget_Tracker(Fl_Widget *wi);
+  Fl_Widget_Tracker(fltk3::Widget *wi);
   ~Fl_Widget_Tracker();
 
   /**
@@ -1049,7 +1049,7 @@
 
     This pointer is \c NULL, if the widget has been deleted.
   */
-  Fl_Widget *widget() {return wp_;}
+  fltk3::Widget *widget() {return wp_;}
 
   /**
     Returns 1, if the watched widget has been deleted.

Modified: branches/branch-3.0/FL/Fl_Abstract_Printer.H
===================================================================
--- branches/branch-3.0/FL/Fl_Abstract_Printer.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Abstract_Printer.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -52,7 +52,7 @@
   };
   void add_image(Fl_Image *image, const uchar *data); // adds an image to the page image list
 #endif
-  void traverse(Fl_Widget *widget); // finds subwindows of widget and prints them
+  void traverse(fltk3::Widget *widget); // finds subwindows of widget and prints them
 protected:
   /** \brief horizontal offset to the origin of graphics coordinates */
   int x_offset;
@@ -80,8 +80,8 @@
   virtual void rotate(float angle);
   virtual void translate(int x, int y);
   virtual void untranslate(void);
-  void print_widget(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
-  void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
+  void print_widget(fltk3::Widget* widget, int delta_x = 0, int delta_y = 0);
+  void print_window_part(fltk3::Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
   virtual int end_page (void);
   virtual void end_job (void);
 };

Modified: branches/branch-3.0/FL/Fl_Bitmap.H
===================================================================
--- branches/branch-3.0/FL/Fl_Bitmap.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Bitmap.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -32,7 +32,7 @@
 #define Fl_Bitmap_H
 #  include "Fl_Image.H"
 
-class Fl_Widget;
+class fltk3::Widget;
 struct Fl_Menu_Item;
 
 /**
@@ -70,7 +70,7 @@
   Fl_Image *copy() { return copy(w(), h()); }
   virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
   void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
-  virtual void label(Fl_Widget*w);
+  virtual void label(fltk3::Widget*w);
   virtual void label(Fl_Menu_Item*m);
   virtual void uncache();
 };

Modified: branches/branch-3.0/FL/Fl_Box.H
===================================================================
--- branches/branch-3.0/FL/Fl_Box.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Box.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -40,7 +40,7 @@
   before some other widgets and making it big enough to surround them
   will let you draw a frame around them.
 */
-class FL_EXPORT Fl_Box : public Fl_Widget {
+class FL_EXPORT Fl_Box : public fltk3::Widget {
 protected:
   void draw();
 public:
@@ -54,10 +54,10 @@
     <P>The destructor removes the box.
   */
     Fl_Box(int X, int Y, int W, int H, const char *l=0)
-	: Fl_Widget(X,Y,W,H,l) {}
+  : fltk3::Widget(X,Y,W,H,l) {}
   /**    See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0)   */
     Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l)
-	: Fl_Widget(X,Y,W,H,l) {box(b);}
+  : fltk3::Widget(X,Y,W,H,l) {box(b);}
 
   virtual int handle(int);
 };

Modified: branches/branch-3.0/FL/Fl_Browser.H
===================================================================
--- branches/branch-3.0/FL/Fl_Browser.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Browser.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -148,7 +148,7 @@
     Returns 0 if browser is empty.
   */
   int size() const { return lines; }
-  void size(int W, int H) { Fl_Widget::size(W, H); }
+  void size(int W, int H) { fltk3::Widget::size(W, H); }
 
   int topline() const ;
   /** For internal use only? */
@@ -180,10 +180,10 @@
   int selected(int line) const ;
   void show(int line);
   /** Shows the entire Fl_Browser widget -- opposite of hide(). */
-  void show() { Fl_Widget::show(); }
+  void show() { fltk3::Widget::show(); }
   void hide(int line);
   /** Hides the entire Fl_Browser widget -- opposite of show(). */
-  void hide() { Fl_Widget::hide(); }
+  void hide() { fltk3::Widget::hide(); }
   int visible(int line) const ;
 
   int value() const ;

Modified: branches/branch-3.0/FL/Fl_Browser_.H
===================================================================
--- branches/branch-3.0/FL/Fl_Browser_.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Browser_.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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/FL/Fl_Button.H
===================================================================
--- branches/branch-3.0/FL/Fl_Button.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Button.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -81,7 +81,7 @@
          (when the user pushes and releases the button, and as the mouse is
 	 dragged around in and out of the button).
 */
-class FL_EXPORT Fl_Button : public Fl_Widget {
+class FL_EXPORT Fl_Button : public fltk3::Widget {
 
   int shortcut_;
   char value_;
@@ -134,11 +134,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/FL/Fl_Cairo.H
===================================================================
--- branches/branch-3.0/FL/Fl_Cairo.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Cairo.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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/FL/Fl_Cairo_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Cairo_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Cairo_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,9 +50,9 @@
    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(Fl_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 Fl_Window::current()
+   the current window. \see fltk3::Window::current()
 */
 class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {
 
@@ -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/FL/Fl_Chart.H
===================================================================
--- branches/branch-3.0/FL/Fl_Chart.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Chart.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -78,7 +78,7 @@
          separated from the pie.
   \li \c FL_SPIKE_CHART: Each sample value is drawn as a vertical line.
  */
-class FL_EXPORT Fl_Chart : public Fl_Widget {
+class FL_EXPORT Fl_Chart : public fltk3::Widget {
     int numb;
     int maxnumb;
     int sizenumb;
@@ -116,7 +116,7 @@
      */
     int size() const {return numb;}
 
-    void size(int W, int H) { Fl_Widget::size(W, H); }
+  void size(int W, int H) { fltk3::Widget::size(W, H); }
 
     /**
       Gets the maximum number of data values for a chart.

Modified: branches/branch-3.0/FL/Fl_Choice.H
===================================================================
--- branches/branch-3.0/FL/Fl_Choice.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Choice.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -49,7 +49,7 @@
 
   When the user picks an item off the menu the value() is set to that item
   and then the item's callback is done with the menu_button as the
-  \c Fl_Widget* argument. If the item does not have a callback the
+  \c fltk3::Widget* argument. If the item does not have a callback the
   menu_button's callback is done instead.
 
   All three mouse buttons pop up the menu. The Forms behavior of the first
@@ -68,13 +68,13 @@
   \image latex choice.eps  "Fl_Choice" width=4cm
   \todo Refactor the doxygen comments for Fl_Choice changed() documentation.
 
-  \li <tt>int Fl_Widget::changed() const</tt>
+  \li <tt>int fltk3::Widget::changed() const</tt>
       This value is true the user picks a different value. <em>It is turned
       off by value() and just before doing a callback (the callback can turn
       it back on if desired).</em>
-  \li <tt>void Fl_Widget::set_changed()</tt>
+  \li <tt>void fltk3::Widget::set_changed()</tt>
       This method sets the changed() flag.
-  \li <tt>void Fl_Widget::clear_changed()</tt>
+  \li <tt>void fltk3::Widget::clear_changed()</tt>
       This method clears the changed() flag.
   \li <tt>Fl_Boxtype Fl_Choice::down_box() const</tt>
       Gets the current down box, which is used when the menu is popped up.

Modified: branches/branch-3.0/FL/Fl_Clock.H
===================================================================
--- branches/branch-3.0/FL/Fl_Clock.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Clock.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -60,7 +60,7 @@
   \image latex clock.eps "FL_SQUARE_CLOCK type" width=4cm
   \image latex round_clock.eps "FL_ROUND_CLOCK type" width=4cm
  */
-class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
+class FL_EXPORT Fl_Clock_Output : public fltk3::Widget {
   int hour_, minute_, second_;
   ulong value_;
   void drawhands(Fl_Color,Fl_Color); // part of draw
@@ -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/FL/Fl_Color_Chooser.H
===================================================================
--- branches/branch-3.0/FL/Fl_Color_Chooser.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Color_Chooser.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -44,26 +44,26 @@
 #ifndef FL_DOXYGEN
 
 /** For internal use only */
-class FL_EXPORT Flcc_HueBox : public Fl_Widget {
+class FL_EXPORT Flcc_HueBox : public fltk3::Widget {
   int px, py;
 protected:
   void draw();
   int handle_key(int);
 public:
   int handle(int);
-  Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
+  Flcc_HueBox(int X, int Y, int W, int H) : fltk3::Widget(X,Y,W,H) {
   px = py = 0;}
 };
 
 /** For internal use only */
-class FL_EXPORT Flcc_ValueBox : public Fl_Widget {
+class FL_EXPORT Flcc_ValueBox : public fltk3::Widget {
   int py;
 protected:
   void draw();
   int handle_key(int);
 public:
   int handle(int);
-  Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
+  Flcc_ValueBox(int X, int Y, int W, int H) : fltk3::Widget(X,Y,W,H) {
   py = 0;}
 };
 
@@ -124,8 +124,8 @@
   double hue_, saturation_, value_;
   double r_, g_, b_;
   void set_valuators();
-  static void rgb_cb(Fl_Widget*, void*);
-  static void mode_cb(Fl_Widget*, void*);
+  static void rgb_cb(fltk3::Widget*, void*);
+  static void mode_cb(fltk3::Widget*, void*);
 public:
   /** Returns which Fl_Color_Chooser variant is currently active */
   int mode() {return choice.value();}

Modified: branches/branch-3.0/FL/Fl_Device.H
===================================================================
--- branches/branch-3.0/FL/Fl_Device.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Device.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -45,7 +45,7 @@
 #include <stdio.h>
 #endif
 
-class Fl_Widget;
+class fltk3::Widget;
 class Fl_Device;
 class Fl_Display;
 class Fl_Abstract_Printer;

Modified: branches/branch-3.0/FL/Fl_Double_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Double_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Double_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -41,12 +41,12 @@
   <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(FL_DOUBLE|FL_INDEX)
+  fltk3::visual(FL_DOUBLE|FL_INDEX)
   \endcode
   This makes sure you can use Xdbe on servers where double buffering
   does not exist for every visual.
 */
-class FL_EXPORT Fl_Double_Window : public Fl_Window {
+class FL_EXPORT Fl_Double_Window : public fltk3::Window {
 protected:
   void flush(int eraseoverlay);
   /**
@@ -56,7 +56,7 @@
   char force_doublebuffering_;
 public:
   void show();
-  void show(int a, char **b) {Fl_Window::show(a,b);}
+  void show(int a, char **b) {fltk3::Window::show(a,b);}
   void flush();
   void resize(int,int,int,int);
   void hide();
@@ -66,12 +66,12 @@
     position, size, and label (title) string.
   */
   Fl_Double_Window(int W, int H, const char *l = 0) 
-    : Fl_Window(W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
+  : fltk3::Window(W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
    /**
     See  Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
   */
   Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0)
-    : Fl_Window(X,Y,W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
+  : fltk3::Window(X,Y,W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); }
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_File_Chooser.H
===================================================================
--- branches/branch-3.0/FL/Fl_File_Chooser.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_File_Chooser.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -59,7 +59,7 @@
   char preview_text_[2048]; 
   int type_; 
   void favoritesButtonCB(); 
-  void favoritesCB(Fl_Widget *w); 
+  void favoritesCB(fltk3::Widget *w); 
   void fileListCB(); 
   void fileNameCB(); 
   void newdir(); 
@@ -219,9 +219,9 @@
   */
   static Fl_File_Sort_F *sort; 
 private:
-  Fl_Widget* ext_group; 
+  fltk3::Widget* ext_group; 
 public:
-  Fl_Widget* add_extra(Fl_Widget* gr);
+  fltk3::Widget* add_extra(fltk3::Widget* gr);
   Fl_File_Browser *browser(void) {return fileList; };
 };
 FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);

Modified: branches/branch-3.0/FL/Fl_File_Icon.H
===================================================================
--- branches/branch-3.0/FL/Fl_File_Icon.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_File_Icon.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -122,7 +122,7 @@
 
   void		draw(int x, int y, int w, int h, Fl_Color ic, int active = 1);
 
-  void		label(Fl_Widget *w);
+  void		label(fltk3::Widget *w);
 
   static void	labeltype(const Fl_Label *o, int x, int y, int w, int h, Fl_Align a);
   void		load(const char *f);

Modified: branches/branch-3.0/FL/Fl_FormsBitmap.H
===================================================================
--- branches/branch-3.0/FL/Fl_FormsBitmap.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_FormsBitmap.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -36,7 +36,7 @@
 /** 
     Forms compatibility Bitmap Image Widget
 */
-class FL_EXPORT Fl_FormsBitmap : public Fl_Widget {
+class FL_EXPORT Fl_FormsBitmap : public fltk3::Widget {
     Fl_Bitmap *b;
 protected:
     void draw();

Modified: branches/branch-3.0/FL/Fl_FormsPixmap.H
===================================================================
--- branches/branch-3.0/FL/Fl_FormsPixmap.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_FormsPixmap.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -37,7 +37,7 @@
   \class Fl_FormsPixmap
   \brief Forms pixmap drawing routines
 */
-class FL_EXPORT Fl_FormsPixmap : public Fl_Widget {
+class FL_EXPORT Fl_FormsPixmap : public fltk3::Widget {
     Fl_Pixmap *b;
 protected:
     void draw();

Modified: branches/branch-3.0/FL/Fl_Free.H
===================================================================
--- branches/branch-3.0/FL/Fl_Free.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Free.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -42,7 +42,7 @@
 #define FL_ALL_FREE		5 /**< FL_INPUT_FREE and FL_CONTINOUS_FREE */
 
 /** appropriate signature for handle function */
-typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char);
+typedef int (*FL_HANDLEPTR)(fltk3::Widget *, int , float, float, char);
 
 /**
   Emulation of the Forms "free" widget.
@@ -63,7 +63,7 @@
   \li \c FL_ALL_FREE         same as FL_INPUT_FREE and FL_CONTINUOUS_FREE.
  
 */
-class FL_EXPORT Fl_Free : public Fl_Widget {
+class FL_EXPORT Fl_Free : public fltk3::Widget {
     FL_HANDLEPTR hfunc;
     static void step(void *);
 protected:

Modified: branches/branch-3.0/FL/Fl_Gl_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Gl_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Gl_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -62,7 +62,7 @@
   it is not useful to add other FLTK Widgets as children,
   unless those widgets are modified to draw using OpenGL calls.
 */
-class FL_EXPORT Fl_Gl_Window : public Fl_Window {
+class FL_EXPORT Fl_Gl_Window : public fltk3::Window {
 
   int mode_;
   const int *alist;
@@ -83,7 +83,7 @@
 public:
 
   void show();
-  void show(int a, char **b) {Fl_Window::show(a,b);}
+  void show(int a, char **b) {fltk3::Window::show(a,b);}
   void flush();
   void hide();
   void resize(int,int,int,int);
@@ -157,7 +157,7 @@
 
     If the desired combination cannot be done, FLTK will try turning off 
     FL_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
@@ -217,7 +217,7 @@
     Creates a new Fl_Gl_Window widget using the given size, and label string. 
     The default boxtype is FL_NO_BOX. The default mode is FL_RGB|FL_DOUBLE|FL_DEPTH.
   */
-  Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();}
+  Fl_Gl_Window(int W, int H, const char *l=0) : fltk3::Window(W,H,l) {init();}
   /**
     Creates a new Fl_Gl_Window widget using the given position,
     size, and label string. The default boxtype is FL_NO_BOX. The
@@ -225,7 +225,7 @@
   */
 
   Fl_Gl_Window(int X, int Y, int W, int H, const char *l=0)
-    : Fl_Window(X,Y,W,H,l) {init();}
+  : fltk3::Window(X,Y,W,H,l) {init();}
 
 protected:
   /**

Modified: branches/branch-3.0/FL/Fl_Group.H
===================================================================
--- branches/branch-3.0/FL/Fl_Group.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Group.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -39,14 +39,14 @@
   The Fl_Group class is the FLTK container widget. It maintains
   an array of child widgets. These children can themselves be any widget
   including Fl_Group. The most important subclass of Fl_Group
-  is Fl_Window, however groups can also be used to control radio buttons 
+  is fltk3::Window, however groups can also be used to control radio buttons 
   or to enforce resize behavior.
 */
-class FL_EXPORT Fl_Group : public Fl_Widget {
+class FL_EXPORT Fl_Group : public fltk3::Widget {
 
-  Fl_Widget** array_;
-  Fl_Widget* savedfocus_;
-  Fl_Widget* resizable_;
+  fltk3::Widget** array_;
+  fltk3::Widget* savedfocus_;
+  fltk3::Widget* resizable_;
   int children_;
   int *sizes_; // remembered initial sizes of children
 
@@ -59,10 +59,10 @@
 
 protected:
   void draw();
-  void draw_child(Fl_Widget& widget) const;
+  void draw_child(fltk3::Widget& widget) const;
   void draw_children();
-  void draw_outside_label(const Fl_Widget& widget) const ;
-  void update_child(Fl_Widget& widget) const;
+  void draw_outside_label(const fltk3::Widget& widget) const ;
+  void update_child(fltk3::Widget& widget) const;
   int  *sizes();
 
 public:
@@ -80,13 +80,13 @@
   /**
     Returns array()[n].  <i>No range checking is done!</i>
   */
-  Fl_Widget* child(int n) const {return array()[n];}
-  int find(const Fl_Widget*) const;
+  fltk3::Widget* child(int n) const {return array()[n];}
+  int find(const fltk3::Widget*) const;
   /**
-    See int Fl_Group::find(const Fl_Widget *w) const 
+    See int Fl_Group::find(const fltk3::Widget *w) const 
   */
-  int find(const Fl_Widget& o) const {return find(&o);}
-  Fl_Widget* const* array() const;
+  int find(const fltk3::Widget& o) const {return find(&o);}
+  fltk3::Widget* const* array() const;
 
   void resize(int,int,int,int);
   /**
@@ -95,29 +95,29 @@
   */
   Fl_Group(int,int,int,int, const char * = 0);
   virtual ~Fl_Group();
-  void add(Fl_Widget&);
+  void add(fltk3::Widget&);
   /**
-    See void Fl_Group::add(Fl_Widget &w) 
+    See void Fl_Group::add(fltk3::Widget &w) 
   */
-  void add(Fl_Widget* o) {add(*o);}
-  void insert(Fl_Widget&, int i);
+  void add(fltk3::Widget* o) {add(*o);}
+  void insert(fltk3::Widget&, int i);
   /**
     This does insert(w, find(before)).  This will append the
     widget if \p before is not in the group.
   */
-  void insert(Fl_Widget& o, Fl_Widget* before) {insert(o,find(before));}
-  void remove(Fl_Widget&);
+  void insert(fltk3::Widget& o, fltk3::Widget* before) {insert(o,find(before));}
+  void remove(fltk3::Widget&);
   /**
     Removes the widget \p o from the group.
-    \sa void remove(Fl_Widget&)
+    \sa void remove(fltk3::Widget&)
   */
-  void remove(Fl_Widget* o) {remove(*o);}
+  void remove(fltk3::Widget* o) {remove(*o);}
   void clear();
 
   /**
-    See void Fl_Group::resizable(Fl_Widget *box) 
+    See void Fl_Group::resizable(fltk3::Widget *box) 
   */
-  void resizable(Fl_Widget& o) {resizable_ = &o;}
+  void resizable(fltk3::Widget& o) {resizable_ = &o;}
   /**
     The resizable widget defines the resizing box for the group. When the
     group is resized it calculates a new size and position for all of its
@@ -137,7 +137,7 @@
 
     The resizable may be set to the group itself, in which case all the
     contents are resized. This is the default value for Fl_Group,
-    although NULL is the default for Fl_Window and Fl_Pack.
+    although NULL is the default for fltk3::Window and Fl_Pack.
 
     If the resizable is NULL then all widgets remain a fixed size
     and distance from the top-left corner.
@@ -146,15 +146,15 @@
     invisible Fl_Box as the resizable and/or by using a hierarchy
     of child Fl_Group's.
   */
-  void resizable(Fl_Widget* o) {resizable_ = o;}
+  void resizable(fltk3::Widget* o) {resizable_ = o;}
   /**
-    See void Fl_Group::resizable(Fl_Widget *box) 
+    See void Fl_Group::resizable(fltk3::Widget *box) 
   */
-  Fl_Widget* resizable() const {return resizable_;}
+  fltk3::Widget* resizable() const {return resizable_;}
   /**
     Adds a widget to the group and makes it the resizable widget.
   */
-  void add_resizable(Fl_Widget& o) {resizable_ = &o; add(o);}
+  void add_resizable(fltk3::Widget& o) {resizable_ = &o; add(o);}
   void init_sizes();
 
   /**
@@ -189,12 +189,12 @@
   /**
     \deprecated This is for backwards compatibility only. You should use
     \e W->%take_focus() instead.
-    \sa Fl_Widget::take_focus();
+    \sa fltk3::Widget::take_focus();
   */
-  void focus(Fl_Widget* W) {W->take_focus();}
+  void focus(fltk3::Widget* W) {W->take_focus();}
 
   /** This is for forms compatibility only */
-  Fl_Widget* & _ddfdesign_kludge() {return resizable_;}
+  fltk3::Widget* & _ddfdesign_kludge() {return resizable_;}
 
   /** This is for forms compatibility only */
   void forms_end();

Modified: branches/branch-3.0/FL/Fl_Help_View.H
===================================================================
--- branches/branch-3.0/FL/Fl_Help_View.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Help_View.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -49,7 +49,7 @@
 //
 
 
-typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *);
+typedef const char *(Fl_Help_Func)(fltk3::Widget *, const char *);
 
 
 //
@@ -311,7 +311,7 @@
     It must return a pathname that can be opened as a local file or NULL:
     
     \code
-    const char *fn(Fl_Widget *w, const char *uri);
+    const char *fn(fltk3::Widget *w, const char *uri);
     \endcode
     
     The link function can be used to retrieve remote or virtual
@@ -328,7 +328,7 @@
   void		resize(int,int,int,int);
   /** Gets the size of the help view. */
   int		size() const { return (size_); }
-  void		size(int W, int H) { Fl_Widget::size(W, H); }
+  void		size(int W, int H) { fltk3::Widget::size(W, H); }
   /** Sets the default text color. */
   void		textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; }
   /** Returns the current default text color. */
@@ -359,10 +359,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_);
@@ -371,7 +371,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.
@@ -380,11 +380,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/FL/Fl_Image.H
===================================================================
--- branches/branch-3.0/FL/Fl_Image.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Image.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -33,7 +33,7 @@
 
 #  include "Enumerations.H"
 
-class Fl_Widget;
+class fltk3::Widget;
 struct Fl_Menu_Item;
 struct Fl_Label;
 
@@ -159,7 +159,7 @@
   */
   void inactive() { color_average(FL_GRAY, .33f); }
   virtual void desaturate();
-  virtual void label(Fl_Widget*w);
+  virtual void label(fltk3::Widget*w);
   virtual void label(Fl_Menu_Item*m);
   /**
     The draw() methods draw the image. This form specifies
@@ -215,7 +215,7 @@
   virtual void desaturate();
   virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
   void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
-  virtual void label(Fl_Widget*w);
+  virtual void label(fltk3::Widget*w);
   virtual void label(Fl_Menu_Item*m);
   virtual void uncache();
 };

Modified: branches/branch-3.0/FL/Fl_Input_.H
===================================================================
--- branches/branch-3.0/FL/Fl_Input_.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Input_.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -99,7 +99,7 @@
   None of these issues should be desasterous. Nevertheless, we should 
   discuss how FLTK should handle false UTF8 suequences and pointers.
 */
-class FL_EXPORT Fl_Input_ : public Fl_Widget {
+class FL_EXPORT Fl_Input_ : public fltk3::Widget {
 
   /** \internal Storage for the text field. */
   const char* value_;
@@ -261,8 +261,8 @@
 
   /** Sets the width and height of this widget.
     \param [in] W, H new width and height
-    \see Fl_Widget::size(int, int) */
-  void size(int W, int H) { Fl_Widget::size(W, H); }
+    \see fltk3::Widget::size(int, int) */
+  void size(int W, int H) { fltk3::Widget::size(W, H); }
 
   /** Gets the maximum length of the input field.  
     \todo It is not clear if this function is actually required */

Modified: branches/branch-3.0/FL/Fl_Input_Choice.H
===================================================================
--- branches/branch-3.0/FL/Fl_Input_Choice.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Input_Choice.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -64,7 +64,7 @@
       fl_color(active_r() ? labelcolor() : fl_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) : 
@@ -74,14 +74,14 @@
   Fl_Input *inp_;
   InputMenuButton *menu_;
 
-  static void menu_cb(Fl_Widget*, void *data) { 
+  static void menu_cb(fltk3::Widget*, void *data) { 
     Fl_Input_Choice *o=(Fl_Input_Choice *)data;
     Fl_Widget_Tracker wp(o);
     const Fl_Menu_Item *item = o->menubutton()->mvalue();
     if (item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) return;	// ignore submenus
     if (!strcmp(o->inp_->value(), o->menu_->text()))
     {
-      o->Fl_Widget::clear_changed();
+      o->fltk3::Widget::clear_changed();
       if (o->when() & FL_WHEN_NOT_CHANGED)
 	o->do_callback();
     }
@@ -89,7 +89,7 @@
     {
       o->inp_->value(o->menu_->text());
       o->inp_->set_changed();
-      o->Fl_Widget::set_changed();
+      o->fltk3::Widget::set_changed();
       if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE))
 	o->do_callback();
     }
@@ -98,20 +98,20 @@
 
     if (o->callback() != default_callback)
     {
-      o->Fl_Widget::clear_changed();
+      o->fltk3::Widget::clear_changed();
       o->inp_->clear_changed();
     }
   }
 
-  static void inp_cb(Fl_Widget*, void *data) { 
+  static void inp_cb(fltk3::Widget*, void *data) { 
     Fl_Input_Choice *o=(Fl_Input_Choice *)data;
     Fl_Widget_Tracker wp(o);
     if (o->inp_->changed()) {
-      o->Fl_Widget::set_changed();
+      o->fltk3::Widget::set_changed();
       if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE))
 	o->do_callback();
     } else {
-      o->Fl_Widget::clear_changed();
+      o->fltk3::Widget::clear_changed();
       if (o->when() & FL_WHEN_NOT_CHANGED)
 	o->do_callback();
     }
@@ -119,19 +119,19 @@
     if (wp.deleted()) return;
 
     if (o->callback() != default_callback)
-      o->Fl_Widget::clear_changed();
+      o->fltk3::Widget::clear_changed();
   }
 
   // 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:
   /**
@@ -156,14 +156,14 @@
   
   /** Adds an item to the menu.*/
   void add(const char *s) { menu_->add(s);  }
-  int changed() const { return inp_->changed() | Fl_Widget::changed();}
+  int changed() const { return inp_->changed() | fltk3::Widget::changed();}
   void clear_changed() { 
     inp_->clear_changed();
-    Fl_Widget::clear_changed();
+    fltk3::Widget::clear_changed();
   }
   void set_changed() { 
     inp_->set_changed();
-    // no need to call Fl_Widget::set_changed()
+    // no need to call fltk3::Widget::set_changed()
   }
   /** Removes all items from the menu. */
   void clear() { menu_->clear(); }

Modified: branches/branch-3.0/FL/Fl_Menu_.H
===================================================================
--- branches/branch-3.0/FL/Fl_Menu_.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Menu_.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -45,7 +45,7 @@
   array may either be supplied directly by the user program, or it may
   be "private": a dynamically allocated array managed by the Fl_Menu_.
 */
-class FL_EXPORT Fl_Menu_ : public Fl_Widget {
+class FL_EXPORT Fl_Menu_ : public fltk3::Widget {
 
   Fl_Menu_Item *menu_;
   const Fl_Menu_Item *value_;
@@ -83,7 +83,7 @@
       return add(a,fl_old_shortcut(b),c,d,e);}
   int  add(const char *);
   int  size() const ;
-  void size(int W, int H) { Fl_Widget::size(W, H); }
+  void size(int W, int H) { fltk3::Widget::size(W, H); }
   void clear();
   void replace(int,const char *);
   void remove(int);

Modified: branches/branch-3.0/FL/Fl_Menu_Bar.H
===================================================================
--- branches/branch-3.0/FL/Fl_Menu_Bar.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Menu_Bar.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,7 +50,7 @@
   submenu, then it acts like a "button" in the menubar.  Clicking on it
   will pick it. </P>
   <P>When the user picks an item off the menu, the item's callback is
-  done with the menubar as the Fl_Widget* argument.  If the item
+  done with the menubar as the fltk3::Widget* argument.  If the item
   does not have a callback the menubar's callback is done instead. </P>
   <P>Submenus will also pop up in response to shortcuts indicated by
   putting a '&' character in the name field of the menu item. If you put a

Modified: branches/branch-3.0/FL/Fl_Menu_Button.H
===================================================================
--- branches/branch-3.0/FL/Fl_Menu_Button.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Menu_Button.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,7 +50,7 @@
   The '&' character in menu item names are only looked at when the menu is
   popped up, however. </P>
   <P>When the user picks an item off the menu, the item's callback is
-  done with the menu_button as the Fl_Widget* argument.  If the
+  done with the menu_button as the fltk3::Widget* argument.  If the
   item does not have a callback the menu_button's callback is done
   instead.
 */

Modified: branches/branch-3.0/FL/Fl_Menu_Item.H
===================================================================
--- branches/branch-3.0/FL/Fl_Menu_Item.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Menu_Item.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -188,14 +188,14 @@
   /**
     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.
   */
   Fl_Font labelfont() const {return labelfont_;}
 
   /**
     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(Fl_Font a) {labelfont_ = a;}
 
@@ -259,11 +259,11 @@
     FL_ALT+'a' or FL_ALT+FL_F+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).
@@ -353,27 +353,27 @@
 
   /**
     Calls the Fl_Menu_Item item's callback, and provides the 
-    Fl_Widget argument (and optionally overrides the user_data()
+    fltk3::Widget argument (and optionally overrides the user_data()
     argument). You must first check that callback() is non-zero
     before calling this.
   */
-  void do_callback(Fl_Widget* o) const {callback_(o, user_data_);}
+  void do_callback(fltk3::Widget* o) const {callback_(o, user_data_);}
 
   /**
     Calls the Fl_Menu_Item item's callback, and provides the 
-    Fl_Widget argument (and optionally overrides the user_data()
+    fltk3::Widget argument (and optionally overrides the user_data()
     argument). You must first check that callback() is non-zero
     before calling this.
   */
-  void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);}
+  void do_callback(fltk3::Widget* o,void* arg) const {callback_(o, arg);}
 
   /**
     Calls the Fl_Menu_Item item's callback, and provides the 
-    Fl_Widget argument (and optionally overrides the user_data()
+    fltk3::Widget argument (and optionally overrides the user_data()
     argument).  You must first check that callback() is non-zero
     before calling this.
   */
-  void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);}
+  void do_callback(fltk3::Widget* o,long arg) const {callback_(o, (void*)arg);}
 
   // back-compatibility, do not use:
 

Modified: branches/branch-3.0/FL/Fl_Multi_Label.H
===================================================================
--- branches/branch-3.0/FL/Fl_Multi_Label.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Multi_Label.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -28,7 +28,7 @@
 #ifndef Fl_Multi_Label_H
 #define Fl_Multi_Label_H
 
-class Fl_Widget;
+class fltk3::Widget;
 struct Fl_Menu_Item;
 
 struct FL_EXPORT Fl_Multi_Label {
@@ -36,7 +36,7 @@
   const char* labelb;
   uchar typea;
   uchar typeb;
-  void label(Fl_Widget*);
+  void label(fltk3::Widget*);
   void label(Fl_Menu_Item*);
 };
 

Modified: branches/branch-3.0/FL/Fl_Native_File_Chooser_MAC.H
===================================================================
--- branches/branch-3.0/FL/Fl_Native_File_Chooser_MAC.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Native_File_Chooser_MAC.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -32,7 +32,7 @@
 #include <Carbon/Carbon.h>
 #include <config.h>
 
-#undef check // necessary for use of Fl::check()
+#undef check // necessary for use of fltk3::check()
 
 #include <FL/filename.H>
 #define MAXFILTERS	80

Modified: branches/branch-3.0/FL/Fl_Object.H
===================================================================
--- branches/branch-3.0/FL/Fl_Object.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Object.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -25,9 +25,9 @@
 //     http://www.fltk.org/str.php
 //
 
-// This file is provided for back compatibility only.  Please use Fl_Widget
+// This file is provided for back compatibility only.  Please use fltk3::Widget
 #ifndef Fl_Object
-#define Fl_Object Fl_Widget
+#define Fl_Object fltk3::Widget
 #endif
 #include "Fl_Widget.H"
 

Modified: branches/branch-3.0/FL/Fl_Overlay_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Overlay_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Overlay_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -47,7 +47,7 @@
 class FL_EXPORT Fl_Overlay_Window : public Fl_Double_Window {
   friend class _Fl_Overlay;
   virtual void draw_overlay() = 0;
-  Fl_Window *overlay_;
+  fltk3::Window *overlay_;
 public:
   void show();
   void flush();

Modified: branches/branch-3.0/FL/Fl_Pixmap.H
===================================================================
--- branches/branch-3.0/FL/Fl_Pixmap.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Pixmap.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -32,7 +32,7 @@
 #define Fl_Pixmap_H
 #  include "Fl_Image.H"
 
-class Fl_Widget;
+class fltk3::Widget;
 struct Fl_Menu_Item;
 
 // Older C++ compilers don't support the explicit keyword... :(
@@ -84,7 +84,7 @@
   virtual void desaturate();
   virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
   void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
-  virtual void label(Fl_Widget*w);
+  virtual void label(fltk3::Widget*w);
   virtual void label(Fl_Menu_Item*m);
   virtual void uncache();
 };

Modified: branches/branch-3.0/FL/Fl_Positioner.H
===================================================================
--- branches/branch-3.0/FL/Fl_Positioner.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Positioner.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -43,7 +43,7 @@
   <P ALIGN=CENTER>\image html  positioner.gif </P> 
   \image latex  positioner.eps " Fl_Positioner" width=4cm
 */
-class FL_EXPORT Fl_Positioner : public Fl_Widget {
+class FL_EXPORT Fl_Positioner : public fltk3::Widget {
 
   double xmin, ymin;
   double xmax, ymax;

Modified: branches/branch-3.0/FL/Fl_Printer.H
===================================================================
--- branches/branch-3.0/FL/Fl_Printer.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Printer.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -44,7 +44,7 @@
  *
  It allows to use all FLTK drawing, color, text, and clip functions, and to have them operate
  on printed page(s). There are two main, non exclusive, ways to use it.
- <ul><li>Print any widget (standard, custom, Fl_Window, Fl_Gl_Window) as it appears 
+ <ul><li>Print any widget (standard, custom, fltk3::Window, Fl_Gl_Window) as it appears 
  on screen, with optional translation and scaling. This is done by calling print_widget() 
  or print_window_part().
  <li>Use a series of FLTK graphics commands (e.g., font, text, lines, colors, clip) to
@@ -102,8 +102,8 @@
   void translate(int x, int y);
   void untranslate(void);
 #ifdef FL_DOXYGEN  
-  void print_widget(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
-  void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
+  void print_widget(fltk3::Widget* widget, int delta_x = 0, int delta_y = 0);
+  void print_window_part(fltk3::Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
 #endif  
   int end_page (void);
   void end_job (void);
@@ -204,7 +204,7 @@
    \param w the widget
    \param x,y offsets where to print relatively to coordinates origin
    */
-  virtual int print(Fl_Abstract_Printer* p, Fl_Widget* w, int x, int y) { return 0; }
+  virtual int print(Fl_Abstract_Printer* p, fltk3::Widget* w, int x, int y) { return 0; }
 };
 
 #endif // Fl_Printer_H

Modified: branches/branch-3.0/FL/Fl_Progress.H
===================================================================
--- branches/branch-3.0/FL/Fl_Progress.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Progress.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -44,7 +44,7 @@
 /**
     Displays a progress bar for the user.
 */
-class FL_EXPORT Fl_Progress : public Fl_Widget
+class FL_EXPORT Fl_Progress : public fltk3::Widget
 {
   float	value_,
 	minimum_,

Modified: branches/branch-3.0/FL/Fl_Repeat_Button.H
===================================================================
--- branches/branch-3.0/FL/Fl_Repeat_Button.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Repeat_Button.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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/FL/Fl_Scroll.H
===================================================================
--- branches/branch-3.0/FL/Fl_Scroll.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Scroll.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -64,7 +64,7 @@
   <LI>Fl_Scroll::BOTH_ALWAYS       - Both always on. </LI>
   </UL>
 
-  Use <B> scrollbar.align(int) ( see void Fl_Widget::align(Fl_Align) ) :</B>
+  Use <B> scrollbar.align(int) ( see void fltk3::Widget::align(Fl_Align) ) :</B>
   to change what side the scrollbars are drawn on.
 
   If the FL_ALIGN_LEFT bit is on, the vertical scrollbar is on the left.
@@ -89,7 +89,7 @@
   fit inside the Fl_Scroll without scrolling.  Be sure to leave
   space for the scrollbars, as Fluid won't show these either.
 
-  <I>You cannot use Fl_Window as a child of this since the
+  <I>You cannot use fltk3::Window as a child of this since the
   clipping is not conveyed to it when drawn, and it will draw over the
   scrollbars and neighboring objects.</I>
 */
@@ -98,8 +98,8 @@
   int xposition_, yposition_;
   int oldx, oldy;
   int scrollbar_size_;
-  static void hscrollbar_cb(Fl_Widget*, void*);
-  static void scrollbar_cb(Fl_Widget*, void*);
+  static void hscrollbar_cb(fltk3::Widget*, void*);
+  static void scrollbar_cb(fltk3::Widget*, void*);
   void fix_scrollbar_order();
   static void draw_clip(void*,int,int,int,int);
 
@@ -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/FL/Fl_Single_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Single_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Single_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -34,29 +34,29 @@
 #include "Fl_Window.H"
 
 /**
-  This is the same as Fl_Window.  However, it is possible that
+  This is the same as fltk3::Window.  However, it is possible that
   some implementations will provide double-buffered windows by default.
   This subcan be used to force single-buffering.  This may be
   useful for modifying existing programs that use incremental update, or
   for some types of image data, such as a movie flipbook.
 */
-class FL_EXPORT Fl_Single_Window : public Fl_Window {
+class FL_EXPORT Fl_Single_Window : public fltk3::Window {
 public:
   void show();
-  void show(int a, char **b) {Fl_Window::show(a,b);}
+  void show(int a, char **b) {fltk3::Window::show(a,b);}
   void flush();
    /**
     Creates a new Fl_Single_Window widget using the given
     size, and label (title) string.
   */
   Fl_Single_Window(int W, int H, const char *l=0)
-    : Fl_Window(W,H,l) {}
+  : fltk3::Window(W,H,l) {}
   /**
     Creates a new Fl_Single_Window widget using the given
     position, size, and label (title) string.
   */
   Fl_Single_Window(int X, int Y, int W, int H, const char *l=0)
-    : Fl_Window(X,Y,W,H,l) {}
+  : fltk3::Window(X,Y,W,H,l) {}
   int make_current();
 };
 

Modified: branches/branch-3.0/FL/Fl_Slider.H
===================================================================
--- branches/branch-3.0/FL/Fl_Slider.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Slider.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,7 +50,7 @@
   maximum().  The minimum() may be greater than the maximum() to
   reverse the slider direction.
 
-  Use void Fl_Widget::type(int) to set how the slider is drawn, 
+  Use void fltk3::Widget::type(int) to set how the slider is drawn, 
   which can be one of the following:
   
   \li FL_VERTICAL - Draws a vertical slider (this is the default).

Modified: branches/branch-3.0/FL/Fl_Spinner.H
===================================================================
--- branches/branch-3.0/FL/Fl_Spinner.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Spinner.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -62,7 +62,7 @@
 		down_button_;		// Down button
 
 
-  static void	sb_cb(Fl_Widget *w, Fl_Spinner *sb) {
+  static void	sb_cb(fltk3::Widget *w, Fl_Spinner *sb) {
 		  double v;		// New value
 
 		  if (w == &(sb->input_)) {
@@ -158,10 +158,10 @@
 		  switch (event) {
 		    case FL_KEYDOWN :
 		    case FL_SHORTCUT :
-		      if (Fl::event_key() == FL_Up) {
+		      if (fltk3::event_key() == FL_Up) {
 			up_button_.do_callback();
 			return 1;
-		      } else if (Fl::event_key() == FL_Down) {
+		      } else if (fltk3::event_key() == FL_Down) {
 			down_button_.do_callback();
 			return 1;
 		      } else return 0;

Modified: branches/branch-3.0/FL/Fl_Table.H
===================================================================
--- branches/branch-3.0/FL/Fl_Table.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Table.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -428,7 +428,7 @@
     return( Fl_Group::children() > 3 );		// (ie. more than box and 2 scrollbars?)
   }
   
-  static void scroll_cb(Fl_Widget*,void*);	// h/v scrollbar callback
+  static void scroll_cb(fltk3::Widget*,void*);	// h/v scrollbar callback
   
   void damage_zone(int r1, int c1, int r2, int c2, int r3 = 0, int c3 = 0);
   
@@ -837,19 +837,19 @@
     table->init_sizes();
     table->redraw();
   }
-  void add(Fl_Widget& w) {
+  void add(fltk3::Widget& w) {
     table->add(w);
   }
-  void add(Fl_Widget* w) {
+  void add(fltk3::Widget* w) {
     table->add(w);
   }
-  void insert(Fl_Widget& w, int n) {
+  void insert(fltk3::Widget& w, int n) {
     table->insert(w,n);
   }
-  void insert(Fl_Widget& w, Fl_Widget* w2) {
+  void insert(fltk3::Widget& w, fltk3::Widget* w2) {
     table->insert(w,w2);
   }
-  void remove(Fl_Widget& w) {
+  void remove(fltk3::Widget& w) {
     table->remove(w);
   }
   void begin() {
@@ -867,7 +867,7 @@
     } 
     Fl_Group::current(Fl_Group::parent());
   }
-  Fl_Widget * const *array() {
+  fltk3::Widget * const *array() {
     return(table->array());
   }
   
@@ -881,12 +881,12 @@
    \code
    for ( int i=0; i<children(); i++ )
    {
-   Fl_Widget *w = child(i);
+   fltk3::Widget *w = child(i);
    [..]
    }
    \endcode
    */
-  Fl_Widget *child(int n) const {
+  fltk3::Widget *child(int n) const {
     return(table->child(n));
   }
   
@@ -901,10 +901,10 @@
   int children() const {
     return(table->children()-2);    // -2: skip Fl_Scroll's h/v scrollbar widgets
   }
-  int find(const Fl_Widget *w) const {
+  int find(const fltk3::Widget *w) const {
     return(table->find(w));
   }
-  int find(const Fl_Widget &w) const {
+  int find(const fltk3::Widget &w) const {
     return(table->find(w));
   } 
   // CALLBACKS
@@ -940,12 +940,12 @@
     _callback_context = context;
     _callback_row = row;
     _callback_col = col;
-    Fl_Widget::do_callback();
+    fltk3::Widget::do_callback();
   }
   
 #if DOXYGEN
   /**
-   The Fl_Widget::when() function is used to set a group of flags, determining
+   The fltk3::Widget::when() function is used to set a group of flags, determining
    when the widget callback is called:
    
    <table border=1>
@@ -969,7 +969,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(Fl_When flags);
@@ -977,7 +977,7 @@
   
 #if DOXYGEN
   /**
-   Callbacks will be called depending on the setting of Fl_Widget::when().
+   Callbacks will be called depending on the setting of fltk3::Widget::when().
    
    Callback functions should use the following functions to determine the 
    context/row/column:
@@ -1036,11 +1036,11 @@
    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
-   static void event_callback(Fl_Widget*, void* data)
+   static void event_callback(fltk3::Widget*, void* data)
    {
    MyTable *o = (MyTable*)data;
    o-&gt;event_callback2();
@@ -1056,7 +1056,7 @@
    };
    \endcode
    */
-  void callback(Fl_Widget*, void*);
+  void callback(fltk3::Widget*, void*);
 #endif
 };
 

Modified: branches/branch-3.0/FL/Fl_Tabs.H
===================================================================
--- branches/branch-3.0/FL/Fl_Tabs.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Tabs.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -60,23 +60,23 @@
   the tabs look the way you want them to.
 */
 class FL_EXPORT Fl_Tabs : public Fl_Group {
-  Fl_Widget *value_;
-  Fl_Widget *push_;
+  fltk3::Widget *value_;
+  fltk3::Widget *push_;
   int tab_positions(int*, int*);
   int tab_height();
-  void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
+  void draw_tab(int x1, int x2, int W, int H, fltk3::Widget* o, int sel=0);
 protected:
   void redraw_tabs();
   void draw();
 
 public:
   int handle(int);
-  Fl_Widget *value();
-  int value(Fl_Widget *);
-  Fl_Widget *push() const {return push_;}
-  int push(Fl_Widget *);
+  fltk3::Widget *value();
+  int value(fltk3::Widget *);
+  fltk3::Widget *push() const {return push_;}
+  int push(fltk3::Widget *);
   Fl_Tabs(int,int,int,int,const char * = 0);
-  Fl_Widget *which(int event_x, int event_y);
+  fltk3::Widget *which(int event_x, int event_y);
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Text_Display.H
===================================================================
--- branches/branch-3.0/FL/Fl_Text_Display.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Text_Display.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -58,7 +58,7 @@
       CURSOR_POS, CHARACTER_POS
     };
 
-    /** 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/FL/Fl_Tile.H
===================================================================
--- branches/branch-3.0/FL/Fl_Tile.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Tile.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -68,12 +68,12 @@
   children but before displaying the window to set the borders where you
   want.
 
-  <P>Note on resizable(Fl_Widget &w) :
+  <P>Note on resizable(fltk3::Widget &w) :
   The "resizable" child widget (which should be invisible) limits where the
   border can be dragged to.  If you don't set it, it will be possible to
   drag the borders right to the edge, and thus resize objects on the edge
   to zero width or height.  The resizable() widget is not
-  resized by dragging any borders. See also void Fl_Group::resizable(Fl_Widget &w)
+  resized by dragging any borders. See also void Fl_Group::resizable(fltk3::Widget &w)
 
 */
 class FL_EXPORT Fl_Tile : public Fl_Group {

Modified: branches/branch-3.0/FL/Fl_Timer.H
===================================================================
--- branches/branch-3.0/FL/Fl_Timer.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Timer.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -45,9 +45,9 @@
   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 Fl_Widget {
+class FL_EXPORT Fl_Timer : public fltk3::Widget {
   static void stepcb(void *);
   void step();
   char on, direction_;

Modified: branches/branch-3.0/FL/Fl_Tooltip.H
===================================================================
--- branches/branch-3.0/FL/Fl_Tooltip.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Tooltip.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -60,12 +60,12 @@
   static void enable(int b = 1) { enabled_ = b;}
   /**    Same as enable(0), disables tooltips on all widgets.  */
   static void disable() { enabled_ = 0; }
-  static void (*enter)(Fl_Widget* w);
-  static void enter_area(Fl_Widget* w, int X, int Y, int W, int H, const char* tip);
-  static void (*exit)(Fl_Widget *w);
+  static void (*enter)(fltk3::Widget* w);
+  static void enter_area(fltk3::Widget* w, int X, int Y, int W, int H, const char* tip);
+  static void (*exit)(fltk3::Widget *w);
   /** Gets the current widget target */
-  static Fl_Widget* current() {return widget_;}
-  static void current(Fl_Widget*);
+  static fltk3::Widget* current() {return widget_;}
+  static void current(fltk3::Widget*);
 
   /**    Gets the typeface for the tooltip text.  */
   static Fl_Font font() { return font_; }
@@ -84,12 +84,12 @@
   /** Sets the color of the text in the tooltip. The default is  black. */
   static void textcolor(Fl_Color c) { textcolor_ = c; }
 
-  // These should not be public, but Fl_Widget::tooltip() needs them...
+  // These should not be public, but fltk3::Widget::tooltip() needs them...
   // fabien: made it private with only a friend function access
 private:
-  friend void Fl_Widget::tooltip(const char *);
-  static void enter_(Fl_Widget* w);
-  static void exit_(Fl_Widget *w);
+  friend void fltk3::Widget::tooltip(const char *);
+  static void enter_(fltk3::Widget* w);
+  static void exit_(fltk3::Widget *w);
 
 private:
   static float delay_; //!< delay before a tooltip is shown
@@ -99,7 +99,7 @@
   static Fl_Color textcolor_;
   static Fl_Font font_;
   static Fl_Fontsize size_;
-  static Fl_Widget* widget_; //!< Keeps track of the current target widget
+  static fltk3::Widget* widget_; //!< Keeps track of the current target widget
 };
 
 #endif

Modified: branches/branch-3.0/FL/Fl_Tree.H
===================================================================
--- branches/branch-3.0/FL/Fl_Tree.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Tree.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -113,7 +113,7 @@
   /// You probably want to use item_clicked() instead, which is fast.
   ///
   /// 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()/fltk3: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 item_clicked().
@@ -631,14 +631,14 @@
   }
   /// Sets the style of box used to draw selected items.
   /// This is an fltk Fl_Boxtype.
-  /// The default is influenced by FLTK's current Fl::scheme()
+  /// The default is influenced by FLTK's current fltk3::scheme()
   ///
   Fl_Boxtype selectbox() const {
     return(_prefs.selectbox());
   }
   /// Gets the style of box used to draw selected items.
   /// This is an fltk Fl_Boxtype.
-  /// The default is influenced by FLTK's current Fl::scheme()
+  /// The default is influenced by FLTK's current fltk3::scheme()
   ///
   void selectbox(Fl_Boxtype val) {
     _prefs.selectbox(val);

Modified: branches/branch-3.0/FL/Fl_Tree_Item.H
===================================================================
--- branches/branch-3.0/FL/Fl_Tree_Item.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Tree_Item.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -69,7 +69,7 @@
   int                     _xywh[4];		// xywh of this widget (if visible)
   int                     _collapse_xywh[4];	// xywh of collapse icon (if any)
   int                     _label_xywh[4];	// xywh of label
-  Fl_Widget              *_widget;		// item's label widget (optional)
+  fltk3::Widget              *_widget;		// item's label widget (optional)
   Fl_Image               *_usericon;		// item's user-specific icon (optional)
   Fl_Tree_Item_Array      _children;		// array of child items
   Fl_Tree_Item           *_parent;		// parent item (=0 if root)
@@ -83,7 +83,7 @@
   Fl_Tree_Item(const Fl_Tree_Prefs &prefs);	// CTOR
   ~Fl_Tree_Item();				// DTOR
   Fl_Tree_Item(const Fl_Tree_Item *o);		// COPY CTOR
-  void draw(int X, int &Y, int W, Fl_Widget *tree, const Fl_Tree_Prefs &prefs, int lastchild=1);
+  void draw(int X, int &Y, int W, fltk3::Widget *tree, const Fl_Tree_Prefs &prefs, int lastchild=1);
   void show_self(const char *indent = "") const;
   void label(const char *val);
   const char *label() const;
@@ -135,11 +135,11 @@
     return(_labelbgcolor); 
   }
   /// Assign an FLTK widget to this item.
-  void widget(Fl_Widget *val) {
+  void widget(fltk3::Widget *val) {
     _widget = val; 
   }
   /// Return FLTK widget assigned to this item.
-  Fl_Widget *widget() const {
+  fltk3::Widget *widget() const {
     return(_widget); 
   }
   /// Return the number of children this item has.

Modified: branches/branch-3.0/FL/Fl_Valuator.H
===================================================================
--- branches/branch-3.0/FL/Fl_Valuator.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Valuator.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -52,7 +52,7 @@
   The ones labelled "0" are the default versions with a type(0).  
   For consistency the symbol FL_VERTICAL is defined as zero.
 */
-class FL_EXPORT Fl_Valuator : public Fl_Widget {
+class FL_EXPORT Fl_Valuator : public fltk3::Widget {
 
   double value_;
   double previous_value_;

Modified: branches/branch-3.0/FL/Fl_Value_Input.H
===================================================================
--- branches/branch-3.0/FL/Fl_Value_Input.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Value_Input.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -69,7 +69,7 @@
   Fl_Input input;
 private:
   char soft_;
-  static void input_cb(Fl_Widget*,void*);
+  static void input_cb(fltk3::Widget*,void*);
   virtual void value_damage(); // cause damage() due to value() changing
 public:
   int handle(int);
@@ -97,10 +97,10 @@
     , FL_ALT | (FL_F + 10), or just 'a'.  A value
     of 0 disables the shortcut. </P>
     <P>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. </P>
     <P>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/FL/Fl_Widget.H
===================================================================
--- branches/branch-3.0/FL/Fl_Widget.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Widget.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -26,26 +26,29 @@
 //
 
 /* \file
-   Fl_Widget, Fl_Label classes . */
+   fltk3::Widget, Fl_Label classes . */
 
 #ifndef Fl_Widget_H
 #define Fl_Widget_H
 
 #include "Enumerations.H"
 
-class Fl_Widget;
-class Fl_Window;
+namespace fltk3 {
+  class Window;
+  class Widget;
+}
+
 class Fl_Group;
 class Fl_Image;
 
 /** Default callback type definition for all fltk widgets (by far the most used) */
-typedef void (Fl_Callback )(Fl_Widget*, void*);
+typedef void (Fl_Callback )(fltk3::Widget*, void*);
 /** Default callback type pointer definition for all fltk widgets */
 typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND
 /** One parameter callback type definition passing only the widget */
-typedef void (Fl_Callback0)(Fl_Widget*);
+typedef void (Fl_Callback0)(fltk3::Widget*);
 /** Callback type definition passing the widget and a long data value */
-typedef void (Fl_Callback1)(Fl_Widget*, long);
+typedef void (Fl_Callback1)(fltk3::Widget*, long);
 
 /** This struct stores all information for a text or mixed graphics label.
 
@@ -78,7 +81,7 @@
 };
 
 
-/** Fl_Widget is the base class for all widgets in FLTK.  
+/** fltk3::Widget is the base class for all widgets in FLTK.  
   
     You can't create one of these because the constructor is not public.
     However you can subclass it.  
@@ -90,8 +93,8 @@
     functions, even if they change the widget's appearance. It is up to the 
     user code to call redraw() after these.
  */
-class FL_EXPORT Fl_Widget {
-  friend class Fl_Group;
+class FL_EXPORT fltk3::Widget {
+  friend class ::Fl_Group;
 
   Fl_Group* parent_;
   Fl_Callback* callback_;
@@ -109,24 +112,12 @@
   const char *tooltip_;
 
   /** unimplemented copy ctor */
-  Fl_Widget(const Fl_Widget &);
+  Widget(const fltk3::Widget &);
   /** unimplemented assignment operator */
-  Fl_Widget& operator=(const Fl_Widget &);
+  Widget& operator=(const fltk3::Widget &);
 
 protected:
 
-  /** Creates a widget at the given position and size.
-
-      The Fl_Widget is a protected constructor, but all derived widgets have a 
-      matching public constructor. It takes a value for x(), y(), w(), h(), and 
-      an optional value for label().
-    
-      \param[in] x, y the position of the widget relative to the enclosing window
-      \param[in] w, h size of the widget in pixels
-      \param[in] label optional text for the widget label
-   */
-  Fl_Widget(int x, int y, int w, int h, const char *label=0L);
-
   /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */
   void x(int v) {x_ = v;}
   /** Internal use only. Use position(int,int), size(int,int) or resize(int,int,int,int) instead. */
@@ -148,18 +139,18 @@
         INACTIVE        = 1<<0,   ///< the widget can't receive focus, and is disabled but potentially visible
         INVISIBLE       = 1<<1,   ///< the widget is not drawn but can receive events
         OUTPUT          = 1<<2,   ///< for output only
-        NOBORDER        = 1<<3,   ///< don't draw a decoration (Fl_Window)
-        FORCE_POSITION  = 1<<4,   ///< don't let the window manager position the window (Fl_Window)
-        NON_MODAL       = 1<<5,   ///< thisis a hovering toolbar window (Fl_Window)
+        NOBORDER        = 1<<3,   ///< don't draw a decoration (fltk3::Window)
+        FORCE_POSITION  = 1<<4,   ///< don't let the window manager position the window (fltk3::Window)
+        NON_MODAL       = 1<<5,   ///< thisis a hovering toolbar window (fltk3::Window)
         SHORTCUT_LABEL  = 1<<6,   ///< the label contains a shortcut we need to draw
         CHANGED         = 1<<7,   ///< the widget value changed
-        OVERRIDE        = 1<<8,   ///< position window on top (Fl_Window)
+        OVERRIDE        = 1<<8,   ///< position window on top (fltk3::Window)
         VISIBLE_FOCUS   = 1<<9,   ///< accepts keyboard focus navigation if the widget can have the focus
         COPIED_LABEL    = 1<<10,  ///< the widget label is internally copied, its destruction is handled by the widget
         CLIP_CHILDREN   = 1<<11,  ///< all drawing within this widget will be clipped (Fl_Group)
-        MENU_WINDOW     = 1<<12,  ///< a temporary popup window, dismissed by clicking outside (Fl_Window)
-        TOOLTIP_WINDOW  = 1<<13,  ///< a temporary popup, transparent to events, and dismissed easily (Fl_Window)
-        MODAL           = 1<<14,  ///< a window blocking input to all other winows (Fl_Window)
+        MENU_WINDOW     = 1<<12,  ///< a temporary popup window, dismissed by clicking outside (fltk3::Window)
+        TOOLTIP_WINDOW  = 1<<13,  ///< a temporary popup, transparent to events, and dismissed easily (fltk3::Window)
+        MODAL           = 1<<14,  ///< a window blocking input to all other winows (fltk3::Window)
         NO_OVERLAY      = 1<<15,  ///< window not using a hardware overlay plane (Fl_Menu_Window)
         GROUP_RELATIVE  = 1<<16,  ///< position this idget relative to the parent group, not to the window
         // (space for more flags)
@@ -178,6 +169,18 @@
 
 public:
 
+  /** Creates a widget at the given position and size.
+   
+   The fltk3::Widget is a protected constructor, but all derived widgets have a 
+   matching public constructor. It takes a value for x(), y(), w(), h(), and 
+   an optional value for label().
+   
+   \param[in] x, y the position of the widget relative to the enclosing window
+   \param[in] w, h size of the widget in pixels
+   \param[in] label optional text for the widget label
+   */
+  Widget(int x, int y, int w, int h, const char *label=0L);
+
   /** Destroys the widget.
       Destroying single widgets is not very common. You almost always want to 
       destroy the parent group instead, which will destroy all of the child widgets 
@@ -186,7 +189,7 @@
       \since FLTK 1.3, the widget's destructor removes the widget from its parent
       group, if it is member of a group.
    */
-  virtual ~Fl_Widget();
+  virtual ~Widget();
 
   /** Draws the widget.
       Never call this function directly. FLTK will schedule redrawing whenever
@@ -200,11 +203,14 @@
       (because draw() is virtual) like this:
 
       \code
-        Fl_Widget *s = &scroll;		// scroll is an embedded Fl_Scrollbar
+        fltk3::Widget *s = &scroll;		// scroll is an embedded Fl_Scrollbar
 	s->draw();			// calls Fl_Scrollbar::draw()
       \endcode
    */
-  virtual void draw() = 0;
+  virtual void draw() {
+    draw_box();
+    draw_label();
+  }
 
   /** Handles the specified event. 
       You normally don't call this method directly, but instead let FLTK do 
@@ -225,9 +231,9 @@
   virtual int handle(int event);
 
   /** Returns a pointer to the parent widget.  
-      Usually this is a Fl_Group or Fl_Window. 
+      Usually this is a Fl_Group or fltk3::Window. 
       \retval NULL if the widget has no parent
-      \see Fl_Group::add(Fl_Widget*)
+      \see Fl_Group::add(fltk3::Widget*)
    */
   Fl_Group* parent() const {return parent_;}
 
@@ -237,7 +243,7 @@
       short-circuits Fl_Group's normal widget adding and removing methods,
       if the widget is already a child widget of another Fl_Group.
 
-      Use Fl_Group::add(Fl_Widget*) and/or Fl_Group::remove(Fl_Widget*) instead.
+      Use Fl_Group::add(fltk3::Widget*) and/or Fl_Group::remove(fltk3::Widget*) instead.
   */
   void parent(Fl_Group* p) {parent_ = p;} // for hacks only, use Fl_Group::add()
 
@@ -327,7 +333,7 @@
 	    it does not provide type safety (in which case we don't need 
 	    to declare Fl_Align an enum to begin with).
 	    *NOTE* The current (FLTK 1.3) implementation (Dec 2008) is such that
-	    Fl_Align is (typedef'd to be) "unsigned" (int), but Fl_Widget's
+	    Fl_Align is (typedef'd to be) "unsigned" (int), but fltk3::Widget's
 	    "align_" member variable is a bit field of 8 bits only !
    */
   Fl_Align align() const {return label_.align_;}
@@ -367,7 +373,7 @@
       an internal table of RGB colors or an RGB color value generated using 
       fl_rgb_color().
       
-      The default for most widgets is FL_BACKGROUND_COLOR. Use Fl::set_color()
+      The default for most widgets is FL_BACKGROUND_COLOR. Use fltk3::set_color()
       to redefine colors in the color map.
       \param[in] bg background color
       \see color(), color(Fl_Color, Fl_Color), selection_color(Fl_Color)
@@ -465,7 +471,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 Fl_Font
    */
@@ -474,7 +480,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 Fl_Font
    */
@@ -633,8 +639,8 @@
 	 a newline for a Fl_Multiline_Input) - this changes the behavior.
      \li FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED: The Enter key will do the
          callback even if the text has not changed. Useful for command fields.
-      Fl_Widget::when() is a set of bitflags used by subclasses of 
-      Fl_Widget to decide when to do the callback.
+      fltk3::Widget::when() is a set of bitflags used by subclasses of 
+      fltk3::Widget to decide when to do the callback.
 
       If the value is zero then the callback is never done. Other values 
       are described  in the individual widgets. This field is in the base 
@@ -718,7 +724,7 @@
       Changing this value will send FL_DEACTIVATE to the widget if 
       active_r() is true.
     
-      Currently you cannot deactivate Fl_Window widgets.
+      Currently you cannot deactivate fltk3::Window widgets.
 
       \see activate(), active(), active_r()
    */
@@ -755,7 +761,7 @@
       Checks if the widget value changed since the last callback.
 
       "Changed" is a flag that is turned on when the user changes the value 
-      stored in the widget. This is only used by subclasses of Fl_Widget that 
+      stored in the widget. This is only used by subclasses of fltk3::Widget that 
       store values, but is in the base class so it is easier to scan all the 
       widgets in a panel and do_callback() on the changed ones in response 
       to an "OK" button.
@@ -779,9 +785,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 FL_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.
    */
@@ -815,12 +821,12 @@
 
   /** 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(Fl_Widget *cb, void *d);
+  static void default_callback(fltk3::Widget *cb, void *d);
 
   /** Calls the widget callback.
       Causes a widget to invoke its callback function with default arguments.
@@ -834,11 +840,11 @@
       \param[in] arg call the callback with \p arg as the user data argument
       \see callback()
    */
-  void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)arg);}
+  void do_callback(fltk3::Widget* o,long arg) {do_callback(o,(void*)arg);}
 
   // Causes a widget to invoke its callback function with arbitrary arguments.
-  // Documentation and implementation in Fl_Widget.cxx
-  void do_callback(Fl_Widget* o,void* arg=0);
+  // Documentation and implementation in fltk3::Widget.cxx
+  void do_callback(fltk3::Widget* o,void* arg=0);
 
   /** Internal use only. */
   int test_shortcut();
@@ -852,7 +858,7 @@
       \return Returns 1 if \p w is a child of this widget, or is
       equal to this widget. Returns 0 if \p w is NULL.
    */
-  int contains(const Fl_Widget *w) const ;
+  int contains(const fltk3::Widget *w) const ;
 
   /** Checks if this widget is a child of w.
       Returns 1 if this widget is a child of \p w, or is
@@ -860,7 +866,7 @@
       \param[in] w the possible parent widget.
       \see contains()
    */
-  int inside(const Fl_Widget* w) const {return w ? w->contains(this) : 0;}
+  int inside(const fltk3::Widget* w) const {return w ? w->contains(this) : 0;}
 
   /** Schedules the drawing of the widget.
       Marks the widget as needing its draw() routine called.
@@ -917,12 +923,12 @@
    */
   void measure_label(int& ww, int& hh) {label_.measure(ww, hh);}
 
-  /** Returns a pointer to the primary Fl_Window widget.
+  /** Returns a pointer to the primary fltk3::Window widget.
       \retval  NULL if no window is associated with this widget.  
-      \note for an Fl_Window widget, this returns its <I>parent</I> window 
+      \note for an fltk3::Window widget, this returns its <I>parent</I> window 
             (if any), not <I>this</I> window.
    */
-  Fl_Window* window() const ;
+  fltk3::Window* window() const ;
 
   /** Returns an Fl_Group pointer if this widget is an Fl_Group.
   
@@ -932,13 +938,13 @@
    */
   virtual Fl_Group* as_group() {return 0;}
 
-  /** Returns an Fl_Window pointer if this widget is an Fl_Window.
+  /** Returns an fltk3::Window pointer if this widget is an fltk3::Window.
    
-   \retval NULL if this widget is not derived from Fl_Window.
+   \retval NULL if this widget is not derived from fltk3::Window.
    \note This method is provided to avoid dynamic_cast.
    \todo More documentation ...
    */
-  virtual Fl_Window* as_window() {return 0;}
+  virtual fltk3::Window* as_window() {return 0;}
   
   /** Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window.   
    \retval NULL if this widget is not derived from Fl_Gl_Window.

Modified: branches/branch-3.0/FL/Fl_Window.H
===================================================================
--- branches/branch-3.0/FL/Fl_Window.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Window.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -26,7 +26,7 @@
 //
 
 /* \file
-   Fl_Window widget . */
+   fltk3::Window widget . */
 
 #ifndef Fl_Window_H
 #define Fl_Window_H
@@ -44,20 +44,20 @@
   or a "subwindow" inside a window.  This is controlled by whether or not
   the window has a parent().
 
-  Once you create a window, you usually add children Fl_Widget
+  Once you create a window, you usually add children fltk3::Widget
   's to it by using window->add(child) for each new widget.
   See Fl_Group for more information on how to add and remove children.
 
-  There are several subclasses of Fl_Window that provide
+  There are several subclasses of fltk3::Window that provide
   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
-  window. Fl_Window has a default callback that calls Fl_Window::hide().
+  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 Fl_Window : public Fl_Group {
+class FL_EXPORT fltk3::Window : public Fl_Group {
 
-  friend class Fl_X;
+  friend class ::Fl_X;
   Fl_X *i; // points at the system-specific stuff
 
   const char* iconlabel_;
@@ -74,13 +74,13 @@
   void _Fl_Window(); // constructor innards
 
   // unimplemented copy ctor and assignment operator
-  Fl_Window(const Fl_Window&);
-  Fl_Window& operator=(const Fl_Window&);
+  Window(const fltk3::Window&);
+  Window& operator=(const fltk3::Window&);
 
 protected:
 
   /** Stores the last window that was made current. See current() const */
-  static Fl_Window *current_;
+  static fltk3::Window *current_;
   virtual void draw();
   /** Forces the window to be drawn, this window is also made current and calls draw(). */
   virtual void flush();
@@ -122,7 +122,7 @@
     window, the window manager will pick a place to show the window
     or allow the user to pick a location. Use position(x,y)
     or hotspot() before calling show() to request a
-    position on the screen. See Fl_Window::resize() 
+    position on the screen. See fltk3::Window::resize() 
     for some more details on positioning windows.
     
     Top-level windows initially have visible() set to 0
@@ -130,28 +130,28 @@
     have visible() set to 1 and parent() set to
     the parent window pointer.
     
-    Fl_Widget::box() defaults to FL_FLAT_BOX. If you plan to
+    fltk3::Widget::box() defaults to FL_FLAT_BOX. If you plan to
     completely fill the window with children widgets you should
     change this to FL_NO_BOX. If you turn the window border off
     you may want to change this to FL_UP_BOX.
 
-    \see Fl_Window(int x, int y, int w, int h, const char* title = 0)
+    \see fltk3::Window(int x, int y, int w, int h, const char* title = 0)
   */
-    Fl_Window(int w, int h, const char* title= 0);
+  Window(int w, int h, const char* title= 0);
   /** Creates a window from the given position, size and title.
 
-    \see Fl_Window::Fl_Window(int w, int h, const char *title = 0)
+    \see fltk3::Window::Window(int w, int h, const char *title = 0)
   */
-    Fl_Window(int x, int y, int w, int h, const char* title = 0);
+  Window(int x, int y, int w, int h, const char* title = 0);
   /**
     The destructor <I>also deletes all the children</I>. This allows a
     whole tree to be deleted at once, without having to keep a pointer to
     all the children in the user code. A kludge has been done so the 
-    Fl_Window and all of its children can be automatic (local)
-    variables, but you must declare the Fl_Window <I>first</I> so
+    fltk3::Window and all of its children can be automatic (local)
+    variables, but you must declare the fltk3::Window <I>first</I> so
     that it is destroyed last.
   */
-    virtual ~Fl_Window();
+  virtual ~Window();
 
   virtual int handle(int);
 
@@ -162,7 +162,7 @@
     false, the size and position are used when show() is called.
     See Fl_Group for the effect of resizing on the child widgets.
 
-    You can also call the Fl_Widget methods size(x,y) and position(w,h),
+    You can also call the fltk3::Widget methods size(x,y) and position(w,h),
     which are inline wrappers for this virtual function.
 
     A top-level window can not force, but merely suggest a position and 
@@ -185,7 +185,7 @@
     off. It only works before show() is called.
   */
   void clear_border()	{set_flag(NOBORDER);}
-  /** See void Fl_Window::border(int) */
+  /** See void fltk3::Window::border(int) */
   unsigned int border() const	{return !(flags() & NOBORDER);}
   /** Activates the flags NOBORDER|FL_OVERRIDE */
   void set_override()	{set_flag(NOBORDER|OVERRIDE);}
@@ -197,7 +197,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.  */
@@ -259,10 +259,10 @@
     does not work with some X window managers). \see position()
   */
   void hotspot(int x, int y, int offscreen = 0);
-  /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */
-  void hotspot(const Fl_Widget*, int offscreen = 0);
-  /** See void Fl_Window::hotspot(int x, int y, int offscreen = 0) */
-  void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
+  /** See void fltk3::Window::hotspot(int x, int y, int offscreen = 0) */
+  void hotspot(const fltk3::Widget*, int offscreen = 0);
+  /** See void fltk3::Window::hotspot(int x, int y, int offscreen = 0) */
+  void hotspot(const fltk3::Widget& p, int offscreen = 0) {hotspot(&p,offscreen);}
 
   /**
     Undoes the effect of a previous resize() or show() so that the next time
@@ -312,9 +312,9 @@
   void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) {
     minw=a; minh=b; maxw=c; maxh=d; dw=e; dh=f; aspect=g; size_range_();}
 
-  /** See void Fl_Window::label(const char*)   */
-  const char* label() const	{return Fl_Widget::label();}
-  /**  See void Fl_Window::iconlabel(const char*)   */
+  /** See void fltk3::Window::label(const char*)   */
+  const char* label() const	{return fltk3::Widget::label();}
+  /**  See void fltk3::Window::iconlabel(const char*)   */
   const char* iconlabel() const	{return iconlabel_;}
   /** Sets the window title bar label. */
   void label(const char*);
@@ -323,7 +323,7 @@
   /** Sets the icon label. */
   void label(const char* label, const char* iconlabel); // platform dependent 
   void copy_label(const char* a);
-  /** See void Fl_Window::xclass(const char*) */
+  /** See void fltk3::Window::xclass(const char*) */
   const char* xclass() const	{return xclass_;}
   /**
     A string used to tell the system what type of window this is. Mostly
@@ -369,7 +369,7 @@
   */
   virtual void hide();
   /**
-    See virtual void Fl_Window::show() 
+    See virtual void fltk3::Window::show() 
   */
   void show(int, char**);
   /**
@@ -395,7 +395,7 @@
     FL_SHOW events and visible() is turned on and off.
 
     There is no way to control what is drawn in the icon except with the
-    string passed to Fl_Window::xclass().  You should not rely on
+    string passed to fltk3::Window::xclass().  You should not rely on
     window managers displaying the icons.
   */
   void iconize();
@@ -403,7 +403,7 @@
   int x_root() const ;
   int y_root() const ;
 
- static Fl_Window *current();
+  static fltk3::Window *current();
   /**
     Sets things up so that the drawing functions in <FL/fl_draw.H> will go
     into this window. This is useful for incremental update of windows, such
@@ -411,17 +411,17 @@
     if it draws a slow graphic. <B>Danger: incremental update is very hard to
     debug and maintain!</B>
 
-    This method only works for the Fl_Window and Fl_Gl_Window derived classes.
+    This method only works for the fltk3::Window and Fl_Gl_Window derived classes.
   */
   void make_current();
 
-  /** Returns an Fl_Window pointer if this widget is an Fl_Window.
+  /** Returns an fltk3::Window pointer if this widget is an fltk3::Window.
   
-      \retval NULL if this widget is not derived from Fl_Window.
+      \retval NULL if this widget is not derived from fltk3::Window.
       \note This method is provided to avoid dynamic_cast.
       \todo More documentation ...
    */
-  virtual Fl_Window* as_window() { return this; }
+  virtual fltk3::Window* as_window() { return this; }
 
   // for back-compatibility only:
   /**
@@ -439,7 +439,7 @@
   */
   void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); // platform dependent
   void default_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE);
-  static void default_callback(Fl_Window*, void* v);
+  static void default_callback(fltk3::Window*, void* v);
 
 };
 

Modified: branches/branch-3.0/FL/Fl_Wizard.H
===================================================================
--- branches/branch-3.0/FL/Fl_Wizard.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/Fl_Wizard.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -49,7 +49,7 @@
 */
 class FL_EXPORT Fl_Wizard : public Fl_Group
 {
-  Fl_Widget *value_;
+  fltk3::Widget *value_;
 
   void draw();
 
@@ -59,8 +59,8 @@
 
   void		next();
   void		prev();
-  Fl_Widget	*value();
-  void		value(Fl_Widget *);
+  fltk3::Widget	*value();
+  void		value(fltk3::Widget *);
 };
 
 #endif // !_Fl_Wizard_H_

Modified: branches/branch-3.0/FL/fl_ask.H
===================================================================
--- branches/branch-3.0/FL/fl_ask.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/fl_ask.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -30,7 +30,7 @@
 
 #  include "Enumerations.H"
 
-class Fl_Widget;
+class fltk3::Widget;
 /** Different system beeps available. \relatesalso fl_beep(int) */
 enum {
   FL_BEEP_DEFAULT = 0,
@@ -61,7 +61,7 @@
 FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
 FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...) __fl_attr((__format__ (__printf__, 1, 3)));
 
-FL_EXPORT Fl_Widget *fl_message_icon();
+FL_EXPORT fltk3::Widget *fl_message_icon();
 extern FL_EXPORT Fl_Font fl_message_font_;
 extern FL_EXPORT Fl_Fontsize fl_message_size_;
 inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {

Modified: branches/branch-3.0/FL/fl_draw.H
===================================================================
--- branches/branch-3.0/FL/fl_draw.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/fl_draw.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -595,7 +595,7 @@
   first <tt>show()</tt> of \e any window in your program to get rid of
   the dithering if possible:
   \code
-  Fl::visual(FL_RGB);
+  fltk3::visual(FL_RGB);
   \endcode
   Gray scale (1-channel) images may be drawn. This is done if
   <tt>abs(D)</tt> is less than 3, or by calling fl_draw_image_mono().
@@ -711,7 +711,7 @@
 /** \todo provide user documentation for fl_set_status function */
 FL_EXPORT void fl_set_status(int X, int Y, int W, int H);
 /** \todo provide user documentation for fl_set_spot function */
-FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0);
+FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win=0);
 /** \todo provide user documentation for fl_reset_spot function*/
 FL_EXPORT void fl_reset_spot(void);
 

Modified: branches/branch-3.0/FL/forms.H
===================================================================
--- branches/branch-3.0/FL/forms.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/forms.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -33,8 +33,8 @@
 #include "Fl_Window.H"
 #include "fl_draw.H"
 
-typedef Fl_Widget FL_OBJECT;
-typedef Fl_Window FL_FORM;
+typedef fltk3::Widget FL_OBJECT;
+typedef fltk3::Window FL_FORM;
 
 ////////////////////////////////////////////////////////////////
 // Random constants & symbols defined by forms.h file:
@@ -170,83 +170,83 @@
 
 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);}
 
-FL_EXPORT Fl_Widget* fl_do_forms(void);
-FL_EXPORT Fl_Widget* fl_check_forms();
-inline Fl_Widget* fl_do_only_forms(void) {return fl_do_forms();}
-inline Fl_Widget* fl_check_only_forms(void) {return fl_check_forms();}
+FL_EXPORT fltk3::Widget* fl_do_forms(void);
+FL_EXPORT fltk3::Widget* fl_check_forms();
+inline fltk3::Widget* fl_do_only_forms(void) {return fl_do_forms();}
+inline fltk3::Widget* fl_check_only_forms(void) {return fl_check_forms();}
 
 // because of new redraw behavior, these are no-ops:
-inline void fl_freeze_object(Fl_Widget*) {}
-inline void fl_unfreeze_object(Fl_Widget*) {}
-inline void fl_freeze_form(Fl_Window*) {}
-inline void fl_unfreeze_form(Fl_Window*) {}
+inline void fl_freeze_object(fltk3::Widget*) {}
+inline void fl_unfreeze_object(fltk3::Widget*) {}
+inline void fl_freeze_form(fltk3::Window*) {}
+inline void fl_unfreeze_form(fltk3::Window*) {}
 inline void fl_freeze_all_forms() {}
 inline void fl_unfreeze_all_forms() {}
 
-inline void fl_set_focus_object(Fl_Window*, Fl_Widget* o) {Fl::focus(o);}
-inline void fl_reset_focus_object(Fl_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(Fl_Window*w,int (*cb)(Fl_Window*,void*),void* v)
-// void fl_set_atclose(int (*cb)(Fl_Window*,void*),void*)
+// void fl_set_form_atclose(fltk3::Window*w,int (*cb)(fltk3::Window*,void*),void* v)
+// void fl_set_atclose(int (*cb)(fltk3::Window*,void*),void*)
 // fl_set_form_atactivate/atdeactivate not implemented!
 
 ////////////////////////////////////////////////////////////////
-// Fl_Widget:
+// fltk3::Widget:
 
-inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);}
-inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);}
+inline void fl_set_object_boxtype(fltk3::Widget* o, Fl_Boxtype a) {o->box(a);}
+inline void fl_set_object_lsize(fltk3::Widget* o,int s) {o->labelsize(s);}
 
 /* forms lib font indexes must be byte sized - extract correct byte from style word */
-inline void fl_set_object_lstyle(Fl_Widget* o,int a) {
+inline void fl_set_object_lstyle(fltk3::Widget* o,int a) {
   o->labelfont((Fl_Font)(a&0xff)); o->labeltype((Fl_Labeltype)(a>>8));}
-inline void fl_set_object_lcol(Fl_Widget* o, Fl_Color a) {o->labelcolor(a);}
+inline void fl_set_object_lcol(fltk3::Widget* o, Fl_Color a) {o->labelcolor(a);}
 #define fl_set_object_lcolor  fl_set_object_lcol
-inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) {o->align(a);}
+inline void fl_set_object_lalign(fltk3::Widget* o, Fl_Align a) {o->align(a);}
 #define fl_set_object_align fl_set_object_lalign
-inline void fl_set_object_color(Fl_Widget* o,Fl_Color a,Fl_Color b) {o->color(a,b);}
-inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();}
-inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);}
-inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);}
-inline void fl_set_object_geometry(Fl_Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);}
+inline void fl_set_object_color(fltk3::Widget* o,Fl_Color a,Fl_Color b) {o->color(a,b);}
+inline void fl_set_object_label(fltk3::Widget* o, const char* a) {o->label(a); o->redraw();}
+inline void fl_set_object_position(fltk3::Widget*o,int x,int y) {o->position(x,y);}
+inline void fl_set_object_size(fltk3::Widget* o, int w, int h) {o->size(w,h);}
+inline void fl_set_object_geometry(fltk3::Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);}
 
-inline void fl_get_object_geometry(Fl_Widget* o,int*x,int*y,int*w,int*h) {
+inline void fl_get_object_geometry(fltk3::Widget* o,int*x,int*y,int*w,int*h) {
   *x = o->x(); *y = o->y(); *w = o->w(); *h = o->h();}
-inline void fl_get_object_position(Fl_Widget* o,int*x,int*y) {
+inline void fl_get_object_position(fltk3::Widget* o,int*x,int*y) {
   *x = o->x(); *y = o->y();}
 
-typedef void (*Forms_CB)(Fl_Widget*, long);
-inline void fl_set_object_callback(Fl_Widget*o,Forms_CB c,long a) {o->callback(c,a);}
+typedef void (*Forms_CB)(fltk3::Widget*, long);
+inline void fl_set_object_callback(fltk3::Widget*o,Forms_CB c,long a) {o->callback(c,a);}
 #define fl_set_call_back      fl_set_object_callback
-inline void fl_call_object_callback(Fl_Widget* o) {o->do_callback();}
-inline void fl_trigger_object(Fl_Widget* o) {o->do_callback();}
-inline void fl_set_object_return(Fl_Widget* o, int v) {
+inline void fl_call_object_callback(fltk3::Widget* o) {o->do_callback();}
+inline void fl_trigger_object(fltk3::Widget* o) {o->do_callback();}
+inline void fl_set_object_return(fltk3::Widget* o, int v) {
   o->when((Fl_When)(v|FL_WHEN_RELEASE));}
 
-inline void fl_redraw_object(Fl_Widget* o) {o->redraw();}
-inline void fl_show_object(Fl_Widget* o) {o->show();}
-inline void fl_hide_object(Fl_Widget* o) {o->hide();}
-inline void fl_free_object(Fl_Widget* x) {delete x;}
-inline void fl_delete_object(Fl_Widget* o) {o->parent()->remove(*o);}
-inline void fl_activate_object(Fl_Widget* o) {o->activate();}
-inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();}
+inline void fl_redraw_object(fltk3::Widget* o) {o->redraw();}
+inline void fl_show_object(fltk3::Widget* o) {o->show();}
+inline void fl_hide_object(fltk3::Widget* o) {o->hide();}
+inline void fl_free_object(fltk3::Widget* x) {delete x;}
+inline void fl_delete_object(fltk3::Widget* o) {o->parent()->remove(*o);}
+inline void fl_activate_object(fltk3::Widget* o) {o->activate();}
+inline void fl_deactivate_object(fltk3::Widget* o) {o->deactivate();}
 
-inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);}
-inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) {b->parent()->insert(*o,b);}
+inline void fl_add_object(fltk3::Window* f, fltk3::Widget* x) {f->add(x);}
+inline void fl_insert_object(fltk3::Widget* o, fltk3::Widget* b) {b->parent()->insert(*o,b);}
 
-inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();}
+inline fltk3::Window* FL_ObjWin(fltk3::Widget* o) {return o->window();}
 
 ////////////////////////////////////////////////////////////////
 // things that appered in the demos a lot that I don't emulate, but
@@ -254,37 +254,37 @@
 
 inline int fl_get_border_width() {return 3;}
 inline void fl_set_border_width(int) {}
-inline void fl_set_object_dblbuffer(Fl_Widget*, int) {}
-inline void fl_set_form_dblbuffer(Fl_Window*, int) {}
+inline void fl_set_object_dblbuffer(fltk3::Widget*, int) {}
+inline void fl_set_form_dblbuffer(fltk3::Window*, int) {}
 
 ////////////////////////////////////////////////////////////////
-// Fl_Window:
+// fltk3::Window:
 
-inline void fl_free_form(Fl_Window* x) {delete x;}
-inline void fl_redraw_form(Fl_Window* f) {f->redraw();}
+inline void fl_free_form(fltk3::Window* x) {delete x;}
+inline void fl_redraw_form(fltk3::Window* f) {f->redraw();}
 
-inline Fl_Window* fl_bgn_form(Fl_Boxtype b,int w,int h) {
-  Fl_Window* g = new Fl_Window(w,h,0);
+inline fltk3::Window* fl_bgn_form(Fl_Boxtype b,int w,int h) {
+  fltk3::Window* g = new fltk3::Window(w,h,0);
   g->box(b);
   return g;
 }
 FL_EXPORT void fl_end_form();
-inline void fl_addto_form(Fl_Window* f) {f->begin();}
+inline void fl_addto_form(fltk3::Window* f) {f->begin();}
 inline Fl_Group* fl_bgn_group() {return new Fl_Group(0,0,0,0,0);}
 inline void fl_end_group() {Fl_Group::current()->forms_end();}
-inline void fl_addto_group(Fl_Widget* o) {((Fl_Group* )o)->begin();}
+inline void fl_addto_group(fltk3::Widget* o) {((Fl_Group* )o)->begin();}
 #define resizebox _ddfdesign_kludge()
 
-inline void fl_scale_form(Fl_Window* f, double x, double y) {
+inline void fl_scale_form(fltk3::Window* f, double x, double y) {
   f->resizable(f); f->size(int(f->w()*x),int(f->h()*y));}
-inline void fl_set_form_position(Fl_Window* f,int x,int y) {f->position(x,y);}
-inline void fl_set_form_size(Fl_Window* f, int w, int h) {f->size(w,h);}
-inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) {
+inline void fl_set_form_position(fltk3::Window* f,int x,int y) {f->position(x,y);}
+inline void fl_set_form_size(fltk3::Window* f, int w, int h) {f->size(w,h);}
+inline void fl_set_form_geometry(fltk3::Window* f,int x,int y,int w,int h) {
   f->resize(x,y,w,h);}
 #define fl_set_initial_placement fl_set_form_geometry
-inline void fl_adjust_form_size(Fl_Window*) {}
+inline void fl_adjust_form_size(fltk3::Window*) {}
 
-FL_EXPORT void fl_show_form(Fl_Window* f,int p,int b,const char* n);
+FL_EXPORT void fl_show_form(fltk3::Window* f,int p,int b,const char* n);
 enum {	// "p" argument values:
   FL_PLACE_FREE = 0,	// make resizable
   FL_PLACE_MOUSE = 1,	// mouse centered on form
@@ -307,38 +307,38 @@
   FL_TRANSIENT
 //FL_MODAL = (1<<8)	// not implemented yet in Forms
 };
-inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);}
-inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);}
+inline void fl_set_form_hotspot(fltk3::Window* w,int x,int y) {w->hotspot(x,y);}
+inline void fl_set_form_hotobject(fltk3::Window* w, fltk3::Widget* o) {w->hotspot(o);}
 extern FL_EXPORT char fl_flip;	// in forms.C
 inline void fl_flip_yorigin() {fl_flip = 1;}
 
 #define fl_prepare_form_window fl_show_form
-inline void fl_show_form_window(Fl_Window*) {}
+inline void fl_show_form_window(fltk3::Window*) {}
 
-inline void fl_raise_form(Fl_Window* f) {f->show();}
+inline void fl_raise_form(fltk3::Window* f) {f->show();}
 
-inline void fl_hide_form(Fl_Window* f) {f->hide();}
-inline void fl_pop_form(Fl_Window* f) {f->show();}
+inline void fl_hide_form(fltk3::Window* f) {f->hide();}
+inline void fl_pop_form(fltk3::Window* f) {f->show();}
 
 extern FL_EXPORT char fl_modal_next; // in forms.C
 inline void fl_activate_all_forms() {}
 inline void fl_deactivate_all_forms() {fl_modal_next = 1;}
-inline void fl_deactivate_form(Fl_Window*w) {w->deactivate();}
-inline void fl_activate_form(Fl_Window*w) {w->activate();}
+inline void fl_deactivate_form(fltk3::Window*w) {w->deactivate();}
+inline void fl_activate_form(fltk3::Window*w) {w->activate();}
 
-inline void fl_set_form_title(Fl_Window* f, const char* s) {f->label(s);}
-inline void fl_title_form(Fl_Window* f, const char* s) {f->label(s);}
+inline void fl_set_form_title(fltk3::Window* f, const char* s) {f->label(s);}
+inline void fl_title_form(fltk3::Window* f, const char* s) {f->label(s);}
 
-typedef void (*Forms_FormCB)(Fl_Widget*);
-inline void fl_set_form_callback(Fl_Window* f,Forms_FormCB c) {f->callback(c);}
+typedef void (*Forms_FormCB)(fltk3::Widget*);
+inline void fl_set_form_callback(fltk3::Window* f,Forms_FormCB c) {f->callback(c);}
 #define fl_set_form_call_back fl_set_form_callback
 
 inline void fl_init() {}
 FL_EXPORT void fl_set_graphics_mode(int,int);
 
-inline int fl_form_is_visible(Fl_Window* f) {return f->visible();}
+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(Fl_Font n,const char* s) {Fl::set_font(n,s);}
+inline void fl_set_font_name(Fl_Font n,const char* s) {fltk3::set_font(n,s);}
 
-inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);}
+inline void fl_mapcolor(Fl_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()
@@ -381,8 +381,8 @@
 ////////////////////////////////////////////////////////////////
 // Forms classes:
 
-inline Fl_Widget* fl_add_new(Fl_Widget* p) {return p;}
-inline Fl_Widget* fl_add_new(uchar t,Fl_Widget* p) {p->type(t); return p;}
+inline fltk3::Widget* fl_add_new(fltk3::Widget* p) {return p;}
+inline fltk3::Widget* fl_add_new(uchar t,fltk3::Widget* p) {p->type(t); return p;}
 
 #define forms_constructor(type,name) \
 inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \
@@ -397,18 +397,18 @@
 #include "Fl_FormsBitmap.H"
 #define FL_NORMAL_BITMAP FL_NO_BOX
 forms_constructorb(Fl_FormsBitmap, fl_add_bitmap)
-inline void fl_set_bitmap_data(Fl_Widget* o, int w, int h, const uchar* b) {
+inline void fl_set_bitmap_data(fltk3::Widget* o, int w, int h, const uchar* b) {
     ((Fl_FormsBitmap*)o)->set(w,h,b);
 }
 
 #include "Fl_FormsPixmap.H"
 #define FL_NORMAL_PIXMAP FL_NO_BOX
 forms_constructorb(Fl_FormsPixmap, fl_add_pixmap)
-inline void fl_set_pixmap_data(Fl_Widget* o, char*const* b) {
+inline void fl_set_pixmap_data(fltk3::Widget* o, char*const* b) {
     ((Fl_FormsPixmap*)o)->set(b);
 }
-//inline void fl_set_pixmap_file(Fl_Widget*, const char*);
-inline void fl_set_pixmap_align(Fl_Widget* o,Fl_Align a,int,int) {o->align(a);}
+//inline void fl_set_pixmap_file(fltk3::Widget*, const char*);
+inline void fl_set_pixmap_align(fltk3::Widget* o,Fl_Align a,int,int) {o->align(a);}
 //inline void fl_set_pixmap_colorcloseness(int, int, int);
 
 #include "Fl_Box.H"
@@ -417,59 +417,59 @@
 #include "Fl_Browser.H"
 forms_constructor(Fl_Browser, fl_add_browser)
 
-inline void fl_clear_browser(Fl_Widget* o) {
+inline void fl_clear_browser(fltk3::Widget* o) {
     ((Fl_Browser*)o)->clear();}
-inline void fl_add_browser_line(Fl_Widget* o, const char* s) {
+inline void fl_add_browser_line(fltk3::Widget* o, const char* s) {
     ((Fl_Browser*)o)->add(s);}
-inline void fl_addto_browser(Fl_Widget* o, const char* s) {
+inline void fl_addto_browser(fltk3::Widget* o, const char* s) {
     ((Fl_Browser*)o)->add(s);} /* should also scroll to bottom */
-//inline void fl_addto_browser_chars(Fl_Widget*, const char*)
+//inline void fl_addto_browser_chars(fltk3::Widget*, const char*)
 //#define fl_append_browser fl_addto_browser_chars
-inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) {
+inline void fl_insert_browser_line(fltk3::Widget* o, int n, const char* s) {
     ((Fl_Browser*)o)->insert(n,s);}
-inline void fl_delete_browser_line(Fl_Widget* o, int n) {
+inline void fl_delete_browser_line(fltk3::Widget* o, int n) {
     ((Fl_Browser*)o)->remove(n);}
-inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) {
+inline void fl_replace_browser_line(fltk3::Widget* o, int n, const char* s) {
     ((Fl_Browser*)o)->replace(n,s);}
-inline char* fl_get_browser_line(Fl_Widget* o, int n) {
+inline char* fl_get_browser_line(fltk3::Widget* o, int n) {
     return (char*)(((Fl_Browser*)o)->text(n));}
-inline int fl_load_browser(Fl_Widget* o, const char* f) {
+inline int fl_load_browser(fltk3::Widget* o, const char* f) {
     return ((Fl_Browser*)o)->load(f);}
-inline void fl_select_browser_line(Fl_Widget* o, int n) {
+inline void fl_select_browser_line(fltk3::Widget* o, int n) {
     ((Fl_Browser*)o)->select(n,1);}
-inline void fl_deselect_browser_line(Fl_Widget* o, int n) {
+inline void fl_deselect_browser_line(fltk3::Widget* o, int n) {
     ((Fl_Browser*)o)->select(n,0);}
-inline void fl_deselect_browser(Fl_Widget* o) {
+inline void fl_deselect_browser(fltk3::Widget* o) {
     ((Fl_Browser*)o)->deselect();}
-inline int fl_isselected_browser_line(Fl_Widget* o, int n) {
+inline int fl_isselected_browser_line(fltk3::Widget* o, int n) {
     return ((Fl_Browser*)o)->selected(n);}
-inline int fl_get_browser_topline(Fl_Widget* o) {
+inline int fl_get_browser_topline(fltk3::Widget* o) {
     return ((Fl_Browser*)o)->topline();}
-inline int fl_get_browser(Fl_Widget* o) {
+inline int fl_get_browser(fltk3::Widget* o) {
     return ((Fl_Browser*)o)->value();}
-inline int fl_get_browser_maxline(Fl_Widget* o) {
+inline int fl_get_browser_maxline(fltk3::Widget* o) {
     return ((Fl_Browser*)o)->size();}
-//linline int fl_get_browser_screenlines(Fl_Widget*);
-inline void fl_set_browser_topline(Fl_Widget* o, int n) {
+//linline int fl_get_browser_screenlines(fltk3::Widget*);
+inline void fl_set_browser_topline(fltk3::Widget* o, int n) {
     ((Fl_Browser*)o)->topline(n);}
-inline void fl_set_browser_fontsize(Fl_Widget* o, int s) {
+inline void fl_set_browser_fontsize(fltk3::Widget* o, int s) {
     ((Fl_Browser*)o)->textsize(s);}
-inline void fl_set_browser_fontstyle(Fl_Widget* o, Fl_Font s) {
+inline void fl_set_browser_fontstyle(fltk3::Widget* o, Fl_Font s) {
     ((Fl_Browser*)o)->textfont(s);}
-inline void fl_set_browser_specialkey(Fl_Widget* o, char c) {
+inline void fl_set_browser_specialkey(fltk3::Widget* o, char c) {
     ((Fl_Browser*)o)->format_char(c);}
-//inline void fl_set_browser_vscrollbar(Fl_Widget*, int);
-//inline void fl_set_browser_hscrollbar(Fl_Widget*, int);
-//inline void fl_set_browser_leftslider(Fl_Widget*, int);
+//inline void fl_set_browser_vscrollbar(fltk3::Widget*, int);
+//inline void fl_set_browser_hscrollbar(fltk3::Widget*, int);
+//inline void fl_set_browser_leftslider(fltk3::Widget*, int);
 //#define fl_set_browser_leftscrollbar fl_set_browser_leftslider
-//inline void fl_set_browser_line_selectable(Fl_Widget*, int, int);
-//inline void fl_get_browser_dimension(Fl_Widget*,int*,int*,int*,int*);
-//inline void fl_set_browser_dblclick_callback(Fl_Widget*,FL_CALLBACKPTR,long);
-//inline void fl_set_browser_xoffset(Fl_Widget*, FL_Coord);
-//inline void fl_set_browser_scrollbarsize(Fl_Widget*, int, int);
-inline void fl_setdisplayed_browser_line(Fl_Widget* o, int n, int i) {
+//inline void fl_set_browser_line_selectable(fltk3::Widget*, int, int);
+//inline void fl_get_browser_dimension(fltk3::Widget*,int*,int*,int*,int*);
+//inline void fl_set_browser_dblclick_callback(fltk3::Widget*,FL_CALLBACKPTR,long);
+//inline void fl_set_browser_xoffset(fltk3::Widget*, FL_Coord);
+//inline void fl_set_browser_scrollbarsize(fltk3::Widget*, int, int);
+inline void fl_setdisplayed_browser_line(fltk3::Widget* o, int n, int i) {
     ((Fl_Browser*)o)->display(n,i);}
-inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) {
+inline int fl_isdisplayed_browser_line(fltk3::Widget* o, int n) {
     return ((Fl_Browser*)o)->displayed(n);}
 
 #include "Fl_Button.H"
@@ -483,10 +483,10 @@
 #define FL_MENU_BUTTON		9
 
 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(Fl_Widget* b) {return ((Fl_Button*)b)->value();}
-inline void fl_set_button(Fl_Widget* b, int v) {((Fl_Button*)b)->value(v);}
-inline int fl_get_button_numb(Fl_Widget*) {return Fl::event_button();}
-inline void fl_set_button_shortcut(Fl_Widget* b, const char* s,int=0) {
+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 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)
 
@@ -500,12 +500,12 @@
 #include "Fl_Check_Button.H"
 forms_constructor(Fl_Check_Button, fl_add_checkbutton)
 
-inline Fl_Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
-inline void fl_set_bitmapbutton_data(Fl_Widget* o,int a,int b,uchar* c) {
+inline fltk3::Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {fltk3::Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
+inline void fl_set_bitmapbutton_data(fltk3::Widget* o,int a,int b,uchar* c) {
   (new Fl_Bitmap(c,a,b))->label(o);}  // does not delete old Fl_Bitmap!
 
-inline Fl_Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
-inline void fl_set_pixmapbutton_data(Fl_Widget* o, const char*const* c) {
+inline fltk3::Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {fltk3::Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
+inline void fl_set_pixmapbutton_data(fltk3::Widget* o, const char*const* c) {
   (new Fl_Pixmap(c))->label(o);}  // does not delete old Fl_Pixmap!
 
 // Fl_Canvas object not yet implemented!
@@ -513,25 +513,25 @@
 #include "Fl_Chart.H"
 
 forms_constructor(Fl_Chart, fl_add_chart)
-inline void fl_clear_chart(Fl_Widget* o) {
+inline void fl_clear_chart(fltk3::Widget* o) {
   ((Fl_Chart*)o)->clear();}
-inline void fl_add_chart_value(Fl_Widget* o,double v,const char* s,uchar c){
+inline void fl_add_chart_value(fltk3::Widget* o,double v,const char* s,uchar c){
   ((Fl_Chart*)o)->add(v,s,c);}
-inline void fl_insert_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) {
+inline void fl_insert_chart_value(fltk3::Widget* o, int i, double v, const char* s, uchar c) {
   ((Fl_Chart*)o)->insert(i,v,s,c);}
-inline void fl_replace_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) {
+inline void fl_replace_chart_value(fltk3::Widget* o, int i, double v, const char* s, uchar c) {
   ((Fl_Chart*)o)->replace(i,v,s,c);}
-inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_chart_bounds(fltk3::Widget* o, double a, double b) {
   ((Fl_Chart*)o)->bounds(a,b);}
-inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) {
+inline void fl_set_chart_maxnumb(fltk3::Widget* o, int v) {
   ((Fl_Chart*)o)->maxsize(v);}
-inline void fl_set_chart_autosize(Fl_Widget* o, int v) {
+inline void fl_set_chart_autosize(fltk3::Widget* o, int v) {
   ((Fl_Chart*)o)->autosize(v);}
-inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) {
+inline void fl_set_chart_lstyle(fltk3::Widget* o, Fl_Font v) {
   ((Fl_Chart*)o)->textfont(v);}
-inline void fl_set_chart_lsize(Fl_Widget* o, int v) {
+inline void fl_set_chart_lsize(fltk3::Widget* o, int v) {
   ((Fl_Chart*)o)->textsize(v);}
-inline void fl_set_chart_lcolor(Fl_Widget* o, Fl_Color v) {
+inline void fl_set_chart_lcolor(fltk3::Widget* o, Fl_Color v) {
   ((Fl_Chart*)o)->textcolor(v);}
 #define fl_set_chart_lcol   fl_set_chart_lcolor
 
@@ -542,33 +542,33 @@
 #define FL_DROPLIST_CHOICE	0
 
 forms_constructor(Fl_Choice, fl_add_choice)
-inline void fl_clear_choice(Fl_Widget* o) {
+inline void fl_clear_choice(fltk3::Widget* o) {
     ((Fl_Choice*)o)->clear();}
-inline void fl_addto_choice(Fl_Widget* o, const char* s) {
+inline void fl_addto_choice(fltk3::Widget* o, const char* s) {
     ((Fl_Choice*)o)->add(s);}
-inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) {
+inline void fl_replace_choice(fltk3::Widget* o, int i, const char* s) {
     ((Fl_Choice*)o)->replace(i-1,s);}
-inline void fl_delete_choice(Fl_Widget* o, int i) {
+inline void fl_delete_choice(fltk3::Widget* o, int i) {
     ((Fl_Choice*)o)->remove(i-1);}
-inline void fl_set_choice(Fl_Widget* o, int i) {
+inline void fl_set_choice(fltk3::Widget* o, int i) {
     ((Fl_Choice*)o)->value(i-1);}
-// inline void fl_set_choice_text(Fl_Widget*, const char*);
-inline int fl_get_choice(Fl_Widget* o) {
+// inline void fl_set_choice_text(fltk3::Widget*, const char*);
+inline int fl_get_choice(fltk3::Widget* o) {
     return ((Fl_Choice*)o)->value()+1;}
-// inline const char* fl_get_choice_item_text(Fl_Widget*, int);
-// inline int fl_get_choice_maxitems(Fl_Widget*);
-inline const char* fl_get_choice_text(Fl_Widget* o) {
+// inline const char* fl_get_choice_item_text(fltk3::Widget*, int);
+// inline int fl_get_choice_maxitems(fltk3::Widget*);
+inline const char* fl_get_choice_text(fltk3::Widget* o) {
     return ((Fl_Choice*)o)->text();}
-inline void fl_set_choice_fontsize(Fl_Widget* o, int x) {
+inline void fl_set_choice_fontsize(fltk3::Widget* o, int x) {
     ((Fl_Choice*)o)->textsize(x);}
-inline void fl_set_choice_fontstyle(Fl_Widget* o, Fl_Font x) {
+inline void fl_set_choice_fontstyle(fltk3::Widget* o, Fl_Font x) {
     ((Fl_Choice*)o)->textfont(x);}
-// inline void fl_set_choice_item_mode(Fl_Widget*, int, unsigned);
-// inline void fl_set_choice_item_shortcut(Fl_Widget*, int, const char*);
+// inline void fl_set_choice_item_mode(fltk3::Widget*, int, unsigned);
+// inline void fl_set_choice_item_shortcut(fltk3::Widget*, int, const char*);
 
 #include "Fl_Clock.H"
 forms_constructort(Fl_Clock, fl_add_clock)
-inline void fl_get_clock(Fl_Widget* o, int* h, int* m, int* s) {
+inline void fl_get_clock(fltk3::Widget* o, int* h, int* m, int* s) {
     *h = ((Fl_Clock*)o)->hour();
     *m = ((Fl_Clock*)o)->minute();
     *s = ((Fl_Clock*)o)->second();
@@ -576,26 +576,26 @@
 
 #include "Fl_Counter.H"
 forms_constructor(Fl_Counter, fl_add_counter)
-inline void fl_set_counter_value(Fl_Widget* o, double v) {
+inline void fl_set_counter_value(fltk3::Widget* o, double v) {
     ((Fl_Counter*)o)->value(v);}
-inline void fl_set_counter_bounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_counter_bounds(fltk3::Widget* o, double a, double b) {
     ((Fl_Counter*)o)->bounds(a,b);}
-inline void fl_set_counter_step(Fl_Widget* o, double a, double b) {
+inline void fl_set_counter_step(fltk3::Widget* o, double a, double b) {
     ((Fl_Counter*)o)->step(a,b);}
-inline void fl_set_counter_precision(Fl_Widget* o, int v) {
+inline void fl_set_counter_precision(fltk3::Widget* o, int v) {
     ((Fl_Counter*)o)->precision(v);}
-inline void fl_set_counter_return(Fl_Widget* o, int v) {
+inline void fl_set_counter_return(fltk3::Widget* o, int v) {
     ((Fl_Counter*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));}
-inline double fl_get_counter_value(Fl_Widget* o) {
+inline double fl_get_counter_value(fltk3::Widget* o) {
     return ((Fl_Counter*)o)->value();}
-inline void fl_get_counter_bounds(Fl_Widget* o, float* a, float* b) {
+inline void fl_get_counter_bounds(fltk3::Widget* o, float* a, float* b) {
   *a = float(((Fl_Counter*)o)->minimum());
   *b = float(((Fl_Counter*)o)->maximum());
 }
-//inline void fl_set_counter_filter(Fl_Widget*,const char* (*)(Fl_Widget*,double,int));
+//inline void fl_set_counter_filter(fltk3::Widget*,const char* (*)(fltk3::Widget*,double,int));
 
 // Cursor stuff cannot be emulated because it uses X stuff
-inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);}
+inline void fl_set_cursor(fltk3::Window* w, Fl_Cursor c) {w->cursor(c);}
 #define FL_INVISIBLE_CURSOR FL_CURSOR_NONE
 #define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT
 
@@ -605,34 +605,34 @@
 #define FL_DIAL_COL2 37
 
 forms_constructor(Fl_Dial, fl_add_dial)
-inline void fl_set_dial_value(Fl_Widget* o, double v) {
+inline void fl_set_dial_value(fltk3::Widget* o, double v) {
   ((Fl_Dial*)o)->value(v);}
-inline double fl_get_dial_value(Fl_Widget* o) {
+inline double fl_get_dial_value(fltk3::Widget* o) {
   return ((Fl_Dial*)o)->value();}
-inline void fl_set_dial_bounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_dial_bounds(fltk3::Widget* o, double a, double b) {
   ((Fl_Dial*)o)->bounds(a, b);}
-inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) {
+inline void fl_get_dial_bounds(fltk3::Widget* o, float* a, float* b) {
   *a = float(((Fl_Dial*)o)->minimum());
   *b = float(((Fl_Dial*)o)->maximum());
 }
-inline void fl_set_dial_return(Fl_Widget* o, int i) {
+inline void fl_set_dial_return(fltk3::Widget* o, int i) {
   ((Fl_Dial*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));}
-inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) {
+inline void fl_set_dial_angles(fltk3::Widget* o, int a, int b) {
   ((Fl_Dial*)o)->angles((short)a, (short)b);}
-//inline void fl_set_dial_cross(Fl_Widget* o, int);
-// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) {
+//inline void fl_set_dial_cross(fltk3::Widget* o, int);
+// inline void fl_set_dial_direction(fltk3::Widget* o, uchar d) {
 //   ((Fl_Dial*)o)->direction(d);}
-inline void fl_set_dial_step(Fl_Widget* o, double v) {
+inline void fl_set_dial_step(fltk3::Widget* o, double v) {
   ((Fl_Dial*)o)->step(v);}
 
 // Frames:
 
-inline Fl_Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
+inline fltk3::Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
   return fl_add_box(i,x-3,y-3,w+6,h+6,l);}
 
 // labelframe nyi
-inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
-  Fl_Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l);
+inline fltk3::Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
+  fltk3::Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l);
   o->align(FL_ALIGN_TOP_LEFT);
   return o;
 }
@@ -683,33 +683,33 @@
 
 #include "Fl_Input.H"
 forms_constructor(Fl_Input, fl_add_input)
-inline void fl_set_input(Fl_Widget* o, const char* v) {
+inline void fl_set_input(fltk3::Widget* o, const char* v) {
     ((Fl_Input*)o)->value(v);}
-inline void fl_set_input_return(Fl_Widget* o, int x) {
+inline void fl_set_input_return(fltk3::Widget* o, int x) {
     ((Fl_Input*)o)->when((Fl_When)(x | FL_WHEN_RELEASE));}
-inline void fl_set_input_color(Fl_Widget* o, Fl_Color a, Fl_Color b) {
+inline void fl_set_input_color(fltk3::Widget* o, Fl_Color a, Fl_Color b) {
     ((Fl_Input*)o)->textcolor(a);
     ((Fl_Input*)o)->cursor_color(b);
 }
-// inline void fl_set_input_scroll(Fl_Widget*, int);
-inline void fl_set_input_cursorpos(Fl_Widget* o, int x, int /*y*/) {
+// inline void fl_set_input_scroll(fltk3::Widget*, int);
+inline void fl_set_input_cursorpos(fltk3::Widget* o, int x, int /*y*/) {
   ((Fl_Input*)o)->position(x);}
-// inline void fl_set_input_selected(Fl_Widget*, int);
-// inline void fl_set_input_selected_range(Fl_Widget*, int, int);
-// inline void fl_set_input_maxchars(Fl_Widget*, int);
-// inline void fl_set_input_format(Fl_Widget*, int, int);
-// inline void fl_set_input_hscrollbar(Fl_Widget*, int);
-// inline void fl_set_input_vscrollbar(Fl_Widget*, int);
-// inline void fl_set_input_xoffset(Fl_Widget*, int);
-// inline void fl_set_input_topline(Fl_Widget*, int);
-// inline void fl_set_input_scrollbarsize(Fl_Widget*, int, int);
-// inline int fl_get_input_topline(Fl_Widget*);
-// inline int fl_get_input_screenlines(Fl_Widget*);
-inline int fl_get_input_cursorpos(Fl_Widget* o, int*x, int*y) {
+// inline void fl_set_input_selected(fltk3::Widget*, int);
+// inline void fl_set_input_selected_range(fltk3::Widget*, int, int);
+// inline void fl_set_input_maxchars(fltk3::Widget*, int);
+// inline void fl_set_input_format(fltk3::Widget*, int, int);
+// inline void fl_set_input_hscrollbar(fltk3::Widget*, int);
+// inline void fl_set_input_vscrollbar(fltk3::Widget*, int);
+// inline void fl_set_input_xoffset(fltk3::Widget*, int);
+// inline void fl_set_input_topline(fltk3::Widget*, int);
+// inline void fl_set_input_scrollbarsize(fltk3::Widget*, int, int);
+// inline int fl_get_input_topline(fltk3::Widget*);
+// inline int fl_get_input_screenlines(fltk3::Widget*);
+inline int fl_get_input_cursorpos(fltk3::Widget* o, int*x, int*y) {
   *x = ((Fl_Input*)o)->position(); *y = 0; return *x;}
-// inline int fl_get_input_numberoflines(Fl_Widget*);
-// inline void fl_get_input_format(Fl_Widget*, int*, int*);
-inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->value();}
+// inline int fl_get_input_numberoflines(fltk3::Widget*);
+// inline void fl_get_input_format(fltk3::Widget*, int*, int*);
+inline const char* fl_get_input(fltk3::Widget* o) {return ((Fl_Input*)o)->value();}
 
 #include "Fl_Menu_Button.H"
 
@@ -719,62 +719,62 @@
 #define FL_PULLDOWN_MENU	2
 forms_constructor(Fl_Menu_Button, fl_add_menu)
 
-inline void fl_clear_menu(Fl_Widget* o) {
+inline void fl_clear_menu(fltk3::Widget* o) {
     ((Fl_Menu_Button*)o)->clear();}
-inline void fl_set_menu(Fl_Widget* o, const char* s) {
+inline void fl_set_menu(fltk3::Widget* o, const char* s) {
     ((Fl_Menu_Button*)o)->clear(); ((Fl_Menu_Button*)o)->add(s);}
-inline void fl_addto_menu(Fl_Widget* o, const char* s) {
+inline void fl_addto_menu(fltk3::Widget* o, const char* s) {
     ((Fl_Menu_Button*)o)->add(s);}
-inline void fl_replace_menu_item(Fl_Widget* o, int i, const char* s) {
+inline void fl_replace_menu_item(fltk3::Widget* o, int i, const char* s) {
     ((Fl_Menu_Button*)o)->replace(i-1,s);}
-inline void fl_delete_menu_item(Fl_Widget* o, int i) {
+inline void fl_delete_menu_item(fltk3::Widget* o, int i) {
     ((Fl_Menu_Button*)o)->remove(i-1);}
-inline void fl_set_menu_item_shortcut(Fl_Widget* o, int i, const char* s) {
+inline void fl_set_menu_item_shortcut(fltk3::Widget* o, int i, const char* s) {
     ((Fl_Menu_Button*)o)->shortcut(i-1,fl_old_shortcut(s));}
-inline void fl_set_menu_item_mode(Fl_Widget* o, int i, long x) {
+inline void fl_set_menu_item_mode(fltk3::Widget* o, int i, long x) {
     ((Fl_Menu_Button*)o)->mode(i-1,x);}
-inline void fl_show_menu_symbol(Fl_Widget*, int ) {
+inline void fl_show_menu_symbol(fltk3::Widget*, int ) {
 /*    ((Fl_Menu_Button*)o)->show_menu_symbol(i); */}
-// inline void fl_set_menu_popup(Fl_Widget*, int);
-inline int fl_get_menu(Fl_Widget* o) {
+// inline void fl_set_menu_popup(fltk3::Widget*, int);
+inline int fl_get_menu(fltk3::Widget* o) {
     return ((Fl_Menu_Button*)o)->value()+1;}
-inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) {
+inline const char* fl_get_menu_item_text(fltk3::Widget* o, int i) {
     return ((Fl_Menu_Button*)o)->text(i);}
-inline int fl_get_menu_maxitems(Fl_Widget* o) {
+inline int fl_get_menu_maxitems(fltk3::Widget* o) {
     return ((Fl_Menu_Button*)o)->size();}
-inline int fl_get_menu_item_mode(Fl_Widget* o, int i) {
+inline int fl_get_menu_item_mode(fltk3::Widget* o, int i) {
     return ((Fl_Menu_Button*)o)->mode(i);}
-inline const char* fl_get_menu_text(Fl_Widget* o) {
+inline const char* fl_get_menu_text(fltk3::Widget* o) {
     return ((Fl_Menu_Button*)o)->text();}
 
 #include "Fl_Positioner.H"
 #define FL_NORMAL_POSITIONER	0
 forms_constructor(Fl_Positioner, fl_add_positioner)
-inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) {
+inline void fl_set_positioner_xvalue(fltk3::Widget* o, double v) {
     ((Fl_Positioner*)o)->xvalue(v);}
-inline double fl_get_positioner_xvalue(Fl_Widget* o) {
+inline double fl_get_positioner_xvalue(fltk3::Widget* o) {
     return ((Fl_Positioner*)o)->xvalue();}
-inline void fl_set_positioner_xbounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_positioner_xbounds(fltk3::Widget* o, double a, double b) {
     ((Fl_Positioner*)o)->xbounds(a,b);}
-inline void fl_get_positioner_xbounds(Fl_Widget* o, float* a, float* b) {
+inline void fl_get_positioner_xbounds(fltk3::Widget* o, float* a, float* b) {
   *a = float(((Fl_Positioner*)o)->xminimum());
   *b = float(((Fl_Positioner*)o)->xmaximum());
 }
-inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) {
+inline void fl_set_positioner_yvalue(fltk3::Widget* o, double v) {
     ((Fl_Positioner*)o)->yvalue(v);}
-inline double fl_get_positioner_yvalue(Fl_Widget* o) {
+inline double fl_get_positioner_yvalue(fltk3::Widget* o) {
     return ((Fl_Positioner*)o)->yvalue();}
-inline void fl_set_positioner_ybounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_positioner_ybounds(fltk3::Widget* o, double a, double b) {
     ((Fl_Positioner*)o)->ybounds(a,b);}
-inline void fl_get_positioner_ybounds(Fl_Widget* o, float* a, float* b) {
+inline void fl_get_positioner_ybounds(fltk3::Widget* o, float* a, float* b) {
   *a = float(((Fl_Positioner*)o)->yminimum());
   *b = float(((Fl_Positioner*)o)->ymaximum());
 }
-inline void fl_set_positioner_xstep(Fl_Widget* o, double v) {
+inline void fl_set_positioner_xstep(fltk3::Widget* o, double v) {
     ((Fl_Positioner*)o)->xstep(v);}
-inline void fl_set_positioner_ystep(Fl_Widget* o, double v) {
+inline void fl_set_positioner_ystep(fltk3::Widget* o, double v) {
     ((Fl_Positioner*)o)->ystep(v);}
-inline void fl_set_positioner_return(Fl_Widget* o, int v) {
+inline void fl_set_positioner_return(fltk3::Widget* o, int v) {
     ((Fl_Positioner*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));}
 
 #include "Fl_Slider.H"
@@ -784,50 +784,50 @@
 
 forms_constructort(Fl_Slider, fl_add_slider)
 #define FL_SLIDER_COL1 FL_GRAY
-inline void fl_set_slider_value(Fl_Widget* o, double v) {
+inline void fl_set_slider_value(fltk3::Widget* o, double v) {
     ((Fl_Slider*)o)->value(v);}
-inline double fl_get_slider_value(Fl_Widget* o) {
+inline double fl_get_slider_value(fltk3::Widget* o) {
     return ((Fl_Slider*)o)->value();}
-inline void fl_set_slider_bounds(Fl_Widget* o, double a, double b) {
+inline void fl_set_slider_bounds(fltk3::Widget* o, double a, double b) {
     ((Fl_Slider*)o)->bounds(a, b);}
-inline void fl_get_slider_bounds(Fl_Widget* o, float* a, float* b) {
+inline void fl_get_slider_bounds(fltk3::Widget* o, float* a, float* b) {
   *a = float(((Fl_Slider*)o)->minimum());
   *b = float(((Fl_Slider*)o)->maximum());
 }
-inline void fl_set_slider_return(Fl_Widget* o, int i) {
+inline void fl_set_slider_return(fltk3::Widget* o, int i) {
     ((Fl_Slider*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));}
-inline void fl_set_slider_step(Fl_Widget* o, double v) {
+inline void fl_set_slider_step(fltk3::Widget* o, double v) {
     ((Fl_Slider*)o)->step(v);}
-// inline void fl_set_slider_increment(Fl_Widget* o, double v, double);
-inline void fl_set_slider_size(Fl_Widget* o, double v) {
+// inline void fl_set_slider_increment(fltk3::Widget* o, double v, double);
+inline void fl_set_slider_size(fltk3::Widget* o, double v) {
     ((Fl_Slider*)o)->slider_size(v);}
 
 #include "Fl_Value_Slider.H"
 forms_constructor(Fl_Value_Slider, fl_add_valslider)
 
-inline void fl_set_slider_precision(Fl_Widget* o, int i) {
+inline void fl_set_slider_precision(fltk3::Widget* o, int i) {
     ((Fl_Value_Slider*)o)->precision(i);}
 // filter function!
 
 // The forms text object was the same as an Fl_Box except it inverted the
 // meaning of FL_ALIGN_INSIDE.  Implementation in forms.cxx
-class FL_EXPORT Fl_FormsText : public Fl_Widget {
+class FL_EXPORT Fl_FormsText : public fltk3::Widget {
 protected:
     void draw();
 public:
     Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0)
-	: Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);}
+  : fltk3::Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);}
 };
 #define FL_NORMAL_TEXT FL_NO_BOX
 forms_constructorb(Fl_FormsText, fl_add_text)
 
 #include "Fl_Timer.H"
 forms_constructort(Fl_Timer, fl_add_timer)
-inline void fl_set_timer(Fl_Widget* o, double v) {((Fl_Timer*)o)->value(v);}
-inline double fl_get_timer(Fl_Widget* o) {return ((Fl_Timer*)o)->value();}
-inline void fl_suspend_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(1);}
-inline void fl_resume_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(0);}
-inline void fl_set_timer_countup(Fl_Widget* o,char d) {((Fl_Timer*)o)->direction(d);}
+inline void fl_set_timer(fltk3::Widget* o, double v) {((Fl_Timer*)o)->value(v);}
+inline double fl_get_timer(fltk3::Widget* o) {return ((Fl_Timer*)o)->value();}
+inline void fl_suspend_timer(fltk3::Widget* o) {((Fl_Timer*)o)->suspended(1);}
+inline void fl_resume_timer(fltk3::Widget* o) {((Fl_Timer*)o)->suspended(0);}
+inline void fl_set_timer_countup(fltk3::Widget* o,char d) {((Fl_Timer*)o)->direction(d);}
 void fl_gettime(long* sec, long* usec);
 
 // Fl_XYPlot nyi
@@ -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/FL/glut.H
===================================================================
--- branches/branch-3.0/FL/glut.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/glut.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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               FL_SHIFT
 #  define GLUT_ACTIVE_CTRL                FL_CTRL
 #  define GLUT_ACTIVE_ALT                 FL_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/FL/mac.H
===================================================================
--- branches/branch-3.0/FL/mac.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/mac.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -70,7 +70,7 @@
 struct XPoint { int x, y; };
 struct XRectangle {int x, y, width, height;};
 
-typedef void *Window; // this is really a pter to the subclass FLWindow of NSWindow
+typedef void *NativeWindow; // this is really a pter to the subclass FLWindow of NSWindow
 typedef struct flCocoaRegion {
   int count;
   CGRect *rects;
@@ -104,9 +104,9 @@
 class Fl_X 
 {
 public:
-  Window xid;              // Cocoa: FLWindow* ; Carbon: WindowRef
+  NativeWindow xid;              // Cocoa: FLWindow* ; Carbon: WindowRef
   Fl_Offscreen other_xid;  // pointer for offscreen bitmaps (doublebuffer)
-  Fl_Window *w;            // FLTK window for 
+  fltk3::Window *w;            // FLTK window for 
   Fl_Region region;
   Fl_Region subRegion;     // region for this specific subwindow
   Fl_X *next;              // linked tree to support subwindows
@@ -114,9 +114,9 @@
   int wait_for_expose;
   void *cursor;			  // is really NSCursor*
   static Fl_X* first;
-  static Fl_X* i(const Fl_Window* w) {return w->i;}
-  static int fake_X_wm(const Fl_Window*,int&,int&,int&,int&,int&);
-  static void make(Fl_Window*);
+  static Fl_X* i(const fltk3::Window* w) {return w->i;}
+  static int fake_X_wm(const fltk3::Window*,int&,int&,int&,int&,int&);
+  static void make(fltk3::Window*);
   void flush();
   // Quartz additions:
   CGContextRef gc;                 // graphics context (NULL when using QD)
@@ -127,16 +127,16 @@
   static void q_end_image();
 };
 
-extern void MacDestroyWindow(Fl_Window*,void *);
-extern void MacMapWindow(Fl_Window*,void *);
-extern void MacUnmapWindow(Fl_Window*,void *);
-extern WindowRef MACwindowRef(Fl_Window *w);
+extern void MacDestroyWindow(fltk3::Window*,void *);
+extern void MacMapWindow(fltk3::Window*,void *);
+extern void MacUnmapWindow(fltk3::Window*,void *);
+extern WindowRef MACwindowRef(fltk3::Window *w);
 extern Fl_Region MacRectRegionIntersect(Fl_Region current, int x,int y,int w, int h);
-extern void MacCollapseWindow(Window w);
+extern void MacCollapseWindow(NativeWindow w);
 
 extern int MacUnlinkWindow(Fl_X*,Fl_X*start=0L);
 
-inline Window fl_xid(const Fl_Window*w) 
+inline NativeWindow fl_xid(const fltk3::Window*w) 
 {
   return Fl_X::i(w)->xid;
 }
@@ -147,7 +147,7 @@
 } *fl_current_xmap;
 
 extern FL_EXPORT void *fl_display;
-extern FL_EXPORT Window fl_window;
+extern FL_EXPORT NativeWindow fl_window;
 extern FL_EXPORT CGContextRef fl_gc;
 extern FL_EXPORT class Fl_Sys_Menu_Bar *fl_sys_menu_bar;
 

Modified: branches/branch-3.0/FL/names.h
===================================================================
--- branches/branch-3.0/FL/names.h	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/names.h	2010-03-30 15:18:29 UTC (rev 7365)
@@ -85,7 +85,7 @@
   \b Example:
   \code
   #include <FL/names.h>		// array will be defined here
-  int MyClass::my_callback(Fl_Widget *w, void*) {
+  int MyClass::my_callback(fltk3::Widget *w, void*) {
       int fnum = w->labelfont();
       // Resulting output might be e.g. "Label's font is FL_HELVETICA (0)"
       printf("Label's font is %s (%d)\n", fl_fontnames[fnum], fnum);

Modified: branches/branch-3.0/FL/win32.H
===================================================================
--- branches/branch-3.0/FL/win32.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/win32.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -48,7 +48,7 @@
 #include <FL/Fl_Device.H>
 
 // some random X equivalents
-typedef HWND Window;
+typedef HWND NativeWindow;
 typedef POINT XPoint;
 struct XRectangle {int x, y, width, height;};
 typedef HRGN Fl_Region;
@@ -72,9 +72,9 @@
 class FL_EXPORT Fl_X {
 public:
   // member variables - add new variables only at the end of this block
-  Window xid;
+  NativeWindow xid;
   HBITMAP other_xid; // for double-buffered windows
-  Fl_Window* w;
+  fltk3::Window* w;
   Fl_Region region;
   Fl_X *next;
   int wait_for_expose;
@@ -83,21 +83,21 @@
   HDC saved_hdc;  // saves the handle of the DC currently loaded
   // static variables, static functions and member functions
   static Fl_X* first;
-  static Fl_X* i(const Fl_Window* w) {return w->i;}
-  static int fake_X_wm(const Fl_Window* w,int &X, int &Y,
+  static Fl_X* i(const fltk3::Window* w) {return w->i;}
+  static int fake_X_wm(const fltk3::Window* w,int &X, int &Y,
 		                 int &bt,int &bx,int &by);
-  void setwindow(Fl_Window* wi) {w=wi; wi->i=this;}
+  void setwindow(fltk3::Window* wi) {w=wi; wi->i=this;}
   void flush() {w->flush();}
   void set_minmax(LPMINMAXINFO minmax);
   void mapraise();
-  static Fl_X* make(Fl_Window*);
+  static Fl_X* make(fltk3::Window*);
 };
 extern FL_EXPORT HCURSOR fl_default_cursor;
 extern FL_EXPORT UINT fl_wake_msg;
-inline Window fl_xid(const Fl_Window*w) {Fl_X *temp = Fl_X::i(w); return temp ? temp->xid : 0;}
-FL_EXPORT Fl_Window* fl_find(Window xid);
-extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
-extern FL_EXPORT int fl_background_pixel;  // hack into Fl_Window::make_xid()
+inline NativeWindow fl_xid(const fltk3::Window*w) {Fl_X *temp = Fl_X::i(w); return temp ? temp->xid : 0;}
+FL_EXPORT fltk3::Window* fl_find(NativeWindow xid);
+extern FL_EXPORT char fl_override_redirect; // hack into fltk3::Window::make_xid()
+extern FL_EXPORT int fl_background_pixel;  // hack into fltk3::Window::make_xid()
 
 // most recent fl_color() or fl_rgbcolor() points at one of these:
 extern FL_EXPORT struct Fl_XMap {
@@ -111,10 +111,10 @@
 FL_EXPORT HBRUSH fl_brush_action(int); // now does the real work
 
 extern FL_EXPORT HINSTANCE fl_display;
-extern FL_EXPORT Window fl_window;
+extern FL_EXPORT NativeWindow fl_window;
 extern FL_EXPORT HDC fl_gc;
 extern FL_EXPORT HPALETTE fl_palette; // non-zero only on 8-bit displays!
-extern FL_EXPORT HDC fl_GetDC(Window);
+extern FL_EXPORT HDC fl_GetDC(NativeWindow);
 extern FL_EXPORT MSG fl_msg;
 extern FL_EXPORT void fl_release_dc(HWND w, HDC dc);
 extern FL_EXPORT void fl_save_dc( HWND w, HDC dc);
@@ -126,7 +126,7 @@
 extern FL_EXPORT HDC fl_makeDC(HBITMAP);
 
 # define fl_begin_offscreen(b) \
-   HDC _sgc=fl_gc; Window _sw=fl_window; \
+   HDC _sgc=fl_gc; NativeWindow _sw=fl_window; \
    fl_gc=fl_makeDC(b); int _savedc = SaveDC(fl_gc); fl_window=(HWND)b; fl_push_no_clip()
 
 # define fl_end_offscreen() \

Modified: branches/branch-3.0/FL/x.H
===================================================================
--- branches/branch-3.0/FL/x.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/FL/x.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -60,14 +60,14 @@
 
 // constant info about the X server connection:
 extern FL_EXPORT Display *fl_display;
-extern FL_EXPORT Window fl_message_window;
+extern FL_EXPORT NativeWindow fl_message_window;
 extern FL_EXPORT int fl_screen;
 extern FL_EXPORT XVisualInfo *fl_visual;
 extern FL_EXPORT Colormap fl_colormap;
 
 // drawing functions:
 extern FL_EXPORT GC fl_gc;
-extern FL_EXPORT Window fl_window;
+extern FL_EXPORT NativeWindow fl_window;
 //extern FL_EXPORT XFontStruct* fl_xfont;
 extern FL_EXPORT XUtf8FontStruct* fl_xfont;
 extern FL_EXPORT void *fl_xftfont;
@@ -80,7 +80,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;
 
@@ -90,7 +90,7 @@
   XCreatePixmap(fl_display, fl_window, w, h, fl_visual->depth)
 // begin/end are macros that save the old state in local variables:
 #    define fl_begin_offscreen(pixmap) \
-  Window _sw=fl_window; fl_window=pixmap; fl_push_no_clip()
+  NativeWindow _sw=fl_window; fl_window=pixmap; fl_push_no_clip()
 #    define fl_end_offscreen() \
   fl_pop_clip(); fl_window = _sw
 
@@ -110,28 +110,28 @@
 // is only here so that fl_xid can be declared inline:
 class FL_EXPORT Fl_X {
 public:
-  Window xid;
-  Window other_xid;
-  Fl_Window *w;
+  NativeWindow xid;
+  NativeWindow other_xid;
+  fltk3::Window *w;
   Fl_Region region;
   Fl_X *next;
   char wait_for_expose;
   char backbuffer_bad; // used for XDBE
   static Fl_X* first;
-  static Fl_X* i(const Fl_Window* wi) {return wi->i;}
-  void setwindow(Fl_Window* wi) {w=wi; wi->i=this;}
+  static Fl_X* i(const fltk3::Window* wi) {return wi->i;}
+  void setwindow(fltk3::Window* wi) {w=wi; wi->i=this;}
   void sendxjunk();
-  static void make_xid(Fl_Window*,XVisualInfo* =fl_visual, Colormap=fl_colormap);
-  static Fl_X* set_xid(Fl_Window*, Window);
+  static void make_xid(fltk3::Window*,XVisualInfo* =fl_visual, Colormap=fl_colormap);
+  static Fl_X* set_xid(fltk3::Window*, NativeWindow);
   // kludges to get around protection:
   void flush() {w->flush();}
-  static void x(Fl_Window* wi, int X) {wi->x(X);}
-  static void y(Fl_Window* wi, int Y) {wi->y(Y);}
+  static void x(fltk3::Window* wi, int X) {wi->x(X);}
+  static void y(fltk3::Window* wi, int Y) {wi->y(Y);}
 };
 
-// convert xid <-> Fl_Window:
-inline Window fl_xid(const Fl_Window*w) {return Fl_X::i(w)->xid;}
-FL_EXPORT Fl_Window* fl_find(Window xid);
+// convert xid <-> fltk3::Window:
+inline NativeWindow fl_xid(const fltk3::Window*w) {return Fl_X::i(w)->xid;}
+FL_EXPORT fltk3::Window* fl_find(NativeWindow xid);
 
 extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
 extern FL_EXPORT int fl_background_pixel;  // hack into Fl_X::make_xid()

Modified: branches/branch-3.0/src/Fl.cxx
===================================================================
--- branches/branch-3.0/src/Fl.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -61,39 +61,39 @@
 // Globals...
 //
 #ifndef FL_DOXYGEN
-Fl_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;
-int		Fl::visible_focus_ = 1,
-		Fl::dnd_text_ops_ = 1;
+char		*fltk3::e_text = (char *)"";
+int		fltk3::e_length;
+int		fltk3::visible_focus_ = 1,
+		fltk3::dnd_text_ops_ = 1;
 
-Fl_Window *fl_xfocus;	// which window X thinks has focus
-Fl_Window *fl_xmousewin;// which window X thinks has FL_ENTER
-Fl_Window *Fl::grab_;	// most recent Fl::grab()
-Fl_Window *Fl::modal_;	// topmost modal() window
+fltk3::Window *fl_xfocus;	// which window X thinks has focus
+fltk3::Window *fl_xmousewin;// which window X thinks has FL_ENTER
+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
@@ -101,7 +101,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;
 }
 
@@ -113,7 +113,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_;
 }
 
@@ -125,7 +125,7 @@
   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;
 }
 
@@ -137,7 +137,7 @@
     should always call this rather than doing your own comparison so you
     are consistent about edge effects.
 */
-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);
@@ -149,7 +149,7 @@
     should always call this rather than doing your own comparison so you
     are consistent about edge effects.
 */
-int Fl::event_inside(const Fl_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());
@@ -217,12 +217,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, Fl_Timeout_Handler 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, Fl_Timeout_Handler cb, void *argp) {
   time += missed_timeout_by; if (time < -.05) time = 0;
   Timeout* t = free_timeout;
   if (t) {
@@ -244,7 +244,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(Fl_Timeout_Handler cb, void *argp) {
   for (Timeout* t = first_timeout; t; t = t->next)
     if (t->cb == cb && t->arg == argp) return 1;
   return 0;
@@ -254,7 +254,7 @@
   Removes a timeout callback. It is harmless to remove a timeout
   callback that no longer exists.
 */
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void *argp) {
+void fltk3::remove_timeout(Fl_Timeout_Handler cb, void *argp) {
   // This version removes all matching timeouts, not just the first one.
   // This may change in the future.
   for (Timeout** p = &first_timeout; *p;) {
@@ -277,7 +277,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*);
@@ -312,12 +312,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(Fl_Timeout_Handler cb, void *argp) {
   Check* t = free_check;
   if (t) free_check = t->next;
   else t = new Check;
@@ -332,7 +332,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(Fl_Timeout_Handler cb, void *argp) {
   for (Check** p = &first_check; *p;) {
     Check* t = *p;
     if (t->cb == cb && t->arg == argp) {
@@ -349,7 +349,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(Fl_Timeout_Handler cb, void *argp) {
   for (Check** p = &first_check; *p;) {
     Check* t = *p;
     if (t->cb == cb && t->arg == argp) {
@@ -382,7 +382,7 @@
 ////////////////////////////////////////////////////////////////
 // wait/run/check/ready:
 
-void (*Fl::idle)(); // see Fl_add_idle.cxx for the add/remove functions
+void (*fltk3::idle)(); // see Fl_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
@@ -390,7 +390,7 @@
 /**
   See int 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();
 
@@ -472,13 +472,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;
 }
@@ -507,10 +507,10 @@
   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 the first form is non-zero if there are
@@ -525,20 +525,20 @@
   return zero if <i>time</i> 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
@@ -547,30 +547,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();
@@ -589,7 +589,7 @@
 Fl_X* Fl_X::first;
 #endif
 
-Fl_Window* fl_find(Window xid) {
+fltk3::Window* fl_find(NativeWindow xid) {
   Fl_X *window;
   for (Fl_X **pp = &Fl_X::first; (window = *pp); pp = &window->next)
 #if defined(WIN32) || defined(USE_X11)
@@ -600,7 +600,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;
@@ -619,12 +619,12 @@
   
   The second form 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.
 */
-Fl_Window* Fl::first_window() {
+fltk3::Window* fltk3::first_window() {
   Fl_X* i = Fl_X::first;
   return i ? i->w : 0;
 }
@@ -633,15 +633,15 @@
   Returns the next top-level window in the list of shown() windows.  You can
   use this call to iterate through all the windows that are shown().
 */
-Fl_Window* Fl::next_window(const Fl_Window* window) {
+fltk3::Window* fltk3::next_window(const fltk3::Window* window) {
   Fl_X* i = Fl_X::i(window)->next;
   return i ? i->w : 0;
 }
 
 /**
-  See Fl_Window* first_window()
+  See fltk3::Window* first_window()
 */
-void Fl::first_window(Fl_Window* window) {
+void fltk3::first_window(fltk3::Window* window) {
   if (!window || !window->shown()) return;
   fl_find(fl_xid(window));
 }
@@ -649,7 +649,7 @@
 /**
   Redraws all widgets.
 */
-void Fl::redraw() {
+void fltk3::redraw() {
   for (Fl_X* i = Fl_X::first; i; i = i->next) i->w->redraw();
 }
 
@@ -659,17 +659,17 @@
   
   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;
     for (Fl_X* i = Fl_X::first; i; i = i->next) {
       if (i->wait_for_expose) {damage_ = 1; continue;}
-      Fl_Window* wi = i->w;
+      fltk3::Window* wi = i->w;
       if (!wi->visible_r()) continue;
       if (wi->damage()) {i->flush(); wi->clear_damage();}
       // destroy damage regions for windows that don't use them:
@@ -712,7 +712,7 @@
     zero from its handle() method.  Exactly which  ones may change
     in future versions, however.
 */
-void Fl::add_handler(Fl_Event_Handler ha) {
+void fltk3::add_handler(Fl_Event_Handler ha) {
   handler_link *l = new handler_link;
   l->handle = ha;
   l->next = handlers;
@@ -722,7 +722,7 @@
 /**
   Removes a previously added event handler.
 */
-void Fl::remove_handler(Fl_Event_Handler ha) {
+void fltk3::remove_handler(Fl_Event_Handler ha) {
   handler_link *l, *p;
 
   // Search for the handler in the list...
@@ -748,31 +748,31 @@
 
 ////////////////////////////////////////////////////////////////
 
-Fl_Widget* fl_oldfocus; // kludge for Fl_Group...
+fltk3::Widget* fl_oldfocus; // kludge for Fl_Group...
 
 /**
     Sets the widget that will receive FL_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 FL_UNFOCUS
     events.  Changing the focus does \e not send FL_FOCUS to
     this or any widget, because sending FL_FOCUS is supposed to
     \e test if the widget wants the focus (by it returning non-zero from
     handle()).
     
-    \sa Fl_Widget::take_focus()
+    \sa fltk3::Widget::take_focus()
 */
-void Fl::focus(Fl_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
-  Fl_Widget *p = focus_;
+  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
     if (o) {
-      Fl_Window *win = 0, *w1 = o->window();
+      fltk3::Window *win = 0, *w1 = o->window();
       while (w1) { win=w1; w1=win->window(); }
       if (win) fl_xfocus = win;
     }
@@ -804,9 +804,9 @@
     if the widget wants the mouse (by it returning non-zero from 
     handle()).
 */
-void Fl::belowmouse(Fl_Widget *o) {
+void fltk3::belowmouse(fltk3::Widget *o) {
   if (grab()) return; // don't do anything while grab is on
-  Fl_Widget *p = belowmouse_;
+  fltk3::Widget *p = belowmouse_;
   if (o != p) {
     belowmouse_ = o;
     int old_event = e_number;
@@ -830,13 +830,13 @@
     if the widget wants the mouse (by it returning non-zero from 
     handle()).
 */
- void Fl::pushed(Fl_Widget *o) {
+void fltk3::pushed(fltk3::Widget *o) {
   pushed_ = o;
 }
 
-static void nothing(Fl_Widget *) {}
-void (*Fl_Tooltip::enter)(Fl_Widget *) = nothing;
-void (*Fl_Tooltip::exit)(Fl_Widget *) = nothing;
+static void nothing(fltk3::Widget *) {}
+void (*Fl_Tooltip::enter)(fltk3::Widget *) = nothing;
+void (*Fl_Tooltip::exit)(fltk3::Widget *) = nothing;
 
 // Update modal(), focus() and other state according to system state,
 // and send FL_ENTER, FL_LEAVE, FL_FOCUS, and/or FL_UNFOCUS events.
@@ -850,74 +850,74 @@
   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
-  Fl_Widget* w = 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 < (FL_Button + FL_LEFT_MOUSE) ||
-        Fl::e_keysym > (FL_Button + FL_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 < (FL_Button + FL_LEFT_MOUSE) ||
+        fltk3::e_keysym > (FL_Button + FL_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 /*FL_BUTTONS*/)) {
-  if (!Fl::pushed()) {
-    // set belowmouse based on Fl::modal() and fl_xmousewin:
+//  if (!(fltk3::event_state() & 0x7f00000 /*FL_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 = FL_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 = FL_ENTER);
+	fltk3::e_number = old_event;
+	if (!w->contains(fltk3::belowmouse())) fltk3::belowmouse(w);
       } else {
 	// send a FL_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 = FL_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 = FL_MOVE);
+	fltk3::e_number = old_event;
       }
     } else {
-      Fl::belowmouse(0);
+      fltk3::belowmouse(0);
       Fl_Tooltip::enter(0);
     }
   }
 }
 
 #ifndef WIN32
-extern Fl_Widget *fl_selection_requestor; // from Fl_x.cxx
+extern fltk3::Widget *fl_selection_requestor; // from Fl_x.cxx
 #endif
 
-// This function is called by ~Fl_Widget() and by Fl_Widget::deactivate
-// and by Fl_Widget::hide().  It indicates that the widget does not want
+// This function is called by ~Fl_Widget() and by fltk3::Widget::deactivate
+// and by fltk3::Widget::hide().  It indicates that the widget does not want
 // to receive any more events, and also removes all global variables that
 // point at the widget.
 // I changed this from the 1.0.1 behavior, the older version could send
 // FL_LEAVE or FL_UNFOCUS events to the widget.  This appears to not be
 // desirable behavior and caused flwm to crash.
 
-void fl_throw_focus(Fl_Widget *o) {
+void fl_throw_focus(fltk3::Widget *o) {
 #ifdef DEBUG
   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;
 #ifndef WIN32
   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;
@@ -930,27 +930,27 @@
 // Call to->handle but first replace the mouse x/y with the correct
 // values to account for nested X windows. 'window' is the outermost
 // window the event was posted to by X:
-static int send(int event, Fl_Widget* to, Fl_Window* window) {
+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();
   } else {
     dx = dy = 0;
   }
-  for (const Fl_Widget* w = to; w; w = w->parent())
+  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;
 }
 
-int Fl::handle(int e, Fl_Window* window)
+int fltk3::handle(int e, fltk3::Window* window)
 /**
   Sends the event to a window for processing.  Returns non-zero if any
   widget uses the event.
@@ -959,7 +959,7 @@
   e_number = e;
   if (fl_local_grab) return fl_local_grab(e);
 
-  Fl_Widget* wi = window;
+  fltk3::Widget* wi = window;
 
   switch (e) {
 
@@ -969,16 +969,16 @@
     return 1;
 
   case FL_SHOW:
-    wi->Fl_Widget::show(); // this calls Fl_Widget::show(), not Fl_Window::show()
+      wi->fltk3::Widget::show(); // this calls fltk3::Widget::show(), not fltk3::Window::show()
     return 1;
 
   case FL_HIDE:
-    wi->Fl_Widget::hide(); // this calls Fl_Widget::hide(), not Fl_Window::hide()
+      wi->fltk3::Widget::hide(); // this calls fltk3::Widget::hide(), not fltk3::Window::hide()
     return 1;
 
   case FL_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();
@@ -1016,11 +1016,11 @@
     }
     if (modal() && wi != modal()) wi = 0;
     if (grab()) wi = grab();
-    {Fl_Widget* pbm = belowmouse();
+    {fltk3::Widget* pbm = belowmouse();
     int 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());
     }
@@ -1064,10 +1064,10 @@
 
   case FL_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((Fl_Widget*)0);
+      Fl_Tooltip::enter((fltk3::Widget*)0);
 
     fl_xfocus = window; // this should not happen!  But maybe it does:
 
@@ -1115,7 +1115,7 @@
 
   case FL_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;
@@ -1125,7 +1125,7 @@
 
   case FL_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_) {
@@ -1164,10 +1164,10 @@
 // hide() destroys the X window, it does not do unmap!
 
 #if !defined(WIN32) && USE_XFT
-extern void fl_destroy_xft_draw(Window);
+extern void fl_destroy_xft_draw(NativeWindow);
 #endif
 
-void Fl_Window::hide() {
+void fltk3::Window::hide() {
   clear_visible();
 
   if (!shown()) return;
@@ -1188,7 +1188,7 @@
 
   // recursively remove any subwindows:
   for (Fl_X *wi = Fl_X::first; wi;) {
-    Fl_Window* W = wi->w;
+    fltk3::Window* W = wi->w;
     if (W->window() == this) {
       W->hide();
       W->set_visible();
@@ -1196,11 +1196,11 @@
     } else wi = wi->next;
   }
 
-  if (this == Fl::modal_) { // we are closing the modal window, find next one:
-    Fl_Window* W;
-    for (W = Fl::first_window(); W; W = Fl::next_window(W))
+  if (this == fltk3::modal_) { // we are closing the modal window, find next one:
+    fltk3::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:
@@ -1211,7 +1211,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) {
-    Fl_Window *w1 = Fl::first_window();
+    fltk3::Window *w1 = fltk3::first_window();
     if (w1 && OpenClipboard(fl_xid(w1))) {
       EmptyClipboard();
       SetClipboardData(CF_TEXT, NULL);
@@ -1226,7 +1226,7 @@
       fl_window = (HWND)-1;
       fl_gc = 0;
 # ifdef USE_CAIRO
-      if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0);
+      if (fltk3::cairo_autolink_context()) fltk3::cairo_make_current((fltk3::Window*) 0);
 # endif
     }
 #elif defined(__APPLE_QUARTZ__)
@@ -1258,13 +1258,13 @@
   
 #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;
 }
 
-Fl_Window::~Fl_Window() {
+fltk3::Window::~Window() {
   hide();
 }
 
@@ -1273,10 +1273,10 @@
 
 // For top-level windows it is assumed the window has already been
 // mapped or unmapped!!!  This is because this should only happen when
-// Fl_Window::show() or Fl_Window::hide() is called, or in response to
+// fltk3::Window::show() or fltk3::Window::hide() is called, or in response to
 // iconize/deiconize events from the system.
 
-int Fl_Window::handle(int ev)
+int fltk3::Window::handle(int ev)
 {
   if (parent()) {
     switch (ev) {
@@ -1302,7 +1302,7 @@
 	// unmap because when the parent window is remapped we don't
 	// want to reappear.
 	if (visible()) {
-	 Fl_Widget* p = parent(); for (;p->visible();p = p->parent()) {}
+          fltk3::Widget* p = parent(); for (;p->visible();p = p->parent()) {}
 	 if (p->type() >= FL_WINDOW) break; // don't do the unmap
 	}
 #if defined(USE_X11) || defined(WIN32)
@@ -1337,7 +1337,7 @@
     by a callback function.  The current interface will be emulated on top
     of this.</i>
 */
-void Fl::selection_owner(Fl_Widget *owner) {selection_owner_ = owner;}
+void fltk3::selection_owner(fltk3::Widget *owner) {selection_owner_ = owner;}
 
 /**
   Changes the current selection.  The block of text is
@@ -1346,9 +1346,9 @@
   returned by event_text()).  The selection_owner()
   widget is set to the passed owner.
 */
-void Fl::selection(Fl_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:
@@ -1359,21 +1359,21 @@
   allows the window system to take as long as necessary to retrieve
   the paste buffer (or even to screw up completely) without complex
   and error-prone synchronization code in FLTK.
-  \see Fl::paste(Fl_Widget &receiver, int clipboard)
+  \see fltk3::paste(fltk3::Widget &receiver, int clipboard)
 */
-void Fl::paste(Fl_Widget &receiver) {
-  Fl::paste(receiver, 0);
+void fltk3::paste(fltk3::Widget &receiver) {
+  fltk3::paste(receiver, 0);
 }
 
 ////////////////////////////////////////////////////////////////
 
 #include <FL/fl_draw.H>
 
-void Fl_Widget::redraw() {
+void fltk3::Widget::redraw() {
   damage(FL_DAMAGE_ALL);
 }
 
-void Fl_Widget::redraw_label() {
+void fltk3::Widget::redraw_label() {
   if (window()) {
     if (box() == FL_NO_BOX) {
       // Widgets with the FL_NO_BOX boxtype need a parent to
@@ -1410,22 +1410,22 @@
   }
 }
 
-void Fl_Widget::damage(uchar fl) {
+void fltk3::Widget::damage(uchar fl) {
   if (type() < FL_WINDOW) {
     // damage only the rectangle covered by a child widget:
     damage(fl, x(), y(), w(), h());
   } else {
     // damage entire window by deleting the region:
-    Fl_X* i = Fl_X::i((Fl_Window*)this);
+    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(FL_DAMAGE_CHILD);
+    fltk3::damage(FL_DAMAGE_CHILD);
   }
 }
 
-void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
-  Fl_Widget* wi = this;
+void fltk3::Widget::damage(uchar fl, int X, int Y, int W, int H) {
+  fltk3::Widget* wi = this;
   // mark all parent widgets between this and window with FL_DAMAGE_CHILD:
   while (wi->type() < FL_WINDOW) {
     wi->damage_ |= fl;
@@ -1433,7 +1433,7 @@
     if (!wi) return;
     fl = FL_DAMAGE_CHILD;
   }
-  Fl_X* i = Fl_X::i((Fl_Window*)wi);
+  Fl_X* i = Fl_X::i((fltk3::Window*)wi);
   if (!i) return; // window not mapped, so ignore it
 
   // clip the damage to the window and quit if none:
@@ -1481,9 +1481,9 @@
     i->region = XRectangleRegion(X,Y,W,H);
     wi->damage_ = fl;
   }
-  Fl::damage(FL_DAMAGE_CHILD);
+  fltk3::damage(FL_DAMAGE_CHILD);
 }
-void Fl_Window::flush() {
+void fltk3::Window::flush() {
   make_current();
 //if (damage() == FL_DAMAGE_EXPOSE && can_boxcheat(box())) fl_boxcheat = this;
   fl_clip_region(i->region); i->region = 0;
@@ -1502,7 +1502,7 @@
 //
 
 static int		num_dwidgets = 0, alloc_dwidgets = 0;
-static Fl_Widget	**dwidgets = 0;
+static fltk3::Widget	**dwidgets = 0;
 
 /** 
   Schedules a widget for deletion at the next call to the event loop.
@@ -1510,7 +1510,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.
@@ -1522,17 +1522,17 @@
   \note In FLTK 1.1 you \b must remove widgets from their parent group
   (or window) before deleting them.
 
-  \see Fl_Widget::~Fl_Widget()
+  \see fltk3::Widget::~Widget()
 */
-void Fl::delete_widget(Fl_Widget *wi) {
+void fltk3::delete_widget(fltk3::Widget *wi) {
   if (!wi) return;
 
   if (num_dwidgets >= alloc_dwidgets) {
-    Fl_Widget	**temp;
+    fltk3::Widget	**temp;
 
-    temp = new Fl_Widget *[alloc_dwidgets + 10];
+    temp = new fltk3::Widget *[alloc_dwidgets + 10];
     if (alloc_dwidgets) {
-      memcpy(temp, dwidgets, alloc_dwidgets * sizeof(Fl_Widget *));
+      memcpy(temp, dwidgets, alloc_dwidgets * sizeof(fltk3::Widget *));
       delete[] dwidgets;
     }
 
@@ -1549,13 +1549,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(Fl_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 ++)
@@ -1564,7 +1564,7 @@
   num_dwidgets = 0;
 }
 
-static Fl_Widget ***widget_watch = 0;
+static fltk3::Widget ***widget_watch = 0;
 static int num_widget_watch = 0;
 static int max_widget_watch = 0;
 
@@ -1582,12 +1582,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
-    Fl_Widget *wp = this;		// save 'this' in a pointer variable
-    Fl::watch_widget_pointer(wp);	// add the pointer to the watch list
+    fltk3::Widget *wp = this;		// save 'this' in a pointer variable
+    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
@@ -1598,14 +1598,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 Fl_Widget_Tracker with a local (automatic)
@@ -1613,16 +1613,16 @@
 
    \see class Fl_Widget_Tracker
 */
-void Fl::watch_widget_pointer(Fl_Widget *&w) 
+void fltk3::watch_widget_pointer(fltk3::Widget *&w) 
 {
-  Fl_Widget **wp = &w;
+  fltk3::Widget **wp = &w;
   int i;
   for (i=0; i<num_widget_watch; ++i) {
     if (widget_watch[i]==wp) return;
   }
   if (num_widget_watch==max_widget_watch) {
     max_widget_watch += 8;
-    widget_watch = (Fl_Widget***)realloc(widget_watch, sizeof(Fl_Widget**)*max_widget_watch);
+    widget_watch = (fltk3::Widget***)realloc(widget_watch, sizeof(fltk3::Widget**)*max_widget_watch);
   }
   widget_watch[num_widget_watch++] = wp;
 #ifdef DEBUG_WATCH
@@ -1636,15 +1636,15 @@
   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 Fl_Widget_Tracker instead.
 
-  \see Fl::watch_widget_pointer()
+  \see fltk3::watch_widget_pointer()
 */
-void Fl::release_widget_pointer(Fl_Widget *&w)
+void fltk3::release_widget_pointer(fltk3::Widget *&w)
 {
-  Fl_Widget **wp = &w;
+  fltk3::Widget **wp = &w;
   int i,j=0;
   for (i=0; i<num_widget_watch; ++i) {
     if (widget_watch[i]!=wp) {
@@ -1675,13 +1675,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 Fl_Widget_Tracker (recommended).
 
-  \see Fl::watch_widget_pointer()
+  \see fltk3::watch_widget_pointer()
   \see class Fl_Widget_Tracker
 */
-void Fl::clear_widget_pointer(Fl_Widget const *w) 
+void fltk3::clear_widget_pointer(fltk3::Widget const *w) 
 {
   if (w==0L) return;
   int i;
@@ -1697,10 +1697,10 @@
 /**
   The constructor adds a widget to the watch list.
 */
-Fl_Widget_Tracker::Fl_Widget_Tracker(Fl_Widget *wi) {
+Fl_Widget_Tracker::Fl_Widget_Tracker(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
 }
 
 /**
@@ -1708,7 +1708,7 @@
 */
 Fl_Widget_Tracker::~Fl_Widget_Tracker() {
 
-  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_Abstract_Printer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Abstract_Printer.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Abstract_Printer.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -44,7 +44,7 @@
  to the current origin of graphics functions.
  @param[in] delta_y Same as above, vertically.
  */
-void Fl_Abstract_Printer::print_widget(Fl_Widget* widget, int delta_x, int delta_y) 
+void Fl_Abstract_Printer::print_widget(fltk3::Widget* widget, int delta_x, int delta_y) 
 { 
   int old_x, old_y, new_x, new_y, is_window;
   if ( ! widget->visible() ) return;
@@ -83,13 +83,13 @@
 }
 
 
-void Fl_Abstract_Printer::traverse(Fl_Widget *widget)
+void Fl_Abstract_Printer::traverse(fltk3::Widget *widget)
 {
   Fl_Group *g = widget->as_group();
   if (!g) return;
   int n = g->children();
   for (int i = 0; i < n; i++) {
-    Fl_Widget *c = g->child(i);
+    fltk3::Widget *c = g->child(i);
     if ( !c->visible() ) continue;
     if ( c->as_window() ) {
       print_widget(c, c->x(), c->y());
@@ -121,14 +121,14 @@
  @param delta_x Optional horizontal offset from current graphics origin where to print the captured rectangle.
  @param delta_y As above, vertically.
  */
-void Fl_Abstract_Printer::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
+void Fl_Abstract_Printer::print_window_part(fltk3::Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
 {
   int slice, width, offset, count = 0;
   Fl_Device::display_device()->set_current();
-  Fl_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[20];
 #ifdef WIN32 // because of bug in StretchDIBits, vertically cut image in pieces of width slice

Modified: branches/branch-3.0/src/Fl_Adjuster.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Adjuster.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Adjuster.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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();
   // Fl_Widget_Tracker wp(this);
   switch (event) {
     case FL_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();
       { Fl_Widget_Tracker wp(this);
 	handle_push();
 	if (wp.deleted()) return 1;
@@ -109,8 +109,8 @@
       handle_drag(soft() ? softclamp(v) : clamp(v));
       return 1;
     case FL_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 FL_KEYBOARD :
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
 	case FL_Up:
           if (w() > h()) return 0;
 	  handle_drag(clamp(increment(value(),-1)));
@@ -150,7 +150,7 @@
 
     case FL_FOCUS:
     case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Bitmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -299,7 +299,7 @@
     fl_begin_offscreen(tmp_id);
     Fl_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;
@@ -361,12 +361,12 @@
   }
 }
 
-void Fl_Bitmap::label(Fl_Widget* widget) {
+void Fl_Bitmap::label(fltk3::Widget* widget) {
   widget->image(this);
 }
 
 void Fl_Bitmap::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
+  fltk3::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
   m->label(_FL_IMAGE_LABEL, (const char*)this);
 }
 

Modified: branches/branch-3.0/src/Fl_Browser_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Browser_.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Browser_.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -59,11 +59,11 @@
    4 = redraw all items
 */
 
-static void scrollbar_callback(Fl_Widget* s, void*) {
+static void scrollbar_callback(fltk3::Widget* s, void*) {
   ((Fl_Browser_*)(s->parent()))->position(int(((Fl_Scrollbar*)s)->value()));
 }
 
-static void hscrollbar_callback(Fl_Widget* s, void*) {
+static void hscrollbar_callback(fltk3::Widget* s, void*) {
   ((Fl_Browser_*)(s->parent()))->hposition(int(((Fl_Scrollbar*)s)->value()));
 }
 
@@ -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();
   Fl_Boxtype b = box() ? box() : FL_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() & FL_ALIGN_LEFT) X += scrollsize;
@@ -112,8 +112,8 @@
   \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();
-  Fl_Widget::resize(X, Y, W, H);
+  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);
   scrollbar.resize(
@@ -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(FL_BORDER_FRAME, X, yy+Y, W, hh, color());
 	draw_focus(FL_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 FL_Down:
           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 FL_Enter:
         case FL_KP_Enter:
           select_only(l, when() & ~FL_WHEN_ENTER_KEY);
@@ -749,7 +749,7 @@
           return 1;
         case FL_Down:
           while ((l = item_next(l))) {
-            if (Fl::event_state(FL_SHIFT|FL_CTRL))
+            if (fltk3::event_state(FL_SHIFT|FL_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 FL_Up:
           while ((l = item_prev(l))) {
-            if (Fl::event_state(FL_SHIFT|FL_CTRL))
+            if (fltk3::event_state(FL_SHIFT|FL_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 FL_PUSH followed by an FL_RELEASE.
 // This second call of Fl_Browser_::handle() may result in a -
@@ -800,12 +800,12 @@
   static int py;
   switch (event) {
   case FL_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(FL_CTRL)) { // toggle selection:
+      if (fltk3::event_state(FL_CTRL)) { // toggle selection:
       TOGGLE:
 	if (l) {
 	  whichway = !item_selected(l);
@@ -832,7 +832,7 @@
 	    if (wp.deleted()) return 1;
 	  }
 	}
-      } else if (Fl::event_state(FL_SHIFT)) { // extend selection:
+      } else if (fltk3::event_state(FL_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 FL_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() & FL_WHEN_CHANGED);
@@ -936,14 +936,14 @@
     if (wp.deleted()) return 1;
 
     // double click calls the callback: (like Enter Key)
-    if (Fl::event_clicks() && (when() & FL_WHEN_ENTER_KEY)) {
+    if (fltk3::event_clicks() && (when() & FL_WHEN_ENTER_KEY)) {
       set_changed();
       do_callback();
     }
     return 1;
   case FL_FOCUS:
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Button.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -61,9 +61,9 @@
 void Fl_Button::setonly() { // set this radio button on, turn others off
   value(1);
   Fl_Group* g = parent();
-  Fl_Widget*const* a = g->array();
+  fltk3::Widget*const* a = g->array();
   for (int i = g->children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o != this && o->type()==FL_RADIO_BUTTON) ((Fl_Button*)o)->value(0);
   }
 }
@@ -78,7 +78,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) {
@@ -89,9 +89,9 @@
 //  if ((value_?selection_color():color())==FL_GRAY) redraw();
     return 1;
   case FL_PUSH:
-    if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
+    if (fltk3::visible_focus() && handle(FL_FOCUS)) fltk3::focus(this);
   case FL_DRAG:
-    if (Fl::event_inside(this)) {
+    if (fltk3::event_inside(this)) {
       if (type() == FL_RADIO_BUTTON) newval = 1;
       else newval = !oldval;
     } else
@@ -127,9 +127,9 @@
     return 1;
   case FL_SHORTCUT:
     if (!(shortcut() ?
-	  Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;
+	  fltk3::test_shortcut(shortcut()) : test_shortcut())) return 0;
     
-    if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
+    if (fltk3::visible_focus() && handle(FL_FOCUS)) fltk3::focus(this);
 
     if (type() == FL_RADIO_BUTTON && !value_) {
       setonly();
@@ -145,7 +145,7 @@
     return 1;
   case FL_FOCUS : /* FALLTHROUGH */
   case FL_UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       if (box() == FL_NO_BOX) {
 	// Widgets with the FL_NO_BOX boxtype need a parent to
 	// redraw, since it is responsible for redrawing the
@@ -157,8 +157,8 @@
       return 1;
     } else return 0;
   case FL_KEYBOARD :
-    if (Fl::focus() == this && Fl::event_key() == ' ' &&
-        !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
+    if (fltk3::focus() == this && fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
       set_changed();
       Fl_Widget_Tracker wp(this);
       if (type() == FL_RADIO_BUTTON && !value_) {
@@ -183,7 +183,7 @@
   \param[in] L widget label, default is no label
  */
 Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *L)
-: Fl_Widget(X,Y,W,H,L) {
+: fltk3::Widget(X,Y,W,H,L) {
   box(FL_UP_BOX);
   down_box(FL_NO_BOX);
   value_ = oldval = 0;

Modified: branches/branch-3.0/src/Fl_Chart.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Chart.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Chart.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -234,10 +234,10 @@
 
     draw_box();
     Fl_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
@@ -292,7 +292,7 @@
   \param[in] L widget label, default is no label
  */
 Fl_Chart::Fl_Chart(int X, int Y, int W, int H,const char *L) :
-Fl_Widget(X,Y,W,H,L) {
+fltk3::Widget(X,Y,W,H,L) {
   box(FL_BORDER_BOX);
   align(FL_ALIGN_BOTTOM);
   numb       = 0;

Modified: branches/branch-3.0/src/Fl_Choice.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Choice.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Choice.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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(FL_DOWN_BOX);
-  int dy = Fl::box_dy(FL_DOWN_BOX);
+  int dx = fltk3::box_dx(FL_DOWN_BOX);
+  int dy = fltk3::box_dy(FL_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(FL_UP_BOX, color());
 
     fl_color(active_r() ? labelcolor() : fl_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, FL_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 FL_KEYBOARD:
-    if (Fl::event_key() != ' ' ||
-        (Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) return 0;
+    if (fltk3::event_key() != ' ' ||
+        (fltk3::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) return 0;
   case FL_PUSH:
-    if (Fl::visible_focus()) Fl::focus(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
   J1:
-    if (Fl::scheme()
+    if (fltk3::scheme()
 	|| fl_contrast(textcolor(), FL_BACKGROUND2_COLOR) != textcolor()) {
       v = menu()->pulldown(x(), y(), w(), h(), mvalue(), this);
     } else {
@@ -191,7 +191,7 @@
     picked(v);
     return 1;
   case FL_SHORTCUT:
-    if (Fl_Widget::test_shortcut()) goto J1;
+      if (fltk3::Widget::test_shortcut()) goto J1;
     v = menu()->test_shortcut();
     if (!v) return 0;
     if (v != mvalue()) redraw();
@@ -199,7 +199,7 @@
     return 1;
   case FL_FOCUS:
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Clock.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -155,7 +155,7 @@
   \param[in] L widget label, default is no label
  */
 Fl_Clock_Output::Fl_Clock_Output(int X, int Y, int W, int H, const char *L)
-: Fl_Widget(X, Y, W, H, L) {
+: fltk3::Widget(X, Y, W, H, L) {
   box(FL_UP_BOX);
   selection_color(fl_gray_ramp(5));
   align(FL_ALIGN_BOTTOM);
@@ -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 FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Color_Chooser.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -27,6 +27,9 @@
 
 #include <FL/Fl.H>
 #include <FL/Fl_Color_Chooser.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Return_Button.H>
 #include <FL/fl_draw.H>
 #include <FL/math.h>
 #include <stdio.h>
@@ -217,31 +220,31 @@
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
   switch (e) {
   case FL_PUSH:
-    if (Fl::visible_focus()) {
-      Fl::focus(this);
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
       redraw();
     }
     ih = c->hue();
     is = c->saturation();
   case FL_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(FL_CTRL)) H = ih;
+    if (fltk3::event_state(FL_CTRL)) H = ih;
     if (c->hsv(H, S, c->value())) c->do_callback();
     } return 1;
   case FL_FOCUS : /* FALLTHROUGH */
   case FL_UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     }
     else return 1;
   case FL_KEYBOARD :
-    return handle_key(Fl::event_key());
+    return handle_key(fltk3::event_key());
   default:
     return 0;
   }
@@ -250,8 +253,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 +273,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 +315,10 @@
 #ifndef FL_DOXYGEN
 void Flcc_HueBox::draw() {
   if (damage()&FL_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() == FL_DAMAGE_EXPOSE) fl_push_clip(x1+px,yy1+py,6,6);
   fl_draw_image(generate_image, this, x1, yy1, w1, h1);
   if (damage() == FL_DAMAGE_EXPOSE) fl_pop_clip();
@@ -330,7 +333,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 ? FL_BLACK : FL_WHITE);
-  draw_box(FL_UP_BOX,x1+X,yy1+Y,6,6,Fl::focus() == this ? FL_FOREGROUND_COLOR : FL_GRAY);
+  draw_box(FL_UP_BOX,x1+X,yy1+Y,6,6,fltk3::focus() == this ? FL_FOREGROUND_COLOR : FL_GRAY);
   px = X; py = Y;
 }
 #endif // !FL_DOXYGEN
@@ -343,26 +346,26 @@
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)parent();
   switch (e) {
   case FL_PUSH:
-    if (Fl::visible_focus()) {
-      Fl::focus(this);
+    if (fltk3::visible_focus()) {
+      fltk3::focus(this);
       redraw();
     }
     iv = c->value();
   case FL_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 FL_FOCUS : /* FALLTHROUGH */
   case FL_UNFOCUS :
-    if (Fl::visible_focus()) {
+    if (fltk3::visible_focus()) {
       redraw();
       return 1;
     }
     else return 1;
   case FL_KEYBOARD :
-    return handle_key(Fl::event_key());
+    return handle_key(fltk3::event_key());
   default:
     return 0;
   }
@@ -372,7 +375,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 +389,23 @@
   if (damage()&FL_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() == FL_DAMAGE_EXPOSE) fl_push_clip(x1,yy1+py,w1,6);
   fl_draw_image(generate_vimage, this, x1, yy1, w1, h1);
   if (damage() == FL_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(FL_UP_BOX,x1,yy1+Y,w1,6,Fl::focus() == this ? FL_FOREGROUND_COLOR : FL_GRAY);
+  draw_box(FL_UP_BOX,x1,yy1+Y,w1,6,fltk3::focus() == this ? FL_FOREGROUND_COLOR : FL_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);
@@ -429,7 +432,7 @@
 
 ////////////////////////////////////////////////////////////////
 
-void Fl_Color_Chooser::rgb_cb(Fl_Widget* o, void*) {
+void Fl_Color_Chooser::rgb_cb(fltk3::Widget* o, void*) {
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)(o->parent());
   double R = c->rvalue.value();
   double G = c->gvalue.value();
@@ -446,7 +449,7 @@
   if (c->rgb(R,G,B)) c->do_callback();
 }
 
-void Fl_Color_Chooser::mode_cb(Fl_Widget* o, void*) {
+void Fl_Color_Chooser::mode_cb(fltk3::Widget* o, void*) {
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)(o->parent());
   // force them to redraw even if value is the same:
   c->rvalue.value(-1);
@@ -496,27 +499,23 @@
 ////////////////////////////////////////////////////////////////
 // fl_color_chooser():
 
-#include <FL/Fl_Window.H>
-#include <FL/Fl_Box.H>
-#include <FL/Fl_Return_Button.H>
-
-class ColorChip : public Fl_Widget {
+class ColorChip : public fltk3::Widget {
   void draw();
 public:
   uchar r,g,b;
-  ColorChip(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
+  ColorChip(int X, int Y, int W, int H) : fltk3::Widget(X,Y,W,H) {
     box(FL_ENGRAVED_FRAME);}
 };
 
 void ColorChip::draw() {
   if (damage()&FL_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(Fl_Widget* o, void* vv) {
+static void chooser_cb(fltk3::Widget* o, void* vv) {
   Fl_Color_Chooser* c = (Fl_Color_Chooser*)o;
   ColorChip* v = (ColorChip*)vv;
   v->r = uchar(255*c->r()+.5);
@@ -532,7 +531,7 @@
 //  [in] o is a pointer to okay_button (below) 
 //  [in] p is a pointer to an int to receive the return value (1)
 // closes the fl_color_chooser window
-static void cc_ok_cb (Fl_Widget *o, void *p) {
+static void cc_ok_cb (fltk3::Widget *o, void *p) {
   *((int *)p) = 1; // set return value
   o->window()->hide();
 }
@@ -541,7 +540,7 @@
 //  [in] o is a pointer to cancel_button (below) _or_ the dialog window
 //  [in] p is a pointer to an int to receive the return value (0)
 // closes the fl_color_chooser window
-static void cc_cancel_cb (Fl_Widget *o, void *p) {
+static void cc_cancel_cb (fltk3::Widget *o, void *p) {
   *((int *)p) = 0; // set return value
   if (o->window()) // cancel button
     o->window()->hide();
@@ -563,7 +562,7 @@
  */
 int fl_color_chooser(const char* name, double& r, double& g, double& b) {
   int ret = 0;
-  Fl_Window window(215,200,name);
+  fltk3::Window window(215,200,name);
   window.callback(cc_cancel_cb,&ret);
   Fl_Color_Chooser chooser(10, 10, 195, 115);
   ColorChip ok_color(10, 130, 95, 25);
@@ -582,7 +581,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Counter.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -64,7 +64,7 @@
   fl_color(active_r() ? textcolor() : fl_inactive(textcolor()));
   char str[128]; format(str);
   fl_draw(str, xx[0], y(), ww[0], h(), FL_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()&FL_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 FL_RELEASE:
     if (mouseobj) {
-      Fl::remove_timeout(repeat_callback, this);
+      fltk3::remove_timeout(repeat_callback, this);
       mouseobj = 0;
       redraw();
     }
     handle_release();
     return 1;
   case FL_PUSH:
-    if (Fl::visible_focus()) Fl::focus(this);
+    if (fltk3::visible_focus()) fltk3::focus(this);
     { Fl_Widget_Tracker wp(this);
       handle_push();
       if (wp.deleted()) return 1;
@@ -144,9 +144,9 @@
   case FL_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);
       Fl_Widget_Tracker wp(this);
       increment_cb();
       if (wp.deleted()) return 1;
@@ -154,7 +154,7 @@
     }
     return 1;
   case FL_KEYBOARD :
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case FL_Left:
 	handle_drag(clamp(increment(value(),-1)));
 	return 1;
@@ -167,7 +167,7 @@
     // break not required because of switch...
   case FL_FOCUS : /* FALLTHROUGH */
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Dial.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -38,14 +38,14 @@
 */
 void Fl_Dial::draw(int X, int Y, int W, int H) {
   if (damage()&FL_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() > _FL_ROUND_UP_BOX && Fl::box_dx(box()));
+    int foo = (box() > _FL_ROUND_UP_BOX && fltk3::box_dx(box()));
     if (foo) {X--; Y--; W+=2; H+=2;}
     if (active_r()) fl_color(color());
     else fl_color(fl_inactive(color()));
@@ -114,8 +114,8 @@
     handle_push();
     if (wp.deleted()) return 1; }
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Double_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -32,7 +32,7 @@
 #include <FL/fl_draw.H>
 
 // On systems that support double buffering "naturally" the base
-// Fl_Window class will probably do double-buffer and this subclass
+// fltk3::Window class will probably do double-buffer and this subclass
 // does nothing.
 
 #if USE_XDBE
@@ -61,7 +61,7 @@
 #endif
 
 void Fl_Double_Window::show() {
-  Fl_Window::show();
+  fltk3::Window::show();
 }
 
 #if defined(USE_X11)
@@ -214,7 +214,7 @@
 const int stack_max = 16;
 static int stack_ix = 0;
 static CGContextRef stack_gc[stack_max];
-static Window stack_window[stack_max];
+static NativeWindow stack_window[stack_max];
 
 void fl_begin_offscreen(Fl_Offscreen ctx) {
   if (stack_ix<stack_max) {
@@ -323,7 +323,7 @@
     DeleteDC(fl_gc);
     fl_gc = _sgc;
     //# 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
 #elif defined(__APPLE__)
     if ( myi->other_xid ) {
@@ -350,7 +350,7 @@
 void Fl_Double_Window::resize(int X,int Y,int W,int H) {
   int ow = w();
   int oh = h();
-  Fl_Window::resize(X,Y,W,H);
+  fltk3::Window::resize(X,Y,W,H);
 #if USE_XDBE
   if (use_xdbe) return;
 #endif
@@ -369,7 +369,7 @@
 #endif
       fl_delete_offscreen(myi->other_xid);
   }
-  Fl_Window::hide();
+  fltk3::Window::hide();
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_File_Chooser.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Chooser.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_File_Chooser.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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((Fl_Timeout_Handler)previewCB, this);
 window->hide();
 }
 void Fl_File_Chooser::cb_window(Fl_Double_Window* o, void* v) {
@@ -109,7 +109,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((Fl_Timeout_Handler)previewCB, this);
 window->hide();
 }
 void Fl_File_Chooser::cb_cancelButton(Fl_Button* o, void* v) {
@@ -288,7 +288,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();
@@ -298,11 +298,11 @@
 prefs_.get("preview", e, 1);
 preview(e);
 Fl_Group::current(prev_current);
-  ext_group=(Fl_Widget*)0;
+  ext_group=(fltk3::Widget*)0;
 }
 
 Fl_File_Chooser::~Fl_File_Chooser() {
-  Fl::remove_timeout((Fl_Timeout_Handler)previewCB, this);
+  fltk3::remove_timeout((Fl_Timeout_Handler)previewCB, this);
 if(ext_group)window->remove(ext_group);
 delete window;
 delete favWindow;
@@ -374,7 +374,7 @@
 void Fl_File_Chooser::show() {
   window->hotspot(fileList);
 window->show();
-Fl::flush();
+fltk3::flush();
 fl_cursor(FL_CURSOR_WAIT);
 rescan_keep_filename();
 fl_cursor(FL_CURSOR_DEFAULT);
@@ -441,14 +441,14 @@
   return window->visible();
 }
 
-Fl_Widget* Fl_File_Chooser::add_extra(Fl_Widget* gr) {
-  Fl_Widget* ret=ext_group;
+fltk3::Widget* Fl_File_Chooser::add_extra(fltk3::Widget* gr) {
+  fltk3::Widget* ret=ext_group;
   if (gr==ext_group) {
     return ret;
       }
       if (ext_group) {
         int sh=ext_group->h()+4;
-Fl_Widget* svres=window->resizable();
+        fltk3::Widget* svres=window->resizable();
 window->resizable(NULL);
 window->size(window->w(),window->h()-sh);
 window->remove(ext_group);
@@ -457,7 +457,7 @@
           }
           if (gr) {
             int nh=window->h()+gr->h()+4;
-Fl_Widget* svres=window->resizable();
+            fltk3::Widget* svres=window->resizable();
 window->resizable(NULL);
 window->size(window->w(),nh);
 gr->position(2,okButton->y()+okButton->h()+2);

Modified: branches/branch-3.0/src/Fl_File_Chooser2.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Chooser2.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_File_Chooser2.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -283,7 +283,7 @@
 /** \fn int Fl_File_Chooser::visible()
   Returns 1 if the Fl_File_Chooser window is visible.*/
 
-/** \fn Fl_Widget* Fl_File_Chooser::add_extra(Fl_Widget*)
+/** \fn fltk3::Widget* Fl_File_Chooser::add_extra(fltk3::Widget*)
   Adds extra widget at the bottom of Fl_File_Chooser window.
   Returns pointer for previous extra widget or NULL if not set previously.
   If argument is NULL only remove previous extra widget.
@@ -293,7 +293,7 @@
 */
   /** \fn int Fl_File_Chooser::shown()
     Returns non-zero if the file chooser main window show() has been called (but not hide()
-    see Fl_Window::shown()
+    see fltk3::Window::shown()
   */
 
   /** \fn void Fl_File_Chooser::callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0)
@@ -564,7 +564,7 @@
 //
 
 void
-Fl_File_Chooser::favoritesCB(Fl_Widget *w)
+Fl_File_Chooser::favoritesCB(fltk3::Widget *w)
 					// I - Widget
 {
   int		i;			// Looping var
@@ -706,7 +706,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))
@@ -721,7 +721,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
     {
@@ -767,8 +767,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((Fl_Timeout_Handler)previewCB, this);
+    fltk3::add_timeout(1.0, (Fl_Timeout_Handler)previewCB, this);
 
     // Do any callback that is registered...
     if (callback_) (*callback_)(this, data_);
@@ -801,7 +801,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();
@@ -837,7 +837,7 @@
   filename = pathname;
 
   // Now process things according to the key pressed...
-  if (Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter) {
+  if (fltk3::event_key() == FL_Enter || fltk3::event_key() == FL_KP_Enter) {
     // Enter pressed - select or change directory...
 #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
     if ((isalpha(pathname[0] & 255) && pathname[1] == ':' && !pathname[2]) ||
@@ -864,8 +864,8 @@
       fl_alert("%s",existing_file_label);
     }
   }
-  else if (Fl::event_key() != FL_Delete &&
-           Fl::event_key() != FL_BackSpace) {
+  else if (fltk3::event_key() != FL_Delete &&
+           fltk3::event_key() != FL_BackSpace) {
     // Check to see if the user has entered a directory...
     if ((slash = strrchr(pathname, '/')) == NULL)
       slash = strrchr(pathname, '\\');
@@ -1319,13 +1319,13 @@
       } else {
         // if this file is an image, try to load it
         window->cursor(FL_CURSOR_WAIT);
-        Fl::check();
+        fltk3::check();
         
         image = Fl_Shared_Image::get(filename);
         
         if (image) {
           window->cursor(FL_CURSOR_DEFAULT);
-          Fl::check();
+          fltk3::check();
           set = 1;
         }
       }
@@ -1357,7 +1357,7 @@
     }
 
     window->cursor(FL_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_Icon.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Icon.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_File_Icon.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -456,9 +456,9 @@
   label type as needed.
   \param[in] w widget for which this icon will become the label
 */
-void Fl_File_Icon::label(Fl_Widget *w)	// I - Widget to label
+void Fl_File_Icon::label(fltk3::Widget *w)	// I - Widget to label
 {
-  Fl::set_labeltype(_FL_ICON_LABEL, labeltype, 0);
+  fltk3::set_labeltype(_FL_ICON_LABEL, labeltype, 0);
   w->label(_FL_ICON_LABEL, (const char*)this);
 }
 

Modified: branches/branch-3.0/src/Fl_File_Icon2.cxx
===================================================================
--- branches/branch-3.0/src/Fl_File_Icon2.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_File_Icon2.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_File_Input.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -129,7 +129,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);
@@ -172,12 +172,12 @@
   if (damage() & (FL_DAMAGE_BAR | FL_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()&FL_DAMAGE_ALL);
+    fltk3::focus()!=this && !size() && !(damage()&FL_DAMAGE_ALL);
   if ((damage() & FL_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);
 }
 
 
@@ -197,7 +197,7 @@
     case FL_MOVE :
     case FL_ENTER :
       if (active_r()) {
-	if (Fl::event_y() < (y() + DIR_HEIGHT)) 
+	if (fltk3::event_y() < (y() + DIR_HEIGHT)) 
           window()->cursor(FL_CURSOR_DEFAULT);
 	else 
           window()->cursor(FL_CURSOR_INSERT);
@@ -206,7 +206,7 @@
       return 1;
 
     case FL_PUSH :
-      inButtonBar = (Fl::event_y() < (y() + DIR_HEIGHT));
+      inButtonBar = (fltk3::event_y() < (y() + DIR_HEIGHT));
     case FL_RELEASE :
     case FL_DRAG :
       if (inButtonBar) 
@@ -248,7 +248,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_GIF_Image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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_Choice.H
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Choice.H	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Gl_Choice.H	2010-03-30 15:18:29 UTC (rev 7365)
@@ -89,29 +89,29 @@
   static Fl_Gl_Choice *find(int mode, const int *);
 };
 
-class Fl_Window;
+class fltk3::Window;
 
 #ifdef WIN32
 
-GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0);
+GLContext fl_create_gl_context(fltk3::Window*, const Fl_Gl_Choice*, int layer=0);
 
 #elif defined(__APPLE_QUARTZ__)
 // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
 
-GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0);
+GLContext fl_create_gl_context(fltk3::Window*, const Fl_Gl_Choice*, int layer=0);
 
 #else
 
 GLContext fl_create_gl_context(XVisualInfo* vis);
 
 static inline
-GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice* g) {
+GLContext fl_create_gl_context(fltk3::Window*, const Fl_Gl_Choice* g) {
   return fl_create_gl_context(g->vis);
 }
 
 #endif
 
-void fl_set_gl_context(Fl_Window*, GLContext);
+void fl_set_gl_context(fltk3::Window*, GLContext);
 void fl_no_gl_context();
 void fl_delete_gl_context(GLContext);
 

Modified: branches/branch-3.0/src/Fl_Gl_Choice.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Choice.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Gl_Choice.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -274,7 +274,7 @@
 
 #elif defined(WIN32)
 
-GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) {
+GLContext fl_create_gl_context(fltk3::Window* window, const Fl_Gl_Choice* g, int layer) {
   Fl_X* i = Fl_X::i(window);
   HDC hdc = i->private_dc;
   if (!hdc) {
@@ -297,7 +297,7 @@
 
 #  elif defined(__APPLE_QUARTZ__)
 // warning: the Quartz version should probably use Core GL (CGL) instead of AGL
-GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) {
+GLContext fl_create_gl_context(fltk3::Window* window, const Fl_Gl_Choice* g, int layer) {
   GLContext context, shared_ctx = 0;
   if (context_list && nContext) shared_ctx = context_list[0];
   context = aglCreateContext( g->pixelformat, shared_ctx);
@@ -331,9 +331,9 @@
 #  endif
 
 static GLContext cached_context;
-static Fl_Window* cached_window;
+static fltk3::Window* cached_window;
 
-void fl_set_gl_context(Fl_Window* w, GLContext context) {
+void fl_set_gl_context(fltk3::Window* w, GLContext context) {
   if (context != cached_context || w != cached_window) {
     cached_context = context;
     cached_window = w;

Modified: branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Gl_Device_Plugin.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -54,17 +54,17 @@
 #endif
   fl_gc = NULL;
 #ifdef WIN32
-  Fl::check();
-  Fl_Window *win = (Fl_Window*)glw;
+  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.
@@ -137,7 +137,7 @@
    \param w the widget
    \param x,y offsets where to print relatively to coordinates origin
    */
-  virtual int print(Fl_Abstract_Printer *p, Fl_Widget *w, int x, int y) {
+  virtual int print(Fl_Abstract_Printer *p, fltk3::Widget *w, int x, int y) {
     Fl_Gl_Window *glw = w->as_gl_window();
     if (!glw) return 0;
     print_gl_window(p, glw, x, y);

Modified: branches/branch-3.0/src/Fl_Gl_Overlay.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Gl_Overlay.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Gl_Overlay.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -113,8 +113,8 @@
     Fl_X::make_xid(this, fl_overlay_visual, fl_overlay_colormap);
     fl_background_pixel = -1;
     // find the outermost window to tell wm about the colormap:
-    Fl_Window *w = window();
-    for (;;) {Fl_Window *w1 = w->window(); if (!w1) break; w = w1;}
+    fltk3::Window *w = window();
+    for (;;) {fltk3::Window *w1 = w->window(); if (!w1) break; w = w1;}
     XSetWMColormapWindows(fl_display, fl_xid(w), &(Fl_X::i(this)->xid), 1);
     context(fl_create_gl_context(fl_overlay_visual), 1);
     valid(0);
@@ -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((Fl_Color)i,r,g,b);
+      uchar r,g,b; fltk3::get_color((Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Gl_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -83,7 +83,7 @@
       }
 
       if (!g) {
-        Fl::error("Insufficient GL support");
+        fltk3::error("Insufficient GL support");
 	return;
       }
     }
@@ -91,12 +91,12 @@
     Fl_X::make_xid(this, g->vis, g->colormap);
     if (overlay && overlay != this) ((Fl_Gl_Window*)overlay)->show();
 #elif defined(__APPLE__)
-	extern void MACsetContainsGLsubwindow(Fl_Window *);
+    extern void MACsetContainsGLsubwindow(fltk3::Window *);
 	if( ! parent() ) need_redraw=1;
 	else MACsetContainsGLsubwindow( window() );
 #endif
   }
-  Fl_Window::show();
+  fltk3::Window::show();
 
 #ifdef __APPLE__
   set_visible();
@@ -422,7 +422,7 @@
   }
 #endif
 
-  Fl_Window::resize(X,Y,W,H);
+  fltk3::Window::resize(X,Y,W,H);
 }
 
 /**
@@ -454,7 +454,7 @@
     overlay = 0;
   }
 #endif
-  Fl_Window::hide();
+  fltk3::Window::hide();
 }
 
 /**
@@ -520,7 +520,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.");
 }
 //
 // End of "$Id$".

Modified: branches/branch-3.0/src/Fl_Group.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Group.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Group.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -27,7 +27,7 @@
 
 // The Fl_Group is the only defined container type in FLTK.
 
-// Fl_Window itself is a subclass of this, and most of the event
+// fltk3::Window itself is a subclass of this, and most of the event
 // handling is designed so windows themselves work correctly.
 
 #include <stdio.h>
@@ -46,16 +46,16 @@
   Returns a pointer to the array of children. <I>This pointer is only
   valid until the next time a child is added or removed.</I>
 */
-Fl_Widget*const* Fl_Group::array() const {
-  return children_ <= 1 ? (Fl_Widget**)(&array_) : array_;
+fltk3::Widget*const* Fl_Group::array() const {
+  return children_ <= 1 ? (fltk3::Widget**)(&array_) : array_;
 }
 
 /**
   Searches the child array for the widget and returns the index. Returns children()
   if the widget is NULL or not found.
 */
-int Fl_Group::find(const Fl_Widget* o) const {
-  Fl_Widget*const* a = array();
+int Fl_Group::find(const fltk3::Widget* o) const {
+  fltk3::Widget*const* a = array();
   int i; for (i=0; i < children_; i++) if (*a++ == o) break;
   return i;
 }
@@ -68,7 +68,7 @@
   tree by just constructing the widgets.
 
   begin() is automatically called by the constructor for Fl_Group (and thus for
-  Fl_Window as well). begin() <I>is exactly the same as</I> current(this).
+  fltk3::Window as well). begin() <I>is exactly the same as</I> current(this).
   <I>Don't forget to end() the group or window!</I>
 */
 void Fl_Group::begin() {current_ = this;}
@@ -82,7 +82,7 @@
 /**
   Returns the currently active group.
   
-  The Fl_Widget constructor automatically does current()->add(widget) if this
+  The fltk3::Widget constructor automatically does current()->add(widget) if this
   is not null. To prevent new widgets from being added to a group, call
   Fl_Group::current(0).
 */
@@ -93,33 +93,33 @@
 */
 void Fl_Group::current(Fl_Group *g) {current_ = g;}
 
-extern Fl_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.
 
-static int send(Fl_Widget* o, int event) {
+static int send(fltk3::Widget* o, int event) {
   if (o->type() < FL_WINDOW) return o->handle(event);
   switch ( event )
   {
   case FL_DND_ENTER: /* FALLTHROUGH */
   case FL_DND_DRAG:
     // figure out correct type of event:
-    event = (o->contains(Fl::belowmouse())) ? FL_DND_DRAG : FL_DND_ENTER;
+    event = (o->contains(fltk3::belowmouse())) ? FL_DND_DRAG : FL_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 FL_ENTER: /* FALLTHROUGH */
   case FL_DND_ENTER:
     // Successful completion of FL_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;
@@ -128,11 +128,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 FL_KEYBOARD/FL_SHORTCUT event
     break;
   case FL_Tab:
-    if (!Fl::event_state(FL_SHIFT)) return FL_Right;
+    if (!fltk3::event_state(FL_SHIFT)) return FL_Right;
   case 0xfe20: // XK_ISO_Left_Tab
     return FL_Left;
   case FL_Right:
@@ -149,9 +149,9 @@
 
 int Fl_Group::handle(int event) {
 
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   int i;
-  Fl_Widget* o;
+  fltk3::Widget* o;
 
   switch (event) {
 
@@ -180,56 +180,56 @@
   case FL_SHORTCUT:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o) && send(o,FL_SHORTCUT))
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,FL_SHORTCUT))
 	return 1;
     }
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && !Fl::event_inside(o) && send(o,FL_SHORTCUT))
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,FL_SHORTCUT))
 	return 1;
     }
-    if ((Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter)) return navigation(FL_Down);
+    if ((fltk3::event_key() == FL_Enter || fltk3::event_key() == FL_KP_Enter)) return navigation(FL_Down);
     return 0;
 
   case FL_ENTER:
   case FL_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,FL_MOVE);
 	} else {
-	  Fl::belowmouse(o);
+	  fltk3::belowmouse(o);
 	  if (send(o,FL_ENTER)) return 1;
 	}
       }
     }
-    Fl::belowmouse(this);
+    fltk3::belowmouse(this);
     return 1;
 
   case FL_DND_ENTER:
   case FL_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,FL_DND_DRAG);
 	} else if (send(o,FL_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 FL_PUSH:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o)) {
+      if (o->takesevents() && fltk3::event_inside(o)) {
 	Fl_Widget_Tracker wp(o);
 	if (send(o,FL_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 FL_RELEASE:
   case FL_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 FL_MOUSEWHEEL:
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && Fl::event_inside(o) && send(o,FL_MOUSEWHEEL))
+      if (o->takesevents() && fltk3::event_inside(o) && send(o,FL_MOUSEWHEEL))
 	return 1;
     }
     for (i = children(); i--;) {
       o = a[i];
-      if (o->takesevents() && !Fl::event_inside(o) && send(o,FL_MOUSEWHEEL))
+      if (o->takesevents() && !fltk3::event_inside(o) && send(o,FL_MOUSEWHEEL))
 	return 1;
     }
     return 0;
@@ -276,12 +276,12 @@
   case FL_HIDE:
     for (i = children(); i--;) {
       o = *a++;
-      if (event == FL_HIDE && o == Fl::focus()) {
+      if (event == FL_HIDE && o == fltk3::focus()) {
         // Give up input focus...
-	int old_event = Fl::e_number;
-        o->handle(Fl::e_number = FL_UNFOCUS);
-	Fl::e_number = old_event;
-	Fl::focus(0);
+	int old_event = fltk3::e_number;
+        o->handle(fltk3::e_number = FL_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,10 +307,10 @@
   }
 }
 
-//void Fl_Group::focus(Fl_Widget *o) {Fl::focus(o); o->handle(FL_FOCUS);}
+//void Fl_Group::focus(fltk3::Widget *o) {fltk3::focus(o); o->handle(FL_FOCUS);}
 
 #if 0
-const char *nameof(Fl_Widget *o) {
+const char *nameof(fltk3::Widget *o) {
   if (!o) return "NULL";
   if (!o->label()) return "<no label>";
   return o->label();
@@ -323,9 +323,9 @@
   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;
   }
-  Fl_Widget *previous = array_[i];
+  fltk3::Widget *previous = array_[i];
 
   for (;;) {
     switch (key) {
@@ -348,7 +348,7 @@
     default:
       return 0;
     }
-    Fl_Widget* o = array_[i];
+    fltk3::Widget* o = array_[i];
     if (o == previous) return 0;
     switch (key) {
     case FL_Down:
@@ -364,7 +364,7 @@
 ////////////////////////////////////////////////////////////////
 
 Fl_Group::Fl_Group(int X,int Y,int W,int H,const char *l)
-: Fl_Widget(X,Y,W,H,l) {
+: fltk3::Widget(X,Y,W,H,l) {
   align(FL_ALIGN_TOP);
   children_ = 0;
   array_ = 0;
@@ -389,7 +389,7 @@
   init_sizes();
   // okay, now it is safe to destroy the children:
   while (children_) {
-    Fl_Widget* o = child(0);	// *first* child widget
+    fltk3::Widget* o = child(0);	// *first* child widget
     if (o->parent() == this) {	// should always be true
       remove(o);		// remove child widget first
       delete o;			// then delete it
@@ -427,7 +427,7 @@
   if n >= children(). This can also be used to rearrange
   the widgets inside a group.
 */
-void Fl_Group::insert(Fl_Widget &o, int index) {
+void Fl_Group::insert(fltk3::Widget &o, int index) {
   if (o.parent()) {
     Fl_Group* g = o.parent();
     int n = g->find(o);
@@ -439,16 +439,16 @@
   }
   o.parent_ = this;
   if (children_ == 0) { // use array pointer to point at single child
-    array_ = (Fl_Widget**)&o;
+    array_ = (fltk3::Widget**)&o;
   } else if (children_ == 1) { // go from 1 to 2 children
-    Fl_Widget* t = (Fl_Widget*)array_;
-    array_ = (Fl_Widget**)malloc(2*sizeof(Fl_Widget*));
+    fltk3::Widget* t = (fltk3::Widget*)array_;
+    array_ = (fltk3::Widget**)malloc(2*sizeof(fltk3::Widget*));
     if (index) {array_[0] = t; array_[1] = &o;}
     else {array_[0] = &o; array_[1] = t;}
   } else {
     if (!(children_ & (children_-1))) // double number of children
-      array_ = (Fl_Widget**)realloc((void*)array_,
-				    2*children_*sizeof(Fl_Widget*));
+      array_ = (fltk3::Widget**)realloc((void*)array_,
+                                        2*children_*sizeof(fltk3::Widget*));
     int j; for (j = children_; j > index; j--) array_[j] = array_[j-1];
     array_[j] = &o;
   }
@@ -460,7 +460,7 @@
   The widget is removed from its current group (if any) and then added
   to the end of this group.
 */
-void Fl_Group::add(Fl_Widget &o) {insert(o, children_);}
+void Fl_Group::add(fltk3::Widget &o) {insert(o, children_);}
 
 /**
   Removes a widget from the group but does not delete it.
@@ -470,7 +470,7 @@
   This method differs from the clear() method in that it only affects
   a single widget and does not delete it from memory.
 */
-void Fl_Group::remove(Fl_Widget &o) {
+void Fl_Group::remove(fltk3::Widget &o) {
   if (!children_) return;
   int i = find(o);
   if (i >= children_) return;
@@ -489,9 +489,9 @@
 
   children_--;
   if (children_ == 1) { // go from 2 to 1 child
-    Fl_Widget *t = array_[!i];
+    fltk3::Widget *t = array_[!i];
     free((void*)array_);
-    array_ = (Fl_Widget**)t;
+    array_ = (fltk3::Widget**)t;
   } else if (children_ > 1) { // delete from array
     for (; i < children_; i++) array_[i] = array_[i+1];
   }
@@ -556,7 +556,7 @@
     p[5] = p[1];
     p[6] = p[2];
     p[7] = p[3];
-    Fl_Widget* r = resizable();
+    fltk3::Widget* r = resizable();
     if (r && r != this) { // then clip the resizable to it
       int t;
       t = r->x(); if (t > p[0]) p[4] = t;
@@ -566,9 +566,9 @@
     }
     // next is all the children's sizes:
     p += 8;
-    Fl_Widget*const* a = array();
+    fltk3::Widget*const* a = array();
     for (int i=children_; i--;) {
-      Fl_Widget* o = *a++;
+      fltk3::Widget* o = *a++;
       *p++ = o->x();
       *p++ = o->x()+o->w();
       *p++ = o->y();
@@ -583,11 +583,11 @@
 
   The Fl_Group widget first resizes itself, and then it moves and resizes
   all its children according to the rules documented for
-  Fl_Group::resizable(Fl_Widget*)
+  Fl_Group::resizable(fltk3::Widget*)
 
-  \sa Fl_Group::resizable(Fl_Widget*)
+  \sa Fl_Group::resizable(fltk3::Widget*)
   \sa Fl_Group::resizable()
-  \sa Fl_Widget::resize(int,int,int,int)
+  \sa fltk3::Widget::resize(int,int,int,int)
 */
 void Fl_Group::resize(int X, int Y, int W, int H) {
 
@@ -598,14 +598,14 @@
   
   int *p = sizes(); // save initial sizes and positions
 
-  Fl_Widget::resize(X,Y,W,H); // make new xywh values visible for children
+  fltk3::Widget::resize(X,Y,W,H); // make new xywh values visible for children
 
   if (!resizable() || dw==0 && dh==0 ) {
 
     if (type() < FL_WINDOW) {
-      Fl_Widget*const* a = array();
+      fltk3::Widget*const* a = array();
       for (int i=children_; i--;) {
-	Fl_Widget* o = *a++;
+	fltk3::Widget* o = *a++;
 	o->resize(o->x()+dx, o->y()+dy, o->w(), o->h());
       }
     }
@@ -626,9 +626,9 @@
     int IY = *p++;
     int IB = *p++;
 
-    Fl_Widget*const* a = array();
+    fltk3::Widget*const* a = array();
     for (int i=children_; i--;) {
-      Fl_Widget* o = *a++;
+      fltk3::Widget* o = *a++;
 #if 1
       int XX = *p++;
       if (XX >= IR) XX += dw;
@@ -671,18 +671,18 @@
   after drawing the box, border, or background.
 */
 void Fl_Group::draw_children() {
-  Fl_Widget*const* a = array();
+  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() & ~FL_DAMAGE_CHILD) { // redraw the entire thing:
     for (int i=children_; i--;) {
-      Fl_Widget& o = **a++;
+      fltk3::Widget& o = **a++;
       draw_child(o);
       draw_outside_label(o);
     }
@@ -707,9 +707,9 @@
   This draws a child widget, if it is not clipped \em and if any damage() bits
   are set. The damage bits are cleared after drawing.
 
-  \sa Fl_Group::draw_child(Fl_Widget& widget) const
+  \sa Fl_Group::draw_child(fltk3::Widget& widget) const
 */
-void Fl_Group::update_child(Fl_Widget& widget) const {
+void Fl_Group::update_child(fltk3::Widget& widget) const {
   if (widget.damage() && widget.visible() && widget.type() < FL_WINDOW &&
       fl_not_clipped(widget.x(), widget.y(), widget.w(), widget.h())) {
     widget.draw();	
@@ -723,7 +723,7 @@
   This draws a child widget, if it is not clipped.
   The damage bits are cleared after drawing.
 */
-void Fl_Group::draw_child(Fl_Widget& widget) const {
+void Fl_Group::draw_child(fltk3::Widget& widget) const {
   if (widget.visible() && widget.type() < FL_WINDOW &&
       fl_not_clipped(widget.x(), widget.y(), widget.w(), widget.h())) {
     widget.clear_damage(FL_DAMAGE_ALL);
@@ -735,7 +735,7 @@
 extern char fl_draw_shortcut;
 
 /** Parents normally call this to draw outside labels of child widgets. */
-void Fl_Group::draw_outside_label(const Fl_Widget& widget) const {
+void Fl_Group::draw_outside_label(const fltk3::Widget& widget) const {
   if (!widget.visible()) return;
   // skip any labels that are inside the widget:
   if (!(widget.align()&15) || (widget.align() & FL_ALIGN_INSIDE)) return;

Modified: branches/branch-3.0/src/Fl_Help_Dialog_Dox.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Help_Dialog_Dox.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Help_Dialog_Dox.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -105,11 +105,11 @@
 
 /** \fn void Fl_Help_Dialog::show()
   Shows the main Help Dialog Window
-  Delegates call to encapsulated window_ void Fl_Window::show() method */
+  Delegates call to encapsulated window_ void fltk3::Window::show() method */
 
 /** \fn void Fl_Help_Dialog::show(int argc, char **argv)
   Shows the main Help Dialog Window
-  Delegates call to encapsulated window_ void Fl_Window::show(int argc, char **argv) instance method */
+  Delegates call to encapsulated window_ void fltk3::Window::show(int argc, char **argv) instance method */
 
 /** \fn void Fl_Help_Dialog::textsize(Fl_Fontsize s)
   Sets the internal Fl_Help_View instance text size.

Modified: branches/branch-3.0/src/Fl_Help_View.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Help_View.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Help_View.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -93,8 +93,8 @@
 //
 
 static int	quote_char(const char *);
-static void	scrollbar_callback(Fl_Widget *s, void *);
-static void	hscrollbar_callback(Fl_Widget *s, void *);
+static void	scrollbar_callback(fltk3::Widget *s, void *);
+static void	hscrollbar_callback(fltk3::Widget *s, void *);
 
 //
 // global flag for image loading (see get_image).
@@ -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 FL_DRAG:
       if (linkp) {
-        if (Fl::event_is_click()) {
+        if (fltk3::event_is_click()) {
           fl_cursor(FL_CURSOR_HAND);
         } else {
           fl_cursor(FL_CURSOR_DEFAULT); // should be "FL_CURSOR_CANCEL" if we had it
@@ -3001,7 +3001,7 @@
       return 1;
     case FL_RELEASE:
       if (linkp) {
-        if (Fl::event_is_click()) {
+        if (fltk3::event_is_click()) {
           follow_link(linkp);
         }
         fl_cursor(FL_CURSOR_DEFAULT);
@@ -3014,7 +3014,7 @@
       }
       return 1;
     case FL_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)
     : Fl_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(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
 
@@ -3240,14 +3240,14 @@
 					// Box to draw...
 
 
-  Fl_Widget::resize(xx, yy, ww, hh);
+  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_)
@@ -3500,7 +3500,7 @@
 
 /** The vertical scrollbar callback. */
 static void
-scrollbar_callback(Fl_Widget *s, void *)
+scrollbar_callback(fltk3::Widget *s, void *)
 {
   ((Fl_Help_View *)(s->parent()))->topline(int(((Fl_Scrollbar*)s)->value()));
 }
@@ -3508,7 +3508,7 @@
 
 /** The horizontal scrollbar callback. */
 static void
-hscrollbar_callback(Fl_Widget *s, void *)
+hscrollbar_callback(fltk3::Widget *s, void *)
 {
   ((Fl_Help_View *)(s->parent()))->leftline(int(((Fl_Scrollbar*)s)->value()));
 }

Modified: branches/branch-3.0/src/Fl_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Image.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -112,10 +112,10 @@
   The label() methods are an obsolete way to set the
   image attribute of a widget or menu item. Use the
   image() or deimage() methods of the
-  Fl_Widget and Fl_Menu_Item classes
+  fltk3::Widget and Fl_Menu_Item classes
   instead.
 */
-void Fl_Image::label(Fl_Widget* widget) {
+void Fl_Image::label(fltk3::Widget* widget) {
   widget->image(this);
 }
 
@@ -123,11 +123,11 @@
   The label() methods are an obsolete way to set the
   image attribute of a widget or menu item. Use the
   image() or deimage() methods of the
-  Fl_Widget and Fl_Menu_Item classes
+  fltk3::Widget and Fl_Menu_Item classes
   instead.
 */
 void Fl_Image::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
+  fltk3::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
   m->label(_FL_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;
 
@@ -544,12 +544,12 @@
 #endif
 }
 
-void Fl_RGB_Image::label(Fl_Widget* widget) {
+void Fl_RGB_Image::label(fltk3::Widget* widget) {
   widget->image(this);
 }
 
 void Fl_RGB_Image::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
+  fltk3::set_labeltype(_FL_IMAGE_LABEL, labeltype, measure);
   m->label(_FL_IMAGE_LABEL, (const char*)this);
 }
 

Modified: branches/branch-3.0/src/Fl_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Input.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Input.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -49,17 +49,17 @@
   if (input_type() == FL_HIDDEN_INPUT) return;
   Fl_Boxtype b = box();
   if (damage() & FL_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(FL_SHIFT) ? mark() : p);
+  return position(p, fltk3::event_state(FL_SHIFT) ? mark() : p);
 }
 
 int Fl_Input::shift_up_down_position(int p) {
-  return up_down_position(p, Fl::event_state(FL_SHIFT));
+  return up_down_position(p, fltk3::event_state(FL_SHIFT));
 }
 
 // If you define this symbol as zero you will get the peculiar fltk
@@ -84,16 +84,16 @@
 
 int Fl_Input::handle_key() {
   
-  char ascii = Fl::event_text()[0];
+  char ascii = fltk3::event_text()[0];
   
   int repeat_num=1;
   
   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
@@ -136,19 +136,19 @@
       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() & (FL_META|FL_CTRL|FL_ALT);
-  switch (Fl::event_key()) {
+  unsigned int mods = fltk3::event_state() & (FL_META|FL_CTRL|FL_ALT);
+  switch (fltk3::event_key()) {
     case FL_Insert:
-      if (Fl::event_state() & FL_CTRL) ascii = ctrl('C');
-      else if (Fl::event_state() & FL_SHIFT) ascii = ctrl('V');
+      if (fltk3::event_state() & FL_CTRL) ascii = ctrl('C');
+      else if (fltk3::event_state() & FL_SHIFT) ascii = ctrl('V');
       break;
     case FL_Delete:
 #ifdef __APPLE__
@@ -359,7 +359,7 @@
       else 
         return 0;	// reserved for shortcuts
     case FL_Tab:
-      if (Fl::event_state(FL_CTRL|FL_SHIFT) || input_type()!=FL_MULTILINE_INPUT || readonly()) return 0;
+      if (fltk3::event_state(FL_CTRL|FL_SHIFT) || input_type()!=FL_MULTILINE_INPUT || readonly()) return 0;
       return replace(position(), mark(), &ascii, 1);
 #ifdef __APPLE__
     case 'c' :
@@ -367,11 +367,11 @@
     case 'x' :
     case 'z' :
       //    printf("'%c' (0x%02x) pressed with%s%s%s%s\n", ascii, ascii,
-      //           Fl::event_state(FL_SHIFT) ? " FL_SHIFT" : "",
-      //           Fl::event_state(FL_CTRL) ? " FL_CTRL" : "",
-      //           Fl::event_state(FL_ALT) ? " FL_ALT" : "",
-      //           Fl::event_state(FL_META) ? " FL_META" : "");
-      if (Fl::event_state(FL_META)) ascii -= 0x60;
+      //           fltk3::event_state(FL_SHIFT) ? " FL_SHIFT" : "",
+      //           fltk3::event_state(FL_CTRL) ? " FL_CTRL" : "",
+      //           fltk3::event_state(FL_ALT) ? " FL_ALT" : "",
+      //           fltk3::event_state(FL_META) ? " FL_META" : "");
+      if (fltk3::event_state(FL_META)) ascii -= 0x60;
       //    printf("using '%c' (0x%02x)...\n", ascii, ascii);
       break;
 #endif // __APPLE__
@@ -447,7 +447,7 @@
         fl_beep();
         return 1;
       }
-      Fl::paste(*this, 1);
+      fltk3::paste(*this, 1);
       return 1;
     case ctrl('X'): // cut the selected text
     case ctrl('W'):
@@ -482,10 +482,10 @@
 
 int Fl_Input::handle(int event) {
   static int dnd_save_position, dnd_save_mark, drag_start = -1, newpos;
-  static Fl_Widget *dnd_save_focus;
+  static fltk3::Widget *dnd_save_focus;
   switch (event) {
     case FL_FOCUS:
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
         case FL_Right:
           position(0);
           break;
@@ -509,7 +509,7 @@
       break;
       
     case FL_KEYBOARD:
-      if (Fl::event_key() == FL_Tab && mark() != position()) {
+      if (fltk3::event_key() == FL_Tab && mark() != position()) {
         // Set the current cursor position to the end of the selection...
         if (mark() > position())
           position(mark());
@@ -517,21 +517,21 @@
           position(position());
         return (1);
       } else {
-        if (active_r() && window() && this == Fl::belowmouse()) 
+        if (active_r() && window() && this == fltk3::belowmouse()) 
           window()->cursor(FL_CURSOR_NONE);
         return handle_key();
       }
       
     case FL_PUSH:
-      if (Fl::dnd_text_ops()) {
+      if (fltk3::dnd_text_ops()) {
         int oldpos = position(), oldmark = mark();
         Fl_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);
+                                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(FL_SHIFT) && input_type()!=FL_SECRET_INPUT &&
+        if (fltk3::focus()==this && !fltk3::event_state(FL_SHIFT) && input_type()!=FL_SECRET_INPUT &&
             (newpos >= mark() && newpos < position() ||
              newpos >= position() && newpos < mark())) {
               // user clicked in the selection, may be trying to drag
@@ -541,38 +541,38 @@
         drag_start = -1;
       }
       
-      if (Fl::focus() != this) {
-        Fl::focus(this);
+      if (fltk3::focus() != this) {
+        fltk3::focus(this);
         handle(FL_FOCUS);
       }
       break;
       
     case FL_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 FL_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);
       }
@@ -584,19 +584,19 @@
       return 1;
       
     case FL_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(FL_FOCUS);
       }
       // fall through:
     case FL_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;
@@ -605,8 +605,8 @@
     {
       Fl_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);
+                              x()+fltk3::box_dx(b), y()+fltk3::box_dy(b),
+                              w()-fltk3::box_dw(b), h()-fltk3::box_dh(b), 0);
     }
       return 1;
       
@@ -616,7 +616,7 @@
       if (!focused())
 #endif
         if (dnd_save_focus != this) {
-          Fl::focus(dnd_save_focus);
+          fltk3::focus(dnd_save_focus);
           handle(FL_UNFOCUS);
         }
       return 1;
@@ -629,10 +629,10 @@
        That clipping happens in drawtext(). Do we change the clipping or should 
        we move the cursor (ouch)?
        case FL_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;
        */
@@ -640,8 +640,8 @@
   }
   Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Input_.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -73,7 +73,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) {
@@ -215,16 +215,16 @@
 void Fl_Input_::drawtext(int X, int Y, int W, int H) {
   int do_mu = !(damage()&FL_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();
@@ -246,7 +246,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) {
@@ -315,8 +315,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.
@@ -355,7 +355,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());
       if (readonly()) {
@@ -379,13 +379,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());
   }
@@ -504,7 +504,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();; ) {
@@ -513,34 +513,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 {
@@ -548,7 +548,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 {
@@ -561,7 +561,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();
     }
   }
@@ -613,7 +613,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);
@@ -621,7 +621,7 @@
     // new position is a cursor
     if (position_ == mark_) {
       // old position was just a cursor
-      if (Fl::focus() == this && !(damage()&FL_DAMAGE_EXPOSE)) {
+      if (fltk3::focus() == this && !(damage()&FL_DAMAGE_EXPOSE)) {
 	minimal_update(position_); erase_cursor_only = 1;
       }
     } else { // old position was a selection
@@ -675,7 +675,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();
@@ -683,7 +683,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;
@@ -895,7 +895,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;
 }
 
@@ -930,7 +930,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;
 
@@ -938,7 +938,7 @@
     if (active_r() && window()) window()->cursor(FL_CURSOR_DEFAULT);
     if (mark_ == position_) {
       if (!(damage()&FL_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 FL_HIDE:
     fl_reset_spot();
@@ -949,10 +949,10 @@
   case FL_PUSH:
     if (active_r() && window()) window()->cursor(FL_CURSOR_INSERT);
 
-    handle_mouse(X, Y, W, H, Fl::event_state(FL_SHIFT));
+    handle_mouse(X, Y, W, H, fltk3::event_state(FL_SHIFT));
 
-    if (Fl::focus() != this) {
-      Fl::focus(this);
+    if (fltk3::focus() != this) {
+      fltk3::focus(this);
       handle(FL_FOCUS);
     }
     return 1;
@@ -973,11 +973,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) {
@@ -1016,10 +1016,10 @@
     return replace(position(), mark(), t, e-t);}
 
   case FL_SHORTCUT:
-    if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut())) 
+    if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut())) 
       return 0;
-    if (Fl::visible_focus() && handle(FL_FOCUS)) {
-      Fl::focus(this);
+    if (fltk3::visible_focus() && handle(FL_FOCUS)) {
+      fltk3::focus(this);
       return 1;
     } // else fall through
 
@@ -1041,7 +1041,7 @@
   \param l an optional label text
 */
 Fl_Input_::Fl_Input_(int X, int Y, int W, int H, const char* l)
-: Fl_Widget(X, Y, W, H, l) {
+: fltk3::Widget(X, Y, W, H, l) {
   box(FL_DOWN_BOX);
   color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
   align(FL_ALIGN_LEFT);
@@ -1205,12 +1205,12 @@
   Changes the size of the widget.
   This call updates the text layout so that the cursor is visible.
   \param [in] X, Y, W, H new size of the widget
-  \see Fl_Widget::resize(int, int, int, int)
+  \see fltk3::Widget::resize(int, int, int, int)
 */
 void Fl_Input_::resize(int X, int Y, int W, int H) {
   if (W != w()) xscroll_ = 0;
   if (H != h()) yscroll_ = 0;
-  Fl_Widget::resize(X, Y, W, H);
+  fltk3::Widget::resize(X, Y, W, H);
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_Light_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Light_Button.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Light_Button.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -38,14 +38,14 @@
 #include "flstring.h"
 
 void Fl_Light_Button::draw() {
-  if (box()) draw_box(this==Fl::pushed() ? fl_down(box()) : box(), color());
+  if (box()) draw_box(this==fltk3::pushed() ? fl_down(box()) : box(), color());
   Fl_Color col = value() ? (active_r() ? selection_color() :
                             fl_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, FL_BACKGROUND2_COLOR);
 	if (value()) {
-	  if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	  if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(FL_SELECTION_COLOR);
 	  } else {
 	    fl_color(col);
@@ -80,12 +80,12 @@
         // Radio button...
         draw_box(down_box(), x()+dx, y()+dy, W, W, FL_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(FL_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(fl_color_average(FL_WHITE, FL_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() : fl_inactive(selection_color());
       fl_color(value() ? col : fl_color_average(col, FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -188,14 +188,14 @@
     if (flags & FL_MENU_RADIO) {
       fl_draw_box(FL_ROUND_DOWN_BOX, x+2, y+d, W, W, FL_BACKGROUND2_COLOR);
       if (value()) {
-	int tW = (W - Fl::box_dw(FL_ROUND_DOWN_BOX)) / 2 + 1;
+	int tW = (W - fltk3::box_dw(FL_ROUND_DOWN_BOX)) / 2 + 1;
 	if ((W - tW) & 1) tW++;	// Make sure difference is even to center
-	int td = Fl::box_dx(FL_ROUND_DOWN_BOX) + 1;
-        if (Fl::scheme()) {
+	int td = fltk3::box_dx(FL_ROUND_DOWN_BOX) + 1;
+        if (fltk3::scheme()) {
 	  // Offset the radio circle...
 	  td ++;
 
-	  if (!strcmp(Fl::scheme(), "gtk+")) {
+	  if (!strcmp(fltk3::scheme(), "gtk+")) {
 	    fl_color(FL_SELECTION_COLOR);
 	    tW --;
 	    fl_pie(x + td + 1, y + d + td - 1, tW + 3, tW + 3, 0.0, 360.0);
@@ -230,7 +230,7 @@
 	    break;
 	}
 
-	if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	  fl_color(fl_color_average(FL_WHITE, FL_SELECTION_COLOR, 0.5));
 	  fl_arc(x + td + 2, y + d + td, tW + 1, tW + 1, 60.0, 180.0);
 	}
@@ -238,7 +238,7 @@
     } else {
       fl_draw_box(FL_DOWN_BOX, x+2, y+d, W, W, FL_BACKGROUND2_COLOR);
       if (value()) {
-	if (Fl::scheme() && !strcmp(Fl::scheme(), "gtk+")) {
+	if (fltk3::scheme() && !strcmp(fltk3::scheme(), "gtk+")) {
 	  fl_color(FL_SELECTION_COLOR);
 	} else {
 	  fl_color(labelcolor_);
@@ -270,7 +270,7 @@
   clear_border();
   set_menu_window();
   menu = L;
-  if (L->labelcolor_ || Fl::scheme() || L->labeltype_ > FL_NO_LABEL) clear_overlay();
+  if (L->labelcolor_ || fltk3::scheme() || L->labeltype_ > FL_NO_LABEL) clear_overlay();
 }
 
 menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
@@ -281,7 +281,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();
@@ -297,7 +297,7 @@
   } else {
     box(FL_UP_BOX);
   }
-  color(button && !Fl::scheme() ? button->color() : FL_GRAY);
+  color(button && !fltk3::scheme() ? button->color() : FL_GRAY);
   selected = -1;
   {
     int j = 0;
@@ -349,11 +349,11 @@
         }
       }
     }
-    if (m->labelcolor_ || Fl::scheme() || m->labeltype_ > FL_NO_LABEL) clear_overlay();
+    if (m->labelcolor_ || fltk3::scheme() || m->labeltype_ > FL_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;
@@ -375,10 +375,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());
       }
     }
   }
@@ -386,7 +386,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 {
@@ -413,9 +413,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;
@@ -431,7 +431,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;
@@ -518,8 +518,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;
 }
@@ -544,7 +544,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
@@ -658,7 +658,7 @@
   menustate &pp = *p;
   switch (e) {
   case FL_KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
     case FL_BackSpace:
     case 0xFE20: // backtab
     BACKTAB:
@@ -674,10 +674,10 @@
       }
       return 1;
     case FL_Tab:
-      if (Fl::event_shift()) goto BACKTAB;
+      if (fltk3::event_shift()) goto BACKTAB;
     case FL_Down:
       if (pp.menu_number || !pp.menubar) {
-        if (!forward(pp.menu_number) && Fl::event_key()==FL_Tab) {
+        if (!forward(pp.menu_number) && fltk3::event_key()==FL_Tab) {
           pp.item_number = -1;
           forward(pp.menu_number);
         }
@@ -729,8 +729,8 @@
       // right after FL_RELEASE...
       if (pp.state == DONE_STATE) return 1;
 #endif // __QNX__
-      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)) {
@@ -774,7 +774,7 @@
   case FL_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() || pp.state == PUSH_STATE ||
+    if (!fltk3::event_is_click() || pp.state == PUSH_STATE ||
 	pp.menubar && pp.current_item && !pp.current_item->submenu() // button
 	) {
 #if 0 // makes the check/radio items leave the menu up
@@ -790,7 +790,7 @@
     }
     return 1;
   }
-  return Fl_Window::handle(e);
+  return fltk3::Window::handle(e);
 }
 
 /**
@@ -813,16 +813,16 @@
 
   button = pbutton;
   if (pbutton) {
-    for (Fl_Window* w = pbutton->window(); w; w = w->window()) {
+    for (fltk3::Window* w = pbutton->window(); w; w = w->window()) {
       X += w->x();
       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;
@@ -840,7 +840,7 @@
   if (menubar) {
     // find the initial menu
     if (!mw.handle(FL_DRAG)) {
-      Fl::grab(0);
+      fltk3::grab(0);
       return 0;
     }
   }
@@ -863,7 +863,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;
     }
@@ -948,7 +948,7 @@
     }
   }
   const Fl_Menu_Item* m = pp.current_item;
-  Fl::grab(0);
+  fltk3::grab(0);
   delete pp.fakemenu;
   while (pp.nummenus>1) delete pp.p[--pp.nummenus];
   mw.hide();
@@ -962,7 +962,7 @@
   callbacks or change the state of check or radio items.</I>
   <P>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). </P>
+  fltk3::event_x() and fltk3::event_y() unchanged here). </P>
   <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. </P>
   <P>The menu is positioned so the cursor is centered over the item 
@@ -992,8 +992,8 @@
   const Fl_Menu_Item* m = first();
   if (m) for (int ii = 0; m->text; m = m->next(), ii++) {
     if (m->activevisible()) {
-      if (Fl::test_shortcut(m->shortcut_)
-	 || Fl_Widget::test_shortcut(m->text)) {
+      if (fltk3::test_shortcut(m->shortcut_)
+          || fltk3::Widget::test_shortcut(m->text)) {
 	if (ip) *ip=ii;
 	return m;
       }
@@ -1018,8 +1018,8 @@
   if (m) for (; m->text; m = m->next()) {
     if (m->activevisible()) {
       // return immediately any match of an item in top level menu:
-      if (Fl::test_shortcut(m->shortcut_)) return m;
-      // if (Fl_Widget::test_shortcut(m->text)) 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()) {
 	const Fl_Menu_Item* s =

Modified: branches/branch-3.0/src/Fl_Menu_.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu_.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -46,7 +46,7 @@
     \b Example:
     \code
       Fl_Menu_Bar *menubar = 0;
-      void my_menu_callback(Fl_Widget*,void*) {
+      void my_menu_callback(fltk3::Widget*,void*) {
         char name[80];
         if ( menubar->item_pathname(name, sizeof(name)-1) == 0 ) {   // recently picked item
           if ( strcmp(name, "File/&Open") == 0 ) { .. }              // open invoked
@@ -216,7 +216,7 @@
     value_ = v;
     if (when()&(FL_WHEN_CHANGED|FL_WHEN_RELEASE)) {
       if (changed() || when()&FL_WHEN_NOT_CHANGED) {
-	if (value_ && value_->callback_) value_->do_callback((Fl_Widget*)this);
+	if (value_ && value_->callback_) value_->do_callback((fltk3::Widget*)this);
 	else do_callback();
       }
     }
@@ -245,7 +245,7 @@
  and label string.  menu() is initialized to null.
  */
 Fl_Menu_::Fl_Menu_(int X,int Y,int W,int H,const char* l)
-: Fl_Widget(X,Y,W,H,l) {
+: fltk3::Widget(X,Y,W,H,l) {
   set_flag(SHORTCUT_LABEL);
   box(FL_UP_BOX);
   when(FL_WHEN_RELEASE_ALWAYS);

Modified: branches/branch-3.0/src/Fl_Menu_Bar.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Bar.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu_Bar.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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(FL_DARK3);

Modified: branches/branch-3.0/src/Fl_Menu_Button.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_Button.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu_Button.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -36,7 +36,7 @@
   if (!box() || type()) return;
   draw_box(pressed_menu_button_ == this ? fl_down(box()) : box(), color());
   draw_label();
-  if (Fl::focus() == this) draw_focus();
+  if (fltk3::focus() == this) draw_focus();
   // ** if (box() == FL_FLAT_BOX) return; // for XForms compatibility
   int H = (labelsize()-3)&-2;
   int X = x()+w()-H*2;
@@ -60,7 +60,7 @@
   redraw();
   Fl_Widget_Tracker 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,26 +78,26 @@
     return (box() && !type()) ? 1 : 0;
   case FL_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 FL_KEYBOARD:
     if (!box()) return 0;
-    if (Fl::event_key() == ' ' &&
-        !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
+    if (fltk3::event_key() == ' ' &&
+        !(fltk3::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
       popup();
       return 1;
     } else return 0;
   case FL_SHORTCUT:
-    if (Fl_Widget::test_shortcut()) {popup(); return 1;}
+      if (fltk3::Widget::test_shortcut()) {popup(); return 1;}
     return test_shortcut() != 0;
   case FL_FOCUS: /* FALLTHROUGH */
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -70,7 +70,7 @@
   if (!gc) {
 	  gc = XCreateGC(fl_display, myi->xid, 0, 0);
 # if defined(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_global.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu_global.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Menu_global.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -35,15 +35,15 @@
 static Fl_Menu_* the_widget;
 
 static int handler(int e) {
-  if (e != FL_SHORTCUT || Fl::modal()) return 0;
-  Fl::first_window(the_widget->window());
+  if (e != FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Multi_Label.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -65,13 +65,13 @@
   w += W; if (H>h) h = H;
 }
 
-void Fl_Multi_Label::label(Fl_Widget* o) {
-  Fl::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure);
+void Fl_Multi_Label::label(fltk3::Widget* o) {
+  fltk3::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure);
   o->label(_FL_MULTI_LABEL, (const char*)this);
 }
 
 void Fl_Multi_Label::label(Fl_Menu_Item* o) {
-  Fl::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure);
+  fltk3::set_labeltype(_FL_MULTI_LABEL, multi_labeltype, multi_measure);
   o->label(_FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Native_File_Chooser_FLTK.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -67,7 +67,7 @@
 
   // Added by MG
   Fl_Button *b = _file_chooser->previewButton;
-  Fl_Window *w = b->window();
+  fltk3::Window *w = b->window();
   Fl_Group::current(w);		// adds a "Show hidden files" check button in _file_chooser's window
   show_hidden = new Fl_Check_Button(b->x() + b->w() + 10, b->y(), 145, b->h(), "Show hidden files");
   show_hidden->callback((Fl_Callback*)show_hidden_cb, this);
@@ -206,7 +206,7 @@
       prev_filtervalue = _file_chooser->filter_value();
       if (!show_hidden->value() ) remove_hidden_files(my_fileList);
     }
-    Fl::wait();
+    fltk3::wait();
   }
 
   if ( _file_chooser->value() && _file_chooser->value()[0] ) {

Modified: branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Native_File_Chooser_MAC.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Overlay_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -93,7 +93,7 @@
 void Fl_Overlay_Window::redraw_overlay() {
   overlay_ = this;
   clear_damage((uchar)(damage()|FL_DAMAGE_OVERLAY));
-  Fl::damage(FL_DAMAGE_CHILD);
+  fltk3::damage(FL_DAMAGE_CHILD);
 }
 
 #else
@@ -105,13 +105,13 @@
 static GC gc;	// the GC used by all X windows
 extern uchar fl_overlay; // changes how fl_color(x) works
 
-class _Fl_Overlay : public Fl_Window {
+class _Fl_Overlay : public fltk3::Window {
   friend class Fl_Overlay_Window;
   void flush();
   void show();
 public:
   _Fl_Overlay(int x, int y, int w, int h) :
-    Fl_Window(x,y,w,h) {set_flag(INACTIVE);}
+  fltk3::Window(x,y,w,h) {set_flag(INACTIVE);}
 };
 
 int Fl_Overlay_Window::can_do_overlay() {
@@ -119,13 +119,13 @@
 }
 
 void _Fl_Overlay::show() {
-  if (shown()) {Fl_Window::show(); return;}
+  if (shown()) {fltk3::Window::show(); return;}
   fl_background_pixel = int(fl_transparent_pixel);
   Fl_X::make_xid(this, fl_overlay_visual, fl_overlay_colormap);
   fl_background_pixel = -1;
   // find the outermost window to tell wm about the colormap:
-  Fl_Window *w = window();
-  for (;;) {Fl_Window *w1 = w->window(); if (!w1) break; w = w1;}
+  fltk3::Window *w = window();
+  for (;;) {fltk3::Window *w1 = w->window(); if (!w1) break; w = w1;}
   XSetWMColormapWindows(fl_display, fl_xid(w), &(Fl_X::i(this)->xid), 1);
 }
 
@@ -136,7 +136,7 @@
   }
   fl_gc = gc;
 #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_overlay = 1;
   Fl_Overlay_Window *w = (Fl_Overlay_Window *)parent();
@@ -161,7 +161,7 @@
   if (shown()) {
     if (overlay_ == this) {
       clear_damage(damage()|FL_DAMAGE_OVERLAY);
-      Fl::damage(FL_DAMAGE_CHILD);
+      fltk3::damage(FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_PNG_Image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -80,7 +80,7 @@
 
   if (setjmp(pp->jmpbuf))
   {
-    Fl::warning("PNG file \"%s\" contains errors!\n", png);
+    fltk3::warning("PNG file \"%s\" contains errors!\n", png);
     return;
   }
 

Modified: branches/branch-3.0/src/Fl_PNM_Image.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PNM_Image.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_PNM_Image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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_PS_Printer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_PS_Printer.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_PS_Printer.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -868,7 +868,7 @@
 void Fl_PSfile_Device::color(Fl_Color c) {
   //colored_=1;
   color_=c;
-  Fl::get_color(c, cr_, cg_, cb_);
+  fltk3::get_color(c, cr_, cg_, cb_);
   if (cr_==cg_ && cg_==cb_) {
     double gray = cr_/255.0;
     fprintf(output, "%g GL\n", gray);
@@ -1292,7 +1292,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_Pack.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pack.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Pack.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -52,15 +52,15 @@
 }
 
 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;
   uchar d = damage();
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   if (horizontal()) {
     rw = -spacing_;
     rh = th;
@@ -81,7 +81,7 @@
       }
   }
   for (int i = children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o->visible()) {
       int X,Y,W,H;
       if (horizontal()) {
@@ -140,10 +140,10 @@
     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()) {
-    Fl_Widget::resize(x(),y(),tw,th);
+    fltk3::Widget::resize(x(),y(),tw,th);
     d = FL_DAMAGE_ALL;
   }
   if (d&FL_DAMAGE_ALL) {

Modified: branches/branch-3.0/src/Fl_Pixmap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Pixmap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Pixmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -230,12 +230,12 @@
   }
 }
 
-void Fl_Pixmap::label(Fl_Widget* widget) {
+void Fl_Pixmap::label(fltk3::Widget* widget) {
   widget->image(this);
 }
 
 void Fl_Pixmap::label(Fl_Menu_Item* m) {
-  Fl::set_labeltype(_FL_IMAGE_LABEL, labeltype, Fl_Image::measure);
+  fltk3::set_labeltype(_FL_IMAGE_LABEL, labeltype, Fl_Image::measure);
   m->label(_FL_IMAGE_LABEL, (const char*)this);
 }
 
@@ -397,7 +397,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Positioner.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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;
@@ -129,7 +129,7 @@
   size, and label string. The default boxtype is FL_NO_BOX.
 */
 Fl_Positioner::Fl_Positioner(int X, int Y, int W, int H, const char* l)
-: Fl_Widget(X, Y, W, H, l) {
+: fltk3::Widget(X, Y, W, H, l) {
   box(FL_DOWN_BOX);
   selection_color(FL_RED);
   align(FL_ALIGN_BOTTOM);

Modified: branches/branch-3.0/src/Fl_Progress.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Progress.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Progress.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -41,7 +41,7 @@
 
 
 //
-// Fl_Progress is a progress bar widget based off Fl_Widget that shows a
+// Fl_Progress is a progress bar widget based off fltk3::Widget that shows a
 // standard progress bar...
 //
 
@@ -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;
@@ -108,7 +108,7 @@
     The default colors are FL_BACKGROUND2_COLOR and FL_YELLOW, resp.
 */
 Fl_Progress::Fl_Progress(int X, int Y, int W, int H, const char* L)
-: Fl_Widget(X, Y, W, H, L) {
+: fltk3::Widget(X, Y, W, H, L) {
   align(FL_ALIGN_INSIDE);
   box(FL_DOWN_BOX);
   color(FL_BACKGROUND2_COLOR, FL_YELLOW);

Modified: branches/branch-3.0/src/Fl_Quartz_Printer.mm
===================================================================
--- branches/branch-3.0/src/Fl_Quartz_Printer.mm	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Quartz_Printer.mm	2010-03-30 15:18:29 UTC (rev 7365)
@@ -61,7 +61,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;
     }
@@ -89,7 +89,7 @@
     if (status != noErr) return 1;
     status = PMSessionPageSetupDialog(printSession, pageFormat, &accepted);
     if (status != noErr || !accepted) {
-      Fl::first_window()->show();
+      fltk3::first_window()->show();
       return 1;
     }
     status = PMCreatePrintSettings(&printSettings);
@@ -100,7 +100,7 @@
     status = PMSessionPrintDialog(printSession, printSettings, pageFormat, &accepted);
     if (!accepted) status = kPMCancel;
     if (status != noErr) {
-      Fl::first_window()->show();
+      fltk3::first_window()->show();
       return 1;
     }
     UInt32 from32, to32;
@@ -287,7 +287,7 @@
   PMSessionEndDocumentNoDialog(printSession);
   Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Repeat_Button.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 FL_PUSH:
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Return_Button.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 == FL_SHORTCUT &&
-      (Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter)) {
+      (fltk3::event_key() == FL_Enter || fltk3::event_key() == FL_KP_Enter)) {
     do_callback();
     return 1;
   } else

Modified: branches/branch-3.0/src/Fl_Roller.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Roller.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Roller.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 FL_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 FL_KEYBOARD :
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case FL_Up:
         if (horizontal()) return 0;
 	handle_drag(clamp(increment(value(),-1)));
@@ -74,7 +74,7 @@
     // break not required because of switch...
   case FL_FOCUS :
   case FL_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()&FL_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(FL_THIN_UP_FRAME, x(), y(), w(), h());
+  if (fltk3::focus() == this) draw_focus(FL_THIN_UP_FRAME, x(), y(), w(), h());
 }
 
 /**

Modified: branches/branch-3.0/src/Fl_Scroll.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Scroll.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Scroll.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -33,7 +33,7 @@
 /** Clear all but the scrollbars... */
 void Fl_Scroll::clear() {
   for (int i=children() - 1; i >= 0; i --) {
-    Fl_Widget* o = child(i);
+    fltk3::Widget* o = child(i);
     if (o != &hscrollbar && o != &scrollbar) {
       remove(o);
       delete o;
@@ -43,7 +43,7 @@
 
 /** Insure the scrollbars are the last children */
 void Fl_Scroll::fix_scrollbar_order() {
-  Fl_Widget** a = (Fl_Widget**)array();
+  fltk3::Widget** a = (fltk3::Widget**)array();
   if (a[children()-1] != &scrollbar) {
     int i,j; for (i = j = 0; j < children(); j++)
       if (a[j] != &hscrollbar && a[j] != &scrollbar) a[i++] = a[j];
@@ -73,11 +73,11 @@
     case _FL_OVAL_FRAME :
     case _FL_PLASTIC_UP_FRAME :
     case _FL_PLASTIC_DOWN_FRAME :
-        if (s->parent() == (Fl_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() == (Fl_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;
         }
 
@@ -86,9 +86,9 @@
 	fl_rectf(X,Y,W,H);
 	break;
   }
-  Fl_Widget*const* a = s->array();
+  fltk3::Widget*const* a = s->array();
   for (int i=s->children()-2; i--;) {
-    Fl_Widget& o = **a++;
+    fltk3::Widget& o = **a++;
     s->draw_child(o);
     s->draw_outside_label(o);
   }
@@ -106,10 +106,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;
@@ -117,9 +117,9 @@
   si.child_b = si.innerbox_y;
   si.child_t = si.innerbox_y;
   int first = 1;
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   for (int i=children()-2; i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if ( first ) {
         first = 0;
 	si.child_l = o->x();
@@ -142,7 +142,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) {
@@ -226,10 +226,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() & FL_ALIGN_LEFT) X += scrollbar.w();
@@ -255,7 +255,7 @@
       fl_scroll(X, Y, W, H, oldx-xposition_, oldy-yposition_, draw_clip, this);
 
       // Erase the background as needed...
-      Fl_Widget*const* a = array();
+      fltk3::Widget*const* a = array();
       int L, R, T, B;
       L = 999999;
       R = 0;
@@ -274,7 +274,7 @@
     }
     if (d & FL_DAMAGE_CHILD) { // draw damaged children
       fl_push_clip(X, Y, W, H);
-      Fl_Widget*const* a = array();
+      fltk3::Widget*const* a = array();
       for (int i=children()-2; i--;) update_child(**a++);
       fl_pop_clip();
     }
@@ -336,12 +336,12 @@
 void Fl_Scroll::resize(int X, int Y, int W, int H) {
   int dx = X-x(), dy = Y-y();
   int dw = W-w(), dh = H-h();
-  Fl_Widget::resize(X,Y,W,H); // resize _before_ moving children around
+  fltk3::Widget::resize(X,Y,W,H); // resize _before_ moving children around
   fix_scrollbar_order();
   // move all the children:
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   for (int i=children()-2; i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     o->position(o->x()+dx, o->y()+dy);
   }
   if (dw==0 && dh==0) {
@@ -363,22 +363,22 @@
   if (!dx && !dy) return;
   xposition_ = X;
   yposition_ = Y;
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   for (int i=children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o == &hscrollbar || o == &scrollbar) continue;
     o->position(o->x()+dx, o->y()+dy);
   }
-  if (parent() == (Fl_Group *)window() && Fl::scheme_bg_) damage(FL_DAMAGE_ALL);
+  if (parent() == (Fl_Group *)window() && fltk3::scheme_bg_) damage(FL_DAMAGE_ALL);
   else damage(FL_DAMAGE_SCROLL);
 }
 
-void Fl_Scroll::hscrollbar_cb(Fl_Widget* o, void*) {
+void Fl_Scroll::hscrollbar_cb(fltk3::Widget* o, void*) {
   Fl_Scroll* s = (Fl_Scroll*)(o->parent());
   s->scroll_to(int(((Fl_Scrollbar*)o)->value()), s->yposition());
 }
 
-void Fl_Scroll::scrollbar_cb(Fl_Widget* o, void*) {
+void Fl_Scroll::scrollbar_cb(fltk3::Widget* o, void*) {
   Fl_Scroll* s = (Fl_Scroll*)(o->parent());
   s->scroll_to(s->xposition(), int(((Fl_Scrollbar*)o)->value()));
 }
@@ -394,10 +394,10 @@
 */
 Fl_Scroll::Fl_Scroll(int X,int Y,int W,int H,const char* L)
   : Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Scrollbar.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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() == FL_MIDDLE_MOUSE) area = 8;
+    if (fltk3::event_button() == FL_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 FL_RELEASE:
       damage(FL_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(FL_DAMAGE_ALL);
       return 1;
@@ -141,14 +141,14 @@
     return Fl_Slider::handle(event, X,Y,W,H);
   case FL_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 FL_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 FL_Left:
 	v -= ls;
 	break;
@@ -167,7 +167,7 @@
 	return 0;
       }
     } else { // vertical
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
       case FL_Up:
 	v -= ls;
 	break;
@@ -208,10 +208,10 @@
 
 void Fl_Scrollbar::draw() {
   if (damage()&FL_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_Single_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Single_Window.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Single_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -33,8 +33,8 @@
 
 #include <FL/Fl_Single_Window.H>
 
-void Fl_Single_Window::show() {Fl_Window::show();}
-void Fl_Single_Window::flush() {Fl_Window::flush();}
+void Fl_Single_Window::show() {fltk3::Window::show();}
+void Fl_Single_Window::flush() {fltk3::Window::flush();}
 
 //
 // End of "$Id$".

Modified: branches/branch-3.0/src/Fl_Slider.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Slider.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Slider.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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()&FL_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 FL_PUSH: {
     Fl_Widget_Tracker 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 FL_KEYBOARD:
     { Fl_Widget_Tracker wp(this);
-      switch (Fl::event_key()) {
+      switch (fltk3::event_key()) {
 	case FL_Up:
 	  if (horizontal()) return 0;
 	  handle_push();
@@ -339,7 +339,7 @@
     // break not required because of switch...
   case FL_FOCUS :
   case FL_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 == FL_PUSH && Fl::visible_focus()) {
-    Fl::focus(this);
+  if (event == FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Table.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -186,7 +186,7 @@
     redraw();
   }
   // ROW RESIZE CALLBACK
-  if ( Fl_Widget::callback() && when() & FL_WHEN_CHANGED ) {
+  if ( fltk3::Widget::callback() && when() & FL_WHEN_CHANGED ) {
     do_callback(CONTEXT_RC_RESIZE, row, 0);
   }
 }
@@ -212,7 +212,7 @@
     redraw();
   }
   // COLUMN RESIZE CALLBACK
-  if ( Fl_Widget::callback() && when() & FL_WHEN_CHANGED ) {
+  if ( fltk3::Widget::callback() && when() & FL_WHEN_CHANGED ) {
     do_callback(CONTEXT_RC_RESIZE, 0, col);
   }
 }
@@ -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,63 +415,63 @@
 
 // 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(FL_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();
@@ -588,7 +588,7 @@
 }
 
 // Someone moved a scrollbar
-void Fl_Table::scroll_cb(Fl_Widget*w, void *data) {
+void Fl_Table::scroll_cb(fltk3::Widget*w, void *data) {
   Fl_Table *o = (Fl_Table*)data;
   o->recalc_dimensions();	// recalc tix, tiy, etc.
   o->table_scrolled();
@@ -679,7 +679,7 @@
   damage_zone(current_row, current_col, select_row, select_col, R, C);
   select_row = R;
   select_col = C;
-  if (!Fl::event_state(FL_SHIFT)) {
+  if (!fltk3::event_state(FL_SHIFT)) {
     current_row = R;
     current_col = C;
   }
@@ -702,8 +702,8 @@
   PRINTEVENT;
   int ret = Fl_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
@@ -711,8 +711,8 @@
   TableContext context = cursor2rowcol(R, C, resizeflag);
   switch ( event ) {
     case FL_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;
@@ -728,7 +728,7 @@
         }
       }
       // Need this for eg. right click to pop up a menu
-      if ( Fl_Widget::callback() &&		// callback defined?
+      if ( fltk3::Widget::callback() &&		// callback defined?
           resizeflag == RESIZE_NONE ) {	// not resizing?
         do_callback(context, R, C);		// do callback
       }
@@ -740,8 +740,8 @@
           
         case CONTEXT_NONE:
           // FL_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;
@@ -753,7 +753,7 @@
           
         case CONTEXT_COL_HEADER:
           // FL_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.
@@ -763,7 +763,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
@@ -779,7 +779,7 @@
           
         case CONTEXT_ROW_HEADER:
           // FL_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.
@@ -789,7 +789,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
@@ -822,16 +822,16 @@
         //    Don't allow column width smaller than 1.
         //    Continue to show FL_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(FL_CURSOR_WE);
         ret = 1;
-        if ( Fl_Widget::callback() && when() & FL_WHEN_CHANGED ) {
+        if ( fltk3::Widget::callback() && when() & FL_WHEN_CHANGED ) {
           do_callback(CONTEXT_RC_RESIZE, R, C);
         }
       }
@@ -842,20 +842,20 @@
         //    Don't allow row width smaller than 1.
         //    Continue to show FL_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(FL_CURSOR_NS);
         ret = 1;
-        if ( Fl_Widget::callback() && when() & FL_WHEN_CHANGED ) {
+        if ( fltk3::Widget::callback() && when() & FL_WHEN_CHANGED ) {
           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) {
@@ -865,7 +865,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) {
@@ -874,7 +874,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) {
@@ -886,10 +886,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();
           }
@@ -904,7 +904,7 @@
         case CONTEXT_TABLE:			// release on dead zone
           if ( _resizing_col == -1 &&		// not resizing a column
               _resizing_row == -1 &&		// not resizing a row
-              Fl_Widget::callback() && 	// callback defined
+              fltk3::Widget::callback() && 	// callback defined
               when() & FL_WHEN_RELEASE && 	// on button release
               _last_row == R ) {		// release on same row PUSHed?
             // Need this for eg. left clicking on a cell to select it
@@ -915,7 +915,7 @@
         default:
           break;
       }
-      if ( Fl::event_button() == 1 ) {
+      if ( fltk3::event_button() == 1 ) {
         change_cursor(FL_CURSOR_DEFAULT);
         _resizing_col = -1;
         _resizing_row = -1;
@@ -953,7 +953,7 @@
       break;
       
     case FL_FOCUS:
-      Fl::focus(this);
+      fltk3::focus(this);
       //FALLTHROUGH
       
     case FL_UNFOCUS:
@@ -965,7 +965,7 @@
       ret = 0;
       int is_row = select_row;
       int is_col = select_col;
-      switch(Fl::event_key()) {
+      switch(fltk3::event_key()) {
         case FL_Home:
           ret = move_cursor(0, -1000000);
           break;
@@ -991,12 +991,12 @@
           ret = move_cursor(1, 0);
           break;
       }
-      if (ret && Fl::focus() != this) {
+      if (ret && fltk3::focus() != this) {
         do_callback(CONTEXT_TABLE, -1, -1);
         take_focus();
       }
-      //if (!ret && Fl_Widget::callback() && when() & FL_WHEN_NOT_CHANGED  )
-      if ( Fl_Widget::callback() && 
+      //if (!ret && fltk3::Widget::callback() && when() & FL_WHEN_NOT_CHANGED  )
+      if ( fltk3::Widget::callback() && 
           (
            ( !ret && when() & FL_WHEN_NOT_CHANGED ) || 
            ( is_row!= select_row || is_col!= select_col ) 
@@ -1169,10 +1169,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());
         }
       }
       
@@ -1184,8 +1184,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Table_Row.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -173,16 +173,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() & FL_CTRL) ? FL_CTRL :
-  (Fl::event_state() & FL_SHIFT) ? FL_SHIFT : 0;
+  int shiftstate = (fltk3::event_state() & FL_CTRL) ? FL_CTRL :
+  (fltk3::event_state() & FL_SHIFT) ? FL_SHIFT : 0;
   
   // Which row/column are we over?
   int R, C;  				// row/column being worked on
@@ -190,9 +190,9 @@
   TableContext context = cursor2rowcol(R, C, resizeflag);
   switch ( event ) {
     case FL_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.
@@ -243,7 +243,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;
@@ -254,7 +254,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;
@@ -294,7 +294,7 @@
     }
       
     case FL_RELEASE:
-      if ( Fl::event_button() == 1 ) {
+      if ( fltk3::event_button() == 1 ) {
         _dragging_select = 0;
         ret = 1;			// release handled
         // Clicked off edges of data table? 
@@ -303,8 +303,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
         }
@@ -314,7 +314,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tabs.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -49,14 +49,14 @@
 
 int Fl_Tabs::tab_positions(int* p, int* wp) {
   int selected = 0;
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   int i;
   char prev_draw_shortcut = fl_draw_shortcut;
   fl_draw_shortcut = 1;
 
-  p[0] = Fl::box_dx(box());
+  p[0] = fltk3::box_dx(box());
   for (i=0; i<children(); i++) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o->visible()) selected = i;
 
     int wt = 0; int ht = 0;
@@ -97,9 +97,9 @@
 int Fl_Tabs::tab_height() {
   int H = h();
   int H2 = y();
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   for (int i=children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o->y() < y()+H) H = o->y()-y();
     if (o->y()+o->h() > H2) H2 = o->y()+o->h();
   }
@@ -109,7 +109,7 @@
 }
 
 // this is used by fluid to pick tabs:
-Fl_Widget *Fl_Tabs::which(int event_x, int event_y) {
+fltk3::Widget *Fl_Tabs::which(int event_x, int event_y) {
   int H = tab_height();
   if (H < 0) {
     if (event_y > y()+h() || event_y < y()+h()+H) return 0;
@@ -129,17 +129,17 @@
 {
   int H = tab_height();
   if (H >= 0) {
-    H += Fl::box_dy(box());
+    H += fltk3::box_dy(box());
     damage(FL_DAMAGE_SCROLL, x(), y(), w(), H);
   } else {
-    H = Fl::box_dy(box()) - H;
+    H = fltk3::box_dy(box()) - H;
     damage(FL_DAMAGE_SCROLL, x(), y() + h() - H, w(), H);
   }
 }
 
 int Fl_Tabs::handle(int event) {
 
-  Fl_Widget *o;
+  fltk3::Widget *o;
   int i;
 
   switch (event) {
@@ -147,18 +147,18 @@
   case FL_PUSH: {
     int H = tab_height();
     if (H >= 0) {
-      if (Fl::event_y() > y()+H) return Fl_Group::handle(event);
+      if (fltk3::event_y() > y()+H) return Fl_Group::handle(event);
     } else {
-      if (Fl::event_y() < y()+h()+H) return Fl_Group::handle(event);
+      if (fltk3::event_y() < y()+h()+H) return Fl_Group::handle(event);
     }}
     /* FALLTHROUGH */
   case FL_DRAG:
   case FL_RELEASE:
-    o = which(Fl::event_x(), Fl::event_y());
+    o = which(fltk3::event_x(), fltk3::event_y());
     if (event == FL_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)) {
@@ -174,14 +174,14 @@
     return 1;
   case FL_MOVE: {
     int ret = Fl_Group::handle(event);
-    Fl_Widget *o = Fl_Tooltip::current(), *n = o;
+    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)
@@ -189,18 +189,18 @@
     return ret; }
   case FL_FOCUS:
   case FL_UNFOCUS:
-    if (!Fl::visible_focus()) return Fl_Group::handle(event);
-    if (Fl::event() == FL_RELEASE ||
-	Fl::event() == FL_SHORTCUT ||
-	Fl::event() == FL_KEYBOARD ||
-	Fl::event() == FL_FOCUS ||
-	Fl::event() == FL_UNFOCUS) {
+    if (!fltk3::visible_focus()) return Fl_Group::handle(event);
+    if (fltk3::event() == FL_RELEASE ||
+	fltk3::event() == FL_SHORTCUT ||
+	fltk3::event() == FL_KEYBOARD ||
+	fltk3::event() == FL_FOCUS ||
+	fltk3::event() == FL_UNFOCUS) {
       redraw_tabs();
-      if (Fl::event() == FL_FOCUS || Fl::event() == FL_UNFOCUS) return 0;
+      if (fltk3::event() == FL_FOCUS || fltk3::event() == FL_UNFOCUS) return 0;
       else return 1;
     } else return Fl_Group::handle(event);
   case FL_KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
       case FL_Left:
         if (child(0)->visible()) return 0;
 	for (i = 1; i < children(); i ++)
@@ -226,7 +226,7 @@
     return Fl_Group::handle(event);
   case FL_SHORTCUT:
     for (i = 0; i < children(); ++i) {
-      Fl_Widget *c = child(i);
+      fltk3::Widget *c = child(i);
       if (c->test_shortcut(c->label())) {
         char sc = !c->visible();
         value(c);
@@ -244,7 +244,7 @@
   }
 }
 
-int Fl_Tabs::push(Fl_Widget *o) {
+int Fl_Tabs::push(fltk3::Widget *o) {
   if (push_ == o) return 0;
   if (push_ && !push_->visible() || o && !o->visible())
     redraw_tabs();
@@ -259,11 +259,11 @@
    This allows the tabs to be deleted, moved to other groups, and
    show()/hide() called without it screwing up.
 */
-Fl_Widget* Fl_Tabs::value() {
-  Fl_Widget* v = 0;
-  Fl_Widget*const* a = array();
+fltk3::Widget* Fl_Tabs::value() {
+  fltk3::Widget* v = 0;
+  fltk3::Widget*const* a = array();
   for (int i=children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (v) o->hide();
     else if (o->visible()) v = o;
     else if (!i) {o->show(); v = o;}
@@ -276,11 +276,11 @@
   Setting the value hides all other children, and makes this one
   visible, if it is really a child.
 */
-int Fl_Tabs::value(Fl_Widget *newvalue) {
-  Fl_Widget*const* a = array();
+int Fl_Tabs::value(fltk3::Widget *newvalue) {
+  fltk3::Widget*const* a = array();
   int ret = 0;
   for (int i=children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o == newvalue) {
       if (!o->visible()) ret = 1;
       o->show();
@@ -294,7 +294,7 @@
 enum {LEFT, RIGHT, SELECTED};
 
 void Fl_Tabs::draw() {
-  Fl_Widget *v = value();
+  fltk3::Widget *v = value();
   int H = tab_height();
 
   if (damage() & FL_DAMAGE_ALL) { // redraw the entire thing:
@@ -321,7 +321,7 @@
     int p[128]; int wp[128];
     int selected = tab_positions(p,wp);
     int i;
-    Fl_Widget*const* a = array();
+    fltk3::Widget*const* a = array();
     for (i=0; i<selected; i++)
       draw_tab(x()+p[i], x()+p[i+1], wp[i], H, a[i], LEFT);
     for (i=children()-1; i > selected; i--)
@@ -333,10 +333,10 @@
   }
 }
 
-void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
+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;
 
@@ -367,7 +367,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();
@@ -393,7 +393,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();
@@ -405,7 +405,7 @@
     Creates a new Fl_Tabs widget using the given position, size,
     and label string. The default boxtype is FL_THIN_UP_BOX.
 
-    <P>Use add(Fl_Widget
+    <P>Use add(fltk3::Widget
     *) to add each child, which are usually
     Fl_Group widgets. The children should be sized to stay
     away from the top or bottom edge of the Fl_Tabs widget,

Modified: branches/branch-3.0/src/Fl_Text_Buffer.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Text_Buffer.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Text_Buffer.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -399,7 +399,7 @@
   insert_column_(column, lineStartPos, text, &insertDeleted, &nInserted,
                   &mCursorPosHint);
   if (nDeleted != insertDeleted)
-    Fl::error("Fl_Text_Buffer::insert_column(): internal consistency check ins1 failed");
+    fltk3::error("Fl_Text_Buffer::insert_column(): internal consistency check ins1 failed");
   call_modify_callbacks(lineStartPos, nDeleted, nInserted, 0, deletedText);
   free((void *) deletedText);
   if (charsInserted != NULL)
@@ -426,7 +426,7 @@
   overlay_rectangular_(lineStartPos, rectStart, rectEnd, text, &insertDeleted,
                         &nInserted, &mCursorPosHint);
   if (nDeleted != insertDeleted)
-    Fl::error("Fl_Text_Buffer::overlay_rectangle(): internal consistency check ovly1 failed");
+    fltk3::error("Fl_Text_Buffer::overlay_rectangle(): internal consistency check ovly1 failed");
   call_modify_callbacks(lineStartPos, nDeleted, nInserted, 0, deletedText);
   free((void *) deletedText);
   if (charsInserted != NULL)
@@ -485,7 +485,7 @@
 
   /* Figure out how many chars were inserted and call modify callbacks */
   if (insertDeleted != deleteInserted + linesPadded)
-    Fl::error("Fl_Text_Buffer::replace_rectangular(): internal consistency check repl1 failed");
+    fltk3::error("Fl_Text_Buffer::replace_rectangular(): internal consistency check repl1 failed");
   call_modify_callbacks(start, end - start, insertInserted, 0, deletedText);
   free((void *) deletedText);
   if (nInsertedLines < nDeletedLines)
@@ -769,7 +769,7 @@
     }
   }
   if (toRemove == -1) {
-    Fl::error("Fl_Text_Buffer::remove_modify_callback(): Can't find modify CB to remove");
+    fltk3::error("Fl_Text_Buffer::remove_modify_callback(): Can't find modify CB to remove");
     return;
   }
 
@@ -835,7 +835,7 @@
     	}
     }
     if (toRemove == -1) {
-    	Fl::error("Fl_Text_Buffer::remove_predelete_callback(): Can't find pre-delete CB to remove");
+    	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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Text_Display.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -109,7 +109,7 @@
 
   end();
 
-  scrollbar_width(Fl::scrollbar_size());
+  scrollbar_width(fltk3::scrollbar_size());
   scrollbar_align(FL_ALIGN_BOTTOM_RIGHT);
 
   mCursorOn = 0;
@@ -158,7 +158,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) {
@@ -369,12 +369,12 @@
   printf("    oldWidth=%d, mContinuousWrap=%d, mWrapMargin=%d\n", oldWidth,
          mContinuousWrap, mWrapMargin);
 #endif // DEBUG
-  Fl_Widget::resize(X,Y,W,H);
+  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;
@@ -1500,7 +1500,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;
@@ -1569,7 +1569,7 @@
      prevent a potential infinite loop if X does not advance */
   stdCharWidth = TMPFONTWIDTH;   //mFontStruct->max_bounds.width;
   if ( stdCharWidth <= 0 ) {
-    Fl::error("Fl_Text_Display::draw_vline(): bad font measurement");
+    fltk3::error("Fl_Text_Display::draw_vline(): bad font measurement");
     if (lineStr) free((void *)lineStr);
     return;
   }
@@ -1793,19 +1793,19 @@
     fsize = styleRec->size;
 
     if (style & PRIMARY_MASK) {
-      if (Fl::focus() == this) background = selection_color();
+      if (fltk3::focus() == this) background = selection_color();
       else background = fl_color_average(color(), selection_color(), 0.4f);
     } else if (style & HIGHLIGHT_MASK) {
-      if (Fl::focus() == this) background = fl_color_average(color(), selection_color(), 0.5f);
+      if (fltk3::focus() == this) background = fl_color_average(color(), selection_color(), 0.5f);
       else background = fl_color_average(color(), selection_color(), 0.6f);
     } else background = color();
     foreground = fl_contrast(styleRec->color, background);
   } else if (style & PRIMARY_MASK) {
-    if (Fl::focus() == this) background = selection_color();
+    if (fltk3::focus() == this) background = selection_color();
     else background = fl_color_average(color(), selection_color(), 0.4f);
     foreground = fl_contrast(textcolor(), background);
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus() == this) background = fl_color_average(color(), selection_color(), 0.5f);
+    if (fltk3::focus() == this) background = fl_color_average(color(), selection_color(), 0.5f);
     else background = fl_color_average(color(), selection_color(), 0.6f);
     foreground = fl_contrast(textcolor(), background);
   } else {
@@ -1854,13 +1854,13 @@
     return;
 
   if (style & PRIMARY_MASK) {
-    if (Fl::focus()==this) {
+    if (fltk3::focus()==this) {
       fl_color(selection_color());
     } else {
       fl_color(fl_color_average(color(), selection_color(), 0.4f));
     }
   } else if (style & HIGHLIGHT_MASK) {
-    if (Fl::focus()==this) {
+    if (fltk3::focus()==this) {
       fl_color(fl_color_average(color(), selection_color(), 0.5f));
     } else {
       fl_color(fl_color_average(color(), selection_color(), 0.6f));
@@ -3153,7 +3153,7 @@
   // draw the text cursor
   if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)
       && !buffer()->primary_selection()->selected() &&
-      mCursorOn && Fl::focus() == this ) {
+      mCursorOn && fltk3::focus() == this ) {
     fl_push_clip(text_area.x-LEFT_MARGIN,
                  text_area.y,
                  text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
@@ -3228,14 +3228,14 @@
     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);
 }
 
 
 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 != FL_LEAVE && event != FL_ENTER &&
       event != FL_MOVE && event != FL_FOCUS && event != FL_UNFOCUS &&
       event != FL_KEYBOARD && event != FL_KEYUP) {
@@ -3246,7 +3246,7 @@
     case FL_ENTER:
     case FL_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(FL_CURSOR_INSERT);
 	else window()->cursor(FL_CURSOR_DEFAULT);
 	return 1;
@@ -3266,19 +3266,19 @@
 
     case FL_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(FL_CURSOR_INSERT);
 	  else window()->cursor(FL_CURSOR_DEFAULT);
 	}
 
-	if (Fl::focus() != this) {
-	  Fl::focus(this);
+	if (fltk3::focus() != this) {
+	  fltk3::focus(this);
 	  handle(FL_FOCUS);
 	}
         if (Fl_Group::handle(event)) return 1;
-        if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG);
+        if (fltk3::event_state()&FL_SHIFT) return handle(FL_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);
         int ok = 0;
         while (!ok) {
           char c = buffer()->character( pos );
@@ -3288,7 +3288,7 @@
             pos++;
           }
         }
-        dragType = Fl::event_clicks();
+        dragType = fltk3::event_clicks();
         dragPos = pos;
         if (dragType == DRAG_CHAR)
           buffer()->unselect();
@@ -3307,40 +3307,40 @@
 
     case FL_DRAG: {
         if (dragType < 0) return 1;
-        int X = Fl::event_x(), Y = Fl::event_y(), pos = 0;
+        int X = fltk3::event_x(), Y = fltk3::event_y(), pos = 0;
         // 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);
@@ -3361,7 +3361,7 @@
     case FL_RELEASE: {
         dragging = 0;
         if (scroll_direction) {
-          Fl::remove_timeout(scroll_timer_cb, this);
+          fltk3::remove_timeout(scroll_timer_cb, this);
           scroll_direction = 0;
         }
 
@@ -3373,13 +3373,13 @@
         dragType = DRAG_CHAR;
 
         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 FL_MOUSEWHEEL:
-      if (Fl::event_dy()) return mVScrollBar->handle(event);
+      if (fltk3::event_dy()) return mVScrollBar->handle(event);
       else return mHScrollBar->handle(event);
 
     case FL_UNFOCUS:
@@ -3404,16 +3404,16 @@
 
     case FL_KEYBOARD:
       // Copy?
-      if ((Fl::event_state()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='c') {
+      if ((fltk3::event_state()&(FL_CTRL|FL_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()&(FL_CTRL|FL_COMMAND)) && Fl::event_key()=='a') {
+      if ((fltk3::event_state()&(FL_CTRL|FL_COMMAND)) && fltk3::event_key()=='a') {
           buffer()->select(0,buffer()->length());
           return 1;
       }
@@ -3424,10 +3424,10 @@
       break;
 
     case FL_SHORTCUT:
-      if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut()))
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
         return 0;
-      if (Fl::visible_focus() && handle(FL_FOCUS)) {
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Text_Editor.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -467,7 +467,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;
@@ -485,7 +485,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()&FL_WHEN_CHANGED) e->do_callback();
@@ -516,12 +516,12 @@
   // 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) buffer()->select(insert_position()-del, 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();
@@ -529,7 +529,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 &= FL_SHIFT|FL_CTRL|FL_ALT|FL_META; // only care about these states
   Key_Func f;
   f = bound_key_function(key, state, global_key_bindings);
@@ -553,7 +553,7 @@
     case FL_FOCUS:
       show_cursor(mCursorOn); // redraws the cursor
       if (buffer()->selected()) redraw(); // Redraw selections...
-      Fl::focus(this);
+      fltk3::focus(this);
       return 1;
 
     case FL_UNFOCUS:
@@ -564,18 +564,18 @@
       return 1;
 
     case FL_KEYBOARD:
-      if (active_r() && window() && this == Fl::belowmouse()) 
+      if (active_r() && window() && this == fltk3::belowmouse()) 
         window()->cursor(FL_CURSOR_NONE);
       return handle_key();
 
     case FL_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()&FL_WHEN_CHANGED) do_callback();
@@ -588,12 +588,12 @@
       return 1;
 
     case FL_PUSH:
-      if (Fl::event_button() == 2) {
+      if (fltk3::event_button() == 2) {
         // don't let the text_display see this event
         if (Fl_Group::handle(event)) return 1;
         dragType = -1;
-        Fl::paste(*this, 0);
-        Fl::focus(this);
+        fltk3::paste(*this, 0);
+        fltk3::focus(this);
         set_changed();
         if (when()&FL_WHEN_CHANGED) do_callback();
         return 1;
@@ -601,10 +601,10 @@
       break;
 
     case FL_SHORTCUT:
-      if (!(shortcut() ? Fl::test_shortcut(shortcut()) : test_shortcut()))
+      if (!(shortcut() ? fltk3::test_shortcut(shortcut()) : test_shortcut()))
         return 0;
-      if (Fl::visible_focus() && handle(FL_FOCUS)) {
-        Fl::focus(this);
+      if (fltk3::visible_focus() && handle(FL_FOCUS)) {
+        fltk3::focus(this);
         return 1;
       }
       break;

Modified: branches/branch-3.0/src/Fl_Tile.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tile.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tile.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -42,11 +42,11 @@
   This redraws all the necessary children.
 */
 void Fl_Tile::position(int oix, int oiy, int newx, int newy) {
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   int *p = sizes();
   p += 8; // skip group & resizable's saved size
   for (int i=children(); i--; p += 4) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     if (o == resizable()) continue;
     int X = o->x();
     int R = X+o->w();
@@ -79,17 +79,17 @@
   int dh = H-h();
   int *p = sizes();
   // resize this (skip the Fl_Group resize):
-  Fl_Widget::resize(X,Y,W,H);
+  fltk3::Widget::resize(X,Y,W,H);
   // find bottom-right of resiable:
   int OR = p[5];
   int NR = X+W-(p[1]-OR);
   int OB = p[7];
   int NB = Y+H-(p[3]-OB);
   // move everything to be on correct side of new resizable:
-  Fl_Widget*const* a = array();
+  fltk3::Widget*const* a = array();
   p += 8;
   for (int i=children(); i--;) {
-    Fl_Widget* o = *a++;
+    fltk3::Widget* o = *a++;
     int xx = o->x()+dx;
     int R = xx+o->w();
     if (*p++ >= OR) xx += dw; else if (xx > NR) xx = NR;
@@ -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) {
 
@@ -144,11 +144,11 @@
     int mindy = 100;
     int oldx = 0;
     int oldy = 0;
-    Fl_Widget*const* a = array();
+      fltk3::Widget*const* a = array();
     int *q = sizes();
     int *p = q+8;
     for (int i=children(); i--; p += 4) {
-      Fl_Widget* o = *a++;
+      fltk3::Widget* o = *a++;
       if (o == resizable()) continue;
       if (p[1]<q[1] && o->y()<=my+GRABAREA && o->y()+o->h()>=my-GRABAREA) {
 	int t = mx - (o->x()+o->w());
@@ -184,17 +184,17 @@
     // if (damage()) return 1; // don't fall behind
   case FL_RELEASE: {
     if (!sdrag) return 0; // should not happen
-    Fl_Widget* r = resizable(); if (!r) r = this;
+    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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tiled_Image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tooltip.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -63,7 +63,7 @@
   }
 };
 
-Fl_Widget* Fl_Tooltip::widget_ = 0;
+fltk3::Widget* Fl_Tooltip::widget_ = 0;
 static Fl_TooltipBox *window = 0;
 static int Y,H;
 
@@ -75,17 +75,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 (Fl_Widget* p = Fl_Tooltip::current(); p; p = p->window()) {
+  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);
@@ -124,10 +124,10 @@
   if (!tip || !*tip) {
     if (window) window->hide();
   } else {
-    //if (Fl::grab()) return;
+    //if (fltk3::grab()) return;
     if (!window) window = new Fl_TooltipBox;
-    // this cast bypasses the normal Fl_Window label() code:
-    ((Fl_Widget*)window)->label(tip);
+    // this cast bypasses the normal fltk3::Window label() code:
+    ((fltk3::Widget*)window)->label(tip);
     window->layout();
     window->redraw();
 //    printf("tooltip_timeout: Showing window %p with tooltip \"%s\"...\n",
@@ -135,7 +135,7 @@
     window->show();
   }
 
-  Fl::remove_timeout(recent_timeout);
+  fltk3::remove_timeout(recent_timeout);
   recent_tooltip = 1;
   recursion = 0;
 }
@@ -149,14 +149,14 @@
    if you want the tooltip to reappear when the mouse moves back in)
    call the fancier enter_area() below.
 */
-void Fl_Tooltip::enter_(Fl_Widget* w) {
+void Fl_Tooltip::enter_(fltk3::Widget* w) {
 #ifdef DEBUG
   printf("Fl_Tooltip::enter_(w=%p)\n", w);
   printf("    window=%p\n", window);
 #endif // DEBUG
 
   // find the enclosing group with a tooltip:
-  Fl_Widget* tw = w;
+  fltk3::Widget* tw = w;
   for (;;) {
     if (!tw) {exit_(0); return;}
     if (tw == widget_) return;
@@ -172,14 +172,14 @@
      a modal overlapping window is deleted. FLTK does this automatically
      when you click the mouse button.
 */
-void Fl_Tooltip::current(Fl_Widget* w) {
+void Fl_Tooltip::current(fltk3::Widget* w) {
 #ifdef DEBUG
   printf("Fl_Tooltip::current(w=%p)\n", w);
 #endif // DEBUG
 
   exit_(0);
   // find the enclosing group with a tooltip:
-  Fl_Widget* tw = w;
+  fltk3::Widget* tw = w;
   for (;;) {
     if (!tw) return;
     if (tw->tooltip()) break;
@@ -191,7 +191,7 @@
 
 // Hide any visible tooltip.
 /**  This method is called when the mouse pointer leaves a  widget. */
-void Fl_Tooltip::exit_(Fl_Widget *w) {
+void Fl_Tooltip::exit_(fltk3::Widget *w) {
 #ifdef DEBUG
   printf("Fl_Tooltip::exit_(w=%p)\n", w);
   printf("    widget=%p, window=%p\n", widget_, window);
@@ -199,12 +199,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() & FL_BUTTONS) recent_tooltip = 0;
-    else Fl::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout);
+    if (fltk3::event_state() & FL_BUTTONS) recent_tooltip = 0;
+    else fltk3::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout);
   }
 }
 
@@ -214,7 +214,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
@@ -223,7 +223,7 @@
   where to put the tooltip), and the text of the tooltip (which must be
   a pointer to static data as it is not copied).
 */
-void Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t)
+void Fl_Tooltip::enter_area(fltk3::Widget* wid, int x,int y,int w,int h, const char* t)
 {
   (void)x;
   (void)w;
@@ -241,14 +241,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
@@ -258,7 +258,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
@@ -267,7 +267,7 @@
 #endif // DEBUG
 }
 
-void Fl_Widget::tooltip(const char *tt) {
+void fltk3::Widget::tooltip(const char *tt) {
   static char beenhere = 0;
   if (!beenhere) {
     beenhere          = 1;

Modified: branches/branch-3.0/src/Fl_Tree.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tree.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -34,7 +34,7 @@
 //
 
 // INTERNAL: scroller callback
-static void scroll_cb(Fl_Widget*,void *data) {
+static void scroll_cb(fltk3::Widget*,void *data) {
   ((Fl_Tree*)data)->redraw();
 }
 
@@ -169,10 +169,10 @@
   Fl_Group::draw_box();
   Fl_Group::draw_label();
   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();
@@ -196,10 +196,10 @@
   if ( ytoofar > 0 ) ydiff += ytoofar;
   if ( Ysave<cy || ydiff > ch || int(_vscroll->value()) > 1 ) {
     _vscroll->visible();
-    int sx = x()+w()-Fl::box_dx(box())-SCROLL_W;
-    int sy = y()+Fl::box_dy(box());
+    int sx = x()+w()-fltk3::box_dx(box())-SCROLL_W;
+    int sy = y()+fltk3::box_dy(box());
     int sw = SCROLL_W;
-    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);
@@ -226,7 +226,7 @@
       Fl_Tree_Item *o = _root->find_clicked(_prefs);
       if ( o ) {
         ret |= 1;				// handled
-        if ( Fl::event_button() == FL_LEFT_MOUSE ) {
+        if ( fltk3::event_button() == FL_LEFT_MOUSE ) {
           // Was collapse icon clicked?
           if ( o->event_on_collapse_icon(_prefs) ) {
             o->open_toggle();
@@ -234,9 +234,9 @@
           }
           // Item's label clicked?
           else if ( o->event_on_label(_prefs) && 
-                   (!o->widget() || !Fl::event_inside(o->widget())) &&
+                   (!o->widget() || !fltk3::event_inside(o->widget())) &&
                    callback() &&
-                   (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) {
+                   (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {
             item_clicked(o);			// save item clicked
 
             // Handle selection behavior
@@ -249,7 +249,7 @@
                 break;
               }
               case FL_TREE_SELECT_MULTI: {
-                int state = Fl::event_state();
+                int state = fltk3::event_state();
                 if ( state & FL_SHIFT ) {
                   if ( ! o->is_selected() ) {
                     o->select();		// add to selection
@@ -270,7 +270,7 @@
               redraw();						// make change(s) visible
               if ( when() & FL_WHEN_CHANGED ) {
                 set_changed();
-                do_callback((Fl_Widget*)this, user_data());	// item callback
+                do_callback((fltk3::Widget*)this, user_data());	// item callback
               }
             }
           }
@@ -284,9 +284,9 @@
         ret |= 1;				// handled
         // Item's label clicked?
         if ( o->event_on_label(_prefs) && 
-	  (!o->widget() || !Fl::event_inside(o->widget())) &&
+	  (!o->widget() || !fltk3::event_inside(o->widget())) &&
 	  callback() &&
-	  (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) {
+	  (!_vscroll->visible() || !fltk3::event_inside(_vscroll)) ) {
           item_clicked(o);			// save item clicked
           // Handle selection behavior
           switch ( _prefs.selectmode() ) {
@@ -298,7 +298,7 @@
               break;
             }
             case FL_TREE_SELECT_MULTI: {
-              int state = Fl::event_state();
+              int state = fltk3::event_state();
               if ( state & FL_CTRL ) {
                 if ( lastselect != o ) {// not already toggled from last microdrag?
                   changed = 1;	// changed
@@ -318,14 +318,14 @@
             redraw();			// make change(s) visible
             if ( when() & FL_WHEN_CHANGED ) {
               set_changed();
-              do_callback((Fl_Widget*)this, user_data());	// item callback
+              do_callback((fltk3::Widget*)this, user_data());	// item callback
             }
           }
         }
       }
     }
     case FL_RELEASE: {
-      if ( Fl::event_button() == FL_LEFT_MOUSE ) {
+      if ( fltk3::event_button() == FL_LEFT_MOUSE ) {
         ret |= 1;
       }
       break;

Modified: branches/branch-3.0/src/Fl_Tree_Item.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree_Item.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tree_Item.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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.
@@ -469,7 +469,7 @@
 }
 
 /// Draw this item and its children.
-void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree, 
+void Fl_Tree_Item::draw(int X, int &Y, int W, fltk3::Widget *tree, 
                         const Fl_Tree_Prefs &prefs, int lastchild) {
   if ( ! _visible ) return; 
   fl_font(_labelfont, _labelsize);

Modified: branches/branch-3.0/src/Fl_Tree_Prefs.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Tree_Prefs.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Tree_Prefs.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -116,10 +116,10 @@
   _selectbox              = FL_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 = _FL_GTK_THIN_UP_BOX;
-    } else if ( strcmp(Fl::scheme(), "plastic") == 0 ) {
+    } else if ( strcmp(fltk3::scheme(), "plastic") == 0 ) {
       _selectbox = _FL_PLASTIC_THIN_UP_BOX;
     }
   }

Modified: branches/branch-3.0/src/Fl_Valuator.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Valuator.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Valuator.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -34,12 +34,12 @@
 #include <stdio.h>
 #include "flstring.h"
 
+/**
+ Creates a new Fl_Valuator widget using the given position,
+ size, and label string. The default boxtype is FL_NO_BOX.
+ */
 Fl_Valuator::Fl_Valuator(int X, int Y, int W, int H, const char* L)
-/**
-  Creates a new Fl_Valuator widget using the given position,
-  size, and label string. The default boxtype is FL_NO_BOX.
-*/
-: Fl_Widget(X,Y,W,H,L) {
+: fltk3::Widget(X,Y,W,H,L) {
   align(FL_ALIGN_BOTTOM);
   when(FL_WHEN_CHANGED);
   value_ = 0;

Modified: branches/branch-3.0/src/Fl_Value_Input.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Input.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Value_Input.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -36,7 +36,7 @@
 #include <FL/math.h>
 
 
-void Fl_Value_Input::input_cb(Fl_Widget*, void* v) {
+void Fl_Value_Input::input_cb(fltk3::Widget*, void* v) {
   Fl_Value_Input& t = *(Fl_Value_Input*)v;
   double nv;
   if ((t.step() - floor(t.step()))>0.0 || t.step() == 0.0) nv = strtod(t.input.value(), 0);
@@ -52,7 +52,7 @@
   if (damage()&~FL_DAMAGE_CHILD) input.clear_damage(FL_DAMAGE_ALL);
   input.box(box());
   input.color(color(), selection_color());
-  Fl_Widget *i = &input; i->draw(); // calls protected input.draw()
+  fltk3::Widget *i = &input; i->draw(); // calls protected input.draw()
   input.clear_damage();
 }
 
@@ -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 FL_PUSH:
     if (!step()) goto DEFAULT;
     ix = mx;
-    drag = Fl::event_button();
+    drag = fltk3::event_button();
     handle_push();
     return 1;
   case FL_DRAG:
@@ -97,7 +97,7 @@
     return 1;
   case FL_RELEASE:
     if (!step()) goto DEFAULT;
-    if (value() != previous_value() || !Fl::event_is_click())
+    if (value() != previous_value() || !fltk3::event_is_click())
       handle_release();
     else {
       Fl_Widget_Tracker wp(&input);

Modified: branches/branch-3.0/src/Fl_Value_Output.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Value_Output.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Value_Output.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -35,10 +35,10 @@
 
 void Fl_Value_Output::draw() {
   Fl_Boxtype b = box() ? box() : FL_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()&~FL_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 FL_PUSH:
     ix = mx;
-    drag = Fl::event_button();
+    drag = fltk3::event_button();
     handle_push();
     return 1;
   case FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Value_Slider.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -51,10 +51,10 @@
     syy += 25; bhh = 25; shh -= 25;
   }
   if (damage()&FL_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 == FL_PUSH && Fl::visible_focus()) {
-    Fl::focus(this);
+  if (event == FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Widget.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -42,14 +42,14 @@
 
 const int QUEUE_SIZE = 20;
 
-static Fl_Widget *obj_queue[QUEUE_SIZE];
+static fltk3::Widget *obj_queue[QUEUE_SIZE];
 static int obj_head, obj_tail;
 
-void Fl_Widget::default_callback(Fl_Widget *o, void * /*v*/) {
+void fltk3::Widget::default_callback(fltk3::Widget *o, void * /*v*/) {
 #if 0
   // This is necessary for strict forms compatibility but is confusing.
   // Use the parent's callback if this widget does not have one.
-  for (Fl_Widget *p = o->parent(); p; p = p->parent())
+  for (fltk3::Widget *p = o->parent(); p; p = p->parent())
     if (p->callback() != default_callback) {
       p->do_callback(o,v);
       return;
@@ -67,20 +67,20 @@
     default callback that puts a pointer to the widget in this queue,
     and this method reads the oldest widget out of this queue.
 */
-Fl_Widget *Fl::readqueue() {
+fltk3::Widget *fltk3::readqueue() {
   if (obj_tail==obj_head) return 0;
-  Fl_Widget *o = obj_queue[obj_tail++];
+  fltk3::Widget *o = obj_queue[obj_tail++];
   if (obj_tail >= QUEUE_SIZE) obj_tail = 0;
   return o;
 }
 /*
     This static internal function removes all pending callbacks for a
-    specific widget from the default callback queue (Fl::readqueue()).
-    It is only called from Fl_Widget's destructor if the widget
+    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(Fl_Widget *w) {
+static void cleanup_readqueue(fltk3::Widget *w) {
 
   if (obj_tail==obj_head) return;
   
@@ -91,7 +91,7 @@
   int entry = obj_tail;		// oldest entry
   obj_head = obj_tail;		// new queue start
   for (;;) {
-    Fl_Widget *o = obj_queue[entry++];
+    fltk3::Widget *o = obj_queue[entry++];
     if (entry >= QUEUE_SIZE) entry = 0;
     if (o != w) { // valid entry
       obj_queue[obj_head++] = o;
@@ -103,14 +103,14 @@
 }
 ////////////////////////////////////////////////////////////////
 
-int Fl_Widget::handle(int) {
+int fltk3::Widget::handle(int) {
   return 0;
 }
 
 /** Default font size for widgets */
 Fl_Fontsize FL_NORMAL_SIZE = 14;
 
-Fl_Widget::Fl_Widget(int X, int Y, int W, int H, const char* L) {
+fltk3::Widget::Widget(int X, int Y, int W, int H, const char* L) {
 
   x_ = X; y_ = Y; w_ = W; h_ = H;
 
@@ -137,54 +137,54 @@
   if (Fl_Group::current()) Fl_Group::current()->add(this);
 }
 
-void Fl_Widget::resize(int X, int Y, int W, int H) {
+void fltk3::Widget::resize(int X, int Y, int W, int H) {
   x_ = X; y_ = Y; w_ = W; h_ = H;
 }
 
 // this is useful for parent widgets to call to resize children:
-int Fl_Widget::damage_resize(int X, int Y, int W, int H) {
+int fltk3::Widget::damage_resize(int X, int Y, int W, int H) {
   if (x() == X && y() == Y && w() == W && h() == H) return 0;
   resize(X, Y, W, H);
   redraw();
   return 1;
 }
 
-int Fl_Widget::take_focus() {
+int fltk3::Widget::take_focus() {
   if (!takesevents()) return 0;
   if (!visible_focus()) return 0;
   if (!handle(FL_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;
 }
 
-extern void fl_throw_focus(Fl_Widget*); // in Fl_x.cxx
+extern void fl_throw_focus(fltk3::Widget*); // in Fl_x.cxx
 
 /**
    Destroys the widget, taking care of throwing focus before if any.
    Destruction removes the widget from any parent group! And groups when
    destroyed destroy all their children. This is convenient and fast.
 */
-Fl_Widget::~Fl_Widget() {
-  Fl::clear_widget_pointer(this);
+fltk3::Widget::~Widget() {
+  fltk3::clear_widget_pointer(this);
   if (flags() & COPIED_LABEL) free((void *)(label_.value));
   // remove from parent group
   if (parent_) parent_->remove(this);
 #ifdef DEBUG_DELETE
   if (parent_) { // this should never happen
-    printf("*** Fl_Widget: parent_->remove(this) failed [%p,%p]\n",parent_,this);
+    printf("*** fltk3::Widget: parent_->remove(this) failed [%p,%p]\n",parent_,this);
   }
 #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
-Fl_Widget::draw_focus(Fl_Boxtype B, int X, int Y, int W, int H) const {
-  if (!Fl::visible_focus()) return;
+fltk3::Widget::draw_focus(Fl_Boxtype B, int X, int Y, int W, int H) const {
+  if (!fltk3::visible_focus()) return;
   switch (B) {
     case FL_DOWN_BOX:
     case FL_DOWN_FRAME:
@@ -200,8 +200,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
@@ -212,10 +212,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);
@@ -227,19 +227,19 @@
 }
 
 
-void Fl_Widget::activate() {
+void fltk3::Widget::activate() {
   if (!active()) {
     clear_flag(INACTIVE);
     if (active_r()) {
       redraw();
       redraw_label();
       handle(FL_ACTIVATE);
-      if (inside(Fl::focus())) Fl::focus()->take_focus();
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
     }
   }
 }
 
-void Fl_Widget::deactivate() {
+void fltk3::Widget::deactivate() {
   if (active_r()) {
     set_flag(INACTIVE);
     redraw();
@@ -251,28 +251,28 @@
   }
 }
 
-int Fl_Widget::active_r() const {
-  for (const Fl_Widget* o = this; o; o = o->parent())
+int fltk3::Widget::active_r() const {
+  for (const fltk3::Widget* o = this; o; o = o->parent())
     if (!o->active()) return 0;
   return 1;
 }
 
-void Fl_Widget::show() {
+void fltk3::Widget::show() {
   if (!visible()) {
     clear_flag(INVISIBLE);
     if (visible_r()) {
       redraw();
       redraw_label();
       handle(FL_SHOW);
-      if (inside(Fl::focus())) Fl::focus()->take_focus();
+      if (inside(fltk3::focus())) fltk3::focus()->take_focus();
     }
   }
 }
 
-void Fl_Widget::hide() {
+void fltk3::Widget::hide() {
   if (visible_r()) {
     set_flag(INVISIBLE);
-    for (Fl_Widget *p = parent(); p; p = p->parent())
+    for (fltk3::Widget *p = parent(); p; p = p->parent())
       if (p->box() || !p->parent()) {p->redraw(); break;}
     handle(FL_HIDE);
     fl_throw_focus(this);
@@ -281,22 +281,22 @@
   }
 }
 
-int Fl_Widget::visible_r() const {
-  for (const Fl_Widget* o = this; o; o = o->parent())
+int fltk3::Widget::visible_r() const {
+  for (const fltk3::Widget* o = this; o; o = o->parent())
     if (!o->visible()) return 0;
   return 1;
 }
 
 // return true if widget is inside (or equal to) this:
 // Returns false for null widgets.
-int Fl_Widget::contains(const Fl_Widget *o) const {
+int fltk3::Widget::contains(const fltk3::Widget *o) const {
   for (; o; o = o->parent_) if (o == this) return 1;
   return 0;
 }
 
 
 void
-Fl_Widget::label(const char *a) {
+fltk3::Widget::label(const char *a) {
   if (flags() & COPIED_LABEL) {
     // reassigning a copied label remains the same copied label
     if (label_.value == a)
@@ -310,7 +310,7 @@
 
 
 void
-Fl_Widget::copy_label(const char *a) {
+fltk3::Widget::copy_label(const char *a) {
   if (flags() & COPIED_LABEL) free((void *)(label_.value));
   if (a) {
     set_flag(COPIED_LABEL);
@@ -331,7 +331,7 @@
   \see callback()
 */
 void
-Fl_Widget::do_callback(Fl_Widget* o,void* arg) {
+fltk3::Widget::do_callback(fltk3::Widget* o,void* arg) {
   Fl_Widget_Tracker wp(this);
   callback_(o,arg);
   if (wp.deleted()) return;

Modified: branches/branch-3.0/src/Fl_Window.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Window.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -25,7 +25,7 @@
 //     http://www.fltk.org/str.php
 //
 
-// The Fl_Window is a window in the fltk library.
+// The fltk3::Window is a window in the fltk library.
 // This is the system-independent portions.  The huge amount of 
 // crap you need to do to communicate with X is in Fl_x.cxx, the
 // equivalent (but totally different) crap for MSWindows is in Fl_win32.cxx
@@ -40,13 +40,13 @@
 #include <FL/fl_draw.H>
 #endif
 
-void Fl_Window::_Fl_Window() {
+void fltk3::Window::_Fl_Window() {
   type(FL_WINDOW);
   box(FL_FLAT_BOX);
-  if (Fl::scheme_bg_) {
+  if (fltk3::scheme_bg_) {
     labeltype(FL_NORMAL_LABEL);
     align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
-    image(Fl::scheme_bg_);
+    image(fltk3::scheme_bg_);
   } else {
     labeltype(FL_NO_LABEL);
   }
@@ -60,7 +60,7 @@
   callback((Fl_Callback*)default_callback);
 }
 
-Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l)
+fltk3::Window::Window(int X,int Y,int W, int H, const char *l)
 : Fl_Group(X, Y, W, H, l) {
   cursor_default = FL_CURSOR_DEFAULT;
   cursor_fg      = FL_BLACK;
@@ -70,7 +70,7 @@
   set_flag(FORCE_POSITION);
 }
 
-Fl_Window::Fl_Window(int W, int H, const char *l)
+fltk3::Window::Window(int W, int H, const char *l)
 // fix common user error of a missing end() with current(0):
   : Fl_Group((Fl_Group::current(0),0), 0, W, H, l) {
   cursor_default = FL_CURSOR_DEFAULT;
@@ -81,25 +81,25 @@
   clear_visible();
 }
 
-Fl_Window *Fl_Widget::window() const {
-  for (Fl_Widget *o = parent(); o; o = o->parent())
-    if (o->type() >= FL_WINDOW) return (Fl_Window*)o;
+fltk3::Window *fltk3::Widget::window() const {
+  for (fltk3::Widget *o = parent(); o; o = o->parent())
+    if (o->type() >= FL_WINDOW) return (fltk3::Window*)o;
   return 0;
 }
 /** Gets the x position of the window on the screen */
-int Fl_Window::x_root() const {
-  Fl_Window *p = window();
+int fltk3::Window::x_root() const {
+  fltk3::Window *p = window();
   if (p) return p->x_root() + x();
   return x();
 }
 /** Gets the y position of the window on the screen */
-int Fl_Window::y_root() const {
-  Fl_Window *p = window();
+int fltk3::Window::y_root() const {
+  fltk3::Window *p = window();
   if (p) return p->y_root() + y();
   return y();
 }
 
-void Fl_Window::draw() {
+void fltk3::Window::draw() {
 
   // The following is similar to Fl_Group::draw(), but ...
   //  - we draw the box with x=0 and y=0 instead of x() and y()
@@ -115,8 +115,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;
@@ -135,15 +135,15 @@
 #endif
 
 # if defined(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
 }
 
-void Fl_Window::label(const char *name) {
+void fltk3::Window::label(const char *name) {
   label(name, iconlabel());
 }
 
-void Fl_Window::copy_label(const char *a) {
+void fltk3::Window::copy_label(const char *a) {
   if (flags() & COPIED_LABEL) {
     free((void *)label());
     clear_flag(COPIED_LABEL);
@@ -154,27 +154,27 @@
 }
 
 
-void Fl_Window::iconlabel(const char *iname) {
+void fltk3::Window::iconlabel(const char *iname) {
   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(Fl_Window* window, void* v) {
+void fltk3::default_atclose(fltk3::Window* window, void* v) {
   window->hide();
-  Fl_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)(Fl_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 Fl_Window::default_callback(Fl_Window* win, void* v) {
-  Fl::atclose(win, v);
+void fltk3::Window::default_callback(fltk3::Window* win, void* v) {
+  fltk3::atclose(win, v);
 }
 
-/**  Returns the last window that was made current. \see Fl_Window::make_current() */
-Fl_Window *Fl_Window::current() {
+/**  Returns the last window that was made current. \see fltk3::Window::make_current() */
+fltk3::Window *fltk3::Window::current() {
   return current_;
 }
 

Modified: branches/branch-3.0/src/Fl_Window_fullscreen.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window_fullscreen.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Window_fullscreen.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -40,7 +40,7 @@
 
 #include <config.h>
 
-void Fl_Window::border(int b) {
+void fltk3::Window::border(int b) {
   if (b) {
     if (border()) return;
     clear_flag(NOBORDER);
@@ -60,7 +60,7 @@
 #endif
 }
 
-void Fl_Window::fullscreen() {
+void fltk3::Window::fullscreen() {
 #ifndef WIN32
   //this would clobber the fake wm, since it relies on the border flags to
   //determine its thickness
@@ -68,21 +68,21 @@
 #endif
 #if defined(__APPLE__) || defined(WIN32)
   int sx, sy, sw, sh;
-  Fl::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
+  fltk3::screen_xywh(sx, sy, sw, sh, x()+w()/2, y()+h()/2);
   // 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
   resize(sx, sy, sw, sh);
 #else
   if (!x()) x(1); // force it to call XResizeWindow()
-  resize(0,0,Fl::w(),Fl::h());
+  resize(0,0,fltk3::w(),fltk3::h());
 #endif
 }
 
-void Fl_Window::fullscreen_off(int X,int Y,int W,int H) {
+void fltk3::Window::fullscreen_off(int X,int Y,int W,int H) {
   // this order produces less blinking on IRIX:
   resize(X,Y,W,H);
 #ifndef WIN32

Modified: branches/branch-3.0/src/Fl_Window_hotspot.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window_hotspot.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Window_hotspot.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -30,18 +30,18 @@
 #include <FL/x.H>
 #include <stdio.h>
 
-void Fl_Window::hotspot(int X, int Y, int offscreen) {
+void fltk3::Window::hotspot(int X, int Y, int offscreen) {
   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;
@@ -84,7 +84,7 @@
   position(X,Y);
 }
 
-void Fl_Window::hotspot(const Fl_Widget *o, int offscreen) {
+void fltk3::Window::hotspot(const fltk3::Widget *o, int offscreen) {
   int X = o->w()/2;
   int Y = o->h()/2;
   while (o != this && o) {

Modified: branches/branch-3.0/src/Fl_Window_iconize.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Window_iconize.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Window_iconize.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -29,7 +29,7 @@
 
 extern char fl_show_iconic; // in Fl_x.cxx
 
-void Fl_Window::iconize() {
+void fltk3::Window::iconize() {
   if (!shown()) {
     fl_show_iconic = 1;
     show();
@@ -37,7 +37,7 @@
 #ifdef WIN32
     ShowWindow(i->xid, SW_SHOWMINNOACTIVE);
 #elif defined(__APPLE__)
-    MacCollapseWindow((Window)i->xid);
+    MacCollapseWindow((NativeWindow)i->xid);
 #else
     XIconifyWindow(fl_display, i->xid, fl_screen);
 #endif

Modified: branches/branch-3.0/src/Fl_Wizard.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Wizard.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_Wizard.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -62,14 +62,14 @@
 {
   box(FL_THIN_UP_BOX);
 
-  value_ = (Fl_Widget *)0;
+  value_ = (fltk3::Widget *)0;
 }
 
 
 //
 /** Draws the wizard border and visible child. */
 void Fl_Wizard::draw() {
-  Fl_Widget	*kid;	// Visible child
+  fltk3::Widget	*kid;	// Visible child
 
 
   kid = value();
@@ -97,7 +97,7 @@
 */
 void Fl_Wizard::next() {
   int			num_kids;
-  Fl_Widget	* const *kids;
+  fltk3::Widget	* const *kids;
 
 
   if ((num_kids = children()) == 0)
@@ -115,7 +115,7 @@
 void Fl_Wizard::prev()
 {
   int			num_kids;
-  Fl_Widget	* const *kids;
+  fltk3::Widget	* const *kids;
 
 
   if ((num_kids = children()) == 0)
@@ -130,17 +130,17 @@
 }
 
 /**  Gets the current visible child widget. */
-Fl_Widget* Fl_Wizard::value()
+fltk3::Widget* Fl_Wizard::value()
 {
   int			num_kids;
-  Fl_Widget	* const *kids;
-  Fl_Widget		*kid;
+  fltk3::Widget	* const *kids;
+  fltk3::Widget		*kid;
 
 
   if ((num_kids = children()) == 0)
-    return ((Fl_Widget *)0);
+    return ((fltk3::Widget *)0);
 
-  for (kids = array(), kid = (Fl_Widget *)0; num_kids > 0; kids ++, num_kids --)
+  for (kids = array(), kid = (fltk3::Widget *)0; num_kids > 0; kids ++, num_kids --)
   {
     if ((*kids)->visible())
     {
@@ -162,10 +162,10 @@
 }
 
 /**  Sets the child widget that is visible.*/
-void Fl_Wizard::value(Fl_Widget *kid)
+void Fl_Wizard::value(fltk3::Widget *kid)
 {
   int			num_kids;
-  Fl_Widget	* const *kids;
+  fltk3::Widget	* const *kids;
 
 
   if ((num_kids = children()) == 0)

Modified: branches/branch-3.0/src/Fl_abort.cxx
===================================================================
--- branches/branch-3.0/src/Fl_abort.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_abort.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_add_idle.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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(Fl_Idle_Handler 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(Fl_Idle_Handler 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(Fl_Idle_Handler 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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_arg.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -74,7 +74,7 @@
   function if you prefer to control the incrementing through the
   arguments yourself.
 */
-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];
 
@@ -93,19 +93,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)) {
@@ -139,7 +139,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)) {
@@ -158,7 +158,7 @@
     fl_fg = v;
 
   } else if (fl_match(s, "scheme", 1)) {
-    Fl::scheme(v);
+    fltk3::scheme(v);
 
   } else return 0; // unrecognized
 
@@ -178,7 +178,7 @@
   You don't have to call it if you don't like them! Everything it can do
   can be done with other calls to FLTK.
   
-  <P>To use the switch parser, call Fl::args(...) near the start
+  <P>To use the switch parser, call fltk3::args(...) near the start
   of your program.  This does <I>not</I> open the display, instead
   switches that need the display open are stashed into static variables.
   Then you <I>must</I> display your first window by calling 
@@ -216,11 +216,11 @@
   
   	<LI>-bg color or -background color
   
-  	<P>Sets the background color using Fl::background().</LI>
+  	<P>Sets the background color using fltk3::background().</LI>
   
   	<LI>-bg2 color or -background2 color
   
-  	<P>Sets the secondary background color using Fl::background2().</LI>
+  	<P>Sets the secondary background color using fltk3::background2().</LI>
   
   	<LI>-display host:n.n
   
@@ -230,11 +230,11 @@
   	<LI>-dnd and -nodnd
   
   	<P>Enables or disables drag and drop text operations
-  	using Fl::dnd_text_ops().</LI>
+  	using fltk3::dnd_text_ops().</LI>
   
   	<LI>-fg color or -foreground color
   
-  	<P>Sets the foreground color using Fl::foreground().</LI>
+  	<P>Sets the foreground color using fltk3::foreground().</LI>
   
   	<LI>-geometry WxH+X+Y
   
@@ -243,24 +243,24 @@
   
   	<LI>-iconic
   
-  	<P>Iconifies the window using Fl_Window::iconize().</LI>
+  	<P>Iconifies the window using fltk3::Window::iconize().</LI>
   
   	<LI>-kbd and -nokbd
   
   	<P>Enables or disables visible keyboard focus for
-  	non-text widgets using Fl::visible_focus().</LI>
+  	non-text widgets using fltk3::visible_focus().</LI>
   
   	<LI>-name string
   
-  	<P>Sets the window class using Fl_Window::xclass().</LI>
+  	<P>Sets the window class using fltk3::Window::xclass().</LI>
   
   	<LI>-scheme string
   
-  	<P>Sets the widget scheme using Fl::scheme().</LI>
+  	<P>Sets the widget scheme using fltk3::scheme().</LI>
   
   	<LI>-title string
   
-  	<P>Sets the window title using Fl_Window::label().</LI>
+  	<P>Sets the window title using fltk3::Window::label().</LI>
   
   	<LI>-tooltips and -notooltips
   
@@ -268,16 +268,16 @@
   
   </UL>
   
-  <P>The second form of Fl::args() is useful if your program does
+  <P>The second form of fltk3::args() is useful if your program does
   not have command line switches of its own. It parses all the switches,
-  and if any are not recognized it calls Fl::abort(Fl::help).
+  and if any are not recognized it calls fltk3::abort(fltk3::help).
   
-  <P>A usage string is displayed if Fl::args() detects an invalid
+  <P>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.
 */
 
-int Fl::args(int argc, char** argv, int& i, Fl_Args_Handler cb) {
+int fltk3::args(int argc, char** argv, int& i, Fl_Args_Handler cb) {
   arg_called = 1;
   i = 1; // skip argv[0]
   while (i < argc) {
@@ -288,20 +288,20 @@
 }
 
 // show a main window, use any parsed arguments
-void Fl_Window::show(int argc, char **argv) {
-  if (argc && !arg_called) Fl::args(argc,argv);
+void fltk3::Window::show(int argc, char **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);
 
@@ -311,7 +311,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__
@@ -322,12 +322,12 @@
     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;
-      Fl_Widget *r = resizable();
+      fltk3::Widget *r = resizable();
       if (!r) resizable(this);
       // for WIN32 we assume window is not mapped yet:
       if (fl & (XValue | YValue))
@@ -347,7 +347,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.
@@ -386,10 +386,10 @@
 " -ti[tle] windowtitle\n"
 " -to[oltips]";
 
-const char * const Fl::help = helpmsg+13;
-/** See Fl::args(int argc, char **argv, int& i, int (*cb)(int,char**,int&)) */
-void Fl::args(int argc, char **argv) {
-  int i; if (Fl::args(argc,argv,i) < argc) Fl::error(helpmsg);
+const char * const fltk3::help = helpmsg+13;
+/** See fltk3::args(int argc, char **argv, int& i, int (*cb)(int,char**,int&)) */
+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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_cocoa.mm	2010-03-30 15:18:29 UTC (rev 7365)
@@ -43,10 +43,10 @@
  really remove these as well, so we can stop linking to Carbon alltogether.
  
  "_GetKeys", referenced from:
- Fl::get_key(int)  in Fl_get_key.o
+ fltk3::get_key(int)  in Fl_get_key.o
  
  "_InstallEventLoopTimer", referenced from:
- Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
+ fltk3::add_timeout(double, void (*)(void*), void*)in Fl.o
  
  "_GetEventParameter", referenced from:
  carbonTextHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in Fl.o
@@ -58,14 +58,14 @@
  fl_open_display()     in Fl.o
  
  "_SetEventLoopTimerNextFireTime", referenced from:
- Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
+ fltk3::add_timeout(double, void (*)(void*), void*)in Fl.o
  
  "_RemoveEventLoopTimer", referenced from:
- Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
+ fltk3::add_timeout(double, void (*)(void*), void*)in Fl.o
  delete_timer(MacTimeout&)       in Fl.o
  
  "_GetMainEventLoop", referenced from:
- Fl::add_timeout(double, void (*)(void*), void*)in Fl.o
+ fltk3::add_timeout(double, void (*)(void*), void*)in Fl.o
  
  */
 
@@ -143,22 +143,22 @@
 void *fl_default_cursor;		// this is really a NSCursor*
 void *fl_capture = 0;			// (NSWindow*) 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 Fl_Window* fl_modal_for;        // parent of modal() window
-Window fl_window;
-Fl_Window *Fl_Window::current_;
+//const fltk3::Window* fl_modal_for;        // parent of modal() window
+NativeWindow fl_window;
+fltk3::Window *fltk3::Window::current_;
 //EventRef fl_os_event;		// last (mouse) event
 
 // forward declarations of variables in this file
 static int got_events = 0;
-static Fl_Window* resize_from_system;
+static fltk3::Window* resize_from_system;
 static SInt32 MACsystemVersion;
 
 #if CONSOLIDATE_MOTION
-static Fl_Window* send_motion;
-extern Fl_Window* fl_xmousewin;
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
 #endif
 
 enum { FLTKTimerEvent = 1, FLTKDataReadyEvent };
@@ -169,7 +169,7 @@
 {
 }
 
-void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
+void fl_set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
 {
 }
 
@@ -221,9 +221,9 @@
   if ( mods & NSControlKeyMask ) state |= FL_CTRL;
   if ( mods & NSShiftKeyMask ) state |= FL_SHIFT;
   if ( mods & NSAlphaShiftKeyMask ) state |= FL_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;
 }
 
@@ -234,17 +234,17 @@
 
  static void mods_to_e_keysym( NSUInteger mods )
  {
- if ( mods & NSCommandKeyMask ) Fl::e_keysym = FL_Meta_L;
- else if ( mods & NSNumericPadKeyMask ) Fl::e_keysym = FL_Num_Lock;
- else if ( mods & NSAlternateKeyMask ) Fl::e_keysym = FL_Alt_L;
- else if ( mods & NSControlKeyMask ) Fl::e_keysym = FL_Control_L;
- else if ( mods & NSShiftKeyMask ) Fl::e_keysym = FL_Shift_L;
- else if ( mods & NSAlphaShiftKeyMask ) Fl::e_keysym = FL_Caps_Lock;
- else Fl::e_keysym = 0;
- //printf( "to sym 0x%08x (%04x)\n", Fl::e_keysym, mods );
+ if ( mods & NSCommandKeyMask ) fltk3::e_keysym = FL_Meta_L;
+ else if ( mods & NSNumericPadKeyMask ) fltk3::e_keysym = FL_Num_Lock;
+ else if ( mods & NSAlternateKeyMask ) fltk3::e_keysym = FL_Alt_L;
+ else if ( mods & NSControlKeyMask ) fltk3::e_keysym = FL_Control_L;
+ else if ( mods & NSShiftKeyMask ) fltk3::e_keysym = FL_Shift_L;
+ else if ( mods & NSAlphaShiftKeyMask ) fltk3::e_keysym = FL_Caps_Lock;
+ 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;
@@ -252,7 +252,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
@@ -494,22 +494,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);
 }
@@ -616,22 +616,22 @@
 }
 
 @interface FLWindow : NSWindow {
-  Fl_Window *w;
+  fltk3::Window *w;
   BOOL containsGLsubwindow;
 }
-- (FLWindow*)initWithFl_W:(Fl_Window *)flw 
+- (FLWindow*)initWithFl_W:(fltk3::Window *)flw 
 	      contentRect:(NSRect)rect 
 		styleMask:(NSUInteger)windowStyle 
 		  backing:(NSBackingStoreType)bufferingType 
 		    defer:(BOOL)deferCreation;
-- (Fl_Window *)getFl_Window;
+- (fltk3::Window *)getFl_Window;
 - (BOOL)windowShouldClose:(FLWindow *)w;
 - (BOOL)containsGLsubwindow;
 - (void)setContainsGLsubwindow:(BOOL)contains;
 @end
 
 @implementation FLWindow
-- (FLWindow*)initWithFl_W:(Fl_Window *)flw 
+- (FLWindow*)initWithFl_W:(fltk3::Window *)flw 
 	      contentRect:(NSRect)rect 
 		styleMask:(NSUInteger)windowStyle 
 		  backing:(NSBackingStoreType)bufferingType 
@@ -644,16 +644,16 @@
   }
   return self;
 }
-- (Fl_Window *)getFl_Window;
+- (fltk3::Window *)getFl_Window;
 {
   return w;
 }
 - (BOOL)windowShouldClose:(FLWindow *)fl
 {
-  Fl::handle( FL_CLOSE, [fl getFl_Window] ); // this might or might not close the window
+  fltk3::handle( FL_CLOSE, [fl getFl_Window] ); // this might or might not close the window
   if (!Fl_X::first) return YES;
-  Fl_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);
   return (l == NULL ? YES : NO);
 }
 - (BOOL)containsGLsubwindow
@@ -701,7 +701,7 @@
   if (event != nil) {
     BOOL needSendEvent = YES;
     if ([event type] == NSLeftMouseDown) {
-      Fl_Window *grab = Fl::grab();
+      fltk3::Window *grab = fltk3::grab();
       if (grab && grab != [(FLWindow *)[event window] getFl_Window]) {
 	// a click event out of a menu window, so we should close this menu
 	// done here to catch also clicks on window title bar/resize box 
@@ -721,7 +721,7 @@
 #if CONSOLIDATE_MOTION
   if (send_motion && send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(FL_MOVE, fl_xmousewin);
+    fltk3::handle(FL_MOVE, fl_xmousewin);
   }
 #endif
   
@@ -741,16 +741,16 @@
   return (got_events);
 }
 
-// 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 = pt.x;
-  Fl::e_y = [[nsw contentView] frame].size.height - pt.y;
+  fltk3::e_x = pt.x;
+  fltk3::e_y = [[nsw contentView] frame].size.height - pt.y;
   pt = [NSEvent mouseLocation];
-  Fl::e_x_root = pt.x;
-  Fl::e_y_root = [[nsw screen] frame].size.height - pt.y;
+  fltk3::e_x_root = pt.x;
+  fltk3::e_y_root = [[nsw screen] frame].size.height - pt.y;
 }
 
 /*
@@ -763,12 +763,12 @@
   // supports two wheels just fine. Matthias,
   fl_lock_function();
   
-  Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
   if ( !window->shown() ) {
     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..
@@ -776,13 +776,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( FL_MOUSEWHEEL, window );
+    fltk3::e_dx = (int)-dx;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( FL_MOUSEWHEEL, window );
   } else if ([theEvent deltaY] != 0) {
-    Fl::e_dx = 0;
-    Fl::e_dy = (int)-dy;
-    if ( Fl::e_dy) Fl::handle( FL_MOUSEWHEEL, window );
+    fltk3::e_dx = 0;
+    fltk3::e_dy = (int)-dy;
+    if ( fltk3::e_dy) fltk3::handle( FL_MOUSEWHEEL, window );
   } else {
     fl_unlock_function();
     return;
@@ -804,13 +804,13 @@
   
   fl_lock_function();
   
-  Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
   if ( !window->shown() ) {
     fl_unlock_function();
     return;
   }
-  Fl_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;
@@ -820,14 +820,14 @@
   
   NSEventType etype = [theEvent type];
   if (etype == NSLeftMouseDown || etype == NSRightMouseDown || etype == NSOtherMouseDown) {
-    if (btn == 1) Fl::e_state |= FL_BUTTON1;
-    else if (btn == 3) Fl::e_state |= FL_BUTTON2;
-    else if (btn == 2) Fl::e_state |= FL_BUTTON3;
+    if (btn == 1) fltk3::e_state |= FL_BUTTON1;
+    else if (btn == 3) fltk3::e_state |= FL_BUTTON2;
+    else if (btn == 2) fltk3::e_state |= FL_BUTTON3;
   }
   else if (etype == NSLeftMouseUp || etype == NSRightMouseUp || etype == NSOtherMouseUp) {
-    if (btn == 1) Fl::e_state &= ~FL_BUTTON1;
-    else if (btn == 3) Fl::e_state &= ~FL_BUTTON2;
-    else if (btn == 2) Fl::e_state &= ~FL_BUTTON3;
+    if (btn == 1) fltk3::e_state &= ~FL_BUTTON1;
+    else if (btn == 3) fltk3::e_state &= ~FL_BUTTON2;
+    else if (btn == 2) fltk3::e_state &= ~FL_BUTTON3;
     }
     
   switch ( etype ) {
@@ -836,12 +836,12 @@
     case NSOtherMouseDown:
       suppressed = 0;
       sendEvent = FL_PUSH;
-      Fl::e_is_click = 1; 
+      fltk3::e_is_click = 1; 
       px = (int)pos.x; py = (int)pos.y;
       if (clickCount>1) 
-        Fl::e_clicks++;
+        fltk3::e_clicks++;
       else
-        Fl::e_clicks = 0;
+        fltk3::e_clicks = 0;
       // fall through
     case NSLeftMouseUp:
     case NSRightMouseUp:
@@ -854,7 +854,7 @@
       if ( !sendEvent ) {
         sendEvent = FL_RELEASE; 
       }
-      Fl::e_keysym = keysym[ btn ];
+      fltk3::e_keysym = keysym[ btn ];
       // fall through
     case NSMouseMoved:
       suppressed = 0;
@@ -867,13 +867,13 @@
     case NSOtherMouseDragged: {
       if (suppressed) break;
       if ( !sendEvent ) {
-        sendEvent = FL_MOVE; // Fl::handle will convert into FL_DRAG
+        sendEvent = FL_MOVE; // fltk3::handle will convert into FL_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:
@@ -1031,7 +1031,7 @@
   // but under 10.6 this gets also called by interpretKeyEvents 
   // during character composition when we don't want to run it
   if ([[NSApp currentEvent] type] != NSSystemDefined) return eventNotHandledErr;
-  Fl_Window *window = [(FLWindow*)keywindow getFl_Window];
+  fltk3::Window *window = [(FLWindow*)keywindow getFl_Window];
   fl_lock_function();
   // int kind = GetEventKind(event);
   unsigned short buf[200];
@@ -1044,27 +1044,27 @@
   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(FL_KEYBOARD, window);
+  fltk3::handle(FL_KEYBOARD, window);
   fl_unlock_function();
   fl_lock_function();
-  Fl::handle(FL_KEYUP, window);
+  fltk3::handle(FL_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;
 }
 
-static void processCompositionSequence(CFStringRef s, Fl_Window *window)
+static void processCompositionSequence(CFStringRef s, fltk3::Window *window)
 // composed character sequences are sent here
 // they contain 2 unichars, the first comes from the deadkey and can be non ascii (e.g., diaeresis),
 // the second is the character to be modified (e.g., e to be accented)
 {
   // unicodes: non-ascii unicode chars produced by deadkeys
-  // asciis: corresponding ascii chars expected by Fl::compose()
+  // asciis: corresponding ascii chars expected by fltk3::compose()
   //                           diaeresis acute-accent circumflex tilde ring-above 
   static UniChar unicodes[] = {0xA8,      0xB4,      0x2C6,     0x2DC, 0x2DA };
   static char asciis[] = {     ':',        '\'',      '^',       '~',    '*' };
@@ -1083,17 +1083,17 @@
   CFStringRef smod = CFStringCreateWithCharacters(kCFAllocatorDefault, unis, 2);
   CFStringGetCString(smod, buffer, sizeof(buffer), kCFStringEncodingUTF8);
   CFRelease(smod);
-  Fl::e_keysym = 0;
-  Fl::e_state = 0;
-  Fl::e_length = 1;
-  Fl::e_text = text;
-  Fl::e_text[0] = buffer[0];
-  Fl::handle(FL_KEYBOARD, window);
-  Fl::e_keysym = 0;
-  Fl::e_state = 0;
-  Fl::e_length = 1;
-  Fl::e_text[0] = buffer[1];
-  Fl::handle(FL_KEYBOARD, window);
+  fltk3::e_keysym = 0;
+  fltk3::e_state = 0;
+  fltk3::e_length = 1;
+  fltk3::e_text = text;
+  fltk3::e_text[0] = buffer[0];
+  fltk3::handle(FL_KEYBOARD, window);
+  fltk3::e_keysym = 0;
+  fltk3::e_state = 0;
+  fltk3::e_length = 1;
+  fltk3::e_text[0] = buffer[1];
+  fltk3::handle(FL_KEYBOARD, window);
 }
 
 
@@ -1104,8 +1104,8 @@
 {
   static char buffer[32];
   int sendEvent = 0;
-  Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
-  Fl::first_window(window);
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::first_window(window);
   NSUInteger mods;
   
   fl_lock_function();
@@ -1155,10 +1155,10 @@
   }
   if ([s length] == 0) {	// this is a dead key that must be combined with the next key to be pressed
     while (window->parent()) window = window->window();
-    Fl::e_keysym = FL_Control_R; // first simulate pressing of the compose key (FL_Control_R)
-    Fl::e_text = (char*)"";
-    Fl::e_length = 0;
-    Fl::handle(FL_KEYBOARD, window); 
+    fltk3::e_keysym = FL_Control_R; // first simulate pressing of the compose key (FL_Control_R)
+    fltk3::e_text = (char*)"";
+    fltk3::e_length = 0;
+    fltk3::handle(FL_KEYBOARD, window); 
     compose=YES;
     // then send remaining events to an object of type NSText that helps handle character composition sequences
     edit = [[theEvent window]  fieldEditor:YES forObject:nil];
@@ -1196,7 +1196,7 @@
     case NSKeyUp: {
       if ( !sendEvent ) {
         sendEvent = FL_KEYUP;
-        Fl::e_state &= 0xbfffffff; // clear the deadkey flag
+        fltk3::e_state &= 0xbfffffff; // clear the deadkey flag
       }
       mods_to_e_state( mods ); // we process modifier keys at the same time
       // if the user pressed alt/option, event_key should have the keycap, 
@@ -1204,9 +1204,9 @@
       sym = macKeyLookUp[maskedKeyCode];
       if ( isalpha(key) )
         sym = tolower(key);
-      else if ( Fl::e_state&FL_CTRL && key<32 && sym<0xff00)
+      else if ( fltk3::e_state&FL_CTRL && key<32 && sym<0xff00)
         sym = key+96;
-      else if ( Fl::e_state&FL_ALT && sym<0xff00) {	// find the keycap of this key
+      else if ( fltk3::e_state&FL_ALT && sym<0xff00) {	// find the keycap of this key
 	NSString *sim = [theEvent charactersIgnoringModifiers];
 	UniChar one;
 	CFStringGetCharacters((CFStringRef)sim, CFRangeMake(0, 1), &one);
@@ -1215,7 +1215,7 @@
 	if(sym >= 'A' && sym <= 'Z') sym += 32;
       }
       
-      Fl::e_keysym = Fl::e_original_keysym = sym;
+      fltk3::e_keysym = fltk3::e_original_keysym = sym;
       // Handle FL_KP_Enter on regular keyboards and on Powerbooks
       if ( maskedKeyCode==0x4c || maskedKeyCode==0x34) key=0x0d;    
       static UInt32 deadKeyState = 0; // must be cleared when losing focus
@@ -1223,9 +1223,9 @@
       if (l > 0) {
         CFStringGetCString((CFStringRef)s, buffer, sizeof(buffer), kCFStringEncodingUTF8);
       }
-      Fl::e_length = strlen(buffer);
-      Fl::e_text = buffer;
-      buffer[Fl::e_length] = 0; // just in case...
+      fltk3::e_length = strlen(buffer);
+      fltk3::e_text = buffer;
+      buffer[fltk3::e_length] = 0; // just in case...
       }
       break;
     default:
@@ -1233,7 +1233,7 @@
       return eventNotHandledErr;
   }
   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 {
@@ -1340,7 +1340,7 @@
 - (void)windowDidMove:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
+  fltk3::Window *window = [nsw getFl_Window];
   NSPoint pt, pt2; 
   pt.x = 0;
   pt.y = [[nsw contentView] frame].size.height;
@@ -1354,7 +1354,7 @@
 - (void)windowDidResize:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
+  fltk3::Window *window = [nsw getFl_Window];
   NSRect r = [[nsw contentView] frame];
   NSPoint pt, pt2; 
   pt.x = 0;
@@ -1370,39 +1370,39 @@
 - (void)windowDidBecomeKey:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
-  Fl::handle( FL_FOCUS, window);
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::handle( FL_FOCUS, window);
 }
 - (void)windowDidBecomeMain:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
-  Fl::first_window(window);
+  fltk3::Window *window = [nsw getFl_Window];
+  fltk3::first_window(window);
   update_e_xy_and_e_xy_root(nsw);
 }
 - (void)windowDidDeminiaturize:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
+  fltk3::Window *window = [nsw getFl_Window];
   window->set_visible();
   update_e_xy_and_e_xy_root(nsw);
 }
 - (void)windowDidMiniaturize:(NSNotification *)notif
 {
   FLWindow *nsw = (FLWindow*)[notif object];
-  Fl_Window *window = [nsw getFl_Window];
+  fltk3::Window *window = [nsw getFl_Window];
   window->clear_visible();
 }
 - (void)windowWillClose:(NSNotification *)notif
 {
-  Fl_Window *w = Fl::first_window();
+  fltk3::Window *w = fltk3::first_window();
   if (!w) return;
   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];
     }
   }
@@ -1413,7 +1413,7 @@
   NSApplicationTerminateReply reply = NSTerminateNow;
   while ( Fl_X::first ) {
     Fl_X *x = Fl_X::first;
-    Fl::handle( FL_CLOSE, x->w );
+    fltk3::handle( FL_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;
@@ -1433,7 +1433,7 @@
   FLWindow *top = 0, *topModal = 0, *topNonModal = 0;
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
-    Fl_Window *win = x->w;
+    fltk3::Window *win = x->w;
     if (win && cw) {
       if (win->modal()) {
         [cw setLevel:NSModalPanelWindowLevel];
@@ -1463,7 +1463,7 @@
   // sort in all regular windows
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
-    Fl_Window *win = x->w;
+    fltk3::Window *win = x->w;
     if (win && cw) {
       if (win->modal()) {
       } else if (win->non_modal()) {
@@ -1475,7 +1475,7 @@
   // now sort in all modals
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
-    Fl_Window *win = x->w;
+    fltk3::Window *win = x->w;
     if (win && cw) {
       if (win->modal()) {
         [cw setLevel:NSNormalWindowLevel];
@@ -1488,7 +1488,7 @@
   // finally all non-modals
   for (x = Fl_X::first;x;x = x->next) {
     FLWindow *cw = (FLWindow*)x->xid;
-    Fl_Window *win = x->w;
+    fltk3::Window *win = x->w;
     if (win && cw) {
       if (win->modal()) {
       } else if (win->non_modal()) {
@@ -1635,7 +1635,7 @@
 /*
  * smallest x ccordinate in screen space
  */
-int Fl::x() {
+int fltk3::x() {
   return [[NSScreen mainScreen] frame].origin.x;
 }
 
@@ -1643,7 +1643,7 @@
 /*
  * smallest y coordinate in screen space
  */
-int Fl::y() {
+int fltk3::y() {
   NSRect all = [[NSScreen mainScreen] frame];
   NSRect visible = [[NSScreen mainScreen] visibleFrame];
   return all.size.height - (visible.origin.y + visible.size.height);
@@ -1653,7 +1653,7 @@
 /*
  * screen width (single monitor!?)
  */
-int Fl::w() {
+int fltk3::w() {
   return [[NSScreen mainScreen] visibleFrame].size.width;
 }
 
@@ -1661,7 +1661,7 @@
 /*
  * screen height (single monitor!?)
  */
-int Fl::h() {
+int fltk3::h() {
   int bx, by, bt;
   get_window_frame_sizes(bx, by, bt);
   return [[NSScreen mainScreen] frame].size.height - bt;
@@ -1671,7 +1671,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];
@@ -1704,7 +1704,7 @@
 /*
  * Gets called when a window is created, resized, or deminiaturized
  */    
-static void handleUpdateEvent( Fl_Window *window ) 
+static void handleUpdateEvent( fltk3::Window *window ) 
 {
   if ( !window ) return;
   Fl_X *i = Fl_X::i( window );
@@ -1747,7 +1747,7 @@
   window->clear_damage();
 }     
 
-int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
   int W, H, xoff, yoff, dx, dy;
   int ret = bx = by = bt = 0;
   if (w->border() && !w->parent()) {
@@ -1851,7 +1851,7 @@
 }
 
 
-Fl_Window *fl_dnd_target_window = 0;
+fltk3::Window *fl_dnd_target_window = 0;
 
 static void  q_set_window_title(NSWindow *nsw, const char * name ) {
   CFStringRef utf8_title = CFStringCreateWithCString(NULL, (name ? name : ""), kCFStringEncodingUTF8);
@@ -1890,7 +1890,7 @@
 - (void)drawRect:(NSRect)rect
 {
   FLWindow *cw = (FLWindow*)[self window];
-  Fl_Window *w = [cw getFl_Window];
+  fltk3::Window *w = [cw getFl_Window];
   handleUpdateEvent(w);
 }
 
@@ -1905,8 +1905,8 @@
 }
 - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent
 {   
-  Fl_Window *w = [(FLWindow*)[theEvent window] getFl_Window];
-  Fl_Window *first = Fl::first_window();
+  fltk3::Window *w = [(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::Window *first = fltk3::first_window();
   return (first == w || !first->modal());
 }
 - (void)mouseUp:(NSEvent *)theEvent {
@@ -1952,46 +1952,46 @@
   fl_lock_function();
   static UInt32 prevMods = 0;
   NSUInteger mods = [theEvent modifierFlags];
-  Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
+  fltk3::Window *window = (fltk3::Window*)[(FLWindow*)[theEvent window] getFl_Window];
   UInt32 tMods = prevMods ^ mods;
   int sendEvent = 0;
   if ( tMods )
   {
     mods_to_e_keysym( tMods );
-    if ( Fl::e_keysym ) 
+    if ( fltk3::e_keysym ) 
       sendEvent = ( prevMods<mods ) ? FL_KEYBOARD : FL_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
 {
-  Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+  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( FL_DND_ENTER, target );
+  int ret = fltk3::handle( FL_DND_ENTER, target );
   breakMacEventLoop();
   return ret ? NSDragOperationCopy : NSDragOperationNone;
 }
 - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
 {
-  Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+  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( FL_DND_DRAG, target );
+  int ret = fltk3::handle( FL_DND_DRAG, target );
   breakMacEventLoop();
   return ret ? NSDragOperationCopy : NSDragOperationNone;
 }
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender 
 {
   static char *DragData = NULL;
-  Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
-  if ( !Fl::handle( FL_DND_RELEASE, target ) ) { 
+  fltk3::Window *target = [(FLWindow*)[self window] getFl_Window];
+  if ( !fltk3::handle( FL_DND_RELEASE, target ) ) { 
     breakMacEventLoop();
     return NO;
   }
@@ -2020,14 +2020,14 @@
     breakMacEventLoop();
     return NO;
   }
-  Fl::e_text = DragData;
-  Fl::e_length = strlen(DragData);
-  int old_event = Fl::e_number;
-  Fl::belowmouse()->handle(Fl::e_number = FL_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 = FL_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();
   return YES;
@@ -2035,7 +2035,7 @@
 - (void)draggingExited:(id < NSDraggingInfo >)sender
 {
   if ( fl_dnd_target_window ) {
-    Fl::handle( FL_DND_LEAVE, fl_dnd_target_window );
+    fltk3::handle( FL_DND_LEAVE, fl_dnd_target_window );
     fl_dnd_target_window = 0;
   }
 }
@@ -2050,7 +2050,7 @@
  * go ahead, create that (sub)window
  * \todo we should make menu windows slightly transparent for the new Mac look
  */
-void Fl_X::make(Fl_Window* w)
+void Fl_X::make(fltk3::Window* w)
 {
   static int xyPos = 100;
   if ( w->parent() ) {		// create a subwindow
@@ -2062,7 +2062,7 @@
     x->subRegion = 0;
     x->cursor = fl_default_cursor;
     x->gc = 0;			// stay 0 for Quickdraw; fill with CGContext for Quartz
-    Fl_Window *win = w->window();
+    fltk3::Window *win = w->window();
     Fl_X *xo = Fl_X::i(win);
     if (xo) {
       x->xidNext = xo->xidChildren;
@@ -2076,9 +2076,9 @@
 	xo->next = x;
 	x->next = z;
       }
-      int old_event = Fl::e_number;
-      w->handle(Fl::e_number = FL_SHOW);
-      Fl::e_number = old_event;
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = FL_SHOW);
+      fltk3::e_number = old_event;
       w->redraw();		// force draw to happen
     }
     fl_show_iconic = 0;
@@ -2102,7 +2102,7 @@
       }
     } else {
 			if (w->resizable()) {
-        Fl_Widget *o = w->resizable();
+                          fltk3::Widget *o = w->resizable();
         int minw = o->w(); if (minw > 100) minw = 100;
         int minh = o->h(); if (minh > 100) minh = 100;
         w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
@@ -2133,14 +2133,14 @@
       wp += 2*bx;
       hp += 2*by+bt;
     }
-    if (!(w->flags() & Fl_Window::FORCE_POSITION)) {
+    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);
       }
@@ -2150,7 +2150,7 @@
     
     if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
       // find some other window to be "transient for":
-      Fl_Window* w = Fl_X::first->w;
+      fltk3::Window* w = Fl_X::first->w;
       while (w->parent()) w = w->window(); // todo: this code does not make any sense! (w!=w??)
     }
     
@@ -2183,7 +2183,7 @@
     [cw setLevel:winlevel];
     
     q_set_window_title(cw, name);
-    if (!(w->flags() & Fl_Window::FORCE_POSITION)) {
+    if (!(w->flags() & fltk3::Window::FORCE_POSITION)) {
       if (w->modal()) {
         [cw center];
       } else if (w->non_modal()) {
@@ -2212,7 +2212,7 @@
       Fl_Tooltip::enter(0);
     }
     [cw makeKeyAndOrderFront:nil];
-    Fl::first_window(w);
+    fltk3::first_window(w);
     [cw setDelegate:mydelegate];
     if (fl_show_iconic) { 
       fl_show_iconic = 0;
@@ -2229,11 +2229,11 @@
     srect = [[cw screen] frame];
     w->y(srect.size.height - (crect.origin.y + w->h()));
     
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = FL_SHOW);
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = FL_SHOW);
+    fltk3::e_number = old_event;
     
-    if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
+    if (w->modal()) { fltk3::modal_ = w; fl_fix_focus(); }
     [localPool release];
   }
 }
@@ -2242,7 +2242,7 @@
 /*
  * Tell the OS what window sizes we want to allow
  */
-void Fl_Window::size_range_() {
+void fltk3::Window::size_range_() {
   int bx, by, bt;
   get_window_frame_sizes(bx, by, bt);
   size_range_set = 1;
@@ -2280,8 +2280,8 @@
  * set the window title bar
  * \todo make the titlebar icon work!
  */
-void Fl_Window::label(const char *name,const char */*iname*/) {
-  Fl_Widget::label(name);
+void fltk3::Window::label(const char *name,const char */*iname*/) {
+  fltk3::Widget::label(name);
   if (shown() || i) {
     q_set_window_title((NSWindow*)i->xid, name);
   }
@@ -2291,9 +2291,9 @@
 /*
  * make a window visible
  */
-void Fl_Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(FL_NORMAL_LABEL);
     align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
   } else {
@@ -2319,14 +2319,14 @@
 /*
  * resize a window
  */
-void Fl_Window::resize(int X,int Y,int W,int H) {
+void fltk3::Window::resize(int X,int Y,int W,int H) {
   int bx, by, bt;
   if ( ! this->border() ) bt = 0;
   else get_window_frame_sizes(bx, by, bt);
   if (W<=0) W = 1; // OS X does not like zero width windows
   if (H<=0) H = 1;
   int is_a_resize = (W != w() || H != h());
-  //  printf("Fl_Window::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
+  //  printf("fltk3::Window::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
   //         X, Y, W, H, is_a_resize, resize_from_system, this);
   if (X != x() || Y != y()) set_flag(FORCE_POSITION);
   else if (!is_a_resize) return;
@@ -2369,20 +2369,20 @@
 /*
  * make all drawing go into this window (called by subclass flush() impl.)
  */
-void Fl_Window::make_current() 
+void fltk3::Window::make_current() 
 {
   Fl_X::q_release_context();
   fl_window = i->xid;
   current_ = this;
   
   int xp = 0, yp = 0;
-  Fl_Window *win = this;
+  fltk3::Window *win = this;
   while ( win ) {
     if ( !win->window() )
       break;
     xp += win->x();
     yp += win->y();
-    win = (Fl_Window*)win->window();
+    win = (fltk3::Window*)win->window();
   }
   
   [[NSView focusView] unlockFocus];
@@ -2392,7 +2392,7 @@
   Fl_Region fl_window_region = XRectangleRegion(0,0,w(),h());
   if ( ! this->window() ) {
     for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext ) {	// clip-out all sub-windows
-      Fl_Window *cw = cx->w;
+      fltk3::Window *cw = cx->w;
       Fl_Region from = fl_window_region;
       fl_window_region = MacRegionMinusRect(from, cw->x(), cw->y(), cw->w(), cw->h() );
       XDestroyRegion(from);
@@ -2417,13 +2417,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(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(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
 }
 
@@ -2462,7 +2462,7 @@
   CGContextRestoreGState(fl_gc); // matches the CGContextSaveGState of make_current
   fl_gc = 0;
 #if defined(USE_CAIRO)
-  if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_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
 }
 
@@ -2523,7 +2523,7 @@
 const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
 
 // clipboard variables definitions :
-Fl_Widget *fl_selection_requestor = 0;
+fltk3::Widget *fl_selection_requestor = 0;
 char *fl_selection_buffer[2];
 int fl_selection_length[2];
 static int fl_selection_buffer_length[2];
@@ -2541,7 +2541,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];
@@ -2564,7 +2564,7 @@
 }
 
 // Call this when a "paste" operation happens:
-void Fl::paste(Fl_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;
@@ -2624,13 +2624,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(FL_PASTE);
 }
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
 {
   // check, if this timer slot exists already
   for (int i = 0; i < mac_timer_used; ++i) {
@@ -2679,13 +2679,13 @@
   }
 }
 
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::repeat_timeout(double time, Fl_Timeout_Handler 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(Fl_Timeout_Handler cb, void* data)
 {
   for (int i = 0; i < mac_timer_used; ++i) {
     MacTimeout& t = mac_timers[i];
@@ -2696,7 +2696,7 @@
   return 0;
 }
 
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
+void fltk3::remove_timeout(Fl_Timeout_Handler cb, void* data)
 {
   for (int i = 0; i < mac_timer_used; ++i) {
     MacTimeout& t = mac_timers[i];
@@ -2746,14 +2746,14 @@
   p->xidChildren = x;
 }
 
-void MacDestroyWindow(Fl_Window *w, void *p) {
+void MacDestroyWindow(fltk3::Window *w, void *p) {
   if (w && !w->parent() && p) {
     [[(NSWindow *)p contentView] release];
     [(NSWindow *)p close];
   }
 }
 
-void MacMapWindow(Fl_Window *w, void *p) {
+void MacMapWindow(fltk3::Window *w, void *p) {
   if (w && p) {
     [(NSWindow *)p orderFront:nil];
   }
@@ -2764,7 +2764,7 @@
   }
 }
 
-void MacUnmapWindow(Fl_Window *w, void *p) {
+void MacUnmapWindow(fltk3::Window *w, void *p) {
   if (w && !w->parent() && p) {
     [(NSWindow *)p orderOut:nil];
   }
@@ -2844,7 +2844,7 @@
   return outr;
 }
 
-void MacCollapseWindow(Window w)
+void MacCollapseWindow(NativeWindow w)
 {
   [(NSWindow*)w miniaturize:nil];
 }
@@ -2974,7 +2974,7 @@
   Fl_Printer printer;
   //Fl_PSfile_Device printer;
   int w, h;
-  Fl_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;
@@ -3370,10 +3370,10 @@
   [mypasteboard declareTypes:[NSArray arrayWithObjects:@"public.utf8-plain-text", nil] owner:nil];
   [mypasteboard setData:(NSData*)text forType:@"public.utf8-plain-text"];
   CFRelease(text);
-  Fl_Widget *w = Fl::pushed();
-  Fl_Window *win = w->window();
+  fltk3::Widget *w = fltk3::pushed();
+  fltk3::Window *win = w->window();
   if (win == NULL) {
-    win = (Fl_Window*)w;
+    win = (fltk3::Window*)w;
   } else { 
     while(win->window()) win = win->window();
   }
@@ -3397,16 +3397,16 @@
               event:theEvent  pasteboard:mypasteboard  
              source:myview  slideBack:YES];
   if ( w ) {
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = FL_RELEASE);
-    Fl::e_number = old_event;
-    Fl::pushed( 0 );
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = FL_RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
   }
   [localPool release];
   return true;
 }
 
-unsigned char *MACbitmapFromRectOfWindow(Fl_Window *win, int x, int y, int w, int h, int *bytesPerPixel)
+unsigned char *MACbitmapFromRectOfWindow(fltk3::Window *win, int x, int y, int w, int h, int *bytesPerPixel)
 // delete the returned pointer after use
 {
   while(win->window()) {
@@ -3447,7 +3447,7 @@
   delete (unsigned char *)data;
 }
 
-CGImageRef MAC_CGImageFromRectOfWindow(Fl_Window *win, int x, int y, int w, int h)
+CGImageRef MAC_CGImageFromRectOfWindow(fltk3::Window *win, int x, int y, int w, int h)
 // CFRelease the returned CGImageRef after use
 {
   int bpp;
@@ -3463,12 +3463,12 @@
   return img;
 }
 
-void MACsetContainsGLsubwindow(Fl_Window *w) 
+void MACsetContainsGLsubwindow(fltk3::Window *w) 
 {
   [(FLWindow*)Fl_X::i(w)->xid setContainsGLsubwindow:YES];
 }
 
-WindowRef MACwindowRef(Fl_Window *w)
+WindowRef MACwindowRef(fltk3::Window *w)
 {
   return (WindowRef)[(FLWindow*)Fl_X::i(w)->xid windowRef];
 }

Modified: branches/branch-3.0/src/Fl_compose.cxx
===================================================================
--- branches/branch-3.0/src/Fl_compose.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_compose.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -82,18 +82,18 @@
 #endif // !WIN32 && OLD_DEAD_KEY_CODE
 
 #ifndef FL_DOXYGEN
-int Fl::compose_state = 0;
+int fltk3::compose_state = 0;
 #endif
 
 /** Any text editing widget should call this for each FL_KEYBOARD event.
     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
@@ -103,7 +103,7 @@
     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) {
 
   del = 0;
   unsigned char ascii = (unsigned)e_text[0];

Modified: branches/branch-3.0/src/Fl_display.cxx
===================================================================
--- branches/branch-3.0/src/Fl_display.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_display.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_get_key.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 > FL_Button && k <= FL_Button+8)
-    return Fl::event_state(8<<(k-FL_Button));
+    return fltk3::event_state(8<<(k-FL_Button));
   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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_get_key_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -79,14 +79,14 @@
 }
 
 //: 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);
 }
 
 #include <stdio.h>
 
 //: returns true, if that key is pressed right now
-int Fl::get_key(int k) {
+int fltk3::get_key(int k) {
   KeyMap foo;
   GetKeys(foo);
 #ifdef MAC_TEST_FOR_KEYCODES

Modified: branches/branch-3.0/src/Fl_get_key_win32.cxx
===================================================================
--- branches/branch-3.0/src/Fl_get_key_win32.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_get_key_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -29,7 +29,7 @@
 // which are actually X keysyms.  So this has to translate to MSWindows
 // VK_x symbols.
 
-#include <FL/Fl.H>
+#include <FL/fltk3.H>
 #include <FL/x.H>
 
 // convert an Fltk (X) keysym to a MSWindows VK symbol:
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_get_system_colors.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 FL_GRAY is this color
@@ -65,17 +65,17 @@
   double powb = log(b/255.0)/log((FL_GRAY-FL_GRAY_RAMP)/(FL_NUM_GRAY-1.0));
   for (int i = 0; i < FL_NUM_GRAY; i++) {
     double gray = i/(FL_NUM_GRAY-1.0);
-    Fl::set_color(fl_gray_ramp(i),
+    fltk3::set_color(fl_gray_ramp(i),
 		  uchar(pow(gray,powr)*255+.5),
 		  uchar(pow(gray,powg)*255+.5),
 		  uchar(pow(gray,powb)*255+.5));
   }
 }
 /** Changes fl_color(FL_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(FL_FOREGROUND_COLOR,r,g,b);
+  fltk3::set_color(FL_FOREGROUND_COLOR,r,g,b);
 }
 
 /**
@@ -84,21 +84,21 @@
     <P>This call may change fl_color(FL_FOREGROUND_COLOR) if it 
     does not provide sufficient contrast to FL_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(FL_BACKGROUND2_COLOR,r,g,b);
-  Fl::set_color(FL_FOREGROUND_COLOR,
+  fltk3::set_color(FL_BACKGROUND2_COLOR,r,g,b);
+  fltk3::set_color(FL_FOREGROUND_COLOR,
                 get_color(fl_contrast(FL_FOREGROUND_COLOR,FL_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(FL_SELECTION_COLOR,r,g,b);
+  fltk3::set_color(FL_SELECTION_COLOR,r,g,b);
 }
 
 #if defined(WIN32) || defined(__APPLE__)
@@ -139,11 +139,11 @@
   } 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
-    Fl_Window::show(argc,argv) before applying the -fg and -bg
+    fltk3::foreground(), fltk3::background(), and 
+    fltk3::background2().  This is done by
+    fltk3::Window::show(argc,argv) before applying the -fg and -bg
     switches.
     
     <P>On X this reads some common values from the Xdefaults database.
@@ -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, Fl_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,8 +316,8 @@
   return reload_scheme();
 }
 
-int Fl::reload_scheme() {
-  Fl_Window *win;
+int fltk3::reload_scheme() {
+  fltk3::Window *win;
 
   if (scheme_ && !strcasecmp(scheme_, "plastic")) {
     // Update the tile image to match the background color...
@@ -364,7 +364,7 @@
     set_boxtype(_FL_ROUND_DOWN_BOX, FL_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(_FL_ROUND_DOWN_BOX, FL_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(_FL_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_grab.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -34,7 +34,7 @@
 // Events are all sent to the "grab window", which does not even
 // have to be displayed (and in the case of Fl_Menu.cxx it isn't).
 // The system is also told to "grab" events and send them to this app.
-// This also modifies how Fl_Window::show() works, on X it turns on
+// This also modifies how fltk3::Window::show() works, on X it turns on
 // override_redirect, it does similar things on WIN32.
 
 extern void fl_fix_focus(); // in Fl.cxx
@@ -51,7 +51,7 @@
 extern void *fl_capture;
 #endif
 
-void Fl::grab(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_lock.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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_;
+Fl_Awake_Handler *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,7 +81,7 @@
 
 
 /** Adds an awake handler for use in awake(). */
-int Fl::add_awake_handler_(Fl_Awake_Handler func, void *data)
+int fltk3::add_awake_handler_(Fl_Awake_Handler func, void *data)
 {
   int ret = 0;
   lock_ring();
@@ -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_(Fl_Awake_Handler &func, void *&data)
 {
   int ret = 0;
   lock_ring();
@@ -127,15 +127,15 @@
   and have it call a specific function
   See void awake(void* message=0). 
 */
-int Fl::awake(Fl_Awake_Handler func, void *data) {
+int fltk3::awake(Fl_Awake_Handler func, void *data) {
   int ret = add_awake_handler_(func, data);
-  Fl::awake();
+  fltk3::awake();
   return ret;
 }
 
 ////////////////////////////////////////////////////////////////
 // Windows threading...
-/** \fn void Fl::lock()
+/** \fn void 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
@@ -153,7 +153,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
@@ -161,17 +161,17 @@
     
     See also: \ref advanced_multithreading
 */
-/** \fn void Fl::awake(void* msg)
+/** \fn void fltk3::awake(void* msg)
     The awake() method 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.
     
     The second form of awake() registers a function that will be 
     called by the main thread during the next message handling cycle. 
@@ -179,10 +179,10 @@
     and -1 if registration failed. Over a thousand awake callbacks can be
     registered simultaneously.
 
-    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
 */
@@ -230,7 +230,7 @@
   EnterCriticalSection(&cs);
 }
 
-void Fl::lock() {
+void fltk3::lock() {
   if (!main_thread) InitializeCriticalSection(&cs);
 
   lock_function();
@@ -242,11 +242,11 @@
   }
 }
 
-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);
 }
 
@@ -257,10 +257,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;
@@ -303,12 +303,12 @@
 }
 #  endif // PTHREAD_MUTEX_RECURSIVE
 
-void Fl::awake(void* msg) {
+void fltk3::awake(void* msg) {
   write(thread_filedes[1], &msg, sizeof(void*));
 }
 
 static void* thread_message_;
-void* Fl::thread_message() {
+void* fltk3::thread_message() {
   void* r = thread_message_;
   thread_message_ = 0;
   return r;
@@ -318,7 +318,7 @@
   read(fd, &thread_message_, sizeof(void*));
   Fl_Awake_Handler func;
   void *data;
-  while (Fl::get_awake_handler_(func, data)==0) {
+  while (fltk3::get_awake_handler_(func, data)==0) {
     (*func)(data);
   }
 }
@@ -327,10 +327,10 @@
 extern void (*fl_lock_function)();
 extern void (*fl_unlock_function)();
 
-void Fl::lock() {
+void fltk3::lock() {
   if (!thread_filedes[1]) {
     // Initialize thread communication pipe to let threads awake FLTK
-    // from Fl::wait()
+    // from fltk3::wait()
     pipe(thread_filedes);
 
     // Make the write side of the pipe non-blocking to avoid deadlock
@@ -339,9 +339,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], FL_READ, thread_awake_cb);
+    // fltk3::awake() from a thread will "wake up" the main thread in
+    // fltk3::wait().
+    fltk3::add_fd(thread_filedes[0], FL_READ, thread_awake_cb);
 
     // Set lock/unlock functions for this system, using a system-supplied
     // recursive mutex if supported...
@@ -362,7 +362,7 @@
   fl_lock_function();
 }
 
-void Fl::unlock() {
+void fltk3::unlock() {
   fl_unlock_function();
 }
 
@@ -389,7 +389,7 @@
 void lock_ring() {
 }
 
-void Fl::awake(void*) {
+void fltk3::awake(void*) {
 }
 
 #endif // WIN32

Modified: branches/branch-3.0/src/Fl_mac.cxx
===================================================================
--- branches/branch-3.0/src/Fl_mac.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -82,7 +82,7 @@
 #endif /*DEBUG_SELECT*/
 
 // external functions
-extern Fl_Window* fl_find(Window);
+extern fltk3::Window* fl_find(NativeWindow);
 extern void fl_fix_focus();
 
 // forward definition of functions in this file
@@ -100,25 +100,25 @@
 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 Fl_Window* fl_modal_for;       // parent of modal() window
+const fltk3::Window* fl_modal_for;       // parent of modal() window
 Fl_Region fl_window_region = 0;
-Window fl_window;
-Fl_Window *Fl_Window::current_;
+NativeWindow fl_window;
+fltk3::Window *fltk3::Window::current_;
 EventRef fl_os_event;		// last (mouse) event
 
 // forward declarations of variables in this file
 static int got_events = 0;
-static Fl_Window* resize_from_system;
+static fltk3::Window* resize_from_system;
 static CursPtr default_cursor_ptr;
 static Cursor default_cursor;
 static WindowRef fl_os_capture = 0; // the dispatch handler will redirect mose move and drag events to these windows
 
 #if CONSOLIDATE_MOTION
-static Fl_Window* send_motion;
-extern Fl_Window* fl_xmousewin;
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
 #endif
 
 enum { kEventClassFLTK = 'fltk' };
@@ -129,7 +129,7 @@
 {
 }
 
-void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
+void fl_set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
 {
 }
 
@@ -181,9 +181,9 @@
   if ( mods & (controlKey|rightControlKey) ) state |= FL_CTRL;
   if ( mods & (shiftKey|rightShiftKey) ) state |= FL_SHIFT;
   if ( mods & alphaLock ) state |= FL_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 = FL_Meta_L;
-  else if ( mods & kEventKeyModifierNumLockMask ) Fl::e_keysym = FL_Num_Lock;
-  else if ( mods & optionKey ) Fl::e_keysym = FL_Alt_L;
-  else if ( mods & rightOptionKey ) Fl::e_keysym = FL_Alt_R;
-  else if ( mods & controlKey ) Fl::e_keysym = FL_Control_L;
-  else if ( mods & rightControlKey ) Fl::e_keysym = FL_Control_R;
-  else if ( mods & shiftKey ) Fl::e_keysym = FL_Shift_L;
-  else if ( mods & rightShiftKey ) Fl::e_keysym = FL_Shift_R;
-  else if ( mods & alphaLock ) Fl::e_keysym = FL_Caps_Lock;
-  else Fl::e_keysym = 0;
-  //printf( "to sym 0x%08x (%04x)\n", Fl::e_keysym, mods );
+  if ( mods & cmdKey ) fltk3::e_keysym = FL_Meta_L;
+  else if ( mods & kEventKeyModifierNumLockMask ) fltk3::e_keysym = FL_Num_Lock;
+  else if ( mods & optionKey ) fltk3::e_keysym = FL_Alt_L;
+  else if ( mods & rightOptionKey ) fltk3::e_keysym = FL_Alt_R;
+  else if ( mods & controlKey ) fltk3::e_keysym = FL_Control_L;
+  else if ( mods & rightControlKey ) fltk3::e_keysym = FL_Control_R;
+  else if ( mods & shiftKey ) fltk3::e_keysym = FL_Shift_L;
+  else if ( mods & rightShiftKey ) fltk3::e_keysym = FL_Shift_R;
+  else if ( mods & alphaLock ) fltk3::e_keysym = FL_Caps_Lock;
+  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); }
 
 /**
@@ -775,7 +775,7 @@
 #if CONSOLIDATE_MOTION
   if (send_motion && send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(FL_MOVE, fl_xmousewin);
+    fltk3::handle(FL_MOVE, fl_xmousewin);
   }
 #endif
 
@@ -799,7 +799,7 @@
 
 /**
  * event handler for Apple-Q key combination
- * this is also called from the Carbon Window handler after all windows were closed
+ * this is also called from the Carbon NativeWindow handler after all windows were closed
  */
 static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
 {
@@ -807,7 +807,7 @@
 
   while ( Fl_X::first ) {
     Fl_X *x = Fl_X::first;
-    Fl::handle( FL_CLOSE, x->w );
+    fltk3::handle( FL_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
@@ -821,19 +821,19 @@
 
 
 /**
- * Carbon Window handler
+ * Carbon NativeWindow handler
  * This needs to be linked into all new window event handlers
  */
 static pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
 {
   UInt32 kind = GetEventKind( event );
   OSStatus ret = eventNotHandledErr;
-  Fl_Window *window = (Fl_Window*)userData;
-  Fl::first_window(window);
+  fltk3::Window *window = (fltk3::Window*)userData;
+  fltk3::first_window(window);
 
   Rect currentBounds, originalBounds;
   WindowClass winClass;
-  static Fl_Window *activeWindow = 0;
+  static fltk3::Window *activeWindow = 0;
   
   fl_lock_function();
   
@@ -866,22 +866,22 @@
     {
       GetWindowClass( fl_xid( window ), &winClass );
       if ( winClass != kHelpWindowClass ) {	// help windows can't get the focus!
-        Fl::handle( FL_FOCUS, window);
+        fltk3::handle( FL_FOCUS, window);
         activeWindow = window;
       }
-      Fl::handle( FL_SHOW, window);
+      fltk3::handle( FL_SHOW, window);
       mods_to_e_state(GetCurrentKeyModifiers());
     }
     break;
   case kEventWindowHidden:
-    if ( !window->parent() ) Fl::handle( FL_HIDE, window);
+    if ( !window->parent() ) fltk3::handle( FL_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( FL_FOCUS, window);
+        fltk3::handle( FL_FOCUS, window);
         activeWindow = window;
       }
     }
@@ -889,12 +889,12 @@
   case kEventWindowDeactivated:
     if ( window==activeWindow ) 
     {
-      Fl::handle( FL_UNFOCUS, window);
+      fltk3::handle( FL_UNFOCUS, window);
       activeWindow = 0;
     }
     break;
   case kEventWindowClose:
-    Fl::handle( FL_CLOSE, window ); // this might or might not close the window
+    fltk3::handle( FL_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
@@ -925,13 +925,13 @@
   fl_lock_function();
 
   fl_os_event = event;
-  Fl_Window *window = (Fl_Window*)userData;
+  fltk3::Window *window = (fltk3::Window*)userData;
   if ( !window->shown() )
   {
     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( FL_MOUSEWHEEL, window );
+    fltk3::e_dx = -delta;
+    fltk3::e_dy = 0;
+    if ( fltk3::e_dx) fltk3::handle( FL_MOUSEWHEEL, window );
   } else if ( axis == kEventMouseWheelAxisY ) {
-    Fl::e_dx = 0;
-    Fl::e_dy = -delta;
-    if ( Fl::e_dy) Fl::handle( FL_MOUSEWHEEL, window );
+    fltk3::e_dx = 0;
+    fltk3::e_dy = -delta;
+    if ( fltk3::e_dy) fltk3::handle( FL_MOUSEWHEEL, window );
   } else {
     fl_unlock_function();
 
@@ -969,7 +969,7 @@
     FL_BUTTON2|FL_BUTTON1, FL_BUTTON2|FL_BUTTON3, 
     FL_BUTTON2|FL_BUTTON1|FL_BUTTON3
   };
-  Fl::e_state = ( Fl::e_state & 0xff0000 ) | state[ chord & 0x07 ];
+  fltk3::e_state = ( fltk3::e_state & 0xff0000 ) | state[ chord & 0x07 ];
 }
 
 
@@ -985,13 +985,13 @@
   fl_lock_function();
   
   fl_os_event = event;
-  Fl_Window *window = (Fl_Window*)userData;
+  fltk3::Window *window = (fltk3::Window*)userData;
   if ( !window->shown() )
   {
     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 = FL_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 = FL_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 = FL_MOVE; // Fl::handle will convert into FL_DRAG
+      sendEvent = FL_MOVE; // fltk3::handle will convert into FL_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;
   }
@@ -1241,8 +1241,8 @@
 pascal OSStatus carbonTextHandler( 
   EventHandlerCallRef nextHandler, EventRef event, void *userData )
 {
-  Fl_Window *window = (Fl_Window*)userData;
-  Fl::first_window(window);
+  fltk3::Window *window = (fltk3::Window*)userData;
+  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(FL_KEYBOARD, window);
+  fltk3::handle(FL_KEYBOARD, window);
   fl_unlock_function();
   fl_lock_function();
-  Fl::handle(FL_KEYUP, window);
+  fltk3::handle(FL_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;
 }  
 
@@ -1276,8 +1276,8 @@
 {
   static char buffer[32];
   int sendEvent = 0;
-  Fl_Window *window = (Fl_Window*)userData;
-  Fl::first_window(window);
+  fltk3::Window *window = (fltk3::Window*)userData;
+  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 = FL_KEYBOARD;
@@ -1341,18 +1341,18 @@
   case kEventRawKeyUp:
     if ( !sendEvent ) {
       sendEvent = FL_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&FL_CTRL && key<32 && sym<0xff00)
+    else if ( fltk3::e_state&FL_CTRL && key<32 && sym<0xff00)
       sym = key+96;
-    else if ( Fl::e_state&FL_ALT && sym<0xff00) // find the keycap of this key
+    else if ( fltk3::e_state&FL_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 FL_KP_Enter 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 ) ? FL_KEYBOARD : FL_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,11 +1655,11 @@
  * 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 ) 
 {
-  Fl_Window *window = fl_find( xid );
+  fltk3::Window *window = fl_find( xid );
   if ( !window ) return;
   GrafPtr oldPort;
   GetPort( &oldPort );
@@ -1731,7 +1731,7 @@
 /**
  * \todo this is a leftover from OS9 times. Please check how much applies to Carbon!
  */
-int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
   int W, H, xoff, yoff, dx, dy;
   int ret = bx = by = bt = 0;
   if (w->border() && !w->parent()) {
@@ -1854,7 +1854,7 @@
 static char *currDragData = 0L;
 static int currDragSize = 0; 
 static OSErr currDragErr = noErr;
-Fl_Window *fl_dnd_target_window = 0;
+fltk3::Window *fl_dnd_target_window = 0;
 #include <FL/fl_draw.H>
 
 /**
@@ -1979,26 +1979,26 @@
  */
 static pascal OSErr dndTrackingHandler( DragTrackingMessage msg, WindowPtr w, void *userData, DragReference dragRef )
 {
-  Fl_Window *target = (Fl_Window*)userData;
-  Fl::first_window(target);
+  fltk3::Window *target = (fltk3::Window*)userData;
+  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( FL_DND_ENTER, target ) )
+    if ( fltk3::handle( FL_DND_ENTER, target ) )
       fl_cursor( FL_CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
     else
       fl_cursor( FL_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( FL_DND_DRAG, target ) )
+    if ( fltk3::handle( FL_DND_DRAG, target ) )
       fl_cursor( FL_CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
     else
       fl_cursor( FL_CURSOR_DEFAULT ); //HideDragHilite( dragRef );
@@ -2025,7 +2025,7 @@
     fl_cursor( FL_CURSOR_DEFAULT ); //HideDragHilite( dragRef );
     if ( fl_dnd_target_window )
     {
-      Fl::handle( FL_DND_LEAVE, fl_dnd_target_window );
+      fltk3::handle( FL_DND_LEAVE, fl_dnd_target_window );
       fl_dnd_target_window = 0;
     }
     breakMacEventLoop();
@@ -2043,41 +2043,41 @@
   Point mp;
   OSErr ret;
   
-  Fl_Window *target = fl_dnd_target_window = (Fl_Window*)userData;
-  Fl::first_window(target);
+  fltk3::Window *target = fl_dnd_target_window = (fltk3::Window*)userData;
+  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( FL_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( FL_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 = FL_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 = FL_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();
   return noErr;
 }
 // fc:  
-static void  q_set_window_title(Window xid, const char * name ) {
+static void  q_set_window_title(NativeWindow xid, const char * name ) {
 #if 1
     CFStringRef utf8_title = CFStringCreateWithCString(NULL, (name ? name : ""), kCFStringEncodingUTF8);
     SetWindowTitleWithCFString(xid, utf8_title);
@@ -2099,7 +2099,7 @@
  * go ahead, create that (sub)window
  * \todo we should make menu windows slightly transparent for the new Mac look
  */
-void Fl_X::make(Fl_Window* w)
+void Fl_X::make(fltk3::Window* w)
 {
   static int xyPos = 100;
   if ( w->parent() ) // create a subwindow
@@ -2117,7 +2117,7 @@
     x->subRegion = 0;
     x->cursor = fl_default_cursor;
     x->gc = 0; // stay 0 for Quickdraw; fill with CGContext for Quartz
-    Fl_Window *win = w->window();
+    fltk3::Window *win = w->window();
     Fl_X *xo = Fl_X::i(win);
     if (xo) {
       x->xidNext = xo->xidChildren;
@@ -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 = FL_SHOW);
-      Fl::e_number = old_event;
+      int old_event = fltk3::e_number;
+      w->handle(fltk3::e_number = FL_SHOW);
+      fltk3::e_number = old_event;
       w->redraw(); // force draw to happen
     }
     fl_show_iconic = 0;
@@ -2150,7 +2150,7 @@
         winattr |= kWindowFullZoomAttribute | kWindowResizableAttribute | kWindowLiveResizeAttribute;
     } else {
       if (w->resizable()) {
-        Fl_Widget *o = w->resizable();
+        fltk3::Widget *o = w->resizable();
         int minw = o->w(); if (minw > 100) minw = 100;
         int minh = o->h(); if (minh > 100) minh = 100;
         w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
@@ -2177,14 +2177,14 @@
       wp += 2*bx;
       hp += 2*by+bt;
     }
-    if (!(w->flags() & Fl_Widget::FORCE_POSITION)) {
+    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);
       }
@@ -2194,7 +2194,7 @@
 
     if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
       // find some other window to be "transient for":
-      Fl_Window* w = Fl_X::first->w;
+      fltk3::Window* w = Fl_X::first->w;
       while (w->parent()) w = w->window(); // todo: this code does not make any sense! (w!=w??)
     }
 
@@ -2224,7 +2224,7 @@
       SetWindowClass(x->xid, kFloatingWindowClass);
       SetWindowActivationScope(x->xid, kWindowActivationScopeAll);
     }
-    if (!(w->flags() & Fl_Widget::FORCE_POSITION))
+    if (!(w->flags() & fltk3::Widget::FORCE_POSITION))
     {
       WindowRef pw = Fl_X::first ? Fl_X::first->xid : 0 ;
       if (w->modal()) {
@@ -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 = FL_SHOW);
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = FL_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(); }
   }
 }
 
@@ -2324,7 +2324,7 @@
 /**
  * Tell the OS what window sizes we want to allow
  */
-void Fl_Window::size_range_() {
+void fltk3::Window::size_range_() {
   size_range_set = 1;
   HISize minSize = { minw, minh };
   HISize maxSize = { maxw?maxw:32000, maxh?maxh:32000 };
@@ -2359,8 +2359,8 @@
  * set the window title bar
  * \todo make the titlebar icon work!
  */
-void Fl_Window::label(const char *name,const char */*iname*/) {
-  Fl_Widget::label(name);
+void fltk3::Window::label(const char *name,const char */*iname*/) {
+  fltk3::Widget::label(name);
 
   if (shown() || i) {
     q_set_window_title(fl_xid(this), name);
@@ -2371,9 +2371,9 @@
 /**
  * make a window visible
  */
-void Fl_Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(FL_NORMAL_LABEL);
     align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
   } else {
@@ -2398,7 +2398,7 @@
 /**
  * resize a window
  */
-void Fl_Window::resize(int X,int Y,int W,int H) {
+void fltk3::Window::resize(int X,int Y,int W,int H) {
   if (W<=0) W = 1; // OS X does not like zero width windows
   if (H<=0) H = 1;
   int is_a_resize = (W != w() || H != h());
@@ -2440,7 +2440,7 @@
 /**
  * make all drawing go into this window (called by subclass flush() impl.)
  */
-void Fl_Window::make_current() 
+void fltk3::Window::make_current() 
 {
   OSStatus err;
   Fl_X::q_release_context();
@@ -2452,14 +2452,14 @@
   SetPort( GetWindowPort(i->xid) ); // \todo check for the handling of doublebuffered windows
 
   int xp = 0, yp = 0;
-  Fl_Window *win = this;
+  fltk3::Window *win = this;
   while ( win ) 
   {
     if ( !win->window() )
       break;
     xp += win->x();
     yp += win->y();
-    win = (Fl_Window*)win->window();
+    win = (fltk3::Window*)win->window();
   }
   SetOrigin( -xp, -yp );
   
@@ -2468,7 +2468,7 @@
   // \todo for performance reasons: we don't have to create this unless the child windows moved
   for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext )
   {
-    Fl_Window *cw = cx->w;
+    fltk3::Window *cw = cx->w;
     if (!cw->visible_r()) continue;
     Fl_Region r = NewRgn();
     SetRectRgn( r, cw->x() - xp, cw->y() - yp, 
@@ -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((Fl_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
 }
 
@@ -2580,7 +2580,7 @@
 const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
 
 // clipboard variables definitions :
-Fl_Widget *fl_selection_requestor = 0;
+fltk3::Widget *fl_selection_requestor = 0;
 char *fl_selection_buffer[2];
 int fl_selection_length[2];
 static int fl_selection_buffer_length[2];
@@ -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(Fl_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(FL_PASTE);
 }
 
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
+void fltk3::add_timeout(double time, Fl_Timeout_Handler 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, Fl_Timeout_Handler 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(Fl_Timeout_Handler 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(Fl_Timeout_Handler cb, void* data)
 {
    for (int i = 0;  i < mac_timer_used;  ++i) {
         MacTimeout& t = mac_timers[i];
@@ -2841,13 +2841,13 @@
   p->xidChildren = x;
 }
 
-void MacDestroyWindow(Fl_Window *w, WindowPtr p) {
+void MacDestroyWindow(fltk3::Window *w, WindowPtr p) {
   MacUnmapWindow(w, p);
   if (w && !w->parent() && p)
     DisposeWindow(p);
 }
 
-void MacMapWindow(Fl_Window *w, WindowPtr p) {
+void MacMapWindow(fltk3::Window *w, WindowPtr p) {
   if (w && p)
     ShowWindow(p);
   //+ link to window list
@@ -2857,7 +2857,7 @@
   }
 }
 
-void MacUnmapWindow(Fl_Window *w, WindowPtr p) {
+void MacUnmapWindow(fltk3::Window *w, WindowPtr p) {
   if (w && !w->parent() && p) 
     HideWindow(p);
   if (w && Fl_X::i(w)) 

Modified: branches/branch-3.0/src/Fl_own_colormap.cxx
===================================================================
--- branches/branch-3.0/src/Fl_own_colormap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_own_colormap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -37,7 +37,7 @@
 #include <FL/Fl.H>
 #include <FL/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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_visual.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -31,7 +31,7 @@
 #include <FL/Fl.H>
 #include <FL/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(FL_RGB)
+    <LI>fltk3::visual(FL_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(FL_RGB8)
+    <LI>fltk3::visual(FL_RGB8)
     <BR>Full color with at least 24 bits of color. FL_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(FL_DOUBLE|FL_INDEX)
+    <LI>fltk3::visual(FL_DOUBLE|FL_INDEX)
     <BR>Hardware double buffering.  Call this if you are going to use 
     Fl_Double_Window.
     <BR>&nbsp; </LI>
-    <LI>Fl::visual(FL_DOUBLE|FL_RGB)</LI>
-    <LI>Fl::visual(FL_DOUBLE|FL_RGB8)
+    <LI>fltk3::visual(FL_DOUBLE|FL_RGB)</LI>
+    <LI>fltk3::visual(FL_DOUBLE|FL_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 & FL_DOUBLE) return 0;
   if (!(flags & FL_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 & FL_DOUBLE) return 0;
 #endif

Modified: branches/branch-3.0/src/Fl_win32.cxx
===================================================================
--- branches/branch-3.0/src/Fl_win32.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -114,7 +114,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");
   }
@@ -141,7 +141,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");
@@ -178,7 +178,7 @@
 # define USE_TRACK_MOUSE
 #endif // NO_TRACK_MOUSE
 
-static Fl_Window *track_mouse_win=0;	// current TrackMouseEvent() window
+static fltk3::Window *track_mouse_win=0;	// current TrackMouseEvent() window
 
 // USE_CAPTURE_MOUSE_WIN - this must be defined for TrackMouseEvent to work
 // correctly with subwindows - otherwise a single mouse click and release
@@ -238,7 +238,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 FL_READ, FL_WRITE, and
-// FL_EXCEPT, as defined for use in Fl::add_fd().
+// FL_EXCEPT, as defined for use in fltk3::add_fd().
 //
 static int maxfd = 0;
 static fd_set fdsets[3];
@@ -262,10 +262,10 @@
 {
 }
 
-void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
+void fl_set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
 {
   if (!win) return;
-  Fl_Window* tw = win;
+  fltk3::Window* tw = win;
   while (tw->parent()) tw = tw->window(); // find top level window
 
   get_imm_module();
@@ -286,7 +286,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) {
@@ -304,11 +304,11 @@
   if (n > maxfd) maxfd = n;
 }
 
-void Fl::add_fd(int fd, void (*cb)(int, void*), void* v) {
-  Fl::add_fd(fd, FL_READ, cb, v);
+void fltk3::add_fd(int fd, void (*cb)(int, void*), void* v) {
+  fltk3::add_fd(fd, FL_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) {
@@ -329,17 +329,17 @@
   if (events & FL_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;
@@ -360,9 +360,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;
   }
   
@@ -392,12 +392,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();
@@ -418,7 +418,7 @@
 	thread_message_ = (void*)fl_msg.wParam;
         Fl_Awake_Handler func;
         void *data;
-        while (Fl::get_awake_handler_(func, data)==0) {
+        while (fltk3::get_awake_handler_(func, data)==0) {
           func(data);
         }
       }
@@ -428,7 +428,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;
@@ -448,7 +448,7 @@
 
 ////////////////////////////////////////////////////////////////
 
-int Fl::x()
+int fltk3::x()
 {
   RECT r;
 
@@ -456,7 +456,7 @@
   return r.left;
 }
 
-int Fl::y()
+int fltk3::y()
 {
   RECT r;
 
@@ -464,7 +464,7 @@
   return r.top;
 }
 
-int Fl::h()
+int fltk3::h()
 {
   RECT r;
 
@@ -472,7 +472,7 @@
   return r.bottom - r.top;
 }
 
-int Fl::w()
+int fltk3::w()
 {
   RECT r;
 
@@ -480,7 +480,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;
@@ -542,7 +542,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)
@@ -580,7 +580,7 @@
 }
 
 // Call this when a "paste" operation happens:
-void Fl::paste(Fl_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
@@ -589,41 +589,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(FL_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(FL_PASTE);
       GlobalUnlock(h);
-      free(Fl::e_text);
-      Fl::e_text = 0;
+      free(fltk3::e_text);
+      fltk3::e_text = 0;
     }
     CloseClipboard();
   }
@@ -650,26 +650,26 @@
 
 HWND fl_capture;
 
-static int mouse_event(Fl_Window *window, int what, int button,
+static int mouse_event(fltk3::Window *window, int what, int button,
 		       WPARAM wParam, LPARAM lParam)
 {
   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
-  Fl_Window *mouse_window = window;	// save "mouse window"
+  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 |= FL_SHIFT;
@@ -678,36 +678,36 @@
   if (wParam & MK_LBUTTON) state |= FL_BUTTON1;
   if (wParam & MK_MBUTTON) state |= FL_BUTTON2;
   if (wParam & MK_RBUTTON) state |= FL_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 = FL_Button + button;
-    Fl::e_is_click = 1;
-    px = pmx = Fl::e_x_root; py = pmy = Fl::e_y_root;
-    return Fl::handle(FL_PUSH,window);
+    fltk3::e_keysym = FL_Button + button;
+    fltk3::e_is_click = 1;
+    px = pmx = fltk3::e_x_root; py = pmy = fltk3::e_y_root;
+    return fltk3::handle(FL_PUSH,window);
 
   case 2: // release:
     if (!fl_capture) ReleaseCapture();
-    Fl::e_keysym = FL_Button + button;
-    return Fl::handle(FL_RELEASE,window);
+    fltk3::e_keysym = FL_Button + button;
+    return fltk3::handle(FL_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(FL_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(FL_MOVE,window);
 
   }
 }
@@ -820,7 +820,7 @@
 /// END TIMERS
 /////////////////////////////////////////////////////////////////////////////
 
-static Fl_Window* resize_bug_fix;
+static fltk3::Window* resize_bug_fix;
 
 extern void fl_save_pen(void);
 extern void fl_restore_pen(void);
@@ -838,15 +838,15 @@
   //fl_msg.pt = ???
   //fl_msg.lPrivate = ???
 
-  Fl_Window *window = fl_find(hWnd);
+  fltk3::Window *window = fl_find(hWnd);
 
   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(FL_CLOSE, window);
+    fltk3::handle(FL_CLOSE, window);
     PostQuitMessage(0);
     return 0;
 
@@ -888,7 +888,7 @@
 
     window->clear_damage((uchar)(window->damage()|FL_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...
@@ -924,26 +924,26 @@
 
   case WM_MOUSELEAVE:
     if (track_mouse_win == window) { // we left the top level window !
-      Fl_Window *tw = window;
+      fltk3::Window *tw = window;
       while (tw->parent()) tw = tw->window(); // find top level window
-      Fl::belowmouse(0);
-      Fl::handle(FL_LEAVE, tw);
+      fltk3::belowmouse(0);
+      fltk3::handle(FL_LEAVE, tw);
     }
     track_mouse_win = 0; // force TrackMouseEvent() restart
     break;
 
   case WM_SETFOCUS:
-    Fl::handle(FL_FOCUS, window);
+    fltk3::handle(FL_FOCUS, window);
     break;
 
   case WM_KILLFOCUS:
-    Fl::handle(FL_UNFOCUS, window);
-    Fl::flush(); // it never returns to main loop when deactivated...
+    fltk3::handle(FL_UNFOCUS, window);
+    fltk3::flush(); // it never returns to main loop when deactivated...
     break;
 
   case WM_SHOWWINDOW:
     if (!window->parent()) {
-      Fl::handle(wParam ? FL_SHOW : FL_HIDE, window);
+      fltk3::handle(wParam ? FL_SHOW : FL_HIDE, window);
     }
     break;
 
@@ -963,7 +963,7 @@
       if (GetAsyncKeyState(VK_SHIFT)&~1) state |= FL_SHIFT;
       if (GetAsyncKeyState(VK_MENU)) state |= FL_ALT;
       if ((GetAsyncKeyState(VK_LWIN)|GetAsyncKeyState(VK_RWIN))&~1) state |= FL_META;
-      Fl::e_state = state;
+      fltk3::e_state = state;
       return 0;
     }
     break;
@@ -986,7 +986,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))
     {
@@ -998,7 +998,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 |= FL_SHIFT;
     if (GetKeyState(VK_CAPITAL)) state |= FL_CAPS_LOCK;
@@ -1015,85 +1015,85 @@
 	state |= FL_META;
     }
     if (GetKeyState(VK_SCROLL)) state |= FL_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 >= FL_KP && Fl::e_keysym <= FL_KP_Last) {
+    } else if (fltk3::e_keysym >= FL_KP && fltk3::e_keysym <= FL_KP_Last) {
       if (state & FL_NUM_LOCK) {
         // Convert to regular keypress...
-	buffer[0] = Fl::e_keysym-FL_KP;
-	Fl::e_length = 1;
+	buffer[0] = fltk3::e_keysym-FL_KP;
+	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 FL_KP + '0' :
-	    Fl::e_keysym = FL_Insert;
+	    fltk3::e_keysym = FL_Insert;
 	    break;
 	  case FL_KP + '1' :
-	    Fl::e_keysym = FL_End;
+	    fltk3::e_keysym = FL_End;
 	    break;
 	  case FL_KP + '2' :
-	    Fl::e_keysym = FL_Down;
+	    fltk3::e_keysym = FL_Down;
 	    break;
 	  case FL_KP + '3' :
-	    Fl::e_keysym = FL_Page_Down;
+	    fltk3::e_keysym = FL_Page_Down;
 	    break;
 	  case FL_KP + '4' :
-	    Fl::e_keysym = FL_Left;
+	    fltk3::e_keysym = FL_Left;
 	    break;
 	  case FL_KP + '6' :
-	    Fl::e_keysym = FL_Right;
+	    fltk3::e_keysym = FL_Right;
 	    break;
 	  case FL_KP + '7' :
-	    Fl::e_keysym = FL_Home;
+	    fltk3::e_keysym = FL_Home;
 	    break;
 	  case FL_KP + '8' :
-	    Fl::e_keysym = FL_Up;
+	    fltk3::e_keysym = FL_Up;
 	    break;
 	  case FL_KP + '9' :
-	    Fl::e_keysym = FL_Page_Up;
+	    fltk3::e_keysym = FL_Page_Up;
 	    break;
 	  case FL_KP + '.' :
-	    Fl::e_keysym = FL_Delete;
+	    fltk3::e_keysym = FL_Delete;
 	    break;
 	  case FL_KP + '/' :
 	  case FL_KP + '*' :
 	  case FL_KP + '-' :
 	  case FL_KP + '+' :
-	    buffer[0] = Fl::e_keysym-FL_KP;
-	    Fl::e_length = 1;
+	    buffer[0] = fltk3::e_keysym-FL_KP;
+	    fltk3::e_length = 1;
 	    break;
 	}
       }
     } else if ((lParam & (1<<31))==0){
       buffer[0] = 0;
-      Fl::e_length = 0;
+      fltk3::e_length = 0;
     }
-    Fl::e_text = buffer;
+    fltk3::e_text = buffer;
     if (lParam & (1<<31)) { // key up events.
-      if (Fl::handle(FL_KEYUP, window)) return 0;
+      if (fltk3::handle(FL_KEYUP, window)) return 0;
       break;
     }
     // for (int i = lParam&0xff; i--;)
     while (window->parent()) window = window->window();
-    if (Fl::handle(FL_KEYBOARD,window)) return 0;
+    if (fltk3::handle(FL_KEYBOARD,window)) return 0;
     break;}
 
   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(FL_MOUSEWHEEL, window);
+    fltk3::e_dy = -delta / WHEEL_DELTA;
+    delta += fltk3::e_dy * WHEEL_DELTA;
+    if (fltk3::e_dy) fltk3::handle(FL_MOUSEWHEEL, window);
     return 0;
   }
 
@@ -1104,9 +1104,9 @@
   case WM_SIZE:
     if (!window->parent()) {
       if (wParam == SIZE_MINIMIZED || wParam == SIZE_MAXHIDE) {
-	Fl::handle(FL_HIDE, window);
+	fltk3::handle(FL_HIDE, window);
       } else {
-	Fl::handle(FL_SHOW, window);
+	fltk3::handle(FL_SHOW, window);
 	resize_bug_fix = window;
 	window->size(LOWORD(lParam), HIWORD(lParam));
       }
@@ -1180,7 +1180,7 @@
     return 1;}
 
   default:
-    if (Fl::handle(0,0)) return 0;
+    if (fltk3::handle(0,0)) return 0;
     break;
   }
 
@@ -1199,7 +1199,7 @@
 //   1   |  fix   |   yes
 //   2   |  size  |   yes
 
-int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
+int Fl_X::fake_X_wm(const fltk3::Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
   int W, H, xoff, yoff, dx, dy;
   int ret = bx = by = bt = 0;
 
@@ -1270,7 +1270,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
@@ -1291,7 +1291,7 @@
 
 ////////////////////////////////////////////////////////////////
 
-void Fl_Window::resize(int X,int Y,int W,int H) {
+void fltk3::Window::resize(int X,int Y,int W,int H) {
   UINT flags = SWP_NOSENDCHANGING | SWP_NOZORDER 
              | SWP_NOACTIVATE | SWP_NOOWNERZORDER;
   int is_a_resize = (W != w() || H != h());
@@ -1370,15 +1370,15 @@
   int nName, NName;
 };
 
-void fl_fix_focus(); // in Fl.cxx
+void fl_fix_focus(); // in fltk3.cxx
 
-char fl_show_iconic;	// hack for Fl_Window::iconic()
+char fl_show_iconic;	// hack for fltk3::Window::iconic()
 // int fl_background_pixel = -1; // color to use for background
 HCURSOR fl_default_cursor;
 UINT fl_wake_msg = 0;
 int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
 
-Fl_X* Fl_X::make(Fl_Window* w) {
+Fl_X* Fl_X::make(fltk3::Window* w) {
   Fl_Group::current(0); // get rid of very common user bug: forgot end()
 
   // if the window is a subwindow and our parent is not mapped yet, we
@@ -1421,7 +1421,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(FL_GRAY,r,g,b);
+    //uchar r,g,b; fltk3::get_color(FL_GRAY,r,g,b);
     //wc.hbrBackground = (HBRUSH)CreateSolidBrush(RGB(r,g,b));
     wcw.hbrBackground = NULL;
     wcw.lpszMenuName = NULL;
@@ -1453,7 +1453,7 @@
   } else {
     if (!w->size_range_set) {
       if (w->resizable()) {
-	Fl_Widget *o = w->resizable();
+	fltk3::Widget *o = w->resizable();
 	int minw = o->w(); if (minw > 100) minw = 100;
 	int minh = o->h(); if (minh > 100) minh = 100;
 	w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
@@ -1483,7 +1483,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);
       }
@@ -1494,11 +1494,11 @@
     parent = 0;
     if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
       // find some other window to be "transient for":
-      Fl_Window* w = Fl_X::first->w;
+      fltk3::Window* w = Fl_X::first->w;
       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;
@@ -1539,15 +1539,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 = FL_SHOW); // get child windows to appear
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = FL_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 loose 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);
 
   // Drag-n-drop requires GCC 3.x or a non-GNU compiler...
 #if !defined(__GNUC__) || __GNUC__ >= 3
@@ -1568,7 +1568,7 @@
   }
 #endif // !__GNUC__ || __GNUC__ >= 3
 
-  if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
+  if (w->modal()) {fltk3::modal_ = w; fl_fix_focus();}
   return x;
 }
 
@@ -1605,12 +1605,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, Fl_Timeout_Handler 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, Fl_Timeout_Handler cb, void* data)
 {
   int timer_id = -1;
   for (int i = 0;  i < win32_timer_used;  ++i) {
@@ -1660,7 +1660,7 @@
     SetTimer(s_TimerWnd, timer_id + 1, elapsed, NULL);
 }
 
-int Fl::has_timeout(Fl_Timeout_Handler cb, void* data)
+int fltk3::has_timeout(Fl_Timeout_Handler cb, void* data)
 {
   for (int i = 0;  i < win32_timer_used;  ++i) {
     Win32Timer& t = win32_timers[i];
@@ -1671,7 +1671,7 @@
   return 0;
 }
 
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
+void fltk3::remove_timeout(Fl_Timeout_Handler cb, void* data)
 {
   int i;
   for (i = 0;  i < win32_timer_used;  ++i) {
@@ -1692,7 +1692,7 @@
 
 HINSTANCE fl_display = GetModuleHandle(NULL);
 
-void Fl_Window::size_range_() {
+void fltk3::Window::size_range_() {
   size_range_set = 1;
 }
 
@@ -1731,8 +1731,8 @@
   return q;
 }
 
-void Fl_Window::label(const char *name,const char *iname) {
-  Fl_Widget::label(name);
+void fltk3::Window::label(const char *name,const char *iname) {
+  fltk3::Widget::label(name);
   iconlabel_ = iname;
   if (shown() && !parent()) {
     if (!name) name = "";
@@ -1750,7 +1750,7 @@
 }
 
 ////////////////////////////////////////////////////////////////
-// Implement the virtual functions for the base Fl_Window class:
+// Implement the virtual functions for the base fltk3::Window class:
 
 // If the box is a filled rectangle, we can make the redisplay *look*
 // faster by using X's background pixel erasing.  We can make it
@@ -1760,12 +1760,12 @@
 // I use FL_GRAY for this and only do this cheat for windows that are
 // that color.
 // Actually it is totally disabled.
-// Fl_Widget *fl_boxcheat;
+// fltk3::Widget *fl_boxcheat;
 //static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
 
-void Fl_Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(FL_NORMAL_LABEL);
     align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
   } else {
@@ -1787,7 +1787,7 @@
 #endif
 }
 
-Fl_Window *Fl_Window::current_;
+fltk3::Window *fltk3::Window::current_;
 // the current context
 HDC fl_gc = 0;
 // the current window handle, initially set to -1 so we can correctly
@@ -1811,7 +1811,7 @@
 }
 
 // make X drawing go into this window (called by subclass flush() impl.)
-void Fl_Window::make_current() {
+void fltk3::Window::make_current() {
   fl_GetDC(fl_xid(this));
 
 #if USE_COLORMAP
@@ -1830,7 +1830,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)
 {
@@ -1937,11 +1937,11 @@
 // contains also preparePrintFront call above
 #include <FL/Fl_Printer.H>
 #include <FL/Fl_Button.H>
-void printFront(Fl_Widget *o, void *data)
+void printFront(fltk3::Widget *o, void *data)
 {
   Fl_Printer printer;
   o->window()->hide();
-  Fl_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; }
@@ -1976,7 +1976,7 @@
   static BOOL first=TRUE;
   if(!first) return;
   first=FALSE;
-  static Fl_Window w(0,0,120,30);
+  static fltk3::Window w(0,0,120,30);
   static Fl_Button b(0,0,w.w(),w.h(), "Print front window");
   b.callback(printFront);
   w.end();

Modified: branches/branch-3.0/src/Fl_x.cxx
===================================================================
--- branches/branch-3.0/src/Fl_x.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/Fl_x.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -92,7 +92,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) {
@@ -130,11 +130,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;
   maxfd = -1; // recalculate maxfd on the fly
   for (i=j=0; i<nfds; i++) {
@@ -169,13 +169,13 @@
 #  endif
 }
 
-void Fl::remove_fd(int n) {
+void fltk3::remove_fd(int n) {
   remove_fd(n, -1);
 }
 
 #if CONSOLIDATE_MOTION
-static Fl_Window* send_motion;
-extern Fl_Window* fl_xmousewin;
+static fltk3::Window* send_motion;
+extern fltk3::Window* fl_xmousewin;
 #endif
 static bool in_a_window; // true if in any of our windows, even destroyed ones
 static void do_queued_events() {
@@ -186,16 +186,16 @@
     fl_handle(xevent);
   }
   // we send FL_LEAVE only if the mouse did not enter some other window:
-  if (!in_a_window) Fl::handle(FL_LEAVE, 0);
+  if (!in_a_window) fltk3::handle(FL_LEAVE, 0);
 #if CONSOLIDATE_MOTION
   else if (send_motion == fl_xmousewin) {
     send_motion = 0;
-    Fl::handle(FL_MOVE, fl_xmousewin);
+    fltk3::handle(FL_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;
@@ -277,7 +277,7 @@
 ////////////////////////////////////////////////////////////////
 
 Display *fl_display;
-Window fl_message_window = 0;
+NativeWindow fl_message_window = 0;
 int fl_screen;
 XVisualInfo *fl_visual;
 Colormap fl_colormap;
@@ -312,7 +312,7 @@
 
 extern "C" {
   static int io_error_handler(Display*) {
-    Fl::fatal("X I/O error");
+    fltk3::fatal("X I/O error");
     return 0;
   }
 
@@ -321,7 +321,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;
   }
 }
@@ -429,7 +429,7 @@
   //if (fl_xim_ic) XUnsetICFocus(fl_xim_ic);
 }
 
-void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
+void fl_set_spot(int font, int size, int X, int Y, int W, int H, fltk3::Window *win)
 {
   int change = 0;
   XVaNestedList preedit_attr;
@@ -520,20 +520,20 @@
     XGetIMValues (fl_xim_im, XNQueryInputStyle,
                   &xim_styles, NULL, NULL);
   } else {
-    Fl::warning("XOpenIM() failed\n");
+    fltk3::warning("XOpenIM() failed\n");
     return;
   }
 
   if (xim_styles && xim_styles->count_styles) {
     fl_new_ic();
    } else {
-     Fl::warning("No XIM style found\n");
+     fltk3::warning("No XIM style found\n");
      XCloseIM(fl_xim_im);
      fl_xim_im = NULL;
      return;
   }
   if (!fl_xim_ic) {
-    Fl::warning("XCreateIC() failed\n");
+    fltk3::warning("XCreateIC() failed\n");
     XCloseIM(fl_xim_im);
     XFree(xim_styles);
     fl_xim_im = NULL;
@@ -551,7 +551,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);
 }
@@ -580,7 +580,7 @@
   fl_XaUtf8String       = XInternAtom(d, "UTF8_STRING",         0);
   fl_XaTextUriList      = XInternAtom(d, "text/uri-list",       0);
 
-  Fl::add_fd(ConnectionNumber(d), POLLIN, fd_callback);
+  fltk3::add_fd(ConnectionNumber(d), POLLIN, fd_callback);
 
   fl_screen = DefaultScreen(d);
 
@@ -595,12 +595,12 @@
   fl_init_xim();
 
 #if !USE_COLORMAP
-  Fl::visual(FL_RGB);
+  fltk3::visual(FL_RGB);
 #endif
 }
 
 void fl_close_display() {
-  Fl::remove_fd(ConnectionNumber(fl_display));
+  fltk3::remove_fd(ConnectionNumber(fl_display));
   XCloseDisplay(fl_display);
 }
 
@@ -636,30 +636,30 @@
   }
 }
 
-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;
+  NativeWindow root = RootWindow(fl_display, fl_screen);
+  NativeWindow c; int mx,my,cx,cy; unsigned int mask;
   XQueryPointer(fl_display,root,&root,&c,&mx,&my,&cx,&cy,&mask);
   xx = mx;
   yy = my;
@@ -668,21 +668,21 @@
 ////////////////////////////////////////////////////////////////
 // Code used for paste and DnD into the program:
 
-Fl_Widget *fl_selection_requestor;
+fltk3::Widget *fl_selection_requestor;
 char *fl_selection_buffer[2];
 int fl_selection_length[2];
 int fl_selection_buffer_length[2];
 char fl_i_own_selection[2] = {0,0};
 
 // Call this when a "paste" operation happens:
-void Fl::paste(Fl_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 FL_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(FL_PASTE);
     return;
   }
@@ -690,16 +690,16 @@
   fl_selection_requestor = &receiver;
   Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
   XConvertSelection(fl_display, property, fl_XaUtf8String, property,
-                    fl_xid(Fl::first_window()), fl_event_time);
+                    fl_xid(fltk3::first_window()), fl_event_time);
 }
 
-Window fl_dnd_source_window;
+NativeWindow fl_dnd_source_window;
 Atom *fl_dnd_source_types; // null-terminated list of data types being supplied
 Atom fl_dnd_type;
 Atom fl_dnd_source_action;
 Atom fl_dnd_action;
 
-void fl_sendClientMessage(Window window, Atom message,
+void fl_sendClientMessage(NativeWindow window, Atom message,
                                  unsigned long d0,
                                  unsigned long d1=0,
                                  unsigned long d2=0,
@@ -722,7 +722,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];
@@ -742,7 +742,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:
 
@@ -753,36 +753,36 @@
 #  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 |= FL_META;
+  if (fl_key_vector[18]&0x18) fltk3::e_state |= FL_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;
 }
 
-static Fl_Window* resize_bug_fix;
+static fltk3::Window* resize_bug_fix;
 
 ////////////////////////////////////////////////////////////////
 
@@ -793,9 +793,9 @@
 {
   XEvent xevent = thisevent;
   fl_xevent = &thisevent;
-  Window xid = xevent.xany.window;
+  NativeWindow xid = xevent.xany.window;
   int filtered = 0;
-  static Window xim_win = 0;
+  static NativeWindow xim_win = 0;
 
   if (fl_xim_ic && xevent.type == DestroyNotify &&
         xid != xim_win && !fl_find(xid))
@@ -830,8 +830,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()) {
+      NativeWindow x  = fl_xid(fltk3::first_window());
       if (x != xim_win) {
         xim_win  = x;
         XSetICValues(fl_xim_ic,
@@ -896,11 +896,11 @@
       buffer[bytesread] = 0;
       if (!remaining) break;
     }
-    Fl::e_text = buffer ? (char*)buffer : (char *)"";
-    Fl::e_length = bytesread;
-    int old_event = Fl::e_number;
-    fl_selection_requestor->handle(Fl::e_number = FL_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 = FL_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
@@ -962,7 +962,7 @@
   }
 
   int event = 0;
-  Fl_Window* window = fl_find(xid);
+  fltk3::Window* window = fl_find(xid);
 
   if (window) switch (xevent.type) {
 
@@ -1022,26 +1022,26 @@
         fl_dnd_type = fl_dnd_source_types[0];
 
       event = FL_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(FL_DND_DRAG, window);
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      int accept = fltk3::handle(FL_DND_DRAG, window);
       fl_sendClientMessage(data[0], fl_XdndStatus,
                            fl_xevent->xclient.window,
                            accept ? 1 : 0,
@@ -1053,8 +1053,8 @@
     } else if (message == fl_XdndLeave) {
       fl_dnd_source_window = 0; // don't send a finished message to it
       event = FL_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) {
@@ -1062,11 +1062,11 @@
       in_a_window = true;
       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(FL_DND_RELEASE, window)) {
-        fl_selection_requestor = Fl::belowmouse();
+      NativeWindow to_window = fl_xevent->xclient.window;
+      fltk3::e_text = unknown;
+      fltk3::e_length = unknown_len;
+      if (fltk3::handle(FL_DND_RELEASE, window)) {
+        fl_selection_requestor = fltk3::belowmouse();
         XConvertSelection(fl_display, fl_XdndSelection,
                           fl_dnd_type, XA_SECONDARY,
                           to_window, fl_event_time);
@@ -1092,8 +1092,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:
@@ -1157,12 +1157,12 @@
         keysym = XKeycodeToKeysym(fl_display, keycode, 0);
       }
       }
-      // MRS: Can't use Fl::event_state(FL_CTRL) since the state is not
+      // MRS: Can't use fltk3::event_state(FL_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
@@ -1229,7 +1229,7 @@
       // numlock state...
       unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
       if (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))
-        Fl::e_original_keysym = (int)(keysym1 | FL_KP);
+        fltk3::e_original_keysym = (int)(keysym1 | FL_KP);
       if ((xevent.xkey.state & Mod2Mask) &&
           (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))) {
         // Store ASCII numeric keypad value...
@@ -1247,24 +1247,24 @@
       }
     } 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);
     set_event_xy();
-    Fl::e_is_click = 0;
+    fltk3::e_is_click = 0;
     break;}
 
   case ButtonPress:
-    Fl::e_keysym = FL_Button + xevent.xbutton.button;
+    fltk3::e_keysym = FL_Button + xevent.xbutton.button;
     set_event_xy();
     if (xevent.xbutton.button == Button4) {
-      Fl::e_dy = -1; // Up
+      fltk3::e_dy = -1; // Up
       event = FL_MOUSEWHEEL;
     } else if (xevent.xbutton.button == Button5) {
-      Fl::e_dy = +1; // Down
+      fltk3::e_dy = +1; // Down
       event = FL_MOUSEWHEEL;
     } else {
-      Fl::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
+      fltk3::e_state |= (FL_BUTTON1 << (xevent.xbutton.button-1));
       event = FL_PUSH;
       checkdouble();
     }
@@ -1287,9 +1287,9 @@
 #  endif
 
   case ButtonRelease:
-    Fl::e_keysym = FL_Button + xevent.xbutton.button;
+    fltk3::e_keysym = FL_Button + xevent.xbutton.button;
     set_event_xy();
-    Fl::e_state &= ~(FL_BUTTON1 << (xevent.xbutton.button-1));
+    fltk3::e_state &= ~(FL_BUTTON1 << (xevent.xbutton.button-1));
     if (xevent.xbutton.button == Button4 ||
         xevent.xbutton.button == Button5) return 0;
     event = FL_RELEASE;
@@ -1302,7 +1302,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 = FL_ENTER;
 
     fl_xmousewin = window;
@@ -1312,7 +1312,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 FL_LEAVE event
     return 0;
@@ -1333,11 +1333,11 @@
     // figure out where OS really put window
     XWindowAttributes actual;
     XGetWindowAttributes(fl_display, fl_xid(window), &actual);
-    Window cr; int X, Y, W = actual.width, H = actual.height;
+    NativeWindow cr; int X, Y, W = actual.width, H = actual.height;
     XTranslateCoordinates(fl_display, fl_xid(window), actual.root,
                           0, 0, &X, &Y, &cr);
 
-    // tell Fl_Window about it and set flag to prevent echoing:
+    // tell fltk3::Window about it and set flag to prevent echoing:
     resize_bug_fix = window;
     window->resize(X, Y, W, H);
     break; // allow add_handler to do something too
@@ -1345,7 +1345,7 @@
 
   case ReparentNotify: {
     int xpos, ypos;
-    Window junk;
+    NativeWindow junk;
 
     //ReparentNotify gives the new position of the window relative to
     //the new parent. FLTK cares about the position on the root window.
@@ -1354,19 +1354,19 @@
                           xevent.xreparent.x, xevent.xreparent.y,
                           &xpos, &ypos, &junk);
 
-    // tell Fl_Window about it and set flag to prevent echoing:
+    // tell fltk3::Window about it and set flag to prevent echoing:
     resize_bug_fix = window;
     window->position(xpos, ypos);
     break;
     }
   }
 
-  return Fl::handle(event, window);
+  return fltk3::handle(event, window);
 }
 
 ////////////////////////////////////////////////////////////////
 
-void Fl_Window::resize(int X,int Y,int W,int H) {
+void fltk3::Window::resize(int X,int Y,int W,int H) {
   int is_a_move = (X != x() || Y != y());
   int is_a_resize = (W != w() || H != h());
   int resize_from_program = (this != resize_bug_fix);
@@ -1399,12 +1399,12 @@
 
 ////////////////////////////////////////////////////////////////
 
-// A subclass of Fl_Window may call this to associate an X window it
-// creates with the Fl_Window:
+// A subclass of fltk3::Window may call this to associate an X window it
+// creates with the fltk3::Window:
 
-void fl_fix_focus(); // in Fl.cxx
+void fl_fix_focus(); // in fltk3.cxx
 
-Fl_X* Fl_X::set_xid(Fl_Window* win, Window winxid) {
+Fl_X* Fl_X::set_xid(fltk3::Window* win, NativeWindow winxid) {
   Fl_X* xp = new Fl_X;
   xp->xid = winxid;
   xp->other_xid = 0;
@@ -1414,7 +1414,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;
 }
 
@@ -1436,7 +1436,7 @@
 |EnterWindowMask|LeaveWindowMask
 |PointerMotionMask;
 
-void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
+void Fl_X::make_xid(fltk3::Window* win, XVisualInfo *visual, Colormap colormap)
 {
   Fl_Group::current(0); // get rid of very common user bug: forgot end()
 
@@ -1446,10 +1446,10 @@
   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() & Fl_Widget::FORCE_POSITION)) {
+    if (!(win->flags() & fltk3::Widget::FORCE_POSITION)) {
       win->x(X = scr_x+(scr_w-W)/2);
       win->y(Y = scr_y+(scr_h-H)/2);
     }
@@ -1458,7 +1458,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:
@@ -1501,7 +1501,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;}
   }
@@ -1550,7 +1550,7 @@
 
     if (win->non_modal() && xp->next && !fl_disable_transient_for) {
       // find some other window to be "transient for":
-      Fl_Window* wp = xp->next->w;
+      fltk3::Window* wp = xp->next->w;
       while (wp->parent()) wp = wp->window();
       XSetTransientForHint(fl_display, xp->xid, fl_xid(wp));
       if (!wp->visible()) showit = 0; // guess that wm will not show it
@@ -1589,9 +1589,9 @@
   XMapWindow(fl_display, xp->xid);
   if (showit) {
     win->set_visible();
-    int old_event = Fl::e_number;
-    win->handle(Fl::e_number = FL_SHOW); // get child windows to appear
-    Fl::e_number = old_event;
+    int old_event = fltk3::e_number;
+    win->handle(fltk3::e_number = FL_SHOW); // get child windows to appear
+    fltk3::e_number = old_event;
     win->redraw();
   }
 }
@@ -1604,7 +1604,7 @@
 
   if (!w->size_range_set) { // default size_range based on resizable():
     if (w->resizable()) {
-      Fl_Widget *o = w->resizable();
+      fltk3::Widget *o = w->resizable();
       int minw = o->w(); if (minw > 100) minw = 100;
       int minh = o->h(); if (minh > 100) minh = 100;
       w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
@@ -1638,8 +1638,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) {
@@ -1655,7 +1655,7 @@
     prop[1] = 1|2|16; // MWM_FUNC_ALL | MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE
   }
 
-  if (w->flags() & Fl_Widget::FORCE_POSITION) {
+  if (w->flags() & fltk3::Widget::FORCE_POSITION) {
     hints->flags |= USPosition;
     hints->x = w->x();
     hints->y = w->y();
@@ -1673,7 +1673,7 @@
   XFree(hints);
 }
 
-void Fl_Window::size_range_() {
+void fltk3::Window::size_range_() {
   size_range_set = 1;
   if (shown()) i->sendxjunk();
 }
@@ -1688,8 +1688,8 @@
   return q;
 }
 
-void Fl_Window::label(const char *name,const char *iname) {
-  Fl_Widget::label(name);
+void fltk3::Window::label(const char *name,const char *iname) {
+  fltk3::Widget::label(name);
   iconlabel_ = iname;
   if (shown() && !parent()) {
     if (!name) name = "";
@@ -1702,7 +1702,7 @@
 }
 
 ////////////////////////////////////////////////////////////////
-// Implement the virtual functions for the base Fl_Window class:
+// Implement the virtual functions for the base fltk3::Window class:
 
 // If the box is a filled rectangle, we can make the redisplay *look*
 // faster by using X's background pixel erasing.  We can make it
@@ -1713,12 +1713,12 @@
 // is resized while a save-behind window is atop it.  The previous
 // contents are restored to the area, but this assumes the area
 // is cleared to background color.  So this is disabled in this version.
-// Fl_Window *fl_boxcheat;
+// fltk3::Window *fl_boxcheat;
 static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
 
-void Fl_Window::show() {
-  image(Fl::scheme_bg_);
-  if (Fl::scheme_bg_) {
+void fltk3::Window::show() {
+  image(fltk3::scheme_bg_);
+  if (fltk3::scheme_bg_) {
     labeltype(FL_NORMAL_LABEL);
     align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
   } else {
@@ -1741,12 +1741,12 @@
 #endif
 }
 
-Window fl_window;
-Fl_Window *Fl_Window::current_;
+NativeWindow fl_window;
+fltk3::Window *fltk3::Window::current_;
 GC fl_gc;
 
 // make X drawing go into this window (called by subclass flush() impl.)
-void Fl_Window::make_current() {
+void fltk3::Window::make_current() {
   static GC gc; // the GC used by all X windows
   if (!gc) gc = XCreateGC(fl_display, i->xid, 0, 0);
   fl_window = i->xid;
@@ -1756,7 +1756,7 @@
 
 #ifdef 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
 
 }
@@ -1766,11 +1766,11 @@
 // contains also preparePrintFront call above
 #include <FL/Fl_Printer.H>
 #include <FL/Fl_Button.H>
-void printFront(Fl_Widget *o, void *data)
+void printFront(fltk3::Widget *o, void *data)
 {
   Fl_Printer printer;
   o->window()->hide();
-  Fl_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; }
@@ -1807,7 +1807,7 @@
   static int first=1;
   if(!first) return;
   first=0;
-  static Fl_Window w(0,0,150,30);
+  static fltk3::Window w(0,0,150,30);
   static Fl_Button b(0,0,w.w(),w.h(), "Print front window");
   b.callback(printFront);
   w.end();

Modified: branches/branch-3.0/src/cmap.cxx
===================================================================
--- branches/branch-3.0/src/cmap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/cmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -109,7 +109,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:
 
 #define FL_GRAY_RAMP 32
 #define FL_NUM_GRAY  24

Modified: branches/branch-3.0/src/fl_ask.cxx
===================================================================
--- branches/branch-3.0/src/fl_ask.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_ask.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -53,7 +53,7 @@
 # endif
 #endif
 
-static Fl_Window *message_form;
+static fltk3::Window *message_form;
 static Fl_Box *message;
 static Fl_Box *icon;
 static Fl_Button *button[3];
@@ -66,12 +66,12 @@
 static char avoidRecursion = 0;
 
 // sets the global return value (ret_val) and closes the window
-static void button_cb(Fl_Widget *bt, void *val) {
+static void button_cb(fltk3::Widget *bt, void *val) {
   ret_val = (int)(long)val;
   message_form->hide();
 }
 
-static Fl_Window *makeform() {
+static fltk3::Window *makeform() {
  if (message_form) {
    message_form->size(410,103);
    return message_form;
@@ -81,7 +81,7 @@
  Fl_Group *previously_current_group = Fl_Group::current();
  Fl_Group::current(0);
  // create a new top level window
- Fl_Window *w = message_form = new Fl_Window(410,103,"");
+  fltk3::Window *w = message_form = new fltk3::Window(410,103,"");
  // w->clear_border();
  // w->box(FL_UP_BOX);
  (message = new Fl_Box(60, 25, 340, 20))
@@ -191,7 +191,7 @@
   const char *b1,
   const char *b2)
 {
-  Fl::pushed(0); // stop dragging (STR #2159)
+  fltk3::pushed(0); // stop dragging (STR #2159)
 
   avoidRecursion = 1;
 
@@ -220,18 +220,18 @@
   if (button[1]->visible() && !input->visible()) 
     button[1]->take_focus();
   message_form->hotspot(button[0]);
-  if (b0 && Fl_Widget::label_shortcut(b0))
+  if (b0 && fltk3::Widget::label_shortcut(b0))
     button[0]->shortcut(0);
   else
     button[0]->shortcut(FL_Escape);
 
-  // deactivate Fl::grab(), because it is incompatible with modal windows
-  Fl_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);
 
   avoidRecursion = 0;
@@ -416,7 +416,7 @@
     many common dialogs like fl_message(), fl_alert(), 
     fl_ask(), fl_choice(), fl_input(), fl_password() 
 */ 
-Fl_Widget *fl_message_icon() {makeform(); return icon;}
+fltk3::Widget *fl_message_icon() {makeform(); return icon;}
 
 static const char* input_innards(const char* fmt, va_list ap,
 				 const char* defstr, uchar type) {

Modified: branches/branch-3.0/src/fl_boxtype.cxx
===================================================================
--- branches/branch-3.0/src/fl_boxtype.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_boxtype.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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; }
 
 uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
 
@@ -316,7 +316,7 @@
   Returns the X offset for the given boxtype.
   \see box_dy()
 */
-int Fl::box_dx(Fl_Boxtype t) {return fl_box_table[t].dx;}
+int fltk3::box_dx(Fl_Boxtype t) {return fl_box_table[t].dx;}
 
 /**
     Returns the Y offset for the given boxtype.
@@ -332,28 +332,28 @@
 
     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(Fl_Boxtype t) {return fl_box_table[t].dy;}
+int fltk3::box_dy(Fl_Boxtype t) {return fl_box_table[t].dy;}
 
 /**
   Returns the width offset for the given boxtype.
   \see box_dy().
 */
-int Fl::box_dw(Fl_Boxtype t) {return fl_box_table[t].dw;}
+int fltk3::box_dw(Fl_Boxtype t) {return fl_box_table[t].dw;}
 
 /**
   Returns the height offset for the given boxtype.
   \see box_dy().
 */
-int Fl::box_dh(Fl_Boxtype t) {return fl_box_table[t].dh;}
+int fltk3::box_dh(Fl_Boxtype t) {return fl_box_table[t].dh;}
 
 /**
   Sets the drawing function for a given box type.
@@ -368,11 +368,11 @@
 }
 
 /** Gets the current box drawing function for the specified box type. */
-Fl_Box_Draw_F *Fl::get_boxtype(Fl_Boxtype t) {
+Fl_Box_Draw_F *fltk3::get_boxtype(Fl_Boxtype t) {
   return fl_box_table[t].f;
 }
 /** Sets the function to call to draw a specific boxtype. */
-void Fl::set_boxtype(Fl_Boxtype t, Fl_Box_Draw_F* f,
+void fltk3::set_boxtype(Fl_Boxtype t, Fl_Box_Draw_F* f,
 		      uchar a, uchar b, uchar c, uchar d) {
   fl_box_table[t].f   = f;
   fl_box_table[t].set = 1;
@@ -382,7 +382,7 @@
   fl_box_table[t].dh  = d;
 }
 /** Copies the from boxtype. */
-void Fl::set_boxtype(Fl_Boxtype to, Fl_Boxtype from) {
+void fltk3::set_boxtype(Fl_Boxtype to, Fl_Boxtype from) {
   fl_box_table[to] = fl_box_table[from];
 }
 
@@ -396,9 +396,9 @@
   if (t && fl_box_table[t].f) fl_box_table[t].f(x,y,w,h,c);
 }
 
-//extern Fl_Widget *fl_boxcheat; // hack set by Fl_Window.cxx
+//extern fltk3::Widget *fl_boxcheat; // hack set by Fl_Window.cxx
 /** Draws the widget box according its box style */
-void Fl_Widget::draw_box() const {
+void fltk3::Widget::draw_box() const {
   int t = box_;
   if (!t) return;
 //   if (this == fl_boxcheat) {
@@ -409,11 +409,11 @@
   draw_box((Fl_Boxtype)t, x_, y_, w_, h_, color_);
 }
 /** Draws a box of type t, of color c at the widget's position and size. */
-void Fl_Widget::draw_box(Fl_Boxtype t, Fl_Color c) const {
+void fltk3::Widget::draw_box(Fl_Boxtype t, Fl_Color c) const {
   draw_box(t, x_, y_, w_, h_, c);
 }
 /** Draws a box of type t, of color c at the position X,Y and size W,H. */
-void Fl_Widget::draw_box(Fl_Boxtype t, int X, int Y, int W, int H, Fl_Color c) const {
+void fltk3::Widget::draw_box(Fl_Boxtype t, int X, int Y, int W, int H, Fl_Color c) const {
   draw_it_active = active_r();
   fl_box_table[t].f(X, Y, W, H, c);
   draw_it_active = 1;

Modified: branches/branch-3.0/src/fl_color.cxx
===================================================================
--- branches/branch-3.0/src/fl_color.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_color.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -72,7 +72,7 @@
     fl_redmask = 0;
     return;
 #  else
-    Fl::fatal("Requires true color visual");
+    fltk3::fatal("Requires true color visual");
 #  endif
   }
 
@@ -325,7 +325,7 @@
   \param[in] i color index
   \param[in] overlay 0 for normal, 1 for overlay color
 */
-void Fl::free_color(Fl_Color i, int overlay) {
+void fltk3::free_color(Fl_Color i, int overlay) {
 #  if HAVE_OVERLAY
 #  else
   if (overlay) return;
@@ -349,7 +349,7 @@
   \param[in] i color index
   \param[in] c color
 */
-void Fl::set_color(Fl_Color i, unsigned c) {
+void fltk3::set_color(Fl_Color i, unsigned c) {
   if (fl_cmap[i] != c) {
     free_color(i,0);
 #  if HAVE_OVERLAY
@@ -370,7 +370,7 @@
     The second form returns the red, green, and blue values
     separately in referenced variables.
 */
-unsigned Fl::get_color(Fl_Color i) {
+unsigned fltk3::get_color(Fl_Color i) {
   if (i & 0xffffff00) return (i);
   else return fl_cmap[i];
 }
@@ -379,12 +379,12 @@
     any 8-bit RGB color.  The color is not allocated until fl_color(i)
     is used.
 */
-void Fl::set_color(Fl_Color i, uchar red, uchar green, uchar blue) {
-  Fl::set_color((Fl_Color)(i & 255),
+void fltk3::set_color(Fl_Color i, uchar red, uchar green, uchar blue) {
+  fltk3::set_color((Fl_Color)(i & 255),
 	((unsigned)red<<24)+((unsigned)green<<16)+((unsigned)blue<<8));
 }
 /** See unsigned get_color(Fl_Color c) */
-void Fl::get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue) {
+void fltk3::get_color(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_color_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -83,7 +83,7 @@
   CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f);
 }
 
-void Fl::set_color(Fl_Color i, unsigned c) {
+void fltk3::set_color(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_color_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -191,12 +191,12 @@
   return brushes[i].brush;
 }
 
-void Fl::free_color(Fl_Color i, int overlay) {
+void fltk3::free_color(Fl_Color i, int overlay) {
   if (overlay) return; // do something about GL overlay?
   clear_xmap(fl_xmap[i]);
 }
 
-void Fl::set_color(Fl_Color i, unsigned c) {
+void fltk3::set_color(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_cursor.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -28,7 +28,7 @@
 // Change the current cursor.
 // Under X the cursor is attached to the X window.  I tried to hide
 // this and pretend that changing the cursor is a drawing function.
-// This avoids a field in the Fl_Window, and I suspect is more
+// This avoids a field in the fltk3::Window, and I suspect is more
 // portable to other systems.
 
 #include <FL/Fl.H>
@@ -44,14 +44,14 @@
   The cursors are defined in the <FL/Enumerations.H> header file. 
   */
 void fl_cursor(Fl_Cursor c, Fl_Color fg, Fl_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.
 
     For back compatibility only.
 */
-void Fl_Window::default_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
+void fltk3::Window::default_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
 //  if (c == FL_CURSOR_DEFAULT) c = FL_CURSOR_ARROW;
 
   cursor_default = c;
@@ -67,10 +67,10 @@
 #    define IDC_HAND	MAKEINTRESOURCE(32649)
 #  endif // !IDC_HAND
 
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) {
+void fltk3::Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) {
   if (!shown()) return;
   // the cursor must be set for the top level window, not for subwindows
-  Fl_Window *w = window(), *toplevel = this;
+  fltk3::Window *w = window(), *toplevel = this;
   while (w) { toplevel = w; w = w->window(); }
   if (toplevel != this) { toplevel->cursor(c, c1, c2); return; }
   // now set the actual cursor
@@ -228,7 +228,7 @@
   return (CGContextRef)off;
 }
 
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
+void fltk3::Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
   if (c == FL_CURSOR_DEFAULT) {
     c = cursor_default;
   }
@@ -284,7 +284,7 @@
   {{0}, {0}} // FL_CURSOR_NONE & unknown
 };
 
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
+void fltk3::Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
   if (!shown()) return;
   Cursor xc;
   int deleteit = 0;
@@ -319,10 +319,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_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_dnd_mac.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_dnd_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -42,9 +42,9 @@
 /**
  * drag and drop whatever is in the cut-copy-paste buffer
  * - create a selection first using: 
- *     Fl::copy(const char *stuff, int len, 0)
+ *     fltk3::copy(const char *stuff, int len, 0)
  */
-int Fl::dnd()
+int fltk3::dnd()
 {
   extern int MACpreparedrag(void);
   return MACpreparedrag();

Modified: branches/branch-3.0/src/fl_dnd_win32.cxx
===================================================================
--- branches/branch-3.0/src/fl_dnd_win32.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_dnd_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,7 +50,7 @@
 extern char *fl_locale2utf8(const char *s, UINT codepage = 0);
 extern unsigned int fl_codepage;
 
-Fl_Window *fl_dnd_target_window = 0;
+fltk3::Window *fl_dnd_target_window = 0;
 
 // All of the following code requires GCC 3.x or a non-GNU compiler...
 #if !defined(__GNUC__) || __GNUC__ >= 3
@@ -93,19 +93,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 );
-    Fl_Window *target = fl_find( hWnd );
+    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( FL_DND_ENTER, target ) )
+      if ( target && fltk3::handle( FL_DND_ENTER, target ) )
         *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
       else
         *pdwEffect = DROPEFFECT_NONE;
@@ -127,15 +127,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)) {
       // Fl_Group will change DND_DRAG into DND_ENTER and DND_LEAVE if needed
-      if ( Fl::handle( FL_DND_DRAG, fl_dnd_target_window ) )
+      if ( fltk3::handle( FL_DND_DRAG, fl_dnd_target_window ) )
         *pdwEffect = DROPEFFECT_MOVE|DROPEFFECT_COPY; //|DROPEFFECT_LINK;
       else
         *pdwEffect = DROPEFFECT_NONE;
@@ -149,7 +149,7 @@
   HRESULT STDMETHODCALLTYPE DragLeave() {
     if ( fl_dnd_target_window && fillCurrentDragData(0))
     {
-      Fl::handle( FL_DND_LEAVE, fl_dnd_target_window );
+      fltk3::handle( FL_DND_LEAVE, fl_dnd_target_window );
       fl_dnd_target_window = 0;
       clearCurrentDragData();
     }
@@ -158,25 +158,25 @@
   HRESULT STDMETHODCALLTYPE Drop( IDataObject *data, DWORD /*grfKeyState*/, POINTL pt, DWORD* /*pdwEffect*/) {
     if ( !fl_dnd_target_window )
       return S_OK;
-    Fl_Window *target = fl_dnd_target_window;
+    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( FL_DND_RELEASE, target ) )
+    if ( !fltk3::handle( FL_DND_RELEASE, target ) )
       return S_OK;
 
-    Fl_Widget *w = target;
+    fltk3::Widget *w = target;
     while (w->parent()) w = w->window();
-    HWND hwnd = fl_xid( (Fl_Window*)w );
+    HWND hwnd = fl_xid( (fltk3::Window*)w );
     if (fillCurrentDragData(data)) {
-      int old_event = Fl::e_number;
-      Fl::belowmouse()->handle(Fl::e_number = FL_PASTE); // e_text will be invalid after this call
-      Fl::e_number = old_event;
+      int old_event = fltk3::e_number;
+      fltk3::belowmouse()->handle(fltk3::e_number = FL_PASTE); // e_text will be invalid after this call
+      fltk3::e_number = old_event;
       SetForegroundWindow( hwnd );
       clearCurrentDragData();
       return S_OK;
@@ -220,8 +220,8 @@
     if ( data->GetData( &fmt, &medium )==S_OK )
     {
       void *stuff = GlobalLock( medium.hGlobal );
-      Fl::e_length = strlen((char*)stuff);
-      Fl::e_text = strdup((char*)stuff);
+      fltk3::e_length = strlen((char*)stuff);
+      fltk3::e_text = strdup((char*)stuff);
       GlobalUnlock( medium.hGlobal );
       ReleaseStgMedium( &medium );
       currDragResult = 1;
@@ -251,14 +251,14 @@
         }
          *dst=0;
 
-        Fl::e_text = (char*) malloc(nn * 5 + 1);
-//      Fl::e_length = fl_unicode2utf(bu, nn, Fl::e_text);
-        Fl::e_length = fl_utf8fromwc(Fl::e_text, (nn*5+1), bu, nn);
-        Fl::e_text[Fl::e_length] = 0;
+        fltk3::e_text = (char*) malloc(nn * 5 + 1);
+//      fltk3::e_length = fl_unicode2utf(bu, nn, fltk3::e_text);
+        fltk3::e_length = fl_utf8fromwc(fltk3::e_text, (nn*5+1), bu, nn);
+        fltk3::e_text[fltk3::e_length] = 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;
@@ -489,9 +489,9 @@
 
    Create a selection first using:
 
-     Fl::copy(const char *stuff, int len, 0)
+     fltk3::copy(const char *stuff, int len, 0)
 */
-int Fl::dnd()
+int fltk3::dnd()
 {
   DWORD dropEffect;
   ReleaseCapture();
@@ -506,19 +506,19 @@
   fdo->Release();
   fds->Release();
 
-  Fl_Widget *w = Fl::pushed();
+  fltk3::Widget *w = fltk3::pushed();
   if ( w )
   {
-    int old_event = Fl::e_number;
-    w->handle(Fl::e_number = FL_RELEASE);
-    Fl::e_number = old_event;
-    Fl::pushed( 0 );
+    int old_event = fltk3::e_number;
+    w->handle(fltk3::e_number = FL_RELEASE);
+    fltk3::e_number = old_event;
+    fltk3::pushed( 0 );
   }
   if ( ret==DRAGDROP_S_DROP ) return 1; // or DD_S_CANCEL
   return 0;
 }
 #else
-int Fl::dnd()
+int fltk3::dnd()
 {
   // Always indicate DnD failed when using GCC < 3...
   return 1;

Modified: branches/branch-3.0/src/fl_dnd_x.cxx
===================================================================
--- branches/branch-3.0/src/fl_dnd_x.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_dnd_x.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -47,7 +47,7 @@
 extern char fl_i_own_selection[2];
 extern char *fl_selection_buffer[2];
 
-extern void fl_sendClientMessage(Window window, Atom message,
+extern void fl_sendClientMessage(NativeWindow window, Atom message,
                                  unsigned long d0,
                                  unsigned long d1=0,
                                  unsigned long d2=0,
@@ -56,7 +56,7 @@
 
 // return version # of Xdnd this window supports.  Also change the
 // window to the proxy if it uses a proxy:
-static int dnd_aware(Window& window) {
+static int dnd_aware(NativeWindow& window) {
   Atom actual; int format; unsigned long count, remaining;
   unsigned char *data = 0;
   XGetWindowProperty(fl_display, window, fl_XdndAware,
@@ -69,39 +69,39 @@
 }
 
 static int grabfunc(int event) {
-  if (event == FL_RELEASE) Fl::pushed(0);
+  if (event == FL_RELEASE) fltk3::pushed(0);
   return 0;
 }
 
-extern int (*fl_local_grab)(int); // in Fl.cxx
+extern int (*fl_local_grab)(int); // in fltk3.cxx
 
 // send an event to an fltk window belonging to this program:
-static int local_handle(int event, Fl_Window* window) {
+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() {
-  Fl_Window *source_fl_win = Fl::first_window();
-  Fl::first_window()->cursor((Fl_Cursor)21);
-  Window source_window = fl_xid(Fl::first_window());
+int fltk3::dnd() {
+  fltk3::Window *source_fl_win = fltk3::first_window();
+  fltk3::first_window()->cursor((Fl_Cursor)21);
+  NativeWindow source_window = fl_xid(fltk3::first_window());
   fl_local_grab = grabfunc;
-  Window target_window = 0;
-  Fl_Window* local_window = 0;
+  NativeWindow 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;
-    Fl_Window* new_local_window = 0;
-    for (Window child = RootWindow(fl_display, fl_screen);;) {
-      Window root; unsigned int junk3;
+    NativeWindow new_window = 0; int new_version = 0;
+    fltk3::Window* new_local_window = 0;
+    for (NativeWindow child = RootWindow(fl_display, fl_screen);;) {
+      NativeWindow root; unsigned int junk3;
       XQueryPointer(fl_display, child, &root, &child,
 		    &e_x_root, &e_y_root, &dest_x, &dest_y, &junk3);
       if (!child) {
@@ -160,7 +160,7 @@
 			   0, (e_x_root<<16)|e_y_root, fl_event_time,
 			   fl_XdndActionCopy);
     }
-    Fl::wait();
+    fltk3::wait();
   }
 
   if (local_window) {
@@ -179,8 +179,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.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_draw.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -333,7 +333,7 @@
   The string is formatted and aligned inside the passed box.
   Handles '\\t' and '\\n', expands all other control characters to '^X',
   and aligns inside or against the edges of the box.
-  See Fl_Widget::align() for values of \p align. The value FL_ALIGN_INSIDE
+  See fltk3::Widget::align() for values of \p align. The value FL_ALIGN_INSIDE
   is ignored, as this function always prints inside the box.
   If \p img is provided and is not \p NULL, the image is drawn above or
   below the text as specified by the \p align value.

Modified: branches/branch-3.0/src/fl_draw_image.cxx
===================================================================
--- branches/branch-3.0/src/fl_draw_image.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_draw_image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_draw_pixmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -203,7 +203,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;
       p += 4;
       ncolors--;
     }
@@ -269,7 +269,7 @@
       if (!fl_parse_color((const char*)p, c[0], c[1], c[2])) {
         // 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_engraved_label.cxx
===================================================================
--- branches/branch-3.0/src/fl_engraved_label.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_engraved_label.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -76,15 +76,15 @@
 }
 
 Fl_Labeltype fl_define_FL_SHADOW_LABEL() {
-  Fl::set_labeltype(_FL_SHADOW_LABEL, fl_shadow_label, 0);
+  fltk3::set_labeltype(_FL_SHADOW_LABEL, fl_shadow_label, 0);
   return _FL_SHADOW_LABEL;
 }
 Fl_Labeltype fl_define_FL_ENGRAVED_LABEL() {
-  Fl::set_labeltype(_FL_ENGRAVED_LABEL, fl_engraved_label, 0);
+  fltk3::set_labeltype(_FL_ENGRAVED_LABEL, fl_engraved_label, 0);
   return _FL_ENGRAVED_LABEL;
 }
 Fl_Labeltype fl_define_FL_EMBOSSED_LABEL() {
-  Fl::set_labeltype(_FL_EMBOSSED_LABEL, fl_embossed_label, 0);
+  fltk3::set_labeltype(_FL_EMBOSSED_LABEL, fl_embossed_label, 0);
   return _FL_EMBOSSED_LABEL;
 }
 

Modified: branches/branch-3.0/src/fl_file_dir.cxx
===================================================================
--- branches/branch-3.0/src/fl_file_dir.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_file_dir.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -136,7 +136,7 @@
   fc->show();
 
   while (fc->shown())
-    Fl::wait();
+    fltk3::wait();
 
   if (fc->value() && relative) {
     fl_filename_relative(retname, sizeof(retname), fc->value());
@@ -177,7 +177,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_font_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -410,7 +410,7 @@
 static CGColorRef flcolortocgcolor(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_font_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -199,11 +199,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!");
     for (; i < 0x400; i++) {
       GetTextExtentPoint32W(gc, (WCHAR*)&ii, 1, &s);
       fl_fontsize->width[r][i] = s.cx;
@@ -277,7 +277,7 @@
   // See description in fl_width() above for an explanation.
   if (!fl_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;
 	fl_gc = GetDC(hWnd);
   }
   if (!fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_font_x.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_font_xft.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -162,7 +162,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...
@@ -486,10 +486,10 @@
 static Window draw_window;
 #if USE_OVERLAY
 static XftDraw* draw_overlay;
-static Window draw_overlay_window;
+static NativeWindow draw_overlay_window;
 #endif
 
-void fl_destroy_xft_draw(Window id) {
+void fl_destroy_xft_draw(NativeWindow id) {
   if (id == draw_window)
     XftDrawChange(draw_, draw_window = fl_message_window);
 #if USE_OVERLAY
@@ -526,7 +526,7 @@
   // XftCollorAllocValue returns:
   XftColor color;
   color.pixel = fl_xpixel(fl_color_);
-  uchar r,g,b; Fl::get_color(fl_color_, r,g,b);
+  uchar r,g,b; fltk3::get_color(fl_color_, r,g,b);
   color.color.red   = ((int)r)*0x101;
   color.color.green = ((int)g)*0x101;
   color.color.blue  = ((int)b)*0x101;
@@ -570,7 +570,7 @@
   // XftCollorAllocValue returns:
   XftColor color;
   color.pixel = fl_xpixel(fl_color_);
-  uchar r,g,b; Fl::get_color(fl_color_, r,g,b);
+  uchar r,g,b; fltk3::get_color(fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_gtk.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -39,7 +39,7 @@
 
 
 static void gtk_color(Fl_Color c) {
-  if (Fl::draw_box_active()) fl_color(c);
+  if (fltk3::draw_box_active()) fl_color(c);
   else fl_color(fl_inactive(c));
 }
 

Modified: branches/branch-3.0/src/fl_labeltype.cxx
===================================================================
--- branches/branch-3.0/src/fl_labeltype.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_labeltype.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -75,7 +75,7 @@
 static Fl_Label_Measure_F* measure[MAX_LABELTYPE];
 
 /** Sets the functions to call to draw and measure a specific labeltype. */
-void Fl::set_labeltype(Fl_Labeltype t,Fl_Label_Draw_F* f,Fl_Label_Measure_F*m) 
+void fltk3::set_labeltype(Fl_Labeltype t,Fl_Label_Draw_F* f,Fl_Label_Measure_F*m) 
 {
   table[t] = f; measure[t] = m;
 }
@@ -105,17 +105,17 @@
 /** Draws the widget's label at the defined label position.
     This is the normal call for a widget's draw() method.
  */
-void Fl_Widget::draw_label() const {
-  int X = x_+Fl::box_dx(box());
-  int W = w_-Fl::box_dw(box());
+void fltk3::Widget::draw_label() const {
+  int X = x_+fltk3::box_dx(box());
+  int W = w_-fltk3::box_dw(box());
   if (W > 11 && align()&(FL_ALIGN_LEFT|FL_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.
     draw() can use this instead of draw_label(void) to change the bounding box
  */
-void Fl_Widget::draw_label(int X, int Y, int W, int H) const {
+void fltk3::Widget::draw_label(int X, int Y, int W, int H) const {
   // quit if we are not drawing a label inside the widget:
   if ((align()&15) && !(align() & FL_ALIGN_INSIDE)) return;
   draw_label(X,Y,W,H,align());
@@ -124,7 +124,7 @@
 /** Draws the label in an arbitrary bounding box with an arbitrary alignment.
     Anybody can call this to force the label to draw anywhere.
  */
-void Fl_Widget::draw_label(int X, int Y, int W, int H, Fl_Align a) const {
+void fltk3::Widget::draw_label(int X, int Y, int W, int H, Fl_Align a) const {
   if (flags()&SHORTCUT_LABEL) fl_draw_shortcut = 1;
   Fl_Label l1 = label_;
   if (!active_r()) {

Modified: branches/branch-3.0/src/fl_line_style.cxx
===================================================================
--- branches/branch-3.0/src/fl_line_style.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_line_style.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -101,7 +101,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_plastic.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -50,8 +50,8 @@
 #ifdef USE_OLD_PLASTIC_COLOR
   return fl_color_average((Fl_Color)gc, bc, 0.75f);
 #else
-  unsigned	grgb = Fl::get_color((Fl_Color)gc),
-		brgb = Fl::get_color(bc);
+  unsigned	grgb = fltk3::get_color((Fl_Color)gc),
+		brgb = fltk3::get_color(bc);
   int		red, green, blue, gray;
 
 
@@ -71,7 +71,7 @@
   if (blue > 255)
     blue = 255;
 
-  if (Fl::draw_box_active())
+  if (fltk3::draw_box_active())
     return fl_rgb_color(red, green, blue);
   else
     return fl_color_average(FL_GRAY, fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_read_image.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -130,13 +130,13 @@
   if (!image) {
     // fetch absolute coordinates
     int dx, dy, sx, sy, sw, sh;
-    Window child_win;
-    Fl_Window *win = fl_find(fl_window);
+    NativeWindow child_win;
+    fltk3::Window *win = fl_find(fl_window);
     if (win) {
       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_read_image_mac.cxx
===================================================================
--- branches/branch-3.0/src/fl_read_image_mac.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_read_image_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -26,7 +26,7 @@
 //
 
 #include <config.h>
-extern unsigned char *MACbitmapFromRectOfWindow(Fl_Window *win, int x, int y, int w, int h, int *bytesPerPixel);
+extern unsigned char *MACbitmapFromRectOfWindow(fltk3::Window *win, int x, int y, int w, int h, int *bytesPerPixel);
 
 //
 // 'fl_read_image()' - Read an image from the current window.
@@ -39,7 +39,7 @@
 	      int   w,		// I - Width of area to read
 	      int   h,		// I - Height of area to read
 	      int   alpha) {	// I - Alpha value for image (0 for none)
-  Fl_Window *window = Fl_Window::current();
+  fltk3::Window *window = fltk3::Window::current();
   while(window->window()) window = window->window();
   int delta;
   uchar *base = MACbitmapFromRectOfWindow(window,x,y,w,h,&delta);

Modified: branches/branch-3.0/src/fl_rect.cxx
===================================================================
--- branches/branch-3.0/src/fl_rect.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_rect.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -482,14 +482,14 @@
 #endif
   }
   if (rstackptr < 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_Device::push_no_clip() {
   if (rstackptr < 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();
 }
 
@@ -498,7 +498,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_scroll_area.cxx
===================================================================
--- branches/branch-3.0/src/fl_scroll_area.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_scroll_area.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -151,8 +151,8 @@
   BitBlt(fl_gc, dest_x, dest_y, src_w, src_h, fl_gc, src_x, src_y,SRCCOPY);
 
 #elif defined(__APPLE_QUARTZ__)
-  extern CGImageRef MAC_CGImageFromRectOfWindow(Fl_Window*, int x, int y, int w, int h);
-  CGImageRef img = MAC_CGImageFromRectOfWindow(Fl_Window::current(), src_x, src_y, src_w, src_h);
+  extern CGImageRef MAC_CGImageFromRectOfWindow(fltk3::Window*, int x, int y, int w, int h);
+  CGImageRef img = MAC_CGImageFromRectOfWindow(fltk3::Window::current(), src_x, src_y, src_w, src_h);
   CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
   Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
   CGContextDrawImage(fl_gc, rect, img);

Modified: branches/branch-3.0/src/fl_set_font.cxx
===================================================================
--- branches/branch-3.0/src/fl_set_font.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_set_font.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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(Fl_Font fnum, const char* name) {
+void fltk3::set_font(Fl_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(Fl_Font fnum, Fl_Font from) {
-  Fl::set_font(fnum, get_font(from));
+void fltk3::set_font(Fl_Font fnum, Fl_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(Fl_Font fnum) {return fl_fonts[fnum].name;}
+const char* fltk3::get_font(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_set_fonts_mac.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -41,7 +41,7 @@
 #define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
+const char* fltk3::get_font_name(Fl_Font fnum, int* ap) {
   Fl_Fontdesc *f = fl_fonts + fnum;
   if (!f->fontname[0]) {
     const char* p = f->name;
@@ -58,7 +58,7 @@
 
 static int fl_free_font = FL_FREE_FONT;
 
-Fl_Font Fl::set_fonts(const char* xstarname) {
+Fl_Font fltk3::set_fonts(const char* xstarname) {
 #pragma unused ( xstarname )
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
 static SInt32 MACsystemVersion = 0;
@@ -83,7 +83,7 @@
 	static char fname[100];
 	CFStringGetCString(cfname, fname, sizeof(fname), kCFStringEncodingUTF8);
 	CFRelease(cfname);
-	Fl::set_font((Fl_Font)(fl_free_font++), strdup(fname));
+	fltk3::set_font((Fl_Font)(fl_free_font++), strdup(fname));
 	}
   CFRelease(arrayref);
   return (Fl_Font)fl_free_font;
@@ -120,7 +120,7 @@
       oName[511] = 0;
     else
       oName[actualLength] = 0;
-	Fl::set_font((Fl_Font)(fl_free_font++), strdup(oName));
+	fltk3::set_font((Fl_Font)(fl_free_font++), strdup(oName));
 //	free(oName);
   }
   free(oFontIDs);
@@ -133,7 +133,7 @@
 }
 
 static int array[128];
-int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_set_fonts_win32.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -41,7 +41,7 @@
 #define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
+const char* fltk3::get_font_name(Fl_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<FL_FREE_FONT; i++) // skip if one of our built-in fonts
-	  if (!strcmp(Fl::get_font_name((Fl_Font)i),n)) {free(n);return 1;}
+	  if (!strcmp(fltk3::get_font_name((Fl_Font)i),n)) {free(n);return 1;}
   char buffer[LF_FACESIZE + 1];
   strcpy(buffer+1, n);
-  buffer[0] = ' '; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+  buffer[0] = ' '; fltk3::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
   if (lpelf->lfWeight <= 400)
-    buffer[0] = 'B', Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
-  buffer[0] = 'I'; Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+    buffer[0] = 'B', fltk3::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+  buffer[0] = 'I'; fltk3::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
   if (lpelf->lfWeight <= 400)
-    buffer[0] = 'P', Fl::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
+    buffer[0] = 'P', fltk3::set_font((Fl_Font)(fl_free_font++), strdup(buffer));
   free(n);
   return 1;
 } /* enumcbw */
 
-Fl_Font Fl::set_fonts(const char* xstarname) {
+Fl_Font fltk3::set_fonts(const char* xstarname) {
   if (fl_free_font == FL_FREE_FONT) {// if not already been called
     if (!fl_gc) fl_GetDC(0);
 
@@ -142,7 +142,7 @@
 
 
 int
-Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
+fltk3::get_font_sizes(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_set_fonts_x.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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(Fl_Font.fontname)-1
 
 // turn a stored (with *'s) X font name into a pretty name:
-const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
+const char* fltk3::get_font_name(Fl_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 = FL_FREE_FONT;
 
-Fl_Font Fl::set_fonts(const char* xstarname) {
+Fl_Font fltk3::set_fonts(const char* xstarname) {
   if (fl_free_font > FL_FREE_FONT) // already been here
     return (Fl_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((Fl_Font)j, p);
+	fltk3::set_font((Fl_Font)j, p);
 	break;
       }
     }
@@ -312,7 +312,7 @@
   return (Fl_Font)fl_free_font;
 }
 
-int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_set_fonts_xft.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -39,7 +39,7 @@
 #define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
 
 // turn a stored font name into a pretty name:
-const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
+const char* fltk3::get_font_name(Fl_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!
-Fl_Font Fl::set_fonts(const char* pattern_name)
+Fl_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((Fl_Font)(j + FL_FREE_FONT), stored_name);
+        fltk3::set_font((Fl_Font)(j + FL_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(Fl_Font fnum, int*& sizep) {
+int fltk3::get_font_sizes(Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_shortcut.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -36,7 +36,7 @@
 // Only FL_META, FL_ALT, FL_SHIFT, and FL_CTRL must be "off".  A
 // zero in the other shift flags indicates "dont 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 FL_SHIFT means "don't care".
 // This allows punctuation shortcuts like "#" to work (rather than
 // calling it "shift+3" on a US keyboard)
@@ -56,9 +56,9 @@
     FL_SHORTCUT, against a shortcut value (described in 
     Fl_Button).  Returns non-zero if there is a match.  Not to
     be confused with 
-    Fl_Widget::test_shortcut().
+    fltk3::Widget::test_shortcut().
 */
-int Fl::test_shortcut(unsigned int shortcut) {
+int fltk3::test_shortcut(unsigned int shortcut) {
   if (!shortcut) return 0;
 
   unsigned int v = shortcut & FL_KEY_MASK;
@@ -66,7 +66,7 @@
     shortcut |= FL_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:
@@ -77,10 +77,10 @@
   unsigned int key = shortcut & FL_KEY_MASK;
 
   // if shift is also correct, check for exactly equal keysyms:
-  if (!(mismatch&(FL_SHIFT)) && key == (unsigned)Fl::event_key()) return 1;
+  if (!(mismatch&(FL_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 (key==firstChar) return 1;
 
   // kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'):
@@ -282,7 +282,7 @@
 
 // Tests for &x shortcuts in button labels:
 
-unsigned int Fl_Widget::label_shortcut(const char *t) {
+unsigned int fltk3::Widget::label_shortcut(const char *t) {
   if (!t) return 0;
   for (;;) {
     if (*t==0) return 0;
@@ -296,20 +296,20 @@
   }
 }
 
-int Fl_Widget::test_shortcut(const char *t) {
+int fltk3::Widget::test_shortcut(const char *t) {
   #ifdef WIN32
   // on MSWindows, users expect shortcuts to work only when the Alt modifier is pressed
-  if (Fl::event_state(FL_ALT)==0) return 0;
+  if (fltk3::event_state(FL_ALT)==0) return 0;
   #endif
   if (!t) return 0;
-  unsigned int c = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0);
+  unsigned int c = fl_utf8decode(fltk3::event_text(), fltk3::event_text()+fltk3::event_length(), 0);
   if (!c) return 0;
   if (c == label_shortcut(t))
     return 1;
   return 0;
 }
 
-int Fl_Widget::test_shortcut() {
+int fltk3::Widget::test_shortcut() {
   if (!(flags()&SHORTCUT_LABEL)) return 0;
   return test_shortcut(label());
 }

Modified: branches/branch-3.0/src/fl_show_colormap.cxx
===================================================================
--- branches/branch-3.0/src/fl_show_colormap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_show_colormap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -38,7 +38,7 @@
  This widget creates a modal window for selecting a color from the colormap.
  Pretty much unchanged from Forms.
 */
-class ColorMenu : public Fl_Window {
+class ColorMenu : public fltk3::Window {
   Fl_Color initial;
   Fl_Color which, previous;
   int done;
@@ -51,7 +51,7 @@
 };
 
 ColorMenu::ColorMenu(Fl_Color oldcol) :
-  Fl_Window(BOXSIZE*8+1+2*BORDER, BOXSIZE*32+1+2*BORDER) {
+fltk3::Window(BOXSIZE*8+1+2*BORDER, BOXSIZE*32+1+2*BORDER) {
   clear_border();
   set_modal();
   initial = which = oldcol;
@@ -86,9 +86,9 @@
   switch (e) {
   case FL_PUSH:
   case FL_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 FL_KEYBOARD:
-    switch (Fl::event_key()) {
+    switch (fltk3::event_key()) {
     case FL_Up: if (c > 7) c -= 8; break;
     case FL_Down: if (c < 256-8) c += 8; break;
     case FL_Left: 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
 Fl_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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/fl_vertex.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -58,7 +58,7 @@
 */
 void fl_push_matrix() {
   if (sptr==32)
-    Fl::error("fl_push_matrix(): matrix stack overflow.");
+    fltk3::error("fl_push_matrix(): matrix stack overflow.");
   else
     stack[sptr++] = m;
 }
@@ -68,7 +68,7 @@
 */
 void fl_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_bitmap.cxx
===================================================================
--- branches/branch-3.0/src/forms_bitmap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/forms_bitmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -29,7 +29,7 @@
 /** Creates a bitmap widget from a box type, position, size and optional label specification */
 Fl_FormsBitmap::Fl_FormsBitmap(
   Fl_Boxtype t, int X, int Y, int W, int H, const char* l)
-: Fl_Widget(X, Y, W, H, l) {
+: fltk3::Widget(X, Y, W, H, l) {
   box(t);
   b = 0;
   color(FL_BLACK);

Modified: branches/branch-3.0/src/forms_compatability.cxx
===================================================================
--- branches/branch-3.0/src/forms_compatability.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/forms_compatability.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -38,8 +38,8 @@
 void Fl_Group::forms_end() {
   // set the dimensions of a group to surround contents
   if (children() && !w()) {
-    Fl_Widget*const* a = array();
-    Fl_Widget* o = *a++;
+    fltk3::Widget*const* a = array();
+    fltk3::Widget* o = *a++;
     int rx = o->x();
     int ry = o->y();
     int rw = rx+o->w();
@@ -58,11 +58,11 @@
   }
   // flip all the children's coordinate systems:
   if (fl_flip) {
-    Fl_Widget* o = (type()>=FL_WINDOW) ? this : window();
+    fltk3::Widget* o = (type()>=FL_WINDOW) ? this : window();
     int Y = o->h();
-    Fl_Widget*const* a = array();
+    fltk3::Widget*const* a = array();
     for (int i=children(); i--;) {
-      Fl_Widget* ow = *a++;
+      fltk3::Widget* ow = *a++;
       int newy = Y-ow->y()-ow->h();
       ow->y(newy);
     }
@@ -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;
@@ -89,7 +89,7 @@
 
 char fl_modal_next; // set by fl_freeze_forms()
 
-void fl_show_form(Fl_Window *f,int place,int b,const char *n) {
+void fl_show_form(fltk3::Window *f,int place,int b,const char *n) {
 
   f->label(n);
   if (!b) f->clear_border();
@@ -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
@@ -125,15 +125,15 @@
   else f->show();
 }
 
-Fl_Widget *fl_do_forms(void) {
-  Fl_Widget *obj;
-  while (!(obj = Fl::readqueue())) if (!Fl::wait()) exit(0);
+fltk3::Widget *fl_do_forms(void) {
+  fltk3::Widget *obj;
+  while (!(obj = fltk3::readqueue())) if (!fltk3::wait()) exit(0);
   return obj;
 }
 
-Fl_Widget *fl_check_forms() {
-  Fl::check();
-  return Fl::readqueue();
+fltk3::Widget *fl_check_forms() {
+  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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/forms_free.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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);
 }
 
 /**
@@ -51,7 +51,7 @@
   The constructor takes both the type and the handle function. The handle
   function should be declared as follows:
   \code
-  int handle_function(Fl_Widget *w,
+  int handle_function(fltk3::Widget *w,
                       int       event,
      	              float     event_x,
     		      float     event_y,
@@ -73,26 +73,26 @@
 */
 Fl_Free::Fl_Free(uchar t,int X, int Y, int W, int H,const char *L,
 		 FL_HANDLEPTR hdl) :
-Fl_Widget(X,Y,W,H,L) {
+fltk3::Widget(X,Y,W,H,L) {
   type(t);
   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 FL_FOCUS:
     if (type()!=FL_INPUT_FREE && type()!=FL_ALL_FREE) return 0;
@@ -100,12 +100,12 @@
   case FL_PUSH:
   case FL_DRAG:
   case FL_RELEASE:
-    key = 4-Fl::event_button();
+    key = 4-fltk3::event_button();
     break;
   case FL_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_pixmap.cxx
===================================================================
--- branches/branch-3.0/src/forms_pixmap.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/forms_pixmap.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -36,7 +36,7 @@
 */
 Fl_FormsPixmap::Fl_FormsPixmap(
   Fl_Boxtype t, int X, int Y, int W, int H, const char* L)
-: Fl_Widget(X, Y, W, H, L) {
+: fltk3::Widget(X, Y, W, H, L) {
   box(t);
   b = 0;
   color(FL_BLACK);

Modified: branches/branch-3.0/src/forms_timer.cxx
===================================================================
--- branches/branch-3.0/src/forms_timer.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/forms_timer.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 <FL/Fl.H>
 #include <FL/Fl_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);
 }
 
 /**
@@ -147,7 +147,7 @@
 */
 Fl_Timer::Fl_Timer(uchar t, int X, int Y, int W, int H, const char* l)
 
-: Fl_Widget(X, Y, W, H, l) {
+: fltk3::Widget(X, Y, W, H, l) {
   box(FL_DOWN_BOX);
   selection_color(FL_RED);
   delay = 0;
@@ -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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/gl_draw.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -349,7 +349,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);
 }
 
@@ -375,8 +375,8 @@
   glMatrixMode (GL_MODELVIEW);
   glPushMatrix();
   glLoadIdentity ();
-  float winw = Fl_Window::current()->w();
-  float winh = Fl_Window::current()->h();
+  float winw = fltk3::Window::current()->w();
+  float winh = fltk3::Window::current()->h();
   glScalef (2.0f / winw, 2.0f /  winh, 1.0f);
   glTranslatef (-winw / 2.0f, -winh / 2.0f, 0.0f);
 //write str to a bitmap just big enough  

Modified: branches/branch-3.0/src/gl_start.cxx
===================================================================
--- branches/branch-3.0/src/gl_start.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/gl_start.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -68,22 +68,22 @@
 #if defined(USE_X11)
     context = fl_create_gl_context(fl_visual);
 #elif defined(WIN32)
-    if (!gl_choice) Fl::gl_visual(0);
-    context = fl_create_gl_context(Fl_Window::current(), gl_choice);
+    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
-    context = fl_create_gl_context(Fl_Window::current(), gl_choice);
+    context = fl_create_gl_context(fltk3::Window::current(), gl_choice);
 #else
 #  error Unsupported platform
 #endif
   }
-  fl_set_gl_context(Fl_Window::current(), context);
+  fl_set_gl_context(fltk3::Window::current(), context);
 #if !defined(WIN32) && !defined(__APPLE__)
   glXWaitX();
 #endif
-  if (pw != Fl_Window::current()->w() || ph != Fl_Window::current()->h()) {
-    pw = Fl_Window::current()->w();
-    ph = Fl_Window::current()->h();
+  if (pw != fltk3::Window::current()->w() || ph != fltk3::Window::current()->h()) {
+    pw = fltk3::Window::current()->w();
+    ph = fltk3::Window::current()->h();
     glLoadIdentity();
     glViewport(0, 0, pw, ph);
     glOrtho(0, pw, 0, ph, -1, 1);
@@ -92,10 +92,10 @@
   if (clip_state_number != fl_clip_state_number) {
     clip_state_number = fl_clip_state_number;
     int x, y, w, h;
-    if (fl_clip_box(0, 0, Fl_Window::current()->w(), Fl_Window::current()->h(),
+    if (fl_clip_box(0, 0, fltk3::Window::current()->w(), fltk3::Window::current()->h(),
 		    x, y, w, h)) {
       fl_clip_region(XRectangleRegion(x,y,w,h));
-      glScissor(x, Fl_Window::current()->h()-(y+h), w, h);
+      glScissor(x, fltk3::Window::current()->h()-(y+h), w, h);
       glEnable(GL_SCISSOR_TEST);
     } else {
       glDisable(GL_SCISSOR_TEST);
@@ -111,7 +111,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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/glut_compatability.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -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 FL_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 FL_MOUSEWHEEL:
-    button = Fl::event_dy();
+    button = fltk3::event_dy();
     while (button < 0) {mouse(3,GLUT_DOWN,ex,ey); ++button;}
     while (button > 0) {mouse(4,GLUT_DOWN,ex,ey); --button;}
     return 1;
@@ -142,12 +142,12 @@
     if (!keyboard && !special) break;
 
   case FL_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 > FL_F && k <= FL_F_Last) k -= FL_F;
 	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	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/screen_xywh.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -134,7 +134,7 @@
 /**
   Gets the number of available screens.
 */
-int Fl::screen_count() {
+int fltk3::screen_count() {
   if (!num_screens) screen_init();
 
   return num_screens;
@@ -146,7 +146,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
@@ -203,19 +203,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
@@ -246,10 +246,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();
 }
 
 

Modified: branches/branch-3.0/src/xutf8/test.c
===================================================================
--- branches/branch-3.0/src/xutf8/test.c	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/xutf8/test.c	2010-03-30 15:18:29 UTC (rev 7365)
@@ -89,7 +89,7 @@
   unsigned long mask;
   Display* dpy;
   int scr;
-  Window w, root;
+  NativeWindow w, root;
   XSetWindowAttributes set_attr;
   int i;
   XIMStyle *style;

Modified: branches/branch-3.0/src/xutf8/test2.c
===================================================================
--- branches/branch-3.0/src/xutf8/test2.c	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/src/xutf8/test2.c	2010-03-30 15:18:29 UTC (rev 7365)
@@ -91,7 +91,7 @@
   unsigned long mask;
   Display* dpy;
   int scr;
-  Window w, root;
+  NativeWindow w, root;
   XSetWindowAttributes set_attr;
   int i;
   XIMStyle *style;

Modified: branches/branch-3.0/test/hello.cxx
===================================================================
--- branches/branch-3.0/test/hello.cxx	2010-03-30 12:09:09 UTC (rev 7364)
+++ branches/branch-3.0/test/hello.cxx	2010-03-30 15:18:29 UTC (rev 7365)
@@ -29,15 +29,18 @@
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Box.H>
 
+using namespace fltk3;
+
 int main(int argc, char **argv) {
-  Fl_Window *window = new Fl_Window(300,180);
-  Fl_Box *box = new Fl_Box(FL_UP_BOX,20,40,260,100,"Hello, World!");
+  Window *window = new Window(300,180);
+  Widget *box = new Widget(20,40,260,100,"Hello, World!");
+  box->box(FL_UP_BOX);
   box->labelfont(FL_BOLD+FL_ITALIC);
   box->labelsize(36);
   box->labeltype(FL_SHADOW_LABEL);
   window->end();
   window->show(argc, argv);
-  return Fl::run();
+  return fltk3::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'.