From a6163888f3c56123b1db313743c6147ba498732c Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 8 Aug 2014 14:42:07 +0300 Subject: Add third_party libs --- third_party/windows/fltk-1.1.10/FL/Enumerations.H | 456 +++++++++++ third_party/windows/fltk-1.1.10/FL/Fl.H | 293 +++++++ third_party/windows/fltk-1.1.10/FL/Fl_Adjuster.H | 55 ++ third_party/windows/fltk-1.1.10/FL/Fl_BMP_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Bitmap.H | 64 ++ third_party/windows/fltk-1.1.10/FL/Fl_Box.H | 51 ++ third_party/windows/fltk-1.1.10/FL/Fl_Browser.H | 132 ++++ third_party/windows/fltk-1.1.10/FL/Fl_Browser_.H | 154 ++++ third_party/windows/fltk-1.1.10/FL/Fl_Button.H | 78 ++ third_party/windows/fltk-1.1.10/FL/Fl_Chart.H | 93 +++ .../windows/fltk-1.1.10/FL/Fl_Check_Browser.H | 103 +++ .../windows/fltk-1.1.10/FL/Fl_Check_Button.H | 42 + third_party/windows/fltk-1.1.10/FL/Fl_Choice.H | 48 ++ third_party/windows/fltk-1.1.10/FL/Fl_Clock.H | 75 ++ .../windows/fltk-1.1.10/FL/Fl_Color_Chooser.H | 104 +++ third_party/windows/fltk-1.1.10/FL/Fl_Counter.H | 76 ++ third_party/windows/fltk-1.1.10/FL/Fl_Dial.H | 67 ++ .../windows/fltk-1.1.10/FL/Fl_Double_Window.H | 54 ++ third_party/windows/fltk-1.1.10/FL/Fl_Export.H | 49 ++ .../windows/fltk-1.1.10/FL/Fl_File_Browser.H | 81 ++ .../windows/fltk-1.1.10/FL/Fl_File_Chooser.H | 187 +++++ third_party/windows/fltk-1.1.10/FL/Fl_File_Icon.H | 115 +++ third_party/windows/fltk-1.1.10/FL/Fl_File_Input.H | 68 ++ third_party/windows/fltk-1.1.10/FL/Fl_Fill_Dial.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Fill_Slider.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Float_Input.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_FormsBitmap.H | 48 ++ .../windows/fltk-1.1.10/FL/Fl_FormsPixmap.H | 48 ++ third_party/windows/fltk-1.1.10/FL/Fl_Free.H | 66 ++ third_party/windows/fltk-1.1.10/FL/Fl_GIF_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Gl_Window.H | 99 +++ third_party/windows/fltk-1.1.10/FL/Fl_Group.H | 111 +++ .../windows/fltk-1.1.10/FL/Fl_Help_Dialog.H | 92 +++ third_party/windows/fltk-1.1.10/FL/Fl_Help_View.H | 221 ++++++ .../windows/fltk-1.1.10/FL/Fl_Hold_Browser.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Hor_Fill_Slider.H | 42 + .../windows/fltk-1.1.10/FL/Fl_Hor_Nice_Slider.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Hor_Slider.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Hor_Value_Slider.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Image.H | 112 +++ third_party/windows/fltk-1.1.10/FL/Fl_Input.H | 47 ++ third_party/windows/fltk-1.1.10/FL/Fl_Input_.H | 145 ++++ .../windows/fltk-1.1.10/FL/Fl_Input_Choice.H | 199 +++++ third_party/windows/fltk-1.1.10/FL/Fl_Int_Input.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_JPEG_Image.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Light_Button.H | 45 ++ third_party/windows/fltk-1.1.10/FL/Fl_Line_Dial.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Menu.H | 33 + third_party/windows/fltk-1.1.10/FL/Fl_Menu_.H | 102 +++ third_party/windows/fltk-1.1.10/FL/Fl_Menu_Bar.H | 46 ++ .../windows/fltk-1.1.10/FL/Fl_Menu_Button.H | 48 ++ third_party/windows/fltk-1.1.10/FL/Fl_Menu_Item.H | 167 ++++ .../windows/fltk-1.1.10/FL/Fl_Menu_Window.H | 54 ++ .../windows/fltk-1.1.10/FL/Fl_Multi_Browser.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Multi_Label.H | 47 ++ .../windows/fltk-1.1.10/FL/Fl_Multiline_Input.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Multiline_Output.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Nice_Slider.H | 42 + third_party/windows/fltk-1.1.10/FL/Fl_Object.H | 36 + third_party/windows/fltk-1.1.10/FL/Fl_Output.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Overlay_Window.H | 56 ++ third_party/windows/fltk-1.1.10/FL/Fl_PNG_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_PNM_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Pack.H | 51 ++ third_party/windows/fltk-1.1.10/FL/Fl_Pixmap.H | 80 ++ third_party/windows/fltk-1.1.10/FL/Fl_Positioner.H | 77 ++ .../windows/fltk-1.1.10/FL/Fl_Preferences.H | 171 +++++ third_party/windows/fltk-1.1.10/FL/Fl_Progress.H | 70 ++ third_party/windows/fltk-1.1.10/FL/Fl_RGB_Image.H | 35 + .../windows/fltk-1.1.10/FL/Fl_Radio_Button.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Radio_Light_Button.H | 42 + .../windows/fltk-1.1.10/FL/Fl_Radio_Round_Button.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Repeat_Button.H | 49 ++ .../windows/fltk-1.1.10/FL/Fl_Return_Button.H | 45 ++ third_party/windows/fltk-1.1.10/FL/Fl_Roller.H | 47 ++ .../windows/fltk-1.1.10/FL/Fl_Round_Button.H | 42 + .../windows/fltk-1.1.10/FL/Fl_Round_Clock.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_Scroll.H | 79 ++ third_party/windows/fltk-1.1.10/FL/Fl_Scrollbar.H | 61 ++ .../windows/fltk-1.1.10/FL/Fl_Secret_Input.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Select_Browser.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Shared_Image.H | 99 +++ .../windows/fltk-1.1.10/FL/Fl_Simple_Counter.H | 43 ++ .../windows/fltk-1.1.10/FL/Fl_Single_Window.H | 49 ++ third_party/windows/fltk-1.1.10/FL/Fl_Slider.H | 75 ++ third_party/windows/fltk-1.1.10/FL/Fl_Spinner.H | 224 ++++++ .../windows/fltk-1.1.10/FL/Fl_Sys_Menu_Bar.H | 56 ++ third_party/windows/fltk-1.1.10/FL/Fl_Tabs.H | 57 ++ .../windows/fltk-1.1.10/FL/Fl_Text_Buffer.H | 263 +++++++ .../windows/fltk-1.1.10/FL/Fl_Text_Display.H | 298 ++++++++ .../windows/fltk-1.1.10/FL/Fl_Text_Editor.H | 110 +++ third_party/windows/fltk-1.1.10/FL/Fl_Tile.H | 45 ++ .../windows/fltk-1.1.10/FL/Fl_Tiled_Image.H | 59 ++ third_party/windows/fltk-1.1.10/FL/Fl_Timer.H | 65 ++ .../windows/fltk-1.1.10/FL/Fl_Toggle_Button.H | 43 ++ .../fltk-1.1.10/FL/Fl_Toggle_Light_Button.H | 37 + .../fltk-1.1.10/FL/Fl_Toggle_Round_Button.H | 37 + third_party/windows/fltk-1.1.10/FL/Fl_Tooltip.H | 77 ++ third_party/windows/fltk-1.1.10/FL/Fl_Valuator.H | 86 +++ .../windows/fltk-1.1.10/FL/Fl_Value_Input.H | 65 ++ .../windows/fltk-1.1.10/FL/Fl_Value_Output.H | 58 ++ .../windows/fltk-1.1.10/FL/Fl_Value_Slider.H | 52 ++ third_party/windows/fltk-1.1.10/FL/Fl_Widget.H | 221 ++++++ third_party/windows/fltk-1.1.10/FL/Fl_Window.H | 135 ++++ third_party/windows/fltk-1.1.10/FL/Fl_Wizard.H | 62 ++ third_party/windows/fltk-1.1.10/FL/Fl_XBM_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Fl_XPM_Image.H | 43 ++ third_party/windows/fltk-1.1.10/FL/Makefile.in | 63 ++ third_party/windows/fltk-1.1.10/FL/dirent.h | 33 + third_party/windows/fltk-1.1.10/FL/filename.H | 156 ++++ third_party/windows/fltk-1.1.10/FL/fl_ask.H | 81 ++ third_party/windows/fltk-1.1.10/FL/fl_draw.H | 207 +++++ third_party/windows/fltk-1.1.10/FL/fl_message.H | 32 + .../windows/fltk-1.1.10/FL/fl_show_colormap.H | 37 + third_party/windows/fltk-1.1.10/FL/fl_show_input.H | 32 + third_party/windows/fltk-1.1.10/FL/forms.H | 844 +++++++++++++++++++++ third_party/windows/fltk-1.1.10/FL/gl.h | 87 +++ third_party/windows/fltk-1.1.10/FL/gl2opengl.h | 35 + third_party/windows/fltk-1.1.10/FL/gl_draw.H | 35 + third_party/windows/fltk-1.1.10/FL/glu.h | 60 ++ third_party/windows/fltk-1.1.10/FL/glut.H | 487 ++++++++++++ third_party/windows/fltk-1.1.10/FL/mac.H | 136 ++++ third_party/windows/fltk-1.1.10/FL/mac.r | 13 + third_party/windows/fltk-1.1.10/FL/math.h | 72 ++ third_party/windows/fltk-1.1.10/FL/names.h | 85 +++ third_party/windows/fltk-1.1.10/FL/win32.H | 152 ++++ third_party/windows/fltk-1.1.10/FL/x.H | 148 ++++ 127 files changed, 11386 insertions(+) create mode 100644 third_party/windows/fltk-1.1.10/FL/Enumerations.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Adjuster.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_BMP_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Bitmap.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Box.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Browser_.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Chart.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Check_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Check_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Choice.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Clock.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Color_Chooser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Counter.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Dial.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Double_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Export.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_File_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_File_Chooser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_File_Icon.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_File_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Fill_Dial.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Fill_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Float_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_FormsBitmap.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_FormsPixmap.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Free.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_GIF_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Gl_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Group.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Help_Dialog.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Help_View.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Hold_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Hor_Fill_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Hor_Nice_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Hor_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Hor_Value_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Input_.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Input_Choice.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Int_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_JPEG_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Light_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Line_Dial.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu_.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu_Bar.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu_Item.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Menu_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Multi_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Multi_Label.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Output.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Nice_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Object.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Output.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Overlay_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_PNG_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_PNM_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Pack.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Pixmap.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Positioner.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Preferences.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Progress.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_RGB_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Radio_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Radio_Light_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Radio_Round_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Repeat_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Return_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Roller.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Round_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Round_Clock.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Scroll.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Scrollbar.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Secret_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Select_Browser.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Shared_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Simple_Counter.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Single_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Spinner.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Sys_Menu_Bar.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Tabs.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Text_Buffer.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Text_Display.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Text_Editor.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Tile.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Tiled_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Timer.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Light_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Round_Button.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Tooltip.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Valuator.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Value_Input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Value_Output.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Value_Slider.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Widget.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Window.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_Wizard.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_XBM_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Fl_XPM_Image.H create mode 100644 third_party/windows/fltk-1.1.10/FL/Makefile.in create mode 100644 third_party/windows/fltk-1.1.10/FL/dirent.h create mode 100644 third_party/windows/fltk-1.1.10/FL/filename.H create mode 100644 third_party/windows/fltk-1.1.10/FL/fl_ask.H create mode 100644 third_party/windows/fltk-1.1.10/FL/fl_draw.H create mode 100644 third_party/windows/fltk-1.1.10/FL/fl_message.H create mode 100644 third_party/windows/fltk-1.1.10/FL/fl_show_colormap.H create mode 100644 third_party/windows/fltk-1.1.10/FL/fl_show_input.H create mode 100644 third_party/windows/fltk-1.1.10/FL/forms.H create mode 100644 third_party/windows/fltk-1.1.10/FL/gl.h create mode 100644 third_party/windows/fltk-1.1.10/FL/gl2opengl.h create mode 100644 third_party/windows/fltk-1.1.10/FL/gl_draw.H create mode 100644 third_party/windows/fltk-1.1.10/FL/glu.h create mode 100644 third_party/windows/fltk-1.1.10/FL/glut.H create mode 100644 third_party/windows/fltk-1.1.10/FL/mac.H create mode 100644 third_party/windows/fltk-1.1.10/FL/mac.r create mode 100644 third_party/windows/fltk-1.1.10/FL/math.h create mode 100644 third_party/windows/fltk-1.1.10/FL/names.h create mode 100644 third_party/windows/fltk-1.1.10/FL/win32.H create mode 100644 third_party/windows/fltk-1.1.10/FL/x.H (limited to 'third_party/windows/fltk-1.1.10/FL') diff --git a/third_party/windows/fltk-1.1.10/FL/Enumerations.H b/third_party/windows/fltk-1.1.10/FL/Enumerations.H new file mode 100644 index 0000000..f9c1fba --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Enumerations.H @@ -0,0 +1,456 @@ +// +// "$Id: Enumerations.H 6817 2009-07-02 09:42:17Z AlbrechtS $" +// +// Enumerations for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2009 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Enumerations_H +#define Fl_Enumerations_H + +# include "Fl_Export.H" + + +// +// The FLTK version number; this is changed slightly from the beta versions +// because the old "const double" definition would not allow for conditional +// compilation... +// +// FL_VERSION is a double that describes the major and minor version numbers. +// Version 1.1 is actually stored as 1.01 to allow for more than 9 minor +// releases. +// +// The FL_MAJOR_VERSION, FL_MINOR_VERSION, and FL_PATCH_VERSION constants +// give the integral values for the major, minor, and patch releases +// respectively. +// + +#define FL_MAJOR_VERSION 1 +#define FL_MINOR_VERSION 1 +#define FL_PATCH_VERSION 10 +#define FL_VERSION ((double)FL_MAJOR_VERSION + \ + (double)FL_MINOR_VERSION * 0.01 + \ + (double)FL_PATCH_VERSION * 0.0001) + +typedef unsigned char uchar; +typedef unsigned long ulong; + +enum Fl_Event { // events + FL_NO_EVENT = 0, + FL_PUSH = 1, + FL_RELEASE = 2, + FL_ENTER = 3, + FL_LEAVE = 4, + FL_DRAG = 5, + FL_FOCUS = 6, + FL_UNFOCUS = 7, + FL_KEYDOWN = 8, + FL_KEYUP = 9, + FL_CLOSE = 10, + FL_MOVE = 11, + FL_SHORTCUT = 12, + FL_DEACTIVATE = 13, + FL_ACTIVATE = 14, + FL_HIDE = 15, + FL_SHOW = 16, + FL_PASTE = 17, + FL_SELECTIONCLEAR = 18, + FL_MOUSEWHEEL = 19, + FL_DND_ENTER = 20, + FL_DND_DRAG = 21, + FL_DND_LEAVE = 22, + FL_DND_RELEASE = 23 +}; +#define FL_KEYBOARD FL_KEYDOWN + +enum Fl_When { // Fl_Widget::when(): + FL_WHEN_NEVER = 0, + FL_WHEN_CHANGED = 1, + FL_WHEN_RELEASE = 4, + FL_WHEN_RELEASE_ALWAYS= 6, + FL_WHEN_ENTER_KEY = 8, + FL_WHEN_ENTER_KEY_ALWAYS=10, + FL_WHEN_ENTER_KEY_CHANGED=11, + FL_WHEN_NOT_CHANGED = 2 // modifier bit to disable changed() test +}; + +// Fl::event_key() and Fl::get_key(n) (use ascii letters for all other keys): +#define FL_Button 0xfee8 // use Fl_Button+FL_*_MOUSE +#define FL_BackSpace 0xff08 +#define FL_Tab 0xff09 +#define FL_Enter 0xff0d +#define FL_Pause 0xff13 +#define FL_Scroll_Lock 0xff14 +#define FL_Escape 0xff1b +#define FL_Home 0xff50 +#define FL_Left 0xff51 +#define FL_Up 0xff52 +#define FL_Right 0xff53 +#define FL_Down 0xff54 +#define FL_Page_Up 0xff55 +#define FL_Page_Down 0xff56 +#define FL_End 0xff57 +#define FL_Print 0xff61 +#define FL_Insert 0xff63 +#define FL_Menu 0xff67 // the "menu/apps" key on XFree86 +#define FL_Help 0xff68 // the 'help' key on Mac keyboards +#define FL_Num_Lock 0xff7f +#define FL_KP 0xff80 // use FL_KP+'x' for 'x' on numeric keypad +#define FL_KP_Enter 0xff8d // same as Fl_KP+'\r' +#define FL_KP_Last 0xffbd // use to range-check keypad +#define FL_F 0xffbd // use FL_F+n for function key n +#define FL_F_Last 0xffe0 // use to range-check function keys +#define FL_Shift_L 0xffe1 +#define FL_Shift_R 0xffe2 +#define FL_Control_L 0xffe3 +#define FL_Control_R 0xffe4 +#define FL_Caps_Lock 0xffe5 +#define FL_Meta_L 0xffe7 // the left MSWindows key on XFree86 +#define FL_Meta_R 0xffe8 // the right MSWindows key on XFree86 +#define FL_Alt_L 0xffe9 +#define FL_Alt_R 0xffea +#define FL_Delete 0xffff + +// Fl::event_button(): +#define FL_LEFT_MOUSE 1 +#define FL_MIDDLE_MOUSE 2 +#define FL_RIGHT_MOUSE 3 + +// Fl::event_state(): +#define FL_SHIFT 0x00010000 +#define FL_CAPS_LOCK 0x00020000 +#define FL_CTRL 0x00040000 +#define FL_ALT 0x00080000 +#define FL_NUM_LOCK 0x00100000 // most X servers do this? +#define FL_META 0x00400000 // correct for XFree86 +#define FL_SCROLL_LOCK 0x00800000 // correct for XFree86 +#define FL_BUTTON1 0x01000000 +#define FL_BUTTON2 0x02000000 +#define FL_BUTTON3 0x04000000 +#define FL_BUTTONS 0x7f000000 // All possible buttons +#define FL_BUTTON(n) (0x00800000<<(n)) + +#ifdef __APPLE__ +# define FL_COMMAND FL_META +#else +# define FL_COMMAND FL_CTRL +#endif // __APPLE__ + +enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C): + FL_NO_BOX = 0, FL_FLAT_BOX, + + FL_UP_BOX, FL_DOWN_BOX, + FL_UP_FRAME, FL_DOWN_FRAME, + FL_THIN_UP_BOX, FL_THIN_DOWN_BOX, + FL_THIN_UP_FRAME, FL_THIN_DOWN_FRAME, + FL_ENGRAVED_BOX, FL_EMBOSSED_BOX, + FL_ENGRAVED_FRAME, FL_EMBOSSED_FRAME, + FL_BORDER_BOX, _FL_SHADOW_BOX, + FL_BORDER_FRAME, _FL_SHADOW_FRAME, + _FL_ROUNDED_BOX, _FL_RSHADOW_BOX, + _FL_ROUNDED_FRAME, _FL_RFLAT_BOX, + _FL_ROUND_UP_BOX, _FL_ROUND_DOWN_BOX, + _FL_DIAMOND_UP_BOX, _FL_DIAMOND_DOWN_BOX, + _FL_OVAL_BOX, _FL_OSHADOW_BOX, + _FL_OVAL_FRAME, _FL_OFLAT_BOX, + _FL_PLASTIC_UP_BOX, _FL_PLASTIC_DOWN_BOX, + _FL_PLASTIC_UP_FRAME, _FL_PLASTIC_DOWN_FRAME, + _FL_PLASTIC_THIN_UP_BOX, _FL_PLASTIC_THIN_DOWN_BOX, + _FL_PLASTIC_ROUND_UP_BOX, _FL_PLASTIC_ROUND_DOWN_BOX, + _FL_GTK_UP_BOX, _FL_GTK_DOWN_BOX, + _FL_GTK_UP_FRAME, _FL_GTK_DOWN_FRAME, + _FL_GTK_THIN_UP_BOX, _FL_GTK_THIN_DOWN_BOX, + _FL_GTK_THIN_UP_FRAME, _FL_GTK_THIN_DOWN_FRAME, + _FL_GTK_ROUND_UP_BOX, _FL_GTK_ROUND_DOWN_BOX, + FL_FREE_BOXTYPE +}; +extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); +#define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX() +#define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1) +extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX(); +#define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX() +#define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2) +extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX(); +#define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX() +#define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2) +extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX(); +#define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX() +extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX(); +#define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX() +extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX(); +#define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX() +#define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1) +extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX(); +#define FL_OVAL_BOX fl_define_FL_OVAL_BOX() +#define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1) +#define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2) +#define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3) + +extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX(); +#define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX() +#define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1) +#define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2) +#define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3) +#define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4) +#define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5) +#define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6) +#define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7) + +extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX(); +#define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX() +#define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1) +#define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2) +#define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3) +#define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4) +#define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5) +#define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6) +#define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7) +#define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8) +#define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9) + +// conversions of box types to other boxtypes: +inline Fl_Boxtype fl_box(Fl_Boxtype b) { + return (Fl_Boxtype)((b1)?b:(b-2)); +} +inline Fl_Boxtype fl_down(Fl_Boxtype b) { + return (Fl_Boxtype)((b lines) Fl_Browser_::display(find_line(lines)); + else Fl_Browser_::display(find_line(n)); + } + + // for back compatability only: + void replace(int a, const char* b) {text(a, b);} + void display(int, int=1); +}; + +#endif + +// +// End of "$Id: Fl_Browser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Browser_.H b/third_party/windows/fltk-1.1.10/FL/Fl_Browser_.H new file mode 100644 index 0000000..90da2e7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Browser_.H @@ -0,0 +1,154 @@ +// +// "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $" +// +// Common browser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// This is the base class for browsers. To be useful it must +// be subclassed and several virtual functions defined. The +// Forms-compatable browser and the file chooser's browser are +// subclassed off of this. + +// Yes, I know this should be a template... + +#ifndef Fl_Browser__H +#define Fl_Browser__H + +#ifndef Fl_Group_H +#include "Fl_Group.H" +#endif +#include "Fl_Scrollbar.H" + +#define FL_NORMAL_BROWSER 0 +#define FL_SELECT_BROWSER 1 +#define FL_HOLD_BROWSER 2 +#define FL_MULTI_BROWSER 3 + +class FL_EXPORT Fl_Browser_ : public Fl_Group { + int position_; // where user wants it scrolled to + int real_position_; // the current vertical scrolling position + int hposition_; // where user wants it panned to + int real_hposition_; // the current horizontal scrolling position + int offset_; // how far down top_ item the real_position is + int max_width; // widest object seen so far + uchar has_scrollbar_; // which scrollbars are enabled + uchar textfont_, textsize_; + unsigned textcolor_; + void* top_; // which item scrolling position is in + void* selection_; // which is selected (except for FL_MULTI_BROWSER) + void *redraw1,*redraw2; // minimal update pointers + void* max_width_item; // which item has max_width_ + + static int scrollbar_width_; + + void update_top(); + +protected: + + // All of the following must be supplied by the subclass: + virtual void *item_first() const = 0; + virtual void *item_next(void *) const = 0; + virtual void *item_prev(void *) const = 0; + virtual int item_height(void *) const = 0; + virtual int item_width(void *) const = 0; + virtual int item_quick_height(void *) const ; + virtual void item_draw(void *,int,int,int,int) const = 0; + // you don't have to provide these but it may help speed it up: + virtual int full_width() const ; // current width of all items + virtual int full_height() const ; // current height of all items + virtual int incr_height() const ; // average height of an item + // These only need to be done by subclass if you want a multi-browser: + virtual void item_select(void *,int=1); + virtual int item_selected(void *) const ; + + // things the subclass may want to call: + void *top() const {return top_;} + void *selection() const {return selection_;} + void new_list(); // completely clobber all data, as though list replaced + void deleting(void *a); // get rid of any pointers to a + void replacing(void *a,void *b); // change a pointers to b + void swapping(void *a,void *b); // exchange pointers a and b + void inserting(void *a,void *b); // insert b near a + int displayed(void *) const ; // true if this line is visible + void redraw_line(void *); // minimal update, no change in size + void redraw_lines() {damage(FL_DAMAGE_SCROLL);} // redraw all of them + void bbox(int&,int&,int&,int&) const; + int leftedge() const; // x position after scrollbar & border + void *find_item(int my); // item under mouse + void draw(int,int,int,int); + int handle(int,int,int,int,int); + + void draw(); + Fl_Browser_(int,int,int,int,const char * = 0); + +public: + + Fl_Scrollbar scrollbar; // Vertical scrollbar + Fl_Scrollbar hscrollbar; // Horizontal scrollbar + + int handle(int); + void resize(int,int,int,int); + + int select(void *,int=1,int docallbacks=0); + int select_only(void *,int docallbacks=0); + int deselect(int docallbacks=0); + int position() const {return position_;} + int hposition() const {return hposition_;} + void position(int); // scroll to here + void hposition(int); // pan to here + void display(void*); // scroll so this item is shown + + uchar has_scrollbar() const {return has_scrollbar_;} + void has_scrollbar(uchar i) {has_scrollbar_ = i;} + enum { // values for has_scrollbar() + HORIZONTAL = 1, + VERTICAL = 2, + BOTH = 3, + ALWAYS_ON = 4, + HORIZONTAL_ALWAYS = 5, + VERTICAL_ALWAYS = 6, + BOTH_ALWAYS = 7 + }; + + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned n) {textcolor_ = n;} + + static void scrollbar_width(int b) {scrollbar_width_ = b;} + static int scrollbar_width() {return scrollbar_width_;} + + // for back compatability: + void scrollbar_right() {scrollbar.align(FL_ALIGN_RIGHT);} + void scrollbar_left() {scrollbar.align(FL_ALIGN_LEFT);} + +}; + +#endif + +// +// End of "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Button.H new file mode 100644 index 0000000..4b3b5ae --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Button.H @@ -0,0 +1,78 @@ +// +// "$Id: Fl_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Button_H +#define Fl_Button_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +// values for type() +#define FL_NORMAL_BUTTON 0 +#define FL_TOGGLE_BUTTON 1 +#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) +#define FL_HIDDEN_BUTTON 3 // for Forms compatability + +extern FL_EXPORT int fl_old_shortcut(const char*); + +class FL_EXPORT Fl_Button : public Fl_Widget { + + int shortcut_; + char value_; + char oldval; + uchar down_box_; + +protected: + + virtual void draw(); + +public: + + virtual int handle(int); + Fl_Button(int,int,int,int,const char * = 0); + int value(int); + char value() const {return value_;} + int set() {return value(1);} + int clear() {return value(0);} + void setonly(); // this should only be called on FL_RADIO_BUTTONs + int shortcut() const {return shortcut_;} + void shortcut(int s) {shortcut_ = s;} + Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} + void down_box(Fl_Boxtype b) {down_box_ = b;} + + // back compatability: + void shortcut(const char *s) {shortcut(fl_old_shortcut(s));} + Fl_Color down_color() const {return selection_color();} + void down_color(unsigned c) {selection_color(c);} +}; + +#endif + +// +// End of "$Id: Fl_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Chart.H b/third_party/windows/fltk-1.1.10/FL/Fl_Chart.H new file mode 100644 index 0000000..528594e --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Chart.H @@ -0,0 +1,93 @@ +// +// "$Id: Fl_Chart.H 4288 2005-04-16 00:13:17Z mike $" +// +// Forms chart header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Chart_H +#define Fl_Chart_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +// values for type() +#define FL_BAR_CHART 0 +#define FL_HORBAR_CHART 1 +#define FL_LINE_CHART 2 +#define FL_FILL_CHART 3 +#define FL_SPIKE_CHART 4 +#define FL_PIE_CHART 5 +#define FL_SPECIALPIE_CHART 6 + +#define FL_FILLED_CHART FL_FILL_CHART // compatibility + +#define FL_CHART_MAX 128 +#define FL_CHART_LABEL_MAX 18 + +struct FL_CHART_ENTRY { + float val; + unsigned col; + char str[FL_CHART_LABEL_MAX+1]; +}; + +class FL_EXPORT Fl_Chart : public Fl_Widget { + int numb; + int maxnumb; + int sizenumb; + FL_CHART_ENTRY *entries; + double min,max; + uchar autosize_; + uchar textfont_,textsize_; + unsigned textcolor_; +protected: + void draw(); +public: + Fl_Chart(int,int,int,int,const char * = 0); + ~Fl_Chart(); + void clear(); + void add(double, const char * =0, unsigned=0); + void insert(int, double, const char * =0, unsigned=0); + void replace(int, double, const char * =0, unsigned=0); + void bounds(double *a,double *b) const {*a = min; *b = max;} + void bounds(double a,double b); + int size() const {return numb;} + void size(int W, int H) { Fl_Widget::size(W, H); } + int maxsize() const {return maxnumb;} + void maxsize(int); + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned n) {textcolor_ = n;} + uchar autosize() const {return autosize_;} + void autosize(uchar n) {autosize_ = n;} +}; + +#endif + +// +// End of "$Id: Fl_Chart.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Check_Browser.H b/third_party/windows/fltk-1.1.10/FL/Fl_Check_Browser.H new file mode 100644 index 0000000..03bcf95 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Check_Browser.H @@ -0,0 +1,103 @@ +// +// "$Id: Fl_Check_Browser.H 5979 2007-11-19 15:46:24Z matt $" +// +// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Check_Browser_H +#define Fl_Check_Browser_H + +#include "Fl.H" +#include "Fl_Browser_.H" + +class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ { + /* required routines for Fl_Browser_ subclass: */ + + void *item_first() const; + void *item_next(void *) const; + void *item_prev(void *) const; + int item_height(void *) const; + int item_width(void *) const; + void item_draw(void *, int, int, int, int) const; + void item_select(void *, int); + int item_selected(void *) const; + + /* private data */ + + public: // IRIX 5.3 C++ compiler doesn't support private structures... + + struct cb_item { + cb_item *next; + cb_item *prev; + char checked; + char selected; + char *text; + }; + + private: + + cb_item *first; + cb_item *last; + cb_item *cache; + int cached_item; + int nitems_; + int nchecked_; + cb_item *find_item(int) const; + int lineno(cb_item *) const; + + public: + + Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0); + ~Fl_Check_Browser() { clear(); } + int add(char *s); // add an (unchecked) item + int add(char *s, int b); // add an item and set checked + // both return the new nitems() + int remove(int item); // delete an item. Returns nitems() + + // inline const char * methods to avoid breaking binary compatibility... + int add(const char *s) { return add((char *)s); } + int add(const char *s, int b) { return add((char *)s, b); } + + void clear(); // delete all items + int nitems() const { return nitems_; } + int nchecked() const { return nchecked_; } + int checked(int item) const; + void checked(int item, int b); + void set_checked(int item) { checked(item, 1); } + void check_all(); + void check_none(); + int value() const; // currently selected item + char *text(int item) const; // returns pointer to internal buffer + + protected: + + int handle(int); +}; + +#endif // Fl_Check_Browser_H + +// +// End of "$Id: Fl_Check_Browser.H 5979 2007-11-19 15:46:24Z matt $". +// + diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Check_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Check_Button.H new file mode 100644 index 0000000..689a24b --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Check_Button.H @@ -0,0 +1,42 @@ +// +// "$Id: Fl_Check_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Check button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Check_Button_H +#define Fl_Check_Button_H + +#include "Fl_Light_Button.H" + +class FL_EXPORT Fl_Check_Button : public Fl_Light_Button { +public: + Fl_Check_Button(int x,int y,int w,int h,const char *l = 0); +}; + +#endif + +// +// End of "$Id: Fl_Check_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Choice.H b/third_party/windows/fltk-1.1.10/FL/Fl_Choice.H new file mode 100644 index 0000000..d547547 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Choice.H @@ -0,0 +1,48 @@ +// +// "$Id: Fl_Choice.H 4288 2005-04-16 00:13:17Z mike $" +// +// Choice header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Choice_H +#define Fl_Choice_H + +#include "Fl_Menu_.H" + +class FL_EXPORT Fl_Choice : public Fl_Menu_ { +protected: + void draw(); +public: + int handle(int); + Fl_Choice(int,int,int,int,const char * = 0); + int value(const Fl_Menu_Item*); + int value(int i); + int value() const {return Fl_Menu_::value();} +}; + +#endif + +// +// End of "$Id: Fl_Choice.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Clock.H b/third_party/windows/fltk-1.1.10/FL/Fl_Clock.H new file mode 100644 index 0000000..b1aaed5 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Clock.H @@ -0,0 +1,75 @@ +// +// "$Id: Fl_Clock.H 4288 2005-04-16 00:13:17Z mike $" +// +// Clock header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Clock_H +#define Fl_Clock_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +// values for type: +#define FL_SQUARE_CLOCK 0 +#define FL_ROUND_CLOCK 1 +#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK +#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // nyi + +// a Fl_Clock_Output can be used to display a program-supplied time: + +class FL_EXPORT Fl_Clock_Output : public Fl_Widget { + int hour_, minute_, second_; + ulong value_; + void drawhands(Fl_Color,Fl_Color); // part of draw +protected: + void draw(int, int, int, int); + void draw(); +public: + Fl_Clock_Output(int x,int y,int w,int h, const char *l = 0); + void value(ulong v); // set to this Unix time + void value(int,int,int); // set hour, minute, second + ulong value() const {return value_;} + int hour() const {return hour_;} + int minute() const {return minute_;} + int second() const {return second_;} +}; + +// a Fl_Clock displays the current time always by using a timeout: + +class FL_EXPORT Fl_Clock : public Fl_Clock_Output { +public: + int handle(int); + void update(); + Fl_Clock(int x,int y,int w,int h, const char *l = 0); + Fl_Clock(uchar t,int x,int y,int w,int h, const char *l); + ~Fl_Clock(); +}; + +#endif + +// +// End of "$Id: Fl_Clock.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Color_Chooser.H b/third_party/windows/fltk-1.1.10/FL/Fl_Color_Chooser.H new file mode 100644 index 0000000..6bd49d5 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Color_Chooser.H @@ -0,0 +1,104 @@ +// +// "$Id: Fl_Color_Chooser.H 4288 2005-04-16 00:13:17Z mike $" +// +// Color chooser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// The color chooser object and the color chooser popup. The popup +// is just a window containing a single color chooser and some boxes +// to indicate the current and cancelled color. + +#ifndef Fl_Color_Chooser_H +#define Fl_Color_Chooser_H + +#include +#include +#include +#include +#include + +class FL_EXPORT Flcc_HueBox : public Fl_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) { + px = py = 0;} +}; + +class FL_EXPORT Flcc_ValueBox : public Fl_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) { + py = 0;} +}; + +class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input { +public: + int format(char*); + Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {} +}; + +class FL_EXPORT Fl_Color_Chooser : public Fl_Group { + Flcc_HueBox huebox; + Flcc_ValueBox valuebox; + Fl_Choice choice; + Flcc_Value_Input rvalue; + Flcc_Value_Input gvalue; + Flcc_Value_Input bvalue; + Fl_Box resize_box; + 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*); +public: + int mode() {return choice.value();} + double hue() const {return hue_;} + double saturation() const {return saturation_;} + double value() const {return value_;} + double r() const {return r_;} + double g() const {return g_;} + double b() const {return b_;} + int hsv(double,double,double); + int rgb(double,double,double); + static void hsv2rgb(double, double, double,double&,double&,double&); + static void rgb2hsv(double, double, double,double&,double&,double&); + Fl_Color_Chooser(int,int,int,int,const char* = 0); +}; + +FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b); +FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b); + +#endif + +// +// End of "$Id: Fl_Color_Chooser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Counter.H b/third_party/windows/fltk-1.1.10/FL/Fl_Counter.H new file mode 100644 index 0000000..412325a --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Counter.H @@ -0,0 +1,76 @@ +// +// "$Id: Fl_Counter.H 4288 2005-04-16 00:13:17Z mike $" +// +// Counter header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// A numerical value with up/down step buttons. From Forms. + +#ifndef Fl_Counter_H +#define Fl_Counter_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +// values for type(): +#define FL_NORMAL_COUNTER 0 +#define FL_SIMPLE_COUNTER 1 + +class FL_EXPORT Fl_Counter : public Fl_Valuator { + + uchar textfont_, textsize_; + unsigned textcolor_; + double lstep_; + uchar mouseobj; + static void repeat_callback(void *); + int calc_mouseobj(); + void increment_cb(); + +protected: + + void draw(); + +public: + + int handle(int); + Fl_Counter(int,int,int,int,const char * = 0); + ~Fl_Counter(); + void lstep(double a) {lstep_ = a;} + void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;} + void step(double a) {Fl_Valuator::step(a);} + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned s) {textcolor_ = s;} + +}; + +#endif + +// +// End of "$Id: Fl_Counter.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Dial.H b/third_party/windows/fltk-1.1.10/FL/Fl_Dial.H new file mode 100644 index 0000000..07bbd21 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Dial.H @@ -0,0 +1,67 @@ +// +// "$Id: Fl_Dial.H 4288 2005-04-16 00:13:17Z mike $" +// +// Dial header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Dial_H +#define Fl_Dial_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +// values for type(): +#define FL_NORMAL_DIAL 0 +#define FL_LINE_DIAL 1 +#define FL_FILL_DIAL 2 + +class FL_EXPORT Fl_Dial : public Fl_Valuator { + + short a1,a2; + +protected: + + // these allow subclasses to put the dial in a smaller area: + void draw(int, int, int, int); + int handle(int, int, int, int, int); + void draw(); + +public: + + int handle(int); + Fl_Dial(int x,int y,int w,int h, const char *l = 0); + short angle1() const {return a1;} + void angle1(short a) {a1 = a;} + short angle2() const {return a2;} + void angle2(short a) {a2 = a;} + void angles(short a, short b) {a1 = a; a2 = b;} + +}; + +#endif + +// +// End of "$Id: Fl_Dial.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Double_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Double_Window.H new file mode 100644 index 0000000..5a8c767 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Double_Window.H @@ -0,0 +1,54 @@ +// +// "$Id: Fl_Double_Window.H 4288 2005-04-16 00:13:17Z mike $" +// +// Double-buffered window header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Double_Window_H +#define Fl_Double_Window_H + +#include "Fl_Window.H" + +class FL_EXPORT Fl_Double_Window : public Fl_Window { +protected: + void flush(int eraseoverlay); + char force_doublebuffering_; // force db, even if the OS already buffers windows (overlays need that on MacOS and Windows2000) +public: + void show(); + void show(int a, char **b) {Fl_Window::show(a,b);} + void flush(); + void resize(int,int,int,int); + void hide(); + ~Fl_Double_Window(); + Fl_Double_Window(int W, int H, const char *l = 0) + : Fl_Window(W,H,l), force_doublebuffering_(0) { type(FL_DOUBLE_WINDOW); } + 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); } +}; + +#endif + +// +// End of "$Id: Fl_Double_Window.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Export.H b/third_party/windows/fltk-1.1.10/FL/Fl_Export.H new file mode 100644 index 0000000..a78daa0 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Export.H @@ -0,0 +1,49 @@ +/* + * "$Id: Fl_Export.H 4288 2005-04-16 00:13:17Z mike $" + * + * WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK). + * + * Copyright 1998-2005 by Bill Spitzak and others. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems on the following page: + * + * http://www.fltk.org/str.php + */ + +#ifndef Fl_Export_H +# define Fl_Export_H + +/* + * The following is only used when building DLLs under WIN32... + */ + +# if defined(FL_DLL) && (defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) || __GNUC__ >= 3) +# ifdef FL_LIBRARY +# define FL_EXPORT __declspec(dllexport) +# else +# define FL_EXPORT __declspec(dllimport) +# endif /* FL_LIBRARY */ +# else +# define FL_EXPORT +# endif /* FL_DLL */ + +#endif /* !Fl_Export_H */ + +/* + * End of "$Id: Fl_Export.H 4288 2005-04-16 00:13:17Z mike $". + */ diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_File_Browser.H b/third_party/windows/fltk-1.1.10/FL/Fl_File_Browser.H new file mode 100644 index 0000000..463f5ac --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_File_Browser.H @@ -0,0 +1,81 @@ +// +// "$Id: Fl_File_Browser.H 4288 2005-04-16 00:13:17Z mike $" +// +// FileBrowser definitions. +// +// Copyright 1999-2005 by Michael Sweet. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// +// Include necessary header files... +// + +#ifndef _Fl_File_Browser_H_ +# define _Fl_File_Browser_H_ + +# include "Fl_Browser.H" +# include "Fl_File_Icon.H" +# include "filename.H" + + +// +// Fl_File_Browser class... +// + +class FL_EXPORT Fl_File_Browser : public Fl_Browser +{ + int filetype_; + const char *directory_; + uchar iconsize_; + const char *pattern_; + + int full_height() const; + int item_height(void *) const; + int item_width(void *) const; + void item_draw(void *, int, int, int, int) const; + int incr_height() const { return (item_height(0)); } + +public: + enum { FILES, DIRECTORIES }; + + Fl_File_Browser(int, int, int, int, const char * = 0); + + uchar iconsize() const { return (iconsize_); }; + void iconsize(uchar s) { iconsize_ = s; redraw(); }; + + void filter(const char *pattern); + const char *filter() const { return (pattern_); }; + + int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort); + + uchar textsize() const { return (Fl_Browser::textsize()); }; + void textsize(uchar s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }; + + int filetype() const { return (filetype_); }; + void filetype(int t) { filetype_ = t; }; +}; + +#endif // !_Fl_File_Browser_H_ + +// +// End of "$Id: Fl_File_Browser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_File_Chooser.H b/third_party/windows/fltk-1.1.10/FL/Fl_File_Chooser.H new file mode 100644 index 0000000..62841d3 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_File_Chooser.H @@ -0,0 +1,187 @@ +// +// "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $" +// +// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// generated by Fast Light User Interface Designer (fluid) version 1.0108 + +#ifndef Fl_File_Chooser_H +#define Fl_File_Chooser_H +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class FL_EXPORT Fl_File_Chooser { +public: + enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 }; +private: + static Fl_Preferences prefs_; + void (*callback_)(Fl_File_Chooser*, void *); + void *data_; + char directory_[1024]; + char pattern_[1024]; + char preview_text_[2048]; + int type_; + void favoritesButtonCB(); + void favoritesCB(Fl_Widget *w); + void fileListCB(); + void fileNameCB(); + void newdir(); + static void previewCB(Fl_File_Chooser *fc); + void showChoiceCB(); + void update_favorites(); + void update_preview(); +public: + Fl_File_Chooser(const char *d, const char *p, int t, const char *title); +private: + Fl_Double_Window *window; + void cb_window_i(Fl_Double_Window*, void*); + static void cb_window(Fl_Double_Window*, void*); + Fl_Choice *showChoice; + void cb_showChoice_i(Fl_Choice*, void*); + static void cb_showChoice(Fl_Choice*, void*); + Fl_Menu_Button *favoritesButton; + void cb_favoritesButton_i(Fl_Menu_Button*, void*); + static void cb_favoritesButton(Fl_Menu_Button*, void*); +public: + Fl_Button *newButton; +private: + void cb_newButton_i(Fl_Button*, void*); + static void cb_newButton(Fl_Button*, void*); + void cb__i(Fl_Tile*, void*); + static void cb_(Fl_Tile*, void*); + Fl_File_Browser *fileList; + void cb_fileList_i(Fl_File_Browser*, void*); + static void cb_fileList(Fl_File_Browser*, void*); + Fl_Box *previewBox; +public: + Fl_Check_Button *previewButton; +private: + void cb_previewButton_i(Fl_Check_Button*, void*); + static void cb_previewButton(Fl_Check_Button*, void*); + Fl_File_Input *fileName; + void cb_fileName_i(Fl_File_Input*, void*); + static void cb_fileName(Fl_File_Input*, void*); + Fl_Return_Button *okButton; + void cb_okButton_i(Fl_Return_Button*, void*); + static void cb_okButton(Fl_Return_Button*, void*); + Fl_Button *cancelButton; + void cb_cancelButton_i(Fl_Button*, void*); + static void cb_cancelButton(Fl_Button*, void*); + Fl_Double_Window *favWindow; + Fl_File_Browser *favList; + void cb_favList_i(Fl_File_Browser*, void*); + static void cb_favList(Fl_File_Browser*, void*); + Fl_Button *favUpButton; + void cb_favUpButton_i(Fl_Button*, void*); + static void cb_favUpButton(Fl_Button*, void*); + Fl_Button *favDeleteButton; + void cb_favDeleteButton_i(Fl_Button*, void*); + static void cb_favDeleteButton(Fl_Button*, void*); + Fl_Button *favDownButton; + void cb_favDownButton_i(Fl_Button*, void*); + static void cb_favDownButton(Fl_Button*, void*); + Fl_Button *favCancelButton; + void cb_favCancelButton_i(Fl_Button*, void*); + static void cb_favCancelButton(Fl_Button*, void*); + Fl_Return_Button *favOkButton; + void cb_favOkButton_i(Fl_Return_Button*, void*); + static void cb_favOkButton(Fl_Return_Button*, void*); +public: + ~Fl_File_Chooser(); + void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0); + void color(Fl_Color c); + Fl_Color color(); + int count(); + void directory(const char *d); + char * directory(); + void filter(const char *p); + const char * filter(); + int filter_value(); + void filter_value(int f); + void hide(); + void iconsize(uchar s); + uchar iconsize(); + void label(const char *l); + const char * label(); + void ok_label(const char *l); + const char * ok_label(); + void preview(int e); + int preview() const { return previewButton->value(); }; + void rescan(); + void rescan_keep_filename(); + void show(); + int shown(); + void textcolor(Fl_Color c); + Fl_Color textcolor(); + void textfont(uchar f); + uchar textfont(); + void textsize(uchar s); + uchar textsize(); + void type(int t); + int type(); + void * user_data() const; + void user_data(void *d); + const char *value(int f = 1); + void value(const char *filename); + int visible(); + static const char *add_favorites_label; + static const char *all_files_label; + static const char *custom_filter_label; + static const char *existing_file_label; + static const char *favorites_label; + static const char *filename_label; + static const char *filesystems_label; + static const char *manage_favorites_label; + static const char *new_directory_label; + static const char *new_directory_tooltip; + static const char *preview_label; + static const char *save_label; + static const char *show_label; + static Fl_File_Sort_F *sort; +}; +FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0); +FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0); +FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*)); +FL_EXPORT void fl_file_chooser_ok_label(const char*l); +#endif + +// +// End of "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_File_Icon.H b/third_party/windows/fltk-1.1.10/FL/Fl_File_Icon.H new file mode 100644 index 0000000..3f01fda --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_File_Icon.H @@ -0,0 +1,115 @@ +// +// "$Id: Fl_File_Icon.H 4288 2005-04-16 00:13:17Z mike $" +// +// Fl_File_Icon definitions. +// +// Copyright 1999-2005 by Michael Sweet. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// +// Include necessary header files... +// + +#ifndef _Fl_Fl_File_Icon_H_ +# define _Fl_Fl_File_Icon_H_ + +# include "Fl.H" + + +// +// Special color value for the icon color. +// + +# define FL_ICON_COLOR (Fl_Color)0xffffffff + + +// +// Fl_File_Icon class... +// + +class FL_EXPORT Fl_File_Icon //// Icon data +{ + static Fl_File_Icon *first_; // Pointer to first icon/filetype + Fl_File_Icon *next_; // Pointer to next icon/filetype + const char *pattern_; // Pattern string + int type_; // Match only if directory or file? + int num_data_; // Number of data elements + int alloc_data_; // Number of allocated elements + short *data_; // Icon data + + public: + + enum // File types + { + ANY, // Any kind of file + PLAIN, // Only plain files + FIFO, // Only named pipes + DEVICE, // Only character and block devices + LINK, // Only symbolic links + DIRECTORY // Only directories + }; + + enum // Data opcodes + { + END, // End of primitive/icon + COLOR, // Followed by color value (2 shorts) + LINE, // Start of line + CLOSEDLINE, // Start of closed line + POLYGON, // Start of polygon + OUTLINEPOLYGON, // Followed by outline color (2 shorts) + VERTEX // Followed by scaled X,Y + }; + + Fl_File_Icon(const char *p, int t, int nd = 0, short *d = 0); + ~Fl_File_Icon(); + + short *add(short d); + short *add_color(Fl_Color c) + { short *d = add((short)COLOR); add((short)(c >> 16)); add((short)c); return (d); } + short *add_vertex(int x, int y) + { short *d = add((short)VERTEX); add((short)x); add((short)y); return (d); } + short *add_vertex(float x, float y) + { short *d = add((short)VERTEX); add((short)(x * 10000.0)); + add((short)(y * 10000.0)); return (d); } + void clear() { num_data_ = 0; } + void draw(int x, int y, int w, int h, Fl_Color ic, int active = 1); + void label(Fl_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); + int load_fti(const char *fti); + int load_image(const char *i); + Fl_File_Icon *next() { return (next_); } + const char *pattern() { return (pattern_); } + int size() { return (num_data_); } + int type() { return (type_); } + short *value() { return (data_); } + + static Fl_File_Icon *find(const char *filename, int filetype = ANY); + static Fl_File_Icon *first() { return (first_); } + static void load_system_icons(void); +}; + +#endif // !_Fl_Fl_File_Icon_H_ + +// +// End of "$Id: Fl_File_Icon.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_File_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_File_Input.H new file mode 100644 index 0000000..545eeeb --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_File_Input.H @@ -0,0 +1,68 @@ +// +// "$Id: Fl_File_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// File_Input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// Original version Copyright 1998 by Curtis Edwards. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_File_Input_H +# define Fl_File_Input_H + +# include + + +class FL_EXPORT Fl_File_Input : public Fl_Input +{ + Fl_Color errorcolor_; + char ok_entry_; + uchar down_box_; + short buttons_[200]; + short pressed_; + + void draw_buttons(); + int handle_button(int event); + void update_buttons(); + +public: + + Fl_File_Input(int,int,int,int,const char *t=0); + + virtual int handle(int); + virtual void draw(); + + Fl_Boxtype down_box() const { return (Fl_Boxtype)down_box_; } + void down_box(Fl_Boxtype b) { down_box_ = b; } + Fl_Color errorcolor() const { return errorcolor_; } + void errorcolor(Fl_Color c) { errorcolor_ = c; } + int value(const char*); + int value(const char*, int); + const char *value() { return Fl_Input_::value(); } +}; + +#endif // !Fl_File_Input_H + + +// +// End of "$Id: Fl_File_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Dial.H b/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Dial.H new file mode 100644 index 0000000..3e76b44 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Dial.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Fill_Dial.H 4288 2005-04-16 00:13:17Z mike $" +// +// Filled dial header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Fill_Dial_H +#define Fl_Fill_Dial_H + +#include "Fl_Dial.H" + +class Fl_Fill_Dial : public Fl_Dial { +public: + Fl_Fill_Dial(int x,int y,int w,int h, const char *l = 0) + : Fl_Dial(x,y,w,h,l) {type(FL_FILL_DIAL);} +}; + +#endif + +// +// End of "$Id: Fl_Fill_Dial.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Slider.H new file mode 100644 index 0000000..a3b51d6 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Fill_Slider.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Filled slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Fill_Slider_H +#define Fl_Fill_Slider_H + +#include "Fl_Slider.H" + +class Fl_Fill_Slider : public Fl_Slider { +public: + Fl_Fill_Slider(int x,int y,int w,int h,const char *l=0) + : Fl_Slider(x,y,w,h,l) {type(FL_VERT_FILL_SLIDER);} +}; + +#endif + +// +// End of "$Id: Fl_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Float_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Float_Input.H new file mode 100644 index 0000000..96ba14b --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Float_Input.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Float_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Floating point input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Float_Input_H +#define Fl_Float_Input_H + +#include "Fl_Input.H" + +class Fl_Float_Input : public Fl_Input { +public: + Fl_Float_Input(int X,int Y,int W,int H,const char *l = 0) + : Fl_Input(X,Y,W,H,l) {type(FL_FLOAT_INPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Float_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_FormsBitmap.H b/third_party/windows/fltk-1.1.10/FL/Fl_FormsBitmap.H new file mode 100644 index 0000000..423ab62 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_FormsBitmap.H @@ -0,0 +1,48 @@ +// +// "$Id: Fl_FormsBitmap.H 4288 2005-04-16 00:13:17Z mike $" +// +// Forms bitmap header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_FormsBitmap_H +#define Fl_FormsBitmap_H + +#include "Fl_Bitmap.H" + +class FL_EXPORT Fl_FormsBitmap : public Fl_Widget { + Fl_Bitmap *b; +protected: + void draw(); +public: + Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0); + void set(int W, int H, const uchar *bits); + void bitmap(Fl_Bitmap *B) {b = B;} + Fl_Bitmap *bitmap() const {return b;} +}; + +#endif + +// +// End of "$Id: Fl_FormsBitmap.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_FormsPixmap.H b/third_party/windows/fltk-1.1.10/FL/Fl_FormsPixmap.H new file mode 100644 index 0000000..c34af69 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_FormsPixmap.H @@ -0,0 +1,48 @@ +// +// "$Id: Fl_FormsPixmap.H 4288 2005-04-16 00:13:17Z mike $" +// +// Forms pixmap header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_FormsPixmap_H +#define Fl_FormsPixmap_H + +#include "Fl_Pixmap.H" + +class FL_EXPORT Fl_FormsPixmap : public Fl_Widget { + Fl_Pixmap *b; +protected: + void draw(); +public: + Fl_FormsPixmap(Fl_Boxtype, int, int, int, int, const char * = 0); + void set(/*const*/char * const * bits); + void Pixmap(Fl_Pixmap *B) {b = B;} + Fl_Pixmap *Pixmap() const {return b;} +}; + +#endif + +// +// End of "$Id: Fl_FormsPixmap.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Free.H b/third_party/windows/fltk-1.1.10/FL/Fl_Free.H new file mode 100644 index 0000000..a279b6c --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Free.H @@ -0,0 +1,66 @@ +// +// "$Id: Fl_Free.H 4288 2005-04-16 00:13:17Z mike $" +// +// Forms free header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Free_H +#define Fl_Free_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +#define FL_NORMAL_FREE 1 +#define FL_SLEEPING_FREE 2 +#define FL_INPUT_FREE 3 +#define FL_CONTINUOUS_FREE 4 +#define FL_ALL_FREE 5 + +typedef int (*FL_HANDLEPTR)(Fl_Widget *, int , float, float, char); + +class FL_EXPORT Fl_Free : public Fl_Widget { + FL_HANDLEPTR hfunc; + static void step(void *); +protected: + void draw(); +public: + int handle(int); + Fl_Free(uchar t,int x,int y,int w,int h,const char *l,FL_HANDLEPTR hdl); + ~Fl_Free(); +}; + +// old event names for compatability: +#define FL_MOUSE FL_DRAG +#define FL_DRAW 100 // NOT USED +#define FL_STEP 101 +#define FL_FREEMEM 102 // NOT USED +#define FL_FREEZE 103 // NOT USED +#define FL_THAW 104 // NOT USED + +#endif + +// +// End of "$Id: Fl_Free.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_GIF_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_GIF_Image.H new file mode 100644 index 0000000..54fdeee --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_GIF_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_GIF_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// GIF image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_GIF_Image_H +#define Fl_GIF_Image_H +# include "Fl_Pixmap.H" + +class FL_EXPORT Fl_GIF_Image : public Fl_Pixmap { + + public: + + Fl_GIF_Image(const char* filename); +}; + +#endif + +// +// End of "$Id: Fl_GIF_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Gl_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Gl_Window.H new file mode 100644 index 0000000..7a6dec8 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Gl_Window.H @@ -0,0 +1,99 @@ +// +// "$Id: Fl_Gl_Window.H 5322 2006-08-17 09:49:43Z matt $" +// +// OpenGL header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// +#ifndef Fl_Gl_Window_H +#define Fl_Gl_Window_H + +#include "Fl_Window.H" + +#ifndef GLContext +typedef void* GLContext; // actually a GLXContext or HGLDC +#endif + +class Fl_Gl_Choice; // structure to hold result of glXChooseVisual + +class FL_EXPORT Fl_Gl_Window : public Fl_Window { + + int mode_; + const int *alist; + Fl_Gl_Choice *g; + GLContext context_; + char valid_f_; + char damage1_; // damage() of back buffer + virtual void draw_overlay(); + void init(); + + void *overlay; + void make_overlay(); + friend class _Fl_Gl_Overlay; + + static int can_do(int, const int *); + int mode(int, const int *); + +public: + + void show(); + void show(int a, char **b) {Fl_Window::show(a,b);} + void flush(); + void hide(); + void resize(int,int,int,int); + + char valid() const {return valid_f_ & 1;} + void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;} + void invalidate(); + + char context_valid() const {return valid_f_ & 2;} + void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;} + + static int can_do(int m) {return can_do(m,0);} + static int can_do(const int *m) {return can_do(0, m);} + int can_do() {return can_do(mode_,alist);} + Fl_Mode mode() const {return (Fl_Mode)mode_;} + int mode(int a) {return mode(a,0);} + int mode(const int *a) {return mode(0, a);} + + void* context() const {return context_;} + void context(void*, int destroy_flag = 0); + void make_current(); + void swap_buffers(); + void ortho(); + + int can_do_overlay(); + void redraw_overlay(); + void hide_overlay(); + void make_overlay_current(); + + ~Fl_Gl_Window(); + Fl_Gl_Window(int W, int H, const char *l=0) : Fl_Window(W,H,l) {init();} + Fl_Gl_Window(int X, int Y, int W, int H, const char *l=0) + : Fl_Window(X,Y,W,H,l) {init();} +}; + +#endif + +// +// End of "$Id: Fl_Gl_Window.H 5322 2006-08-17 09:49:43Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Group.H b/third_party/windows/fltk-1.1.10/FL/Fl_Group.H new file mode 100644 index 0000000..ebf5dc7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Group.H @@ -0,0 +1,111 @@ +// +// "$Id: Fl_Group.H 6468 2008-10-19 10:35:06Z AlbrechtS $" +// +// Group header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Group_H +#define Fl_Group_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +class FL_EXPORT Fl_Group : public Fl_Widget { + + Fl_Widget** array_; + Fl_Widget* savedfocus_; + Fl_Widget* resizable_; + int children_; + short *sizes_; // remembered initial sizes of children + + int navigation(int); + static Fl_Group *current_; + + // unimplemented copy ctor and assignment operator + Fl_Group(const Fl_Group&); + Fl_Group& operator=(const Fl_Group&); + +protected: + enum { CLIP_CHILDREN = 2048 }; + + void draw(); + void draw_child(Fl_Widget&) const; + void draw_children(); + void draw_outside_label(const Fl_Widget&) const ; + void update_child(Fl_Widget&) const; + short* sizes(); + +public: + + int handle(int); + void begin(); + void end(); + static Fl_Group *current(); + static void current(Fl_Group *g); + + int children() const {return children_;} + Fl_Widget* child(int n) const {return array()[n];} + int find(const Fl_Widget*) const; + int find(const Fl_Widget& o) const {return find(&o);} + Fl_Widget* const* array() const; + + void resize(int,int,int,int); + Fl_Group(int,int,int,int, const char * = 0); + virtual ~Fl_Group(); + void add(Fl_Widget&); + void add(Fl_Widget* o) {add(*o);} + void insert(Fl_Widget&, int i); + void insert(Fl_Widget& o, Fl_Widget* before) {insert(o,find(before));} + void remove(Fl_Widget&); + void remove(Fl_Widget* o) {remove(*o);} + void clear(); + + void resizable(Fl_Widget& o) {resizable_ = &o;} + void resizable(Fl_Widget* o) {resizable_ = o;} + Fl_Widget* resizable() const {return resizable_;} + void add_resizable(Fl_Widget& o) {resizable_ = &o; add(o);} + void init_sizes(); + + void clip_children(int c) { if (c) set_flag(CLIP_CHILDREN); else clear_flag(CLIP_CHILDREN); } + int clip_children() { return (flags() & CLIP_CHILDREN) != 0; } + + // back compatibility functions: + void focus(Fl_Widget* o) {o->take_focus();} + Fl_Widget* & _ddfdesign_kludge() {return resizable_;} + void forms_end(); +}; + +// dummy class used to end child groups in constructors for complex +// subclasses of Fl_Group: +class FL_EXPORT Fl_End { +public: + Fl_End() {Fl_Group::current()->end();} +}; + +#endif + +// +// End of "$Id: Fl_Group.H 6468 2008-10-19 10:35:06Z AlbrechtS $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Help_Dialog.H b/third_party/windows/fltk-1.1.10/FL/Fl_Help_Dialog.H new file mode 100644 index 0000000..5a93aa8 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Help_Dialog.H @@ -0,0 +1,92 @@ +// +// "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $" +// +// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// generated by Fast Light User Interface Designer (fluid) version 1.0108 + +#ifndef Fl_Help_Dialog_H +#define Fl_Help_Dialog_H +#include +#include +#include +#include +#include +#include +#include + +class FL_EXPORT Fl_Help_Dialog { + int index_; + int max_; + int line_[100]; + char file_[100][256]; + int find_pos_; +public: + Fl_Help_Dialog(); +private: + Fl_Double_Window *window_; + Fl_Button *back_; + void cb_back__i(Fl_Button*, void*); + static void cb_back_(Fl_Button*, void*); + Fl_Button *forward_; + void cb_forward__i(Fl_Button*, void*); + static void cb_forward_(Fl_Button*, void*); + Fl_Button *smaller_; + void cb_smaller__i(Fl_Button*, void*); + static void cb_smaller_(Fl_Button*, void*); + Fl_Button *larger_; + void cb_larger__i(Fl_Button*, void*); + static void cb_larger_(Fl_Button*, void*); + Fl_Input *find_; + void cb_find__i(Fl_Input*, void*); + static void cb_find_(Fl_Input*, void*); + Fl_Help_View *view_; + void cb_view__i(Fl_Help_View*, void*); + static void cb_view_(Fl_Help_View*, void*); +public: + ~Fl_Help_Dialog(); + int h(); + void hide(); + void load(const char *f); + void position(int xx, int yy); + void resize(int xx, int yy, int ww, int hh); + void show(); + void show(int argc, char **argv); + void textsize(uchar s); + uchar textsize(); + void topline(const char *n); + void topline(int n); + void value(const char *f); + const char * value() const; + int visible(); + int w(); + int x(); + int y(); +}; +#endif + +// +// End of "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Help_View.H b/third_party/windows/fltk-1.1.10/FL/Fl_Help_View.H new file mode 100644 index 0000000..d834d82 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Help_View.H @@ -0,0 +1,221 @@ +// +// "$Id: Fl_Help_View.H 5991 2007-12-15 16:08:23Z mike $" +// +// Help Viewer widget definitions. +// +// Copyright 1997-2005 by Easy Software Products. +// Image support donated by Matthias Melcher, Copyright 2000. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Help_View_H +# define Fl_Help_View_H + +// +// Include necessary header files... +// + +# include +# include "Fl.H" +# include "Fl_Group.H" +# include "Fl_Scrollbar.H" +# include "fl_draw.H" +# include "Fl_Shared_Image.H" + + +// +// Fl_Help_Func type - link callback function for files... +// + + +typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *); + + +// +// Fl_Help_Block structure... +// + +struct Fl_Help_Block +{ + const char *start, // Start of text + *end; // End of text + uchar border; // Draw border? + Fl_Color bgcolor; // Background color + int x, // Indentation/starting X coordinate + y, // Starting Y coordinate + w, // Width + h; // Height + int line[32]; // Left starting position for each line +}; + +// +// Fl_Help_Link structure... +// + +struct Fl_Help_Link +{ + char filename[192], // Reference filename + name[32]; // Link target (blank if none) + int x, // X offset of link text + y, // Y offset of link text + w, // Width of link text + h; // Height of link text +}; + +// +// Fl_Help_Target structure... +// + +struct Fl_Help_Target +{ + char name[32]; // Target name + int y; // Y offset of target +}; + +// +// Fl_Help_View class... +// + +class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget +{ + enum { RIGHT = -1, CENTER, LEFT }; // Alignments + + char title_[1024]; // Title string + Fl_Color defcolor_, // Default text color + bgcolor_, // Background color + textcolor_, // Text color + linkcolor_; // Link color + uchar textfont_, // Default font for text + textsize_; // Default font size + const char *value_; // HTML text value + + int nblocks_, // Number of blocks/paragraphs + ablocks_; // Allocated blocks + Fl_Help_Block *blocks_; // Blocks + + int nfonts_; // Number of fonts in stack + uchar fonts_[100][2]; // Font stack + + Fl_Help_Func *link_; // Link transform function + + int nlinks_, // Number of links + alinks_; // Allocated links + Fl_Help_Link *links_; // Links + + int ntargets_, // Number of targets + atargets_; // Allocated targets + Fl_Help_Target *targets_; // Targets + + char directory_[1024]; // Directory for current file + char filename_[1024]; // Current filename + int topline_, // Top line in document + leftline_, // Lefthand position + size_, // Total document length + hsize_; // Maximum document width + Fl_Scrollbar scrollbar_, // Vertical scrollbar for document + hscrollbar_; // Horizontal scrollbar + + static int selection_first; + static int selection_last; + static int selection_push_first; + static int selection_push_last; + static int selection_drag_first; + static int selection_drag_last; + static int selected; + static int draw_mode; + static int mouse_x; + static int mouse_y; + static int current_pos; + static Fl_Help_View *current_view; + static Fl_Color hv_selection_color; + static Fl_Color hv_selection_text_color; + + Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0); + void add_link(const char *n, int xx, int yy, int ww, int hh); + void add_target(const char *n, int yy); + static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1); + int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l); + void draw(); + void format(); + void format_table(int *table_width, int *columns, const char *table); + void free_data(); + int get_align(const char *p, int a); + const char *get_attr(const char *p, const char *n, char *buf, int bufsize); + Fl_Color get_color(const char *n, Fl_Color c); + Fl_Shared_Image *get_image(const char *name, int W, int H); + int get_length(const char *l); + int handle(int); + + void initfont(uchar &f, uchar &s) { nfonts_ = 0; + fl_font(f = fonts_[0][0] = textfont_, + s = fonts_[0][1] = textsize_); } + void pushfont(uchar f, uchar s) { if (nfonts_ < 99) nfonts_ ++; + fl_font(fonts_[nfonts_][0] = f, + fonts_[nfonts_][1] = s); } + void popfont(uchar &f, uchar &s) { if (nfonts_ > 0) nfonts_ --; + fl_font(f = fonts_[nfonts_][0], + s = fonts_[nfonts_][1]); } + + void hv_draw(const char *t, int x, int y); + char begin_selection(); + char extend_selection(); + void end_selection(int c=0); + void clear_global_selection(); + Fl_Help_Link *find_link(int, int); + void follow_link(Fl_Help_Link*); + +public: + + Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0); + ~Fl_Help_View(); + const char *directory() const { if (directory_[0]) return (directory_); + else return ((const char *)0); } + const char *filename() const { if (filename_[0]) return (filename_); + else return ((const char *)0); } + int find(const char *s, int p = 0); + void link(Fl_Help_Func *fn) { link_ = fn; } + int load(const char *f); + void resize(int,int,int,int); + int size() const { return (size_); } + void size(int W, int H) { Fl_Widget::size(W, H); } + void textcolor(Fl_Color c) { if (textcolor_ == defcolor_) textcolor_ = c; defcolor_ = c; } + Fl_Color textcolor() const { return (defcolor_); } + void textfont(uchar f) { textfont_ = f; format(); } + uchar textfont() const { return (textfont_); } + void textsize(uchar s) { textsize_ = s; format(); } + uchar textsize() const { return (textsize_); } + const char *title() { return (title_); } + void topline(const char *n); + void topline(int); + int topline() const { return (topline_); } + void leftline(int); + int leftline() const { return (leftline_); } + void value(const char *v); + const char *value() const { return (value_); } + void clear_selection(); + void select_all(); +}; + +#endif // !Fl_Help_View_H + +// +// End of "$Id: Fl_Help_View.H 5991 2007-12-15 16:08:23Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Hold_Browser.H b/third_party/windows/fltk-1.1.10/FL/Fl_Hold_Browser.H new file mode 100644 index 0000000..c9290db --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Hold_Browser.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Hold_Browser.H 4288 2005-04-16 00:13:17Z mike $" +// +// Hold browser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Hold_Browser_H +#define Fl_Hold_Browser_H + +#include "Fl_Browser.H" + +class Fl_Hold_Browser : public Fl_Browser { +public: + Fl_Hold_Browser(int X,int Y,int W,int H,const char *l=0) + : Fl_Browser(X,Y,W,H,l) {type(FL_HOLD_BROWSER);} +}; + +#endif + +// +// End of "$Id: Fl_Hold_Browser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Fill_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Fill_Slider.H new file mode 100644 index 0000000..1bcbc9a --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Fill_Slider.H @@ -0,0 +1,42 @@ +// +// "$Id: Fl_Hor_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Horizontal fill slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// +#ifndef Fl_Hor_Fill_Slider_H +#define Fl_Hor_Fill_Slider_H + +#include "Fl_Slider.H" + +class Fl_Hor_Fill_Slider : public Fl_Slider { +public: + Fl_Hor_Fill_Slider(int x,int y,int w,int h,const char *l=0) + : Fl_Slider(x,y,w,h,l) {type(FL_HOR_FILL_SLIDER);} +}; + +#endif + +// +// End of "$Id: Fl_Hor_Fill_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Nice_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Nice_Slider.H new file mode 100644 index 0000000..06e3c60 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Nice_Slider.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Hor_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Horizontal "nice" slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Hor_Nice_Slider_H +#define Fl_Hor_Nice_Slider_H + +#include "Fl_Slider.H" + +class Fl_Hor_Nice_Slider : public Fl_Slider { +public: + Fl_Hor_Nice_Slider(int x,int y,int w,int h,const char *l=0) + : Fl_Slider(x,y,w,h,l) {type(FL_HOR_NICE_SLIDER); box(FL_FLAT_BOX);} +}; + +#endif + +// +// End of "$Id: Fl_Hor_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Slider.H new file mode 100644 index 0000000..76d9c66 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Slider.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Hor_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Horizontal slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Hor_Slider_H +#define Fl_Hor_Slider_H + +#include "Fl_Slider.H" + +class Fl_Hor_Slider : public Fl_Slider { +public: + Fl_Hor_Slider(int X,int Y,int W,int H,const char *l=0) + : Fl_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);} +}; + +#endif + +// +// End of "$Id: Fl_Hor_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Value_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Value_Slider.H new file mode 100644 index 0000000..990f6da --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Hor_Value_Slider.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Hor_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Horizontal value slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Hor_Value_Slider_H +#define Fl_Hor_Value_Slider_H + +#include "Fl_Value_Slider.H" + +class Fl_Hor_Value_Slider : public Fl_Value_Slider { +public: + Fl_Hor_Value_Slider(int X,int Y,int W,int H,const char *l=0) + : Fl_Value_Slider(X,Y,W,H,l) {type(FL_HOR_SLIDER);} +}; + +#endif + +// +// End of "$Id: Fl_Hor_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_Image.H new file mode 100644 index 0000000..769aaa9 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Image.H @@ -0,0 +1,112 @@ +// +// "$Id: Fl_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// Image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Image_H +# define Fl_Image_H + +# include "Enumerations.H" + +class Fl_Widget; +struct Fl_Menu_Item; +struct Fl_Label; + +class FL_EXPORT Fl_Image { + int w_, h_, d_, ld_, count_; + const char * const *data_; + + // Forbid use of copy contructor and assign operator + Fl_Image & operator=(const Fl_Image &); + Fl_Image(const Fl_Image &); + + protected: + + void w(int W) {w_ = W;} + void h(int H) {h_ = H;} + void d(int D) {d_ = D;} + void ld(int LD) {ld_ = LD;} + void data(const char * const *p, int c) {data_ = p; count_ = c;} + void draw_empty(int X, int Y); + + static void labeltype(const Fl_Label *lo, int lx, int ly, int lw, int lh, Fl_Align la); + static void measure(const Fl_Label *lo, int &lw, int &lh); + + public: + + int w() const {return w_;} + int h() const {return h_;} + int d() const {return d_;} + int ld() const {return ld_;} + int count() const {return count_;} + const char * const *data() const {return data_;} + + Fl_Image(int W, int H, int D) {w_ = W; h_ = H; d_ = D; ld_ = 0; count_ = 0; data_ = 0;} + virtual ~Fl_Image(); + virtual Fl_Image *copy(int W, int H); + Fl_Image *copy() { return copy(w(), h()); } + virtual void color_average(Fl_Color c, float i); + void inactive() { color_average(FL_GRAY, .33f); } + virtual void desaturate(); + virtual void label(Fl_Widget*w); + virtual void label(Fl_Menu_Item*m); + 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 uncache(); +}; + +class FL_EXPORT Fl_RGB_Image : public Fl_Image { + public: + + const uchar *array; + int alloc_array; // Non-zero if array was allocated + +#if defined(__APPLE__) || defined(WIN32) + void *id; // for internal use + void *mask; // for internal use (mask bitmap) +#else + unsigned id; // for internal use + unsigned mask; // for internal use (mask bitmap) +#endif // __APPLE__ || WIN32 + + Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0) : + Fl_Image(W,H,D), array(bits), alloc_array(0), id(0), mask(0) {data((const char **)&array, 1); ld(LD);} + virtual ~Fl_RGB_Image(); + virtual Fl_Image *copy(int W, int H); + Fl_Image *copy() { return copy(w(), h()); } + virtual void color_average(Fl_Color c, float i); + 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(Fl_Menu_Item*m); + virtual void uncache(); +}; + +#endif // !Fl_Image_H + +// +// End of "$Id: Fl_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Input.H new file mode 100644 index 0000000..4ae0dc8 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Input.H @@ -0,0 +1,47 @@ +// +// "$Id: Fl_Input.H 5300 2006-08-14 07:06:45Z matt $" +// +// Input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Input_H +#define Fl_Input_H + +#include "Fl_Input_.H" + +class FL_EXPORT Fl_Input : public Fl_Input_ { + int handle_key(); + int shift_position(int p); + int shift_up_down_position(int p); +public: + void draw(); + int handle(int); + Fl_Input(int,int,int,int,const char * = 0); +}; + +#endif + +// +// End of "$Id: Fl_Input.H 5300 2006-08-14 07:06:45Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Input_.H b/third_party/windows/fltk-1.1.10/FL/Fl_Input_.H new file mode 100644 index 0000000..efc7b53 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Input_.H @@ -0,0 +1,145 @@ +// +// "$Id: Fl_Input_.H 4288 2005-04-16 00:13:17Z mike $" +// +// Input base class header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Input__H +#define Fl_Input__H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +#define FL_NORMAL_INPUT 0 +#define FL_FLOAT_INPUT 1 +#define FL_INT_INPUT 2 +#define FL_HIDDEN_INPUT 3 +#define FL_MULTILINE_INPUT 4 +#define FL_SECRET_INPUT 5 +#define FL_INPUT_TYPE 7 +#define FL_INPUT_READONLY 8 +#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) +#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) +#define FL_INPUT_WRAP 16 +#define FL_MULTILINE_INPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_WRAP) +#define FL_MULTILINE_OUTPUT_WRAP (FL_MULTILINE_INPUT | FL_INPUT_READONLY | FL_INPUT_WRAP) + +class FL_EXPORT Fl_Input_ : public Fl_Widget { + + const char* value_; + char* buffer; + + int size_; + int bufsize; + int position_; + int mark_; + int xscroll_, yscroll_; + int mu_p; + int maximum_size_; + + uchar erase_cursor_only; + uchar textfont_; + uchar textsize_; + unsigned textcolor_; + unsigned cursor_color_; + + const char* expand(const char*, char*) const; + double expandpos(const char*, const char*, const char*, int*) const; + void minimal_update(int, int); + void minimal_update(int p); + void put_in_buffer(int newsize); + + void setfont() const; + +protected: + + int word_start(int i) const; + int word_end(int i) const; + int line_start(int i) const; + int line_end(int i) const; + void drawtext(int, int, int, int); + int up_down_position(int, int keepmark=0); + void handle_mouse(int, int, int, int, int keepmark=0); + int handletext(int e, int, int, int, int); + void maybe_do_callback(); + int xscroll() const {return xscroll_;} + int yscroll() const {return yscroll_;} + +public: + + void resize(int, int, int, int); + + Fl_Input_(int, int, int, int, const char* = 0); + ~Fl_Input_(); + + int value(const char*); + int value(const char*, int); + int static_value(const char*); + int static_value(const char*, int); + const char* value() const {return value_;} + char index(int i) const {return value_[i];} + int size() const {return size_;} + void size(int W, int H) { Fl_Widget::size(W, H); } + int maximum_size() const {return maximum_size_;} + void maximum_size(int m) {maximum_size_ = m;} + + int position() const {return position_;} + int mark() const {return mark_;} + int position(int p, int m); + int position(int p) {return position(p, p);} + int mark(int m) {return position(position(), m);} + int replace(int, int, const char*, int=0); + int cut() {return replace(position(), mark(), 0);} + int cut(int n) {return replace(position(), position()+n, 0);} + int cut(int a, int b) {return replace(a, b, 0);} + int insert(const char* t, int l=0){return replace(position_, mark_, t, l);} + int copy(int clipboard); + int undo(); + int copy_cuts(); + + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned n) {textcolor_ = n;} + Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;} + void cursor_color(unsigned n) {cursor_color_ = n;} + + int input_type() const {return type() & FL_INPUT_TYPE; } + void input_type(int t) { type((uchar)(t | readonly())); } + int readonly() const { return type() & FL_INPUT_READONLY; } + void readonly(int b) { if (b) type((uchar)(type() | FL_INPUT_READONLY)); + else type((uchar)(type() & ~FL_INPUT_READONLY)); } + int wrap() const { return type() & FL_INPUT_WRAP; } + void wrap(int b) { if (b) type((uchar)(type() | FL_INPUT_WRAP)); + else type((uchar)(type() & ~FL_INPUT_WRAP)); } +}; + +#endif + +// +// End of "$Id: Fl_Input_.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Input_Choice.H b/third_party/windows/fltk-1.1.10/FL/Fl_Input_Choice.H new file mode 100644 index 0000000..391a815 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Input_Choice.H @@ -0,0 +1,199 @@ +// +// "$Id$" +// +// An input/chooser widget. +// ______________ ____ +// | || __ | +// | input area || \/ | +// |______________||____| +// +// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 2004 by Greg Ercolano. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Input_Choice_H +#define Fl_Input_Choice_H + +#include +#include +#include +#include +#include +#include + +class Fl_Input_Choice : public Fl_Group { + // Private class to handle slightly 'special' behavior of menu button + class InputMenuButton : public Fl_Menu_Button { + void draw() { + draw_box(FL_UP_BOX, color()); + 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(); + } + public: + InputMenuButton(int x,int y,int w,int h,const char*l=0) : + Fl_Menu_Button(x,y,w,h,l) { box(FL_UP_BOX); } + }; + + Fl_Input *inp_; + InputMenuButton *menu_; + + static void menu_cb(Fl_Widget*, void *data) { + Fl_Input_Choice *o=(Fl_Input_Choice *)data; + 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(); + if (o->when() & FL_WHEN_NOT_CHANGED) + o->do_callback(); + } + else + { + o->inp_->value(o->menu_->text()); + o->inp_->set_changed(); + o->Fl_Widget::set_changed(); + if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) + o->do_callback(); + } + + if (o->callback() != default_callback) + { + o->Fl_Widget::clear_changed(); + o->inp_->clear_changed(); + } + } + + static void inp_cb(Fl_Widget*, void *data) { + Fl_Input_Choice *o=(Fl_Input_Choice *)data; + if (o->inp_->changed()) { + o->Fl_Widget::set_changed(); + if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) + o->do_callback(); + } else { + o->Fl_Widget::clear_changed(); + if (o->when() & FL_WHEN_NOT_CHANGED) + o->do_callback(); + } + + if (o->callback() != default_callback) + o->Fl_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 menu_x() { return(x() + w() - 20 - Fl::box_dx(box())); } + inline int menu_y() { return(y() + Fl::box_dy(box())); } + inline int menu_w() { return(20); } + inline int menu_h() { return(h() - Fl::box_dh(box())); } + +public: + Fl_Input_Choice (int x,int y,int w,int h,const char*l=0) : Fl_Group(x,y,w,h,l) { + Fl_Group::box(FL_DOWN_BOX); + align(FL_ALIGN_LEFT); // default like Fl_Input + inp_ = new Fl_Input(inp_x(), inp_y(), + inp_w(), inp_h()); + inp_->callback(inp_cb, (void*)this); + inp_->box(FL_FLAT_BOX); // cosmetic + inp_->when(FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED); + menu_ = new InputMenuButton(menu_x(), menu_y(), + menu_w(), menu_h()); + menu_->callback(menu_cb, (void*)this); + menu_->box(FL_FLAT_BOX); // cosmetic + end(); + } + void add(const char *s) { + menu_->add(s); + } + int changed() const { + return inp_->changed() | Fl_Widget::changed(); + } + void clear_changed() { + inp_->clear_changed(); + Fl_Widget::clear_changed(); + } + void set_changed() { + inp_->set_changed(); + // no need to call Fl_Widget::set_changed() + } + void clear() { + menu_->clear(); + } + Fl_Boxtype down_box() const { + return (menu_->down_box()); + } + void down_box(Fl_Boxtype b) { + menu_->down_box(b); + } + const Fl_Menu_Item *menu() { + return (menu_->menu()); + } + void menu(const Fl_Menu_Item *m) { + menu_->menu(m); + } + void resize(int X, int Y, int W, int H) { + Fl_Group::resize(X,Y,W,H); + inp_->resize(inp_x(), inp_y(), inp_w(), inp_h()); + menu_->resize(menu_x(), menu_y(), menu_w(), menu_h()); + } + Fl_Color textcolor() const { + return (inp_->textcolor()); + } + void textcolor(Fl_Color c) { + inp_->textcolor(c); + } + uchar textfont() const { + return (inp_->textfont()); + } + void textfont(uchar f) { + inp_->textfont(f); + } + uchar textsize() const { + return (inp_->textsize()); + } + void textsize(uchar s) { + inp_->textsize(s); + } + const char* value() const { + return (inp_->value()); + } + void value(const char *val) { + inp_->value(val); + } + void value(int val) { + menu_->value(val); + inp_->value(menu_->text(val)); + } + Fl_Menu_Button *menubutton() { return menu_; } + Fl_Input *input() { return inp_; } +}; + +#endif // !Fl_Input_Choice_H + +// +// End of "$Id$". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Int_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Int_Input.H new file mode 100644 index 0000000..abe012f --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Int_Input.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Int_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Integer input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Int_Input_H +#define Fl_Int_Input_H + +#include "Fl_Input.H" + +class Fl_Int_Input : public Fl_Input { +public: + Fl_Int_Input(int X,int Y,int W,int H,const char *l = 0) + : Fl_Input(X,Y,W,H,l) {type(FL_INT_INPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Int_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_JPEG_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_JPEG_Image.H new file mode 100644 index 0000000..4d1d09d --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_JPEG_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_JPEG_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// JPEG image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_JPEG_Image_H +#define Fl_JPEG_Image_H +# include "Fl_Image.H" + +class FL_EXPORT Fl_JPEG_Image : public Fl_RGB_Image { + + public: + + Fl_JPEG_Image(const char* filename); +}; + +#endif + +// +// End of "$Id: Fl_JPEG_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Light_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Light_Button.H new file mode 100644 index 0000000..80cd5bc --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Light_Button.H @@ -0,0 +1,45 @@ +// +// "$Id: Fl_Light_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Lighted button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Light_Button_H +#define Fl_Light_Button_H + +#include "Fl_Button.H" + +class FL_EXPORT Fl_Light_Button : public Fl_Button { +protected: + virtual void draw(); +public: + virtual int handle(int); + Fl_Light_Button(int x,int y,int w,int h,const char *l = 0); +}; + +#endif + +// +// End of "$Id: Fl_Light_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Line_Dial.H b/third_party/windows/fltk-1.1.10/FL/Fl_Line_Dial.H new file mode 100644 index 0000000..b08a82a --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Line_Dial.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Line_Dial.H 4288 2005-04-16 00:13:17Z mike $" +// +// Line dial header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Line_Dial_H +#define Fl_Line_Dial_H + +#include "Fl_Dial.H" + +class Fl_Line_Dial : public Fl_Dial { +public: + Fl_Line_Dial(int x,int y,int w,int h, const char *l = 0) + : Fl_Dial(x,y,w,h,l) {type(FL_LINE_DIAL);} +}; + +#endif + +// +// End of "$Id: Fl_Line_Dial.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu.H new file mode 100644 index 0000000..8b9e697 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu.H @@ -0,0 +1,33 @@ +// +// "$Id: Fl_Menu.H 4288 2005-04-16 00:13:17Z mike $" +// +// Old menu header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// this include file is for back compatability only +#include "Fl_Menu_Item.H" + +// +// End of "$Id: Fl_Menu.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu_.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_.H new file mode 100644 index 0000000..5be4045 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_.H @@ -0,0 +1,102 @@ +// +// "$Id: Fl_Menu_.H 4288 2005-04-16 00:13:17Z mike $" +// +// Menu base class header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Menu__H +#define Fl_Menu__H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif +#include "Fl_Menu_Item.H" + +class FL_EXPORT Fl_Menu_ : public Fl_Widget { + + Fl_Menu_Item *menu_; + const Fl_Menu_Item *value_; + +protected: + + uchar alloc; + uchar down_box_; + uchar textfont_; + uchar textsize_; + unsigned textcolor_; + +public: + Fl_Menu_(int,int,int,int,const char * =0); + ~Fl_Menu_(); + + int item_pathname(char *name, int namelen, const Fl_Menu_Item *finditem=0) const; + const Fl_Menu_Item* picked(const Fl_Menu_Item*); + const Fl_Menu_Item* find_item(const char *name); + + const Fl_Menu_Item* test_shortcut() {return picked(menu()->test_shortcut());} + void global(); + + const Fl_Menu_Item *menu() const {return menu_;} + void menu(const Fl_Menu_Item *m); + void copy(const Fl_Menu_Item *m, void* user_data = 0); + int add(const char*, int shortcut, Fl_Callback*, void* = 0, int = 0); + int add(const char* a, const char* b, Fl_Callback* c, + void* d = 0, int e = 0) {return add(a,fl_old_shortcut(b),c,d,e);} + int size() const ; + void size(int W, int H) { Fl_Widget::size(W, H); } + void clear(); + int add(const char *); + void replace(int,const char *); + void remove(int); + void shortcut(int i, int s) {menu_[i].shortcut(s);} + void mode(int i,int fl) {menu_[i].flags = fl;} + int mode(int i) const {return menu_[i].flags;} + + const Fl_Menu_Item *mvalue() const {return value_;} + int value() const {return value_ ? (int)(value_-menu_) : -1;} + int value(const Fl_Menu_Item*); + int value(int i) {return value(menu_+i);} + const char *text() const {return value_ ? value_->text : 0;} + const char *text(int i) const {return menu_[i].text;} + + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar c) {textfont_=c;} + uchar textsize() const {return textsize_;} + void textsize(uchar c) {textsize_=c;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned c) {textcolor_=c;} + + Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} + void down_box(Fl_Boxtype b) {down_box_ = b;} + + // back compatability: + Fl_Color down_color() const {return selection_color();} + void down_color(unsigned c) {selection_color(c);} +}; + +#endif + +// +// End of "$Id: Fl_Menu_.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Bar.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Bar.H new file mode 100644 index 0000000..24e564a --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Bar.H @@ -0,0 +1,46 @@ +// +// "$Id: Fl_Menu_Bar.H 4288 2005-04-16 00:13:17Z mike $" +// +// Menu bar header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Menu_Bar_H +#define Fl_Menu_Bar_H + +#include "Fl_Menu_.H" + +class FL_EXPORT Fl_Menu_Bar : public Fl_Menu_ { +protected: + void draw(); +public: + int handle(int); + Fl_Menu_Bar(int X, int Y, int W, int H,const char *l=0) + : Fl_Menu_(X,Y,W,H,l) {} +}; + +#endif + +// +// End of "$Id: Fl_Menu_Bar.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Button.H new file mode 100644 index 0000000..68f53ee --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Button.H @@ -0,0 +1,48 @@ +// +// "$Id: Fl_Menu_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Menu button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Menu_Button_H +#define Fl_Menu_Button_H + +#include "Fl_Menu_.H" + +class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ { +protected: + void draw(); +public: + // values for type: + enum {POPUP1 = 1, POPUP2, POPUP12, POPUP3, POPUP13, POPUP23, POPUP123}; + int handle(int); + const Fl_Menu_Item* popup(); + Fl_Menu_Button(int,int,int,int,const char * =0); +}; + +#endif + +// +// End of "$Id: Fl_Menu_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Item.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Item.H new file mode 100644 index 0000000..d8f3ddb --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Item.H @@ -0,0 +1,167 @@ +// +// "$Id: Fl_Menu_Item.H 4288 2005-04-16 00:13:17Z mike $" +// +// Menu item header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Menu_Item_H +#define Fl_Menu_Item_H + +# include "Fl_Widget.H" +# include "Fl_Image.H" + +# if defined(__APPLE__) && defined(check) +# undef check +# endif + +enum { // values for flags: + FL_MENU_INACTIVE = 1, + FL_MENU_TOGGLE= 2, + FL_MENU_VALUE = 4, + FL_MENU_RADIO = 8, + FL_MENU_INVISIBLE = 0x10, + FL_SUBMENU_POINTER = 0x20, + FL_SUBMENU = 0x40, + FL_MENU_DIVIDER = 0x80, + FL_MENU_HORIZONTAL = 0x100 +}; + +extern FL_EXPORT int fl_old_shortcut(const char*); + +class Fl_Menu_; + +struct FL_EXPORT Fl_Menu_Item { + const char *text; // label() + int shortcut_; + Fl_Callback *callback_; + void *user_data_; + int flags; + uchar labeltype_; + uchar labelfont_; + uchar labelsize_; + unsigned labelcolor_; + + // advance N items, skipping submenus: + const Fl_Menu_Item *next(int=1) const; + Fl_Menu_Item *next(int i=1) { + return (Fl_Menu_Item*)(((const Fl_Menu_Item*)this)->next(i));} + const Fl_Menu_Item *first() const { return next(0); } + Fl_Menu_Item *first() { return next(0); } + + // methods on menu items: + const char* label() const {return text;} + void label(const char* a) {text=a;} + void label(Fl_Labeltype a,const char* b) {labeltype_ = a; text = b;} + Fl_Labeltype labeltype() const {return (Fl_Labeltype)labeltype_;} + void labeltype(Fl_Labeltype a) {labeltype_ = a;} + Fl_Color labelcolor() const {return (Fl_Color)labelcolor_;} + void labelcolor(unsigned a) {labelcolor_ = a;} + Fl_Font labelfont() const {return (Fl_Font)labelfont_;} + void labelfont(uchar a) {labelfont_ = a;} + uchar labelsize() const {return labelsize_;} + void labelsize(uchar a) {labelsize_ = a;} + Fl_Callback_p callback() const {return callback_;} + void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;} + void callback(Fl_Callback* c) {callback_=c;} + void callback(Fl_Callback0*c) {callback_=(Fl_Callback*)c;} + void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;} + void* user_data() const {return user_data_;} + void user_data(void* v) {user_data_ = v;} + long argument() const {return (long)user_data_;} + void argument(long v) {user_data_ = (void*)v;} + int shortcut() const {return shortcut_;} + void shortcut(int s) {shortcut_ = s;} + int submenu() const {return flags&(FL_SUBMENU|FL_SUBMENU_POINTER);} + int checkbox() const {return flags&FL_MENU_TOGGLE;} + int radio() const {return flags&FL_MENU_RADIO;} + int value() const {return flags&FL_MENU_VALUE;} + void set() {flags |= FL_MENU_VALUE;} + void clear() {flags &= ~FL_MENU_VALUE;} + void setonly(); + int visible() const {return !(flags&FL_MENU_INVISIBLE);} + void show() {flags &= ~FL_MENU_INVISIBLE;} + void hide() {flags |= FL_MENU_INVISIBLE;} + int active() const {return !(flags&FL_MENU_INACTIVE);} + void activate() {flags &= ~FL_MENU_INACTIVE;} + void deactivate() {flags |= FL_MENU_INACTIVE;} + int activevisible() const {return !(flags&0x11);} + + // compatibility for FLUID so it can set the image of a menu item... + void image(Fl_Image* a) {a->label(this);} + void image(Fl_Image& a) {a.label(this);} + + // used by menubar: + int measure(int* h, const Fl_Menu_*) const; + void draw(int x, int y, int w, int h, const Fl_Menu_*, int t=0) const; + + // popup menus without using an Fl_Menu_ widget: + const Fl_Menu_Item* popup( + int X, int Y, + const char *title = 0, + const Fl_Menu_Item* picked=0, + const Fl_Menu_* = 0) const; + const Fl_Menu_Item* pulldown( + int X, int Y, int W, int H, + const Fl_Menu_Item* picked = 0, + const Fl_Menu_* = 0, + const Fl_Menu_Item* title = 0, + int menubar=0) const; + const Fl_Menu_Item* test_shortcut() const; + const Fl_Menu_Item* find_shortcut(int *ip=0) const; + + void do_callback(Fl_Widget* o) const {callback_(o, user_data_);} + void do_callback(Fl_Widget* o,void* arg) const {callback_(o, arg);} + void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);} + + // back-compatability, do not use: + int checked() const {return flags&FL_MENU_VALUE;} + void check() {flags |= FL_MENU_VALUE;} + void uncheck() {flags &= ~FL_MENU_VALUE;} + int add(const char*, int shortcut, Fl_Callback*, void* =0, int = 0); + int add(const char*a, const char* b, Fl_Callback* c, + void* d = 0, int e = 0) { + return add(a,fl_old_shortcut(b),c,d,e);} + int size() const ; +}; + +typedef Fl_Menu_Item Fl_Menu; // back compatability + +enum { // back-compatability enum: + FL_PUP_NONE = 0, + FL_PUP_GREY = FL_MENU_INACTIVE, + FL_PUP_GRAY = FL_MENU_INACTIVE, + FL_MENU_BOX = FL_MENU_TOGGLE, + FL_PUP_BOX = FL_MENU_TOGGLE, + FL_MENU_CHECK = FL_MENU_VALUE, + FL_PUP_CHECK = FL_MENU_VALUE, + FL_PUP_RADIO = FL_MENU_RADIO, + FL_PUP_INVISIBLE = FL_MENU_INVISIBLE, + FL_PUP_SUBMENU = FL_SUBMENU_POINTER +}; + +#endif + +// +// End of "$Id: Fl_Menu_Item.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Window.H new file mode 100644 index 0000000..79bfd79 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Menu_Window.H @@ -0,0 +1,54 @@ +// +// "$Id: Fl_Menu_Window.H 4288 2005-04-16 00:13:17Z mike $" +// +// Menu window header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Menu_Window_H +#define Fl_Menu_Window_H + +#include "Fl_Single_Window.H" + +class FL_EXPORT Fl_Menu_Window : public Fl_Single_Window { + enum {NO_OVERLAY = 128}; +public: + void show(); + void erase(); + void flush(); + void hide(); + int overlay() {return !(flags()&NO_OVERLAY);} + void set_overlay() {clear_flag(NO_OVERLAY);} + void clear_overlay() {set_flag(NO_OVERLAY);} + ~Fl_Menu_Window(); + Fl_Menu_Window(int W, int H, const char *l = 0) + : Fl_Single_Window(W,H,l) { image(0); } + Fl_Menu_Window(int X, int Y, int W, int H, const char *l = 0) + : Fl_Single_Window(X,Y,W,H,l) { image(0); } +}; + +#endif + +// +// End of "$Id: Fl_Menu_Window.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Browser.H b/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Browser.H new file mode 100644 index 0000000..6491077 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Browser.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Multi_Browser.H 4288 2005-04-16 00:13:17Z mike $" +// +// Multi browser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Multi_Browser_H +#define Fl_Multi_Browser_H + +#include "Fl_Browser.H" + +class Fl_Multi_Browser : public Fl_Browser { +public: + Fl_Multi_Browser(int X,int Y,int W,int H,const char *L=0) + : Fl_Browser(X,Y,W,H,L) {type(FL_MULTI_BROWSER);} +}; + +#endif + +// +// End of "$Id: Fl_Multi_Browser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Label.H b/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Label.H new file mode 100644 index 0000000..560a9c5 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Multi_Label.H @@ -0,0 +1,47 @@ +// +// "$Id: Fl_Multi_Label.H 4288 2005-04-16 00:13:17Z mike $" +// +// Multi-label header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Multi_Label_H +#define Fl_Multi_Label_H + +class Fl_Widget; +struct Fl_Menu_Item; + +struct FL_EXPORT Fl_Multi_Label { + const char* labela; + const char* labelb; + uchar typea; + uchar typeb; + void label(Fl_Widget*); + void label(Fl_Menu_Item*); +}; + +#endif + +// +// End of "$Id: Fl_Multi_Label.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Input.H new file mode 100644 index 0000000..55fd5e1 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Input.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Multiline_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Multiline input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Multiline_Input_H +#define Fl_Multiline_Input_H + +#include "Fl_Input.H" + +class Fl_Multiline_Input : public Fl_Input { +public: + Fl_Multiline_Input(int X,int Y,int W,int H,const char *l = 0) + : Fl_Input(X,Y,W,H,l) {type(FL_MULTILINE_INPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Multiline_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Output.H b/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Output.H new file mode 100644 index 0000000..522c5b8 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Multiline_Output.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Multiline_Output.H 4288 2005-04-16 00:13:17Z mike $" +// +// Multi line output header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Multiline_Output_H +#define Fl_Multiline_Output_H + +#include "Fl_Output.H" + +class Fl_Multiline_Output : public Fl_Output { +public: + Fl_Multiline_Output(int X,int Y,int W,int H,const char *l = 0) + : Fl_Output(X,Y,W,H,l) {type(FL_MULTILINE_OUTPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Multiline_Output.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Nice_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Nice_Slider.H new file mode 100644 index 0000000..f4fcdcb --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Nice_Slider.H @@ -0,0 +1,42 @@ +// +// "$Id: Fl_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// "Nice" slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// +#ifndef Fl_Nice_Slider_H +#define Fl_Nice_Slider_H + +#include "Fl_Slider.H" + +class Fl_Nice_Slider : public Fl_Slider { +public: + Fl_Nice_Slider(int x,int y,int w,int h,const char *l=0) + : Fl_Slider(x,y,w,h,l) {type(FL_VERT_NICE_SLIDER); box(FL_FLAT_BOX);} +}; + +#endif + +// +// End of "$Id: Fl_Nice_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Object.H b/third_party/windows/fltk-1.1.10/FL/Fl_Object.H new file mode 100644 index 0000000..2d7e4a0 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Object.H @@ -0,0 +1,36 @@ +// +// "$Id: Fl_Object.H 4288 2005-04-16 00:13:17Z mike $" +// +// Old Fl_Object header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// This file is provided for back compatability only. Please use Fl_Widget +#ifndef Fl_Object +#define Fl_Object Fl_Widget +#endif +#include "Fl_Widget.H" + +// +// End of "$Id: Fl_Object.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Output.H b/third_party/windows/fltk-1.1.10/FL/Fl_Output.H new file mode 100644 index 0000000..b5dc531 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Output.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Output.H 4288 2005-04-16 00:13:17Z mike $" +// +// Output header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Output_H +#define Fl_Output_H + +#include "Fl_Input.H" + +class Fl_Output : public Fl_Input { +public: + Fl_Output(int X,int Y,int W,int H, const char *l = 0) + : Fl_Input(X, Y, W, H, l) {type(FL_NORMAL_OUTPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Output.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Overlay_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Overlay_Window.H new file mode 100644 index 0000000..908ea2b --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Overlay_Window.H @@ -0,0 +1,56 @@ +// +// "$Id: Fl_Overlay_Window.H 4288 2005-04-16 00:13:17Z mike $" +// +// Overlay window header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Overlay_Window_H +#define Fl_Overlay_Window_H + +#include "Fl_Double_Window.H" + +class FL_EXPORT Fl_Overlay_Window : public Fl_Double_Window { + friend class _Fl_Overlay; + virtual void draw_overlay() = 0; + Fl_Window *overlay_; +public: + void show(); + void flush(); + void hide(); + void resize(int,int,int,int); + ~Fl_Overlay_Window(); + int can_do_overlay(); + void redraw_overlay(); + Fl_Overlay_Window(int W, int H, const char *l=0) + : Fl_Double_Window(W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); } + Fl_Overlay_Window(int X, int Y, int W, int H, const char *l=0) + : Fl_Double_Window(X,Y,W,H,l) {overlay_ = 0; force_doublebuffering_=1; image(0); } + void show(int a, char **b) {Fl_Double_Window::show(a,b);} +}; + +#endif + +// +// End of "$Id: Fl_Overlay_Window.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_PNG_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_PNG_Image.H new file mode 100644 index 0000000..022b6ec --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_PNG_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_PNG_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// PNG image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_PNG_Image_H +#define Fl_PNG_Image_H +# include "Fl_Image.H" + +class FL_EXPORT Fl_PNG_Image : public Fl_RGB_Image { + + public: + + Fl_PNG_Image(const char* filename); +}; + +#endif + +// +// End of "$Id: Fl_PNG_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_PNM_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_PNM_Image.H new file mode 100644 index 0000000..a79a397 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_PNM_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_PNM_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// PNM image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_PNM_Image_H +#define Fl_PNM_Image_H +# include "Fl_Image.H" + +class FL_EXPORT Fl_PNM_Image : public Fl_RGB_Image { + + public: + + Fl_PNM_Image(const char* filename); +}; + +#endif + +// +// End of "$Id: Fl_PNM_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Pack.H b/third_party/windows/fltk-1.1.10/FL/Fl_Pack.H new file mode 100644 index 0000000..0a96a7c --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Pack.H @@ -0,0 +1,51 @@ +// +// "$Id: Fl_Pack.H 4288 2005-04-16 00:13:17Z mike $" +// +// Pack header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Pack_H +#define Fl_Pack_H + +#include + +class FL_EXPORT Fl_Pack : public Fl_Group { + int spacing_; +public: + enum { // values for type(int) + VERTICAL = 0, + HORIZONTAL = 1 + }; + void draw(); + Fl_Pack(int x,int y,int w ,int h,const char *l = 0); + int spacing() const {return spacing_;} + void spacing(int i) {spacing_ = i;} + uchar horizontal() const {return type();} +}; + +#endif + +// +// End of "$Id: Fl_Pack.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Pixmap.H b/third_party/windows/fltk-1.1.10/FL/Fl_Pixmap.H new file mode 100644 index 0000000..7db82c2 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Pixmap.H @@ -0,0 +1,80 @@ +// +// "$Id: Fl_Pixmap.H 4288 2005-04-16 00:13:17Z mike $" +// +// Pixmap header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Pixmap_H +#define Fl_Pixmap_H +# include "Fl_Image.H" + +class Fl_Widget; +struct Fl_Menu_Item; + +// Older C++ compilers don't support the explicit keyword... :( +# if defined(__sgi) && !defined(_COMPILER_VERSION) +# define explicit +# endif // __sgi && !_COMPILER_VERSION + +class FL_EXPORT Fl_Pixmap : public Fl_Image { + void copy_data(); + void delete_data(); + void set_data(const char * const *p); + + protected: + + void measure(); + + public: + + int alloc_data; // Non-zero if data was allocated +#if defined(__APPLE__) || defined(WIN32) + void *id; // for internal use + void *mask; // for internal use (mask bitmap) +#else + unsigned id; // for internal use + unsigned mask; // for internal use (mask bitmap) +#endif // __APPLE__ || WIN32 + + explicit Fl_Pixmap(char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(const char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + virtual ~Fl_Pixmap(); + virtual Fl_Image *copy(int W, int H); + Fl_Image *copy() { return copy(w(), h()); } + virtual void color_average(Fl_Color c, float i); + 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(Fl_Menu_Item*m); + virtual void uncache(); +}; + +#endif + +// +// End of "$Id: Fl_Pixmap.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Positioner.H b/third_party/windows/fltk-1.1.10/FL/Fl_Positioner.H new file mode 100644 index 0000000..b20c769 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Positioner.H @@ -0,0 +1,77 @@ +// +// "$Id: Fl_Positioner.H 4288 2005-04-16 00:13:17Z mike $" +// +// Positioner header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Positioner_H +#define Fl_Positioner_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +class FL_EXPORT Fl_Positioner : public Fl_Widget { + + double xmin, ymin; + double xmax, ymax; + double xvalue_, yvalue_; + double xstep_, ystep_; + +protected: + + // these allow subclasses to put the dial in a smaller area: + void draw(int, int, int, int); + int handle(int, int, int, int, int); + void draw(); + +public: + + int handle(int); + Fl_Positioner(int x,int y,int w,int h, const char *l=0); + double xvalue() const {return xvalue_;} + double yvalue() const {return yvalue_;} + int xvalue(double); + int yvalue(double); + int value(double,double); + void xbounds(double, double); + double xminimum() const {return xmin;} + void xminimum(double a) {xbounds(a,xmax);} + double xmaximum() const {return xmax;} + void xmaximum(double a) {xbounds(xmin,a);} + void ybounds(double, double); + double yminimum() const {return ymin;} + void yminimum(double a) {ybounds(a,ymax);} + double ymaximum() const {return ymax;} + void ymaximum(double a) {ybounds(ymin,a);} + void xstep(double a) {xstep_ = a;} + void ystep(double a) {ystep_ = a;} + +}; + +#endif + +// +// End of "$Id: Fl_Positioner.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Preferences.H b/third_party/windows/fltk-1.1.10/FL/Fl_Preferences.H new file mode 100644 index 0000000..6fbfcc1 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Preferences.H @@ -0,0 +1,171 @@ +// +// "$Id: Fl_Preferences.H 5330 2006-08-18 07:29:09Z matt $" +// +// Preferences definitions for the Fast Light Tool Kit (FLTK). +// +// Copyright 2002-2005 by Matthias Melcher. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Preferences_H +# define Fl_Preferences_H + +# ifdef WIN32 +# include +# endif // WIN32 + +# include +# include "Fl_Export.H" + + +/** + * Preferences are a data tree containing a root, branches and leafs + */ +class FL_EXPORT Fl_Preferences +{ + +public: + + enum Root { SYSTEM=0, USER }; + // enum Type { win32, macos, fltk }; + + Fl_Preferences( Root root, const char *vendor, const char *application ); + Fl_Preferences( const char *path, const char *vendor, const char *application ); + Fl_Preferences( Fl_Preferences&, const char *group ); + Fl_Preferences( Fl_Preferences*, const char *group ); + ~Fl_Preferences(); + + int groups(); + const char *group( int ); + char groupExists( const char *group ); + char deleteGroup( const char *group ); + + int entries(); + const char *entry( int ); + char entryExists( const char *entry ); + char deleteEntry( const char *entry ); + + char set( const char *entry, int value ); + char set( const char *entry, float value ); + char set( const char *entry, float value, int precision ); + char set( const char *entry, double value ); + char set( const char *entry, double value, int precision ); + char set( const char *entry, const char *value ); + char set( const char *entry, const void *value, int size ); + + char get( const char *entry, int &value, int defaultValue ); + char get( const char *entry, float &value, float defaultValue ); + char get( const char *entry, double &value, double defaultValue ); + char get( const char *entry, char *&value, const char *defaultValue ); + char get( const char *entry, char *value, const char *defaultValue, int maxSize ); + char get( const char *entry, void *&value, const void *defaultValue, int defaultSize ); + char get( const char *entry, void *value, const void *defaultValue, int defaultSize, int maxSize ); + int size( const char *entry ); + + char getUserdataPath( char *path, int pathlen ); + + void flush(); + + // char export( const char *filename, Type fileFormat ); + // char import( const char *filename ); + + class FL_EXPORT Name { + char *data_; + public: + Name( unsigned int n ); + Name( const char *format, ... ); + operator const char *() { return data_; } + ~Name(); + }; + + struct Entry + { + char *name, *value; + }; + +private: + + // make the following functions unavailable + Fl_Preferences(); + Fl_Preferences(const Fl_Preferences&); + Fl_Preferences &operator=(const Fl_Preferences&); + + static char nameBuffer[128]; + + class FL_EXPORT Node // a node contains a list to all its entries + { // and all means to manage the tree structure + Node *child_, *next_, *parent_; + char *path_; + char dirty_; + public: + Node( const char *path ); + ~Node(); + // node methods + int write( FILE *f ); + Node *find( const char *path ); + Node *search( const char *path, int offset=0 ); + Node *addChild( const char *path ); + void setParent( Node *parent ); + Node *parent() { return parent_; } + char remove(); + char dirty(); + // entry methods + int nChildren(); + const char *child( int ix ); + void set( const char *name, const char *value ); + void set( const char *line ); + void add( const char *line ); + const char *get( const char *name ); + int getEntry( const char *name ); + char deleteEntry( const char *name ); + // public values + Entry *entry; + int nEntry, NEntry; + static int lastEntrySet; + }; + friend class Node; + + class FL_EXPORT RootNode // the root node manages file paths and basic reading and writing + { + Fl_Preferences *prefs_; + char *filename_; + char *vendor_, *application_; + public: + RootNode( Fl_Preferences *, Root root, const char *vendor, const char *application ); + RootNode( Fl_Preferences *, const char *path, const char *vendor, const char *application ); + ~RootNode(); + int read(); + int write(); + char getPath( char *path, int pathlen ); + }; + friend class RootNode; + + Node *node; + RootNode *rootNode; + +}; + + +#endif // !Fl_Preferences_H + +// +// End of "$Id: Fl_Preferences.H 5330 2006-08-18 07:29:09Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Progress.H b/third_party/windows/fltk-1.1.10/FL/Fl_Progress.H new file mode 100644 index 0000000..a58a2d7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Progress.H @@ -0,0 +1,70 @@ +// +// "$Id: Fl_Progress.H 4288 2005-04-16 00:13:17Z mike $" +// +// Progress bar widget definitions. +// +// Copyright 2000-2005 by Michael Sweet. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef _Fl_Progress_H_ +# define _Fl_Progress_H_ + +// +// Include necessary headers. +// + +#include "Fl_Widget.H" + + +// +// Progress class... +// + +class FL_EXPORT Fl_Progress : public Fl_Widget +{ + float value_, + minimum_, + maximum_; + + protected: + + virtual void draw(); + + public: + + Fl_Progress(int x, int y, int w, int h, const char *l = 0); + + void maximum(float v) { maximum_ = v; redraw(); } + float maximum() const { return (maximum_); } + + void minimum(float v) { minimum_ = v; redraw(); } + float minimum() const { return (minimum_); } + + void value(float v) { value_ = v; redraw(); } + float value() const { return (value_); } +}; + +#endif // !_Fl_Progress_H_ + +// +// End of "$Id: Fl_Progress.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_RGB_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_RGB_Image.H new file mode 100644 index 0000000..34f546c --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_RGB_Image.H @@ -0,0 +1,35 @@ +// +// "$Id:$" +// +// RGB Image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2007 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_RGB_Image_H +# define Fl_RGB_Image_H +# include "Fl_Image.H" +#endif // !Fl_RGB_Image_H + +// +// End of "$Id:$". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Button.H new file mode 100644 index 0000000..0d66a1b --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Button.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Radio_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Radio button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Radio_Button_H +#define Fl_Radio_Button_H + +#include "Fl_Button.H" + +class Fl_Radio_Button : public Fl_Button { +public: + Fl_Radio_Button(int x,int y,int w,int h,const char *l=0) + : Fl_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);} +}; + +#endif + +// +// End of "$Id: Fl_Radio_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Light_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Light_Button.H new file mode 100644 index 0000000..bf4457e --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Light_Button.H @@ -0,0 +1,42 @@ +// +// "$Id: Fl_Radio_Light_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Radio light button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// +#ifndef Fl_Radio_Light_Button_H +#define Fl_Radio_Light_Button_H + +#include "Fl_Light_Button.H" + +class Fl_Radio_Light_Button : public Fl_Light_Button { +public: + Fl_Radio_Light_Button(int X,int Y,int W,int H,const char *l=0) + : Fl_Light_Button(X,Y,W,H,l) {type(FL_RADIO_BUTTON);} +}; + +#endif + +// +// End of "$Id: Fl_Radio_Light_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Round_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Round_Button.H new file mode 100644 index 0000000..0b7319e --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Radio_Round_Button.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Radio_Round_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Radio round button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Radio_Round_Button_H +#define Fl_Radio_Round_Button_H + +#include "Fl_Round_Button.H" + +class Fl_Radio_Round_Button : public Fl_Round_Button { +public: + Fl_Radio_Round_Button(int x,int y,int w,int h,const char *l=0) + : Fl_Round_Button(x,y,w,h,l) {type(FL_RADIO_BUTTON);} +}; + +#endif + +// +// End of "$Id: Fl_Radio_Round_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Repeat_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Repeat_Button.H new file mode 100644 index 0000000..705c0d7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Repeat_Button.H @@ -0,0 +1,49 @@ +// +// "$Id: Fl_Repeat_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Repeat button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Repeat_Button_H +#define Fl_Repeat_Button_H +#include "Fl.H" +#include "Fl_Button.H" + +class FL_EXPORT Fl_Repeat_Button : public Fl_Button { + static void repeat_callback(void *); +public: + int handle(int); + 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); + Fl_Button::deactivate(); + } +}; + +#endif + +// +// End of "$Id: Fl_Repeat_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Return_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Return_Button.H new file mode 100644 index 0000000..afb3c20 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Return_Button.H @@ -0,0 +1,45 @@ +// +// "$Id: Fl_Return_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Return button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Return_Button_H +#define Fl_Return_Button_H +#include "Fl_Button.H" + +class FL_EXPORT Fl_Return_Button : public Fl_Button { +protected: + void draw(); +public: + int handle(int); + Fl_Return_Button(int X, int Y, int W, int H,const char *l=0) + : Fl_Button(X,Y,W,H,l) {} +}; + +#endif + +// +// End of "$Id: Fl_Return_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Roller.H b/third_party/windows/fltk-1.1.10/FL/Fl_Roller.H new file mode 100644 index 0000000..b063176 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Roller.H @@ -0,0 +1,47 @@ +// +// "$Id: Fl_Roller.H 4288 2005-04-16 00:13:17Z mike $" +// +// Roller header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Roller_H +#define Fl_Roller_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +class FL_EXPORT Fl_Roller : public Fl_Valuator { +protected: + void draw(); +public: + int handle(int); + Fl_Roller(int X,int Y,int W,int H,const char* L=0); +}; + +#endif + +// +// End of "$Id: Fl_Roller.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Round_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Round_Button.H new file mode 100644 index 0000000..2b9e433 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Round_Button.H @@ -0,0 +1,42 @@ +// +// "$Id: Fl_Round_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Round button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Round_Button_H +#define Fl_Round_Button_H + +#include "Fl_Light_Button.H" + +class FL_EXPORT Fl_Round_Button : public Fl_Light_Button { +public: + Fl_Round_Button(int x,int y,int w,int h,const char *l = 0); +}; + +#endif + +// +// End of "$Id: Fl_Round_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Round_Clock.H b/third_party/windows/fltk-1.1.10/FL/Fl_Round_Clock.H new file mode 100644 index 0000000..74d1e17 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Round_Clock.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Round_Clock.H 4288 2005-04-16 00:13:17Z mike $" +// +// Round clock header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Round_Clock_H +#define Fl_Round_Clock_H + +#include "Fl_Clock.H" + +class Fl_Round_Clock : public Fl_Clock { +public: + Fl_Round_Clock(int x,int y,int w,int h, const char *l = 0) + : Fl_Clock(x,y,w,h,l) {type(FL_ROUND_CLOCK); box(FL_NO_BOX);} +}; + +#endif + +// +// End of "$Id: Fl_Round_Clock.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Scroll.H b/third_party/windows/fltk-1.1.10/FL/Fl_Scroll.H new file mode 100644 index 0000000..655cfa6 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Scroll.H @@ -0,0 +1,79 @@ +// +// "$Id: Fl_Scroll.H 5618 2007-01-18 19:23:24Z matt $" +// +// Scroll header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Scroll_H +#define Fl_Scroll_H + +#include "Fl_Group.H" +#include "Fl_Scrollbar.H" + +class FL_EXPORT Fl_Scroll : public Fl_Group { + + int xposition_, yposition_; + int width_, height_; + int oldx, oldy; + static void hscrollbar_cb(Fl_Widget*, void*); + static void scrollbar_cb(Fl_Widget*, void*); + void fix_scrollbar_order(); + static void draw_clip(void*,int,int,int,int); + +protected: + + void bbox(int&,int&,int&,int&); + void draw(); + +public: + + Fl_Scrollbar scrollbar; + Fl_Scrollbar hscrollbar; + + void resize(int,int,int,int); + int handle(int); + + Fl_Scroll(int X,int Y,int W,int H,const char*l=0); + + enum { // values for type() + HORIZONTAL = 1, + VERTICAL = 2, + BOTH = 3, + ALWAYS_ON = 4, + HORIZONTAL_ALWAYS = 5, + VERTICAL_ALWAYS = 6, + BOTH_ALWAYS = 7 + }; + + int xposition() const {return xposition_;} + int yposition() const {return yposition_;} + void position(int, int); + void clear(); +}; + +#endif + +// +// End of "$Id: Fl_Scroll.H 5618 2007-01-18 19:23:24Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Scrollbar.H b/third_party/windows/fltk-1.1.10/FL/Fl_Scrollbar.H new file mode 100644 index 0000000..314ac0f --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Scrollbar.H @@ -0,0 +1,61 @@ +// +// "$Id: Fl_Scrollbar.H 6042 2008-02-25 13:00:53Z matt $" +// +// Scroll bar header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Scrollbar_H +#define Fl_Scrollbar_H + +#include "Fl_Slider.H" + +class FL_EXPORT Fl_Scrollbar : public Fl_Slider { + + int linesize_; + int pushed_; + static void timeout_cb(void*); + void increment_cb(); +protected: + void draw(); + +public: + + Fl_Scrollbar(int x,int y,int w,int h, const char *l = 0); + ~Fl_Scrollbar(); + int handle(int); + + int value() {return int(Fl_Slider::value());} + int value(int p, int s, int top, int total) { + return scrollvalue(p, s, top, total); + } + int linesize() const {return linesize_;} + void linesize(int i) {linesize_ = i;} + +}; + +#endif + +// +// End of "$Id: Fl_Scrollbar.H 6042 2008-02-25 13:00:53Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Secret_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Secret_Input.H new file mode 100644 index 0000000..fee328e --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Secret_Input.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Secret_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Secret input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Secret_Input_H +#define Fl_Secret_Input_H + +#include "Fl_Input.H" + +class Fl_Secret_Input : public Fl_Input { +public: + Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0) + : Fl_Input(X,Y,W,H,l) {type(FL_SECRET_INPUT);} +}; + +#endif + +// +// End of "$Id: Fl_Secret_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Select_Browser.H b/third_party/windows/fltk-1.1.10/FL/Fl_Select_Browser.H new file mode 100644 index 0000000..25639d3 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Select_Browser.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Select_Browser.H 4288 2005-04-16 00:13:17Z mike $" +// +// Select browser header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Select_Browser_H +#define Fl_Select_Browser_H + +#include "Fl_Browser.H" + +class Fl_Select_Browser : public Fl_Browser { +public: + Fl_Select_Browser(int X,int Y,int W,int H,const char *l=0) + : Fl_Browser(X,Y,W,H,l) {type(FL_SELECT_BROWSER);} +}; + +#endif + +// +// End of "$Id: Fl_Select_Browser.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Shared_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_Shared_Image.H new file mode 100644 index 0000000..e159f80 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Shared_Image.H @@ -0,0 +1,99 @@ +// +// "$Id: Fl_Shared_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// Shared image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Shared_Image_H +# define Fl_Shared_Image_H + +# include "Fl_Image.H" + + +// Test function for adding new formats +typedef Fl_Image *(*Fl_Shared_Handler)(const char *name, uchar *header, + int headerlen); + +// Shared images class. +class FL_EXPORT Fl_Shared_Image : public Fl_Image { + protected: + + static Fl_Shared_Image **images_; // Shared images + static int num_images_; // Number of shared images + static int alloc_images_; // Allocated shared images + static Fl_Shared_Handler *handlers_; // Additional format handlers + static int num_handlers_; // Number of format handlers + static int alloc_handlers_; // Allocated format handlers + + const char *name_; // Name of image file + int original_; // Original image? + int refcount_; // Number of times this image has been used + Fl_Image *image_; // The image that is shared + int alloc_image_; // Was the image allocated? + + static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1); + + // Use get() and release() to load/delete images in memory... + Fl_Shared_Image(); + Fl_Shared_Image(const char *n, Fl_Image *img = 0); + virtual ~Fl_Shared_Image(); + void add(); + void update(); + + public: + + const char *name() { return name_; } + int refcount() { return refcount_; } + void release(); + void reload(); + + virtual Fl_Image *copy(int W, int H); + Fl_Image *copy() { return copy(w(), h()); } + virtual void color_average(Fl_Color c, float i); + virtual void desaturate(); + virtual void draw(int X, int Y, int W, int H, int cx, int cy); + void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } + virtual void uncache(); + + static Fl_Shared_Image *find(const char *n, int W = 0, int H = 0); + static Fl_Shared_Image *get(const char *n, int W = 0, int H = 0); + static Fl_Shared_Image **images(); + static int num_images(); + static void add_handler(Fl_Shared_Handler f); + static void remove_handler(Fl_Shared_Handler f); +}; + +// +// The following function is provided in the fltk_images library and +// registers all of the "extra" image file formats that are not part +// of the core FLTK library... +// + +FL_EXPORT extern void fl_register_images(); + +#endif // !Fl_Shared_Image_H + +// +// End of "$Id: Fl_Shared_Image.H 4288 2005-04-16 00:13:17Z mike $" +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Simple_Counter.H b/third_party/windows/fltk-1.1.10/FL/Fl_Simple_Counter.H new file mode 100644 index 0000000..bf08d02 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Simple_Counter.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Simple_Counter.H 4288 2005-04-16 00:13:17Z mike $" +// +// Simple counter header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Simple_Counter_H +#define Fl_Simple_Counter_H + +#include "Fl_Counter.H" + +class Fl_Simple_Counter : public Fl_Counter { +public: + Fl_Simple_Counter(int x,int y,int w,int h, const char *l = 0) + : Fl_Counter(x,y,w,h,l) {type(FL_SIMPLE_COUNTER);} +}; + +#endif + +// +// End of "$Id: Fl_Simple_Counter.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Single_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Single_Window.H new file mode 100644 index 0000000..6611d14 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Single_Window.H @@ -0,0 +1,49 @@ +// +// "$Id: Fl_Single_Window.H 4288 2005-04-16 00:13:17Z mike $" +// +// Single-buffered window header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Single_Window_H +#define Fl_Single_Window_H + +#include "Fl_Window.H" + +class FL_EXPORT Fl_Single_Window : public Fl_Window { +public: + void show(); + void show(int a, char **b) {Fl_Window::show(a,b);} + void flush(); + Fl_Single_Window(int W, int H, const char *l=0) + : Fl_Window(W,H,l) {} + Fl_Single_Window(int X, int Y, int W, int H, const char *l=0) + : Fl_Window(X,Y,W,H,l) {} + int make_current(); +}; + +#endif + +// +// End of "$Id: Fl_Single_Window.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Slider.H new file mode 100644 index 0000000..7b50c81 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Slider.H @@ -0,0 +1,75 @@ +// +// "$Id: Fl_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Slider_H +#define Fl_Slider_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +// values for type(), lowest bit indicate horizontal: +#define FL_VERT_SLIDER 0 +#define FL_HOR_SLIDER 1 +#define FL_VERT_FILL_SLIDER 2 +#define FL_HOR_FILL_SLIDER 3 +#define FL_VERT_NICE_SLIDER 4 +#define FL_HOR_NICE_SLIDER 5 + +class FL_EXPORT Fl_Slider : public Fl_Valuator { + + float slider_size_; + uchar slider_; + void _Fl_Slider(); + void draw_bg(int, int, int, int); + +protected: + + // these allow subclasses to put the slider in a smaller area: + void draw(int, int, int, int); + int handle(int, int, int, int, int); + +public: + + void draw(); + int handle(int); + Fl_Slider(int x,int y,int w,int h, const char *l = 0); + Fl_Slider(uchar t,int x,int y,int w,int h, const char *l); + + int scrollvalue(int windowtop,int windowsize,int first,int totalsize); + void bounds(double a, double b); + float slider_size() const {return slider_size_;} + void slider_size(double v); + Fl_Boxtype slider() const {return (Fl_Boxtype)slider_;} + void slider(Fl_Boxtype c) {slider_ = c;} +}; + +#endif + +// +// End of "$Id: Fl_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Spinner.H b/third_party/windows/fltk-1.1.10/FL/Fl_Spinner.H new file mode 100644 index 0000000..fe9872d --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Spinner.H @@ -0,0 +1,224 @@ +// +// "$Id$" +// +// Spinner widget for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2006 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Spinner_H +# define Fl_Spinner_H + +// +// Include necessary headers... +// + +# include +# include +# include +# include +# include +# include + + +// +// Fl_Spinner widget class... +// + +class Fl_Spinner : public Fl_Group +{ + double value_; // Current value + double minimum_; // Minimum value + double maximum_; // Maximum value + double step_; // Amount to add/subtract for up/down + const char *format_; // Format string + + Fl_Input input_; // Input field for the value + Fl_Repeat_Button + up_button_, // Up button + down_button_; // Down button + + + static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) { + double v; // New value + + if (w == &(sb->input_)) { + // Something changed in the input field... + v = atof(sb->input_.value()); + + if (v < sb->minimum_) { + sb->value_ = sb->minimum_; + sb->update(); + } else if (v > sb->maximum_) { + sb->value_ = sb->maximum_; + sb->update(); + } else sb->value_ = v; + } else if (w == &(sb->up_button_)) { + // Up button pressed... + v = sb->value_ + sb->step_; + + if (v > sb->maximum_) sb->value_ = sb->minimum_; + else sb->value_ = v; + + sb->update(); + } else if (w == &(sb->down_button_)) { + // Down button pressed... + v = sb->value_ - sb->step_; + + if (v < sb->minimum_) sb->value_ = sb->maximum_; + else sb->value_ = v; + + sb->update(); + } + + sb->do_callback(); + } + void update() { + char s[255]; // Value string + + if (format_[0]=='%'&&format_[1]=='.'&&format_[2]=='*') { // precision argument + // this code block is a simplified version of + // Fl_Valuator::format() and works well (but looks ugly) + int c = 0; + char temp[64], *sp = temp; + sprintf(temp, "%.12f", step_); + while (*sp) sp++; + sp--; + while (sp>temp && *sp=='0') sp--; + while (sp>temp && (*sp>='0' && *sp<='9')) { sp--; c++; } + sprintf(s, format_, c, value_); + } else { + sprintf(s, format_, value_); + } + input_.value(s); + } + + public: + + Fl_Spinner(int X, int Y, int W, int H, const char *L = 0) + : Fl_Group(X, Y, W, H, L), + input_(X, Y, W - H / 2 - 2, H), + up_button_(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2, "@-42<"), + down_button_(X + W - H / 2 - 2, Y + H - H / 2, + H / 2 + 2, H / 2, "@-42>") { + end(); + + value_ = 1.0; + minimum_ = 1.0; + maximum_ = 100.0; + step_ = 1.0; + format_ = "%g"; + + align(FL_ALIGN_LEFT); + + input_.value("1"); + input_.type(FL_INT_INPUT); + input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE); + input_.callback((Fl_Callback *)sb_cb, this); + + up_button_.callback((Fl_Callback *)sb_cb, this); + + down_button_.callback((Fl_Callback *)sb_cb, this); + } + + const char *format() { return (format_); } + void format(const char *f) { format_ = f; update(); } + + int handle(int event) { + switch (event) { + case FL_KEYDOWN : + case FL_SHORTCUT : + if (Fl::event_key() == FL_Up) { + up_button_.do_callback(); + return 1; + } else if (Fl::event_key() == FL_Down) { + down_button_.do_callback(); + return 1; + } else return 0; + + case FL_FOCUS : + if (input_.take_focus()) return 1; + else return 0; + } + + return Fl_Group::handle(event); + } + + // Speling mistaks retained for source compatibility... + double maxinum() const { return (maximum_); } + double maximum() const { return (maximum_); } + void maximum(double m) { maximum_ = m; } + double mininum() const { return (minimum_); } + double minimum() const { return (minimum_); } + void minimum(double m) { minimum_ = m; } + void range(double a, double b) { minimum_ = a; maximum_ = b; } + void resize(int X, int Y, int W, int H) { + Fl_Group::resize(X,Y,W,H); + + input_.resize(X, Y, W - H / 2 - 2, H); + up_button_.resize(X + W - H / 2 - 2, Y, H / 2 + 2, H / 2); + down_button_.resize(X + W - H / 2 - 2, Y + H - H / 2, + H / 2 + 2, H / 2); + } + double step() const { return (step_); } + void step(double s) { + step_ = s; + if (step_ != (int)step_) input_.type(FL_FLOAT_INPUT); + else input_.type(FL_INT_INPUT); + update(); + } + Fl_Color textcolor() const { + return (input_.textcolor()); + } + void textcolor(Fl_Color c) { + input_.textcolor(c); + } + uchar textfont() const { + return (input_.textfont()); + } + void textfont(uchar f) { + input_.textfont(f); + } + uchar textsize() const { + return (input_.textsize()); + } + void textsize(uchar s) { + input_.textsize(s); + } + uchar type() const { return (input_.type()); } + void type(uchar v) { + if (v==FL_FLOAT_INPUT) { + format("%.*f"); + } else { + format("%.0f"); + } + input_.type(v); + } + double value() const { return (value_); } + void value(double v) { value_ = v; update(); } +}; + +#endif // !Fl_Spinner_H + +// +// End of "$Id$". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Sys_Menu_Bar.H b/third_party/windows/fltk-1.1.10/FL/Fl_Sys_Menu_Bar.H new file mode 100644 index 0000000..d3e2724 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Sys_Menu_Bar.H @@ -0,0 +1,56 @@ +// +// "$Id: Fl_Sys_Menu_Bar.H 4546 2005-08-29 20:05:38Z matt $" +// +// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Sys_Menu_Bar_H +#define Fl_Sys_Menu_Bar_H + +#include "Fl_Menu_Bar.H" + +#ifdef __APPLE__ + +class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar { +protected: + void draw(); +public: + Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0) + : Fl_Menu_Bar(x,y,w,h,l) { + deactivate(); // don't let the old area take events + } + void menu(const Fl_Menu_Item *m); +}; + +#else + +typedef Fl_Menu_Bar Fl_Sys_Menu_Bar; + +#endif + +#endif + +// +// End of "$Id: Fl_Sys_Menu_Bar.H 4546 2005-08-29 20:05:38Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Tabs.H b/third_party/windows/fltk-1.1.10/FL/Fl_Tabs.H new file mode 100644 index 0000000..d242844 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Tabs.H @@ -0,0 +1,57 @@ +// +// "$Id: Fl_Tabs.H 5326 2006-08-17 13:43:07Z matt $" +// +// Tab header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Tabs_H +#define Fl_Tabs_H + +#include "Fl_Group.H" + +class FL_EXPORT Fl_Tabs : public Fl_Group { + Fl_Widget *value_; + Fl_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); +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 *); + Fl_Tabs(int,int,int,int,const char * = 0); + Fl_Widget *which(int event_x, int event_y); +}; + +#endif + +// +// End of "$Id: Fl_Tabs.H 5326 2006-08-17 13:43:07Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Text_Buffer.H b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Buffer.H new file mode 100644 index 0000000..4076366 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Buffer.H @@ -0,0 +1,263 @@ +// +// "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $" +// +// Header file for Fl_Text_Buffer class. +// +// Copyright 2001-2005 by Bill Spitzak and others. +// Original code Copyright Mark Edel. Permission to distribute under +// the LGPL for the FLTK library granted by Mark Edel. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef FL_TEXT_BUFFER_H +#define FL_TEXT_BUFFER_H + +/* Maximum length in characters of a tab or control character expansion + of a single buffer character */ +#define FL_TEXT_MAX_EXP_CHAR_LEN 20 + +#include "Fl_Export.H" + +class FL_EXPORT Fl_Text_Selection { + friend class Fl_Text_Buffer; + + public: + void set(int start, int end); + void set_rectangular(int start, int end, int rectStart, int rectEnd); + void update(int pos, int nDeleted, int nInserted); + char rectangular() { return mRectangular; } + int start() { return mStart; } + int end() { return mEnd; } + int rect_start() { return mRectStart; } + int rect_end() { return mRectEnd; } + char selected() { return mSelected; } + void selected(char b) { mSelected = b; } + int includes(int pos, int lineStartPos, int dispIndex); + int position(int* start, int* end); + int position(int* start, int* end, int* isRect, int* rectStart, int* rectEnd); + + + protected: + char mSelected; + char mRectangular; + int mStart; + int mEnd; + int mRectStart; + int mRectEnd; +}; + +typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted, + int nRestyled, const char* deletedText, + void* cbArg); +typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); + +class FL_EXPORT Fl_Text_Buffer { + public: + Fl_Text_Buffer(int requestedSize = 0); + ~Fl_Text_Buffer(); + + int length() { return mLength; } + char* text(); + void text(const char* text); + char* text_range(int start, int end); + char character(int pos); + char* text_in_rectangle(int start, int end, int rectStart, int rectEnd); + void insert(int pos, const char* text); + void append(const char* t) { insert(length(), t); } + void remove(int start, int end); + void replace(int start, int end, const char *text); + void copy(Fl_Text_Buffer* fromBuf, int fromStart, int fromEnd, int toPos); + int undo(int *cp=0); + void canUndo(char flag=1); + int insertfile(const char *file, int pos, int buflen = 128*1024); + int appendfile(const char *file, int buflen = 128*1024) + { return insertfile(file, length(), buflen); } + int loadfile(const char *file, int buflen = 128*1024) + { select(0, length()); remove_selection(); return appendfile(file, buflen); } + int outputfile(const char *file, int start, int end, int buflen = 128*1024); + int savefile(const char *file, int buflen = 128*1024) + { return outputfile(file, 0, length(), buflen); } + + void insert_column(int column, int startPos, const char* text, + int* charsInserted, int* charsDeleted); + + void replace_rectangular(int start, int end, int rectStart, int rectEnd, + const char* text); + + void overlay_rectangular(int startPos, int rectStart, int rectEnd, + const char* text, int* charsInserted, + int* charsDeleted); + + void remove_rectangular(int start, int end, int rectStart, int rectEnd); + void clear_rectangular(int start, int end, int rectStart, int rectEnd); + int tab_distance() { return mTabDist; } + void tab_distance(int tabDist); + void select(int start, int end); + int selected() { return mPrimary.selected(); } + void unselect(); + void select_rectangular(int start, int end, int rectStart, int rectEnd); + int selection_position(int* start, int* end); + + int selection_position(int* start, int* end, int* isRect, int* rectStart, + int* rectEnd); + + char* selection_text(); + void remove_selection(); + void replace_selection(const char* text); + void secondary_select(int start, int end); + int secondary_selected() { return mSecondary.selected(); } + void secondary_unselect(); + + void secondary_select_rectangular(int start, int end, int rectStart, + int rectEnd); + + int secondary_selection_position(int* start, int* end); + int secondary_selection_position(int* start, int* end, int* isRect, + int* rectStart, int* rectEnd); + + char* secondary_selection_text(); + void remove_secondary_selection(); + void replace_secondary_selection(const char* text); + void highlight(int start, int end); + int highlight() { return mHighlight.selected(); } + void unhighlight(); + void highlight_rectangular(int start, int end, int rectStart, int rectEnd); + + int highlight_position(int* start, int* end); + int highlight_position(int* start, int* end, int* isRect, int* rectStart, + int* rectEnd); + + char* highlight_text(); + void add_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); + void remove_modify_callback(Fl_Text_Modify_Cb bufModifiedCB, void* cbArg); + + void call_modify_callbacks() { call_modify_callbacks(0, 0, 0, 0, 0); } + + void add_predelete_callback(Fl_Text_Predelete_Cb bufPredelCB, void* cbArg); + void remove_predelete_callback(Fl_Text_Predelete_Cb predelCB, void* cbArg); + + void call_predelete_callbacks() { call_predelete_callbacks(0, 0); } + + char* line_text(int pos); + int line_start(int pos); + int line_end(int pos); + int word_start(int pos); + int word_end(int pos); + int expand_character(int pos, int indent, char *outStr); + + static int expand_character(char c, int indent, char* outStr, int tabDist, + char nullSubsChar); + + static int character_width(char c, int indent, int tabDist, char nullSubsChar); + int count_displayed_characters(int lineStartPos, int targetPos); + int skip_displayed_characters(int lineStartPos, int nChars); + int count_lines(int startPos, int endPos); + int skip_lines(int startPos, int nLines); + int rewind_lines(int startPos, int nLines); + int findchar_forward(int startPos, char searchChar, int* foundPos); + int findchar_backward(int startPos, char searchChar, int* foundPos); + int findchars_forward(int startPos, const char* searchChars, int* foundPos); + int findchars_backward(int startPos, const char* searchChars, int* foundPos); + + int search_forward(int startPos, const char* searchString, int* foundPos, + int matchCase = 0); + + int search_backward(int startPos, const char* searchString, int* foundPos, + int matchCase = 0); + + int substitute_null_characters(char* string, int length); + void unsubstitute_null_characters(char* string); + char null_substitution_character() { return mNullSubsChar; } + Fl_Text_Selection* primary_selection() { return &mPrimary; } + Fl_Text_Selection* secondary_selection() { return &mSecondary; } + Fl_Text_Selection* highlight_selection() { return &mHighlight; } + + protected: + void call_modify_callbacks(int pos, int nDeleted, int nInserted, + int nRestyled, const char* deletedText); + void call_predelete_callbacks(int pos, int nDeleted); + + int insert_(int pos, const char* text); + void remove_(int start, int end); + + void remove_rectangular_(int start, int end, int rectStart, int rectEnd, + int* replaceLen, int* endPos); + + void insert_column_(int column, int startPos, const char* insText, + int* nDeleted, int* nInserted, int* endPos); + + void overlay_rectangular_(int startPos, int rectStart, int rectEnd, + const char* insText, int* nDeleted, + int* nInserted, int* endPos); + + void redisplay_selection(Fl_Text_Selection* oldSelection, + Fl_Text_Selection* newSelection); + + void move_gap(int pos); + void reallocate_with_gap(int newGapStart, int newGapLen); + char* selection_text_(Fl_Text_Selection* sel); + void remove_selection_(Fl_Text_Selection* sel); + void replace_selection_(Fl_Text_Selection* sel, const char* text); + + void rectangular_selection_boundaries(int lineStartPos, int rectStart, + int rectEnd, int* selStart, + int* selEnd); + + void update_selections(int pos, int nDeleted, int nInserted); + + Fl_Text_Selection mPrimary; /* highlighted areas */ + Fl_Text_Selection mSecondary; + Fl_Text_Selection mHighlight; + int mLength; /* length of the text in the buffer (the length + of the buffer itself must be calculated: + gapEnd - gapStart + length) */ + char* mBuf; /* allocated memory where the text is stored */ + int mGapStart; /* points to the first character of the gap */ + int mGapEnd; /* points to the first char after the gap */ + // The hardware tab distance used by all displays for this buffer, + // and used in computing offsets for rectangular selection operations. + int mTabDist; /* equiv. number of characters in a tab */ + int mUseTabs; /* True if buffer routines are allowed to use + tabs for padding in rectangular operations */ + int mNModifyProcs; /* number of modify-redisplay procs attached */ + Fl_Text_Modify_Cb* /* procedures to call when buffer is */ + mNodifyProcs; /* modified to redisplay contents */ + void** mCbArgs; /* caller arguments for modifyProcs above */ + int mNPredeleteProcs; /* number of pre-delete procs attached */ + Fl_Text_Predelete_Cb* /* procedure to call before text is deleted */ + mPredeleteProcs; /* from the buffer; at most one is supported. */ + void **mPredeleteCbArgs; /* caller argument for pre-delete proc above */ + int mCursorPosHint; /* hint for reasonable cursor position after + a buffer modification operation */ + char mNullSubsChar; /* NEdit is based on C null-terminated strings, + so ascii-nul characters must be substituted + with something else. This is the else, but + of course, things get quite messy when you + use it */ + char mCanUndo; /* if this buffer is used for attributes, it must + not do any undo calls */ +}; + +#endif + +// +// End of "$Id: Fl_Text_Buffer.H 6010 2008-01-04 20:31:52Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Text_Display.H b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Display.H new file mode 100644 index 0000000..7d33bc8 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Display.H @@ -0,0 +1,298 @@ +// +// "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $" +// +// Header file for Fl_Text_Display class. +// +// Copyright 2001-2005 by Bill Spitzak and others. +// Original code Copyright Mark Edel. Permission to distribute under +// the LGPL for the FLTK library granted by Mark Edel. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef FL_TEXT_DISPLAY_H +#define FL_TEXT_DISPLAY_H + +#include "fl_draw.H" +#include "Fl_Group.H" +#include "Fl_Widget.H" +#include "Fl_Scrollbar.H" +#include "Fl_Text_Buffer.H" + +class FL_EXPORT Fl_Text_Display: public Fl_Group { + public: + enum { + NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR, + BLOCK_CURSOR, HEAVY_CURSOR + }; + + enum { + CURSOR_POS, CHARACTER_POS + }; + + // drag types- they match Fl::event_clicks() so that single clicking to + // start a collection selects by character, double clicking selects by + // word and triple clicking selects by line. + enum { + DRAG_CHAR = 0, DRAG_WORD = 1, DRAG_LINE = 2 + }; + friend void fl_text_drag_me(int pos, Fl_Text_Display* d); + + typedef void (*Unfinished_Style_Cb)(int, void *); + + // style attributes - currently not implemented! + enum { + ATTR_NONE = 0, + ATTR_UNDERLINE = 1, + ATTR_HIDDEN = 2 + }; + + struct Style_Table_Entry { + Fl_Color color; + Fl_Font font; + int size; + unsigned attr; + }; + + Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0); + ~Fl_Text_Display(); + + virtual int handle(int e); + void buffer(Fl_Text_Buffer* buf); + void buffer(Fl_Text_Buffer& buf) { buffer(&buf); } + Fl_Text_Buffer* buffer() { return mBuffer; } + void redisplay_range(int start, int end); + void scroll(int topLineNum, int horizOffset); + void insert(const char* text); + void overstrike(const char* text); + void insert_position(int newPos); + int insert_position() { return mCursorPos; } + int in_selection(int x, int y); + void show_insert_position(); + int move_right(); + int move_left(); + int move_up(); + int move_down(); + int count_lines(int start, int end, bool start_pos_is_line_start); + int line_start(int pos); + int line_end(int pos, bool start_pos_is_line_start); + int skip_lines(int startPos, int nLines, bool startPosIsLineStart); + int rewind_lines(int startPos, int nLines); + void next_word(void); + void previous_word(void); + void show_cursor(int b = 1); + void hide_cursor() { show_cursor(0); } + void cursor_style(int style); + Fl_Color cursor_color() const {return mCursor_color;} + void cursor_color(Fl_Color n) {mCursor_color = n;} + int scrollbar_width() { return scrollbar_width_; } + Fl_Align scrollbar_align() { return scrollbar_align_; } + void scrollbar_width(int W) { scrollbar_width_ = W; } + void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; } + int word_start(int pos) { return buffer()->word_start(pos); } + int word_end(int pos) { return buffer()->word_end(pos); } + + + void highlight_data(Fl_Text_Buffer *styleBuffer, + const Style_Table_Entry *styleTable, + int nStyles, char unfinishedStyle, + Unfinished_Style_Cb unfinishedHighlightCB, + void *cbArg); + + int position_style(int lineStartPos, int lineLen, int lineIndex, + int dispIndex); + + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned n) {textcolor_ = n;} + + int wrapped_column(int row, int column); + int wrapped_row(int row); + void wrap_mode(int wrap, int wrap_margin); + + virtual void resize(int X, int Y, int W, int H); + + protected: + // Most (all?) of this stuff should only be called from resize() or + // draw(). + // Anything with "vline" indicates thats it deals with currently + // visible lines. + + virtual void draw(); + void draw_text(int X, int Y, int W, int H); + void draw_range(int start, int end); + void draw_cursor(int, int); + + void draw_string(int style, int x, int y, int toX, const char *string, + int nChars); + + void draw_vline(int visLineNum, int leftClip, int rightClip, + int leftCharIndex, int rightCharIndex); + + void draw_line_numbers(bool clearAll); + + void clear_rect(int style, int x, int y, int width, int height); + void display_insert(); + + void offset_line_starts(int newTopLineNum); + + void calc_line_starts(int startLine, int endLine); + + void update_line_starts(int pos, int charsInserted, int charsDeleted, + int linesInserted, int linesDeleted, int *scrolled); + + void calc_last_char(); + + int position_to_line( int pos, int* lineNum ); + int string_width(const char* string, int length, int style); + + static void scroll_timer_cb(void*); + + static void buffer_predelete_cb(int pos, int nDeleted, void* cbArg); + static void buffer_modified_cb(int pos, int nInserted, int nDeleted, + int nRestyled, const char* deletedText, + void* cbArg); + + static void h_scrollbar_cb(Fl_Scrollbar* w, Fl_Text_Display* d); + static void v_scrollbar_cb( Fl_Scrollbar* w, Fl_Text_Display* d); + void update_v_scrollbar(); + void update_h_scrollbar(); + int measure_vline(int visLineNum); + int longest_vline(); + int empty_vlines(); + int vline_length(int visLineNum); + int xy_to_position(int x, int y, int PosType = CHARACTER_POS); + + void xy_to_rowcol(int x, int y, int* row, int* column, + int PosType = CHARACTER_POS); + + int position_to_xy(int pos, int* x, int* y); + void maintain_absolute_top_line_number(int state); + int get_absolute_top_line_number(); + void absolute_top_line_number(int oldFirstChar); + int maintaining_absolute_top_line_number(); + void reset_absolute_top_line_number(); + int position_to_linecol(int pos, int* lineNum, int* column); + void scroll_(int topLineNum, int horizOffset); + + void extend_range_for_styles(int* start, int* end); + + void find_wrap_range(const char *deletedText, int pos, int nInserted, + int nDeleted, int *modRangeStart, int *modRangeEnd, + int *linesInserted, int *linesDeleted); + void measure_deleted_lines(int pos, int nDeleted); + void wrapped_line_counter(Fl_Text_Buffer *buf, int startPos, int maxPos, + int maxLines, bool startPosIsLineStart, + int styleBufOffset, int *retPos, int *retLines, + int *retLineStart, int *retLineEnd, + bool countLastLineMissingNewLine = true); + void find_line_end(int pos, bool start_pos_is_line_start, int *lineEnd, + int *nextLineStart); + int measure_proportional_character(char c, int colNum, int pos); + int wrap_uses_character(int lineEndPos); + int range_touches_selection(Fl_Text_Selection *sel, int rangeStart, + int rangeEnd); + + int damage_range1_start, damage_range1_end; + int damage_range2_start, damage_range2_end; + int mCursorPos; + int mCursorOn; + int mCursorOldY; /* Y pos. of cursor for blanking */ + int mCursorToHint; /* Tells the buffer modified callback + where to move the cursor, to reduce + the number of redraw calls */ + int mCursorStyle; /* One of enum cursorStyles above */ + int mCursorPreferredCol; /* Column for vert. cursor movement */ + int mNVisibleLines; /* # of visible (displayed) lines */ + int mNBufferLines; /* # of newlines in the buffer */ + Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */ + Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing + color and font information */ + int mFirstChar, mLastChar; /* Buffer positions of first and last + displayed character (lastChar points + either to a newline or one character + beyond the end of the buffer) */ + int mContinuousWrap; /* Wrap long lines when displaying */ + int mWrapMargin; /* Margin in # of char positions for + wrapping in continuousWrap mode */ + int* mLineStarts; + int mTopLineNum; /* Line number of top displayed line + of file (first line of file is 1) */ + int mAbsTopLineNum; /* In continuous wrap mode, the line + number of the top line if the text + were not wrapped (note that this is + only maintained as needed). */ + int mNeedAbsTopLineNum; /* Externally settable flag to continue + maintaining absTopLineNum even if + it isn't needed for line # display */ + int mHorizOffset; /* Horizontal scroll pos. in pixels */ + int mTopLineNumHint; /* Line number of top displayed line + of file (first line of file is 1) */ + int mHorizOffsetHint; /* Horizontal scroll pos. in pixels */ + int mNStyles; /* Number of entries in styleTable */ + const Style_Table_Entry *mStyleTable; /* Table of fonts and colors for + coloring/syntax-highlighting */ + char mUnfinishedStyle; /* Style buffer entry which triggers + on-the-fly reparsing of region */ + Unfinished_Style_Cb mUnfinishedHighlightCB; /* Callback to parse "unfinished" */ + /* regions */ + void* mHighlightCBArg; /* Arg to unfinishedHighlightCB */ + + int mMaxsize; + + int mFixedFontWidth; /* Font width if all current fonts are + fixed and match in width, else -1 */ + int mSuppressResync; /* Suppress resynchronization of line + starts during buffer updates */ + int mNLinesDeleted; /* Number of lines deleted during + buffer modification (only used + when resynchronization is suppressed) */ + int mModifyingTabDistance; /* Whether tab distance is being + modified */ + + Fl_Color mCursor_color; + + Fl_Scrollbar* mHScrollBar; + Fl_Scrollbar* mVScrollBar; + int scrollbar_width_; + Fl_Align scrollbar_align_; + int dragPos, dragType, dragging; + int display_insert_position_hint; + struct { int x, y, w, h; } text_area; + + uchar textfont_; + uchar textsize_; + unsigned textcolor_; + + // The following are not presently used from the original NEdit code, + // but are being put here so that future versions of Fl_Text_Display + // can implement line numbers without breaking binary compatibility. + int mLineNumLeft, mLineNumWidth; + /* Line number margin and width */ +}; + +#endif + +// +// End of "$Id: Fl_Text_Display.H 4502 2005-08-10 23:11:51Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Text_Editor.H b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Editor.H new file mode 100644 index 0000000..31d468f --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Text_Editor.H @@ -0,0 +1,110 @@ +// +// "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $" +// +// Header file for Fl_Text_Editor class. +// +// Copyright 2001-2005 by Bill Spitzak and others. +// Original code Copyright Mark Edel. Permission to distribute under +// the LGPL for the FLTK library granted by Mark Edel. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + + +#ifndef FL_TEXT_EDITOR_H +#define FL_TEXT_EDITOR_H + +#include "Fl_Text_Display.H" + +// key will match in any state +#define FL_TEXT_EDITOR_ANY_STATE (-1L) + +class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display { + public: + typedef int (*Key_Func)(int key, Fl_Text_Editor* editor); + + struct Key_Binding { + int key; + int state; + Key_Func function; + Key_Binding* next; + }; + + Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0); + ~Fl_Text_Editor() { remove_all_key_bindings(); } + virtual int handle(int e); + void insert_mode(int b) { insert_mode_ = b; } + int insert_mode() { return insert_mode_; } + + void add_key_binding(int key, int state, Key_Func f, Key_Binding** list); + void add_key_binding(int key, int state, Key_Func f) + { add_key_binding(key, state, f, &key_bindings); } + void remove_key_binding(int key, int state, Key_Binding** list); + void remove_key_binding(int key, int state) + { remove_key_binding(key, state, &key_bindings); } + void remove_all_key_bindings(Key_Binding** list); + void remove_all_key_bindings() { remove_all_key_bindings(&key_bindings); } + void add_default_key_bindings(Key_Binding** list); + Key_Func bound_key_function(int key, int state, Key_Binding* list); + Key_Func bound_key_function(int key, int state) + { return bound_key_function(key, state, key_bindings); } + void default_key_function(Key_Func f) { default_key_function_ = f; } + + // functions for the built in default bindings + static int kf_default(int c, Fl_Text_Editor* e); + static int kf_ignore(int c, Fl_Text_Editor* e); + static int kf_backspace(int c, Fl_Text_Editor* e); + static int kf_enter(int c, Fl_Text_Editor* e); + static int kf_move(int c, Fl_Text_Editor* e); + static int kf_shift_move(int c, Fl_Text_Editor* e); + static int kf_ctrl_move(int c, Fl_Text_Editor* e); + static int kf_c_s_move(int c, Fl_Text_Editor* e); + static int kf_home(int, Fl_Text_Editor* e); + static int kf_end(int c, Fl_Text_Editor* e); + static int kf_left(int c, Fl_Text_Editor* e); + static int kf_up(int c, Fl_Text_Editor* e); + static int kf_right(int c, Fl_Text_Editor* e); + static int kf_down(int c, Fl_Text_Editor* e); + static int kf_page_up(int c, Fl_Text_Editor* e); + static int kf_page_down(int c, Fl_Text_Editor* e); + static int kf_insert(int c, Fl_Text_Editor* e); + static int kf_delete(int c, Fl_Text_Editor* e); + static int kf_copy(int c, Fl_Text_Editor* e); + static int kf_cut(int c, Fl_Text_Editor* e); + static int kf_paste(int c, Fl_Text_Editor* e); + static int kf_select_all(int c, Fl_Text_Editor* e); + static int kf_undo(int c, Fl_Text_Editor* e); + + protected: + int handle_key(); + void maybe_do_callback(); + + int insert_mode_; + Key_Binding* key_bindings; + static Key_Binding* global_key_bindings; + Key_Func default_key_function_; +}; + +#endif + +// +// End of "$Id: Fl_Text_Editor.H 4288 2005-04-16 00:13:17Z mike $". +// + diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Tile.H b/third_party/windows/fltk-1.1.10/FL/Fl_Tile.H new file mode 100644 index 0000000..b227907 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Tile.H @@ -0,0 +1,45 @@ +// +// "$Id: Fl_Tile.H 4288 2005-04-16 00:13:17Z mike $" +// +// Tile header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Tile_H +#define Fl_Tile_H + +#include "Fl_Group.H" + +class FL_EXPORT Fl_Tile : public Fl_Group { +public: + int handle(int); + Fl_Tile(int X,int Y,int W,int H,const char*l=0) : Fl_Group(X,Y,W,H,l) {} + void resize(int, int, int, int); + void position(int, int, int, int); +}; + +#endif + +// +// End of "$Id: Fl_Tile.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Tiled_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_Tiled_Image.H new file mode 100644 index 0000000..eb671cc --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Tiled_Image.H @@ -0,0 +1,59 @@ +// +// "$Id: Fl_Tiled_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// Tiled image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Tiled_Image_H +# define Fl_Tiled_Image_H + +# include "Fl_Image.H" + + +// Tiled image class. +class FL_EXPORT Fl_Tiled_Image : public Fl_Image { + protected: + + Fl_Image *image_; // The image that is shared + int alloc_image_; // Did we allocate this image? + + public: + + Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0); + virtual ~Fl_Tiled_Image(); + + virtual Fl_Image *copy(int W, int H); + Fl_Image *copy() { return copy(w(), h()); } + virtual void color_average(Fl_Color c, float i); + virtual void desaturate(); + virtual void draw(int X, int Y, int W, int H, int cx, int cy); + void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); } + Fl_Image *image() { return image_; } +}; + +#endif // !Fl_Tiled_Image_H + +// +// End of "$Id: Fl_Tiled_Image.H 4288 2005-04-16 00:13:17Z mike $" +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Timer.H b/third_party/windows/fltk-1.1.10/FL/Fl_Timer.H new file mode 100644 index 0000000..8ba564d --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Timer.H @@ -0,0 +1,65 @@ +// +// "$Id: Fl_Timer.H 4288 2005-04-16 00:13:17Z mike $" +// +// Timer header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Timer_H +#define Fl_Timer_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +// values for type(): +#define FL_NORMAL_TIMER 0 +#define FL_VALUE_TIMER 1 +#define FL_HIDDEN_TIMER 2 + +class FL_EXPORT Fl_Timer : public Fl_Widget { + static void stepcb(void *); + void step(); + char on, direction_; + double delay, total; + long lastsec,lastusec; +protected: + void draw(); +public: + int handle(int); + Fl_Timer(uchar t,int x,int y,int w,int h, const char *l); + ~Fl_Timer(); + void value(double); + double value() const {return delay>0.0?delay:0.0;} + char direction() const {return direction_;} + void direction(char d) {direction_ = d;} + char suspended() const {return !on;} + void suspended(char d); +}; + +#endif + +// +// End of "$Id: Fl_Timer.H 4288 2005-04-16 00:13:17Z mike $". +// + diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Button.H new file mode 100644 index 0000000..8537a73 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Button.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_Toggle_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Toggle button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Toggle_Button_H +#define Fl_Toggle_Button_H + +#include "Fl_Button.H" + +class Fl_Toggle_Button : public Fl_Button { +public: + Fl_Toggle_Button(int X,int Y,int W,int H,const char *l=0) + : Fl_Button(X,Y,W,H,l) {type(FL_TOGGLE_BUTTON);} +}; + +#endif + +// +// End of "$Id: Fl_Toggle_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Light_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Light_Button.H new file mode 100644 index 0000000..6407edf --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Light_Button.H @@ -0,0 +1,37 @@ +// +// "$Id: Fl_Toggle_Light_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Toggle light button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// provided for back-compatability only + +#ifndef Fl_Toggle_Light_Button +#include "Fl_Light_Button.H" +#define Fl_Toggle_Light_Button Fl_Light_Button +#endif + +// +// End of "$Id: Fl_Toggle_Light_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Round_Button.H b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Round_Button.H new file mode 100644 index 0000000..ddf8b55 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Toggle_Round_Button.H @@ -0,0 +1,37 @@ +// +// "$Id: Fl_Toggle_Round_Button.H 4288 2005-04-16 00:13:17Z mike $" +// +// Toggle round button header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// provided for back-compatability only + +#ifndef Fl_Toggle_Round_Button +#include "Fl_Round_Button.H" +#define Fl_Toggle_Round_Button Fl_Round_Button +#endif + +// +// End of "$Id: Fl_Toggle_Round_Button.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Tooltip.H b/third_party/windows/fltk-1.1.10/FL/Fl_Tooltip.H new file mode 100644 index 0000000..2e6fab0 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Tooltip.H @@ -0,0 +1,77 @@ +// +// "$Id: Fl_Tooltip.H 4288 2005-04-16 00:13:17Z mike $" +// +// Tooltip header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Tooltip_H +#define Fl_Tooltip_H + +#include +#include + +class FL_EXPORT Fl_Tooltip { +public: + static float delay() { return delay_; } + static void delay(float f) { delay_ = f; } + static float hoverdelay() { return hoverdelay_; } + static void hoverdelay(float f) { hoverdelay_ = f; } + static int enabled() { return enabled_; } + static void enable(int b = 1) { enabled_ = b;} + 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 Fl_Widget* current() {return widget_;} + static void current(Fl_Widget*); + + static int font() { return font_; } + static int size() { return size_; } + static void font(int i) { font_ = i; } + static void size(int s) { size_ = s; } + static void color(unsigned c) { color_ = c; } + static Fl_Color color() { return (Fl_Color)color_; } + static void textcolor(unsigned c) { textcolor_ = c; } + static Fl_Color textcolor() { return (Fl_Color)textcolor_; } + + // These should not be public, but Fl_Widget::tooltip() needs them... + static void enter_(Fl_Widget* w); + static void exit_(Fl_Widget *w); + +private: + static float delay_; + static float hoverdelay_; + static int enabled_; + static unsigned color_; + static unsigned textcolor_; + static int font_; + static int size_; + static Fl_Widget* widget_; +}; + +#endif + +// +// End of "$Id: Fl_Tooltip.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Valuator.H b/third_party/windows/fltk-1.1.10/FL/Fl_Valuator.H new file mode 100644 index 0000000..f3e71bb --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Valuator.H @@ -0,0 +1,86 @@ +// +// "$Id: Fl_Valuator.H 4288 2005-04-16 00:13:17Z mike $" +// +// Valuator header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Valuator_H +#define Fl_Valuator_H + +#ifndef Fl_Widget_H +#include "Fl_Widget.H" +#endif + +// shared type() values for classes that work in both directions: +#define FL_VERTICAL 0 +#define FL_HORIZONTAL 1 + +class FL_EXPORT Fl_Valuator : public Fl_Widget { + + double value_; + double previous_value_; + double min, max; // truncates to this range *after* rounding + double A; int B; // rounds to multiples of A/B, or no rounding if A is zero + +protected: + + int horizontal() const {return type()&1;} + Fl_Valuator(int X, int Y, int W, int H, const char* L); + + double previous_value() const {return previous_value_;} + void handle_push() {previous_value_ = value_;} + double softclamp(double); + void handle_drag(double newvalue); + void handle_release(); // use drag() value + virtual void value_damage(); // cause damage() due to value() changing + void set_value(double v) {value_ = v;} + +public: + + void bounds(double a, double b) {min=a; max=b;} + double minimum() const {return min;} + void minimum(double a) {min = a;} + double maximum() const {return max;} + void maximum(double a) {max = a;} + void range(double a, double b) {min = a; max = b;} + void step(int a) {A = a; B = 1;} + void step(double a, int b) {A = a; B = b;} + void step(double s); + double step() const {return A/B;} + void precision(int); + + double value() const {return value_;} + int value(double); + + virtual int format(char*); + double round(double); // round to nearest multiple of step + double clamp(double); // keep in range + double increment(double, int); // add n*step to value +}; + +#endif + +// +// End of "$Id: Fl_Valuator.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Value_Input.H b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Input.H new file mode 100644 index 0000000..5b5cdd6 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Input.H @@ -0,0 +1,65 @@ +// +// "$Id: Fl_Value_Input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Value input header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Value_Input_H +#define Fl_Value_Input_H + +#include "Fl_Valuator.H" +#include "Fl_Input.H" + +class FL_EXPORT Fl_Value_Input : public Fl_Valuator { +public: + Fl_Input input; +private: + char soft_; + static void input_cb(Fl_Widget*,void*); + virtual void value_damage(); // cause damage() due to value() changing +public: + int handle(int); + void draw(); + void resize(int,int,int,int); + Fl_Value_Input(int x,int y,int w,int h,const char *l=0); + + void soft(char s) {soft_ = s;} + char soft() const {return soft_;} + + Fl_Font textfont() const {return input.textfont();} + void textfont(uchar s) {input.textfont(s);} + uchar textsize() const {return input.textsize();} + void textsize(uchar s) {input.textsize(s);} + Fl_Color textcolor() const {return input.textcolor();} + void textcolor(unsigned n) {input.textcolor(n);} + Fl_Color cursor_color() const {return input.cursor_color();} + void cursor_color(unsigned n) {input.cursor_color(n);} + +}; + +#endif + +// +// End of "$Id: Fl_Value_Input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Value_Output.H b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Output.H new file mode 100644 index 0000000..92337b1 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Output.H @@ -0,0 +1,58 @@ +// +// "$Id: Fl_Value_Output.H 4288 2005-04-16 00:13:17Z mike $" +// +// Value output header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Value_Output_H +#define Fl_Value_Output_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +class FL_EXPORT Fl_Value_Output : public Fl_Valuator { + uchar textfont_, textsize_, soft_; + unsigned textcolor_; +public: + int handle(int); + void draw(); + Fl_Value_Output(int x,int y,int w,int h,const char *l=0); + + void soft(uchar s) {soft_ = s;} + uchar soft() const {return soft_;} + + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned s) {textcolor_ = s;} +}; + +#endif + +// +// End of "$Id: Fl_Value_Output.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Value_Slider.H b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Slider.H new file mode 100644 index 0000000..dca6384 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Value_Slider.H @@ -0,0 +1,52 @@ +// +// "$Id: Fl_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $" +// +// Value slider header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Value_Slider_H +#define Fl_Value_Slider_H + +#include "Fl_Slider.H" + +class FL_EXPORT Fl_Value_Slider : public Fl_Slider { + uchar textfont_, textsize_; + unsigned textcolor_; +public: + void draw(); + int handle(int); + Fl_Value_Slider(int x,int y,int w,int h, const char *l = 0); + Fl_Font textfont() const {return (Fl_Font)textfont_;} + void textfont(uchar s) {textfont_ = s;} + uchar textsize() const {return textsize_;} + void textsize(uchar s) {textsize_ = s;} + Fl_Color textcolor() const {return (Fl_Color)textcolor_;} + void textcolor(unsigned s) {textcolor_ = s;} +}; + +#endif + +// +// End of "$Id: Fl_Value_Slider.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Widget.H b/third_party/windows/fltk-1.1.10/FL/Fl_Widget.H new file mode 100644 index 0000000..b0e6db4 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Widget.H @@ -0,0 +1,221 @@ +// +// "$Id: Fl_Widget.H 5982 2007-11-19 16:21:48Z matt $" +// +// Widget header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Widget_H +#define Fl_Widget_H + +#include "Enumerations.H" + +class Fl_Widget; +class Fl_Window; +class Fl_Group; +class Fl_Image; + +typedef void (Fl_Callback )(Fl_Widget*, void*); +typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND +typedef void (Fl_Callback0)(Fl_Widget*); +typedef void (Fl_Callback1)(Fl_Widget*, long); + +struct FL_EXPORT Fl_Label { + const char* value; + Fl_Image* image; + Fl_Image* deimage; + uchar type; + uchar font; + uchar size; + unsigned color; + void draw(int,int,int,int, Fl_Align) const ; + void measure(int&, int&) const ; +}; + +class FL_EXPORT Fl_Widget { + friend class Fl_Group; + + Fl_Group* parent_; + Fl_Callback* callback_; + void* user_data_; + short x_,y_,w_,h_; + Fl_Label label_; + int flags_; + unsigned color_; + unsigned color2_; + uchar type_; + uchar damage_; + uchar box_; + uchar align_; + uchar when_; + + const char *tooltip_; + + // unimplemented copy ctor and assignment operator + Fl_Widget(const Fl_Widget &); + Fl_Widget& operator=(const Fl_Widget &); + +protected: + + Fl_Widget(int,int,int,int,const char* =0); + + void x(int v) {x_ = (short)v;} + void y(int v) {y_ = (short)v;} + void w(int v) {w_ = (short)v;} + void h(int v) {h_ = (short)v;} + + int flags() const {return flags_;} + void set_flag(int c) {flags_ |= c;} + void clear_flag(int c) {flags_ &= ~c;} + enum {INACTIVE=1, INVISIBLE=2, OUTPUT=4, SHORTCUT_LABEL=64, + CHANGED=128, VISIBLE_FOCUS=512, COPIED_LABEL = 1024}; + + void draw_box() const; + void draw_box(Fl_Boxtype, Fl_Color) const; + void draw_box(Fl_Boxtype, int,int,int,int, Fl_Color) const; + void draw_focus() {draw_focus(box(),x(),y(),w(),h());} + void draw_focus(Fl_Boxtype, int,int,int,int) const; + void draw_label() const; + void draw_label(int, int, int, int) const; + +public: + + virtual ~Fl_Widget(); + + virtual void draw() = 0; + virtual int handle(int); + Fl_Group* parent() const {return parent_;} + void parent(Fl_Group* p) {parent_ = p;} // for hacks only, Fl_Group::add() + + uchar type() const {return type_;} + void type(uchar t) {type_ = t;} + + int x() const {return x_;} + int y() const {return y_;} + int w() const {return w_;} + int h() const {return h_;} + virtual void resize(int,int,int,int); + int damage_resize(int,int,int,int); + void position(int X,int Y) {resize(X,Y,w_,h_);} + void size(int W,int H) {resize(x_,y_,W,H);} + + Fl_Align align() const {return (Fl_Align)align_;} + void align(uchar a) {align_ = a;} + Fl_Boxtype box() const {return (Fl_Boxtype)box_;} + void box(Fl_Boxtype a) {box_ = a;} + Fl_Color color() const {return (Fl_Color)color_;} + void color(unsigned a) {color_ = a;} + Fl_Color selection_color() const {return (Fl_Color)color2_;} + void selection_color(unsigned a) {color2_ = a;} + void color(unsigned a, unsigned b) {color_=a; color2_=b;} + const char* label() const {return label_.value;} + void label(const char* a); + void copy_label(const char* a); + void label(Fl_Labeltype a,const char* b) {label_.type = a; label_.value = b;} + Fl_Labeltype labeltype() const {return (Fl_Labeltype)label_.type;} + void labeltype(Fl_Labeltype a) {label_.type = a;} + Fl_Color labelcolor() const {return (Fl_Color)label_.color;} + void labelcolor(unsigned a) {label_.color=a;} + Fl_Font labelfont() const {return (Fl_Font)label_.font;} + void labelfont(uchar a) {label_.font=a;} + uchar labelsize() const {return label_.size;} + void labelsize(uchar a) {label_.size=a;} + Fl_Image* image() {return label_.image;} + void image(Fl_Image* a) {label_.image=a;} + void image(Fl_Image& a) {label_.image=&a;} + Fl_Image* deimage() {return label_.deimage;} + void deimage(Fl_Image* a) {label_.deimage=a;} + void deimage(Fl_Image& a) {label_.deimage=&a;} + const char *tooltip() const {return tooltip_;} + void tooltip(const char *t); + Fl_Callback_p callback() const {return callback_;} + void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;} + void callback(Fl_Callback* c) {callback_=c;} + void callback(Fl_Callback0*c) {callback_=(Fl_Callback*)c;} + void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;} + void* user_data() const {return user_data_;} + void user_data(void* v) {user_data_ = v;} + long argument() const {return (long)user_data_;} + void argument(long v) {user_data_ = (void*)v;} + Fl_When when() const {return (Fl_When)when_;} + void when(uchar i) {when_ = i;} + + int visible() const {return !(flags_&INVISIBLE);} + int visible_r() const; + void show(); + void hide(); + void set_visible() {flags_ &= ~INVISIBLE;} + void clear_visible() {flags_ |= INVISIBLE;} + int active() const {return !(flags_&INACTIVE);} + int active_r() const; + void activate(); + void deactivate(); + int output() const {return (flags_&OUTPUT);} + void set_output() {flags_ |= OUTPUT;} + void clear_output() {flags_ &= ~OUTPUT;} + int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));} + int changed() const {return flags_&CHANGED;} + void set_changed() {flags_ |= CHANGED;} + void clear_changed() {flags_ &= ~CHANGED;} + int take_focus(); + void set_visible_focus() { flags_ |= VISIBLE_FOCUS; } + void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; } + void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); } + int visible_focus() { return flags_ & VISIBLE_FOCUS; } + + static void default_callback(Fl_Widget*, void*); + void do_callback() {callback_(this,user_data_); if (callback_ != default_callback) clear_changed();} + void do_callback(Fl_Widget* o,void* arg=0) {callback_(o,arg); if (callback_ != default_callback) clear_changed();} + void do_callback(Fl_Widget* o,long arg) {callback_(o,(void*)arg); if (callback_ != default_callback) clear_changed();} + int test_shortcut(); + static char label_shortcut(const char *t); + static int test_shortcut(const char*); + int contains(const Fl_Widget*) const ; + int inside(const Fl_Widget* o) const {return o ? o->contains(this) : 0;} + + void redraw(); + void redraw_label(); + uchar damage() const {return damage_;} + void clear_damage(uchar c = 0) {damage_ = c;} + void damage(uchar c); + void damage(uchar c,int,int,int,int); + void draw_label(int, int, int, int, Fl_Align) const; + void measure_label(int& xx, int& yy) {label_.measure(xx,yy);} + + Fl_Window* window() const ; + + // back compatability only: + Fl_Color color2() const {return (Fl_Color)color2_;} + void color2(unsigned a) {color2_ = a;} +}; + +// reserved type numbers (necessary for my cheapo RTTI) start here. +// grep the header files for "RESERVED_TYPE" to find the next available +// number. +#define FL_RESERVED_TYPE 100 + +#endif + +// +// End of "$Id: Fl_Widget.H 5982 2007-11-19 16:21:48Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Window.H b/third_party/windows/fltk-1.1.10/FL/Fl_Window.H new file mode 100644 index 0000000..ebfdd81 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Window.H @@ -0,0 +1,135 @@ +// +// "$Id: Fl_Window.H 4421 2005-07-15 09:34:53Z matt $" +// +// Window header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_Window_H +#define Fl_Window_H + +#include "Fl_Group.H" + +#define FL_WINDOW 0xF0 // all subclasses have type() >= this +#define FL_DOUBLE_WINDOW 0xF1 + +class Fl_X; + +class FL_EXPORT Fl_Window : public Fl_Group { + + friend class Fl_X; + Fl_X *i; // points at the system-specific stuff + + const char* iconlabel_; + const char* xclass_; + const void* icon_; + // size_range stuff: + short minw, minh, maxw, maxh; + uchar dw, dh, aspect, size_range_set; + // cursor stuff + Fl_Cursor cursor_default; + Fl_Color cursor_fg, cursor_bg; + void size_range_(); + // values for flags(): + enum { + FL_MODAL = 64, + FL_NOBORDER = 8, + FL_FORCE_POSITION = 16, + FL_NON_MODAL = 32, + FL_OVERRIDE = 256 + }; + void _Fl_Window(); // constructor innards + + // unimplemented copy ctor and assignment operator + Fl_Window(const Fl_Window&); + Fl_Window& operator=(const Fl_Window&); + +protected: + + static Fl_Window *current_; + virtual void draw(); + virtual void flush(); + +public: + + Fl_Window(int,int,int,int, const char* = 0); + Fl_Window(int,int, const char* = 0); + virtual ~Fl_Window(); + + virtual int handle(int); + + virtual void resize(int,int,int,int); + void border(int b); + void clear_border() {set_flag(FL_NOBORDER);} + int border() const {return !(flags() & FL_NOBORDER);} + void set_override() {set_flag(FL_NOBORDER|FL_OVERRIDE);} + int override() const { return flags()&FL_OVERRIDE; } + void set_modal() {set_flag(FL_MODAL);} + int modal() const {return flags() & FL_MODAL;} + void set_non_modal() {set_flag(FL_NON_MODAL);} + int non_modal() const {return flags() & (FL_NON_MODAL|FL_MODAL);} + + void hotspot(int x, int y, int offscreen = 0); + void hotspot(const Fl_Widget*, int offscreen = 0); + void hotspot(const Fl_Widget& p, int offscreen = 0) {hotspot(&p,offscreen);} + void free_position() {clear_flag(FL_FORCE_POSITION);} + void size_range(int a, int b, int c=0, int d=0, int e=0, int f=0, int g=0) { + minw=(short)a; minh=(short)b; maxw=(short)c; maxh=(short)d; dw=(uchar)e; dh=(uchar)f; aspect=(uchar)g; size_range_();} + + const char* label() const {return Fl_Widget::label();} + const char* iconlabel() const {return iconlabel_;} + void label(const char*); + void iconlabel(const char*); + void label(const char* label, const char* iconlabel); + void copy_label(const char* a); + const char* xclass() const {return xclass_;} + void xclass(const char* c) {xclass_ = c;} + const void* icon() const {return icon_;} + void icon(const void * ic) {icon_ = ic;} + + int shown() {return i != 0;} + virtual void show(); + virtual void hide(); + void show(int, char**); + void fullscreen(); + void fullscreen_off(int,int,int,int); + void iconize(); + + int x_root() const ; + int y_root() const ; + + static Fl_Window *current(); + void make_current(); + + // for back-compatability only: + void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); + void default_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); + static void default_callback(Fl_Window*, void* v); + +}; + +#endif + +// +// End of "$Id: Fl_Window.H 4421 2005-07-15 09:34:53Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_Wizard.H b/third_party/windows/fltk-1.1.10/FL/Fl_Wizard.H new file mode 100644 index 0000000..098240d --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_Wizard.H @@ -0,0 +1,62 @@ +// +// "$Id: Fl_Wizard.H 4288 2005-04-16 00:13:17Z mike $" +// +// Fl_Wizard widget definitions. +// +// Copyright 1999-2005 by Easy Software Products. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// +// Include necessary header files... +// + +#ifndef _Fl_Wizard_H_ +# define _Fl_Wizard_H_ + +# include + + +// +// Fl_Wizard class... +// + +class FL_EXPORT Fl_Wizard : public Fl_Group +{ + Fl_Widget *value_; + + void draw(); + + public: + + Fl_Wizard(int, int, int, int, const char * = 0); + + void next(); + void prev(); + Fl_Widget *value(); + void value(Fl_Widget *); +}; + +#endif // !_Fl_Wizard_H_ + +// +// End of "$Id: Fl_Wizard.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_XBM_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_XBM_Image.H new file mode 100644 index 0000000..55d8f0c --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_XBM_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_XBM_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// XBM image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_XBM_Image_H +#define Fl_XBM_Image_H +# include "Fl_Bitmap.H" + +class FL_EXPORT Fl_XBM_Image : public Fl_Bitmap { + + public: + + Fl_XBM_Image(const char* filename); +}; + +#endif // !Fl_XBM_Image_H + +// +// End of "$Id: Fl_XBM_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Fl_XPM_Image.H b/third_party/windows/fltk-1.1.10/FL/Fl_XPM_Image.H new file mode 100644 index 0000000..0ddda9c --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Fl_XPM_Image.H @@ -0,0 +1,43 @@ +// +// "$Id: Fl_XPM_Image.H 4288 2005-04-16 00:13:17Z mike $" +// +// XPM image header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef Fl_XPM_Image_H +#define Fl_XPM_Image_H +# include "Fl_Pixmap.H" + +class FL_EXPORT Fl_XPM_Image : public Fl_Pixmap { + + public: + + Fl_XPM_Image(const char* filename); +}; + +#endif // !Fl_XPM_Image + +// +// End of "$Id: Fl_XPM_Image.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/Makefile.in b/third_party/windows/fltk-1.1.10/FL/Makefile.in new file mode 100644 index 0000000..daafb94 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/Makefile.in @@ -0,0 +1,63 @@ +# +# "$Id: Makefile.in 5745 2007-03-15 13:27:41Z mike $" +# +# Header makefile for the Fast Light Tool Kit (FLTK). +# +# Copyright 1998-2007 by Bill Spitzak and others. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# Please report all bugs and problems on the following page: +# +# http://www.fltk.org/str.php +# + +include ../makeinclude + +all: + +clean: + +depend: + +install: + echo "Installing include files in $(DESTDIR)$(includedir)..." + $(RMDIR) $(DESTDIR)$(includedir)/FL + $(INSTALL_DIR) $(DESTDIR)$(includedir)/FL + for file in *.[hrH]; do \ + $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/FL; \ + done +@HLINKS@ cd $(DESTDIR)$(includedir)/FL;\ +@HLINKS@ for file in *.H; do\ +@HLINKS@ $(RM) "`basename $$file H`h";\ +@HLINKS@ $(LN) $$file "`basename $$file H`h";\ +@HLINKS@ done +@HLINKS@ $(RM) $(DESTDIR)$(includedir)/FL/fl_file_chooser.H +@HLINKS@ $(LN) Fl_File_Chooser.H $(DESTDIR)$(includedir)/FL/fl_file_chooser.H +@HLINKS@ $(RM) $(DESTDIR)$(includedir)/FL/fl_file_chooser.h +@HLINKS@ $(LN) Fl_File_Chooser.H $(DESTDIR)$(includedir)/FL/fl_file_chooser.h +@HLINKS@ $(RM) $(DESTDIR)$(includedir)/Fl +@HLINKS@ $(LN) FL $(DESTDIR)$(includedir)/Fl + +uninstall: + echo "Uninstalling include files..." + $(RMDIR) $(DESTDIR)$(includedir)/FL +@HLINKS@ $(RM) $(DESTDIR)$(includedir)/Fl + + +# +# End of "$Id: Makefile.in 5745 2007-03-15 13:27:41Z mike $". +# diff --git a/third_party/windows/fltk-1.1.10/FL/dirent.h b/third_party/windows/fltk-1.1.10/FL/dirent.h new file mode 100644 index 0000000..b8dc67b --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/dirent.h @@ -0,0 +1,33 @@ +// +// "$Id: dirent.h 4288 2005-04-16 00:13:17Z mike $" +// +// Directory header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// this file is for back-compatability only +#include "filename.H" + +// +// End of "$Id: dirent.h 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/filename.H b/third_party/windows/fltk-1.1.10/FL/filename.H new file mode 100644 index 0000000..682b676 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/filename.H @@ -0,0 +1,156 @@ +/* + * "$Id: filename.H 5635 2007-01-23 15:02:00Z mike $" + * + * Filename header file for the Fast Light Tool Kit (FLTK). + * + * Copyright 1998-2005 by Bill Spitzak and others. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + * Please report all bugs and problems on the following page: + * + * http://www.fltk.org/str.php + */ + +#ifndef FL_FILENAME_H +# define FL_FILENAME_H + +# include "Fl_Export.H" + +# define FL_PATH_MAX 256 /* all buffers are this length */ + +FL_EXPORT const char *fl_filename_name(const char *); +FL_EXPORT const char *fl_filename_ext(const char *); +FL_EXPORT char *fl_filename_setext(char *to, int tolen, const char *ext); +FL_EXPORT int fl_filename_expand(char *to, int tolen, const char *from); +FL_EXPORT int fl_filename_absolute(char *to, int tolen, const char *from); +FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from); +FL_EXPORT int fl_filename_match(const char *name, const char *pattern); +FL_EXPORT int fl_filename_isdir(const char *name); + +# ifdef __cplusplus +/* + * Under WIN32, we include filename.H from numericsort.c; this should probably change... + */ + +inline char *fl_filename_setext(char *to, const char *ext) { return fl_filename_setext(to, FL_PATH_MAX, ext); } +inline int fl_filename_expand(char *to, const char *from) { return fl_filename_expand(to, FL_PATH_MAX, from); } +inline int fl_filename_absolute(char *to, const char *from) { return fl_filename_absolute(to, FL_PATH_MAX, from); } +inline int fl_filename_relative(char *to, const char *from) { return fl_filename_relative(to, FL_PATH_MAX, from); } +# endif /* __cplusplus */ + + +# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) + +struct dirent {char d_name[1];}; + +# elif defined(__APPLE__) && defined(__PROJECTBUILDER__) + +/* Apple's ProjectBuilder has the nasty habit of including recursively + * down the file tree. To avoid re-including we must + * directly include the systems math file. (Plus, I could not find a + * predefined macro for ProjectBuilder builds, so we have to define it + * in the project) + */ +# include +# include "/usr/include/dirent.h" + +# elif defined(__WATCOMC__) +# include +# include + +# else +/* + * WARNING: on some systems (very few nowadays?) may not exist. + * The correct information is in one of these files: + * + * #include + * #include + * #include + * + * plus you must do the following #define: + * + * #define dirent direct + * + * It would be best to create a file that does this... + */ +# include +# include +# endif + +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ + +FL_EXPORT int fl_alphasort(struct dirent **, struct dirent **); +FL_EXPORT int fl_casealphasort(struct dirent **, struct dirent **); +FL_EXPORT int fl_casenumericsort(struct dirent **, struct dirent **); +FL_EXPORT int fl_numericsort(struct dirent **, struct dirent **); + +typedef int (Fl_File_Sort_F)(struct dirent **, struct dirent **); + +# ifdef __cplusplus +} + +/* + * Portable "scandir" function. Ugly but necessary... + */ + +FL_EXPORT int fl_filename_list(const char *d, struct dirent ***l, + Fl_File_Sort_F *s = fl_numericsort); + +/* + * Generic function to open a Uniform Resource Identifier (URI) using a + * system-defined program (added in FLTK 1.1.8) + */ + +FL_EXPORT int fl_open_uri(const char *uri, char *msg = (char *)0, + int msglen = 0); + +/* + * _fl_filename_isdir_quick() is a private function that checks for a + * trailing slash and assumes that the passed name is a directory if + * it finds one. This function is used by Fl_File_Browser and + * Fl_File_Chooser to avoid extra stat() calls, but is not supported + * outside of FLTK... + */ +int _fl_filename_isdir_quick(const char *name); + +# endif /* __cplusplus */ + +/* + * FLTK 1.0.x compatibility definitions... + */ + +# ifdef FLTK_1_0_COMPAT +# define filename_absolute fl_filename_absolute +# define filename_expand fl_filename_expand +# define filename_ext fl_filename_ext +# define filename_isdir fl_filename_isdir +# define filename_list fl_filename_list +# define filename_match fl_filename_match +# define filename_name fl_filename_name +# define filename_relative fl_filename_relative +# define filename_setext fl_filename_setext +# define numericsort fl_numericsort +# endif /* FLTK_1_0_COMPAT */ + + +#endif /* FL_FILENAME_H */ + +/* + * End of "$Id: filename.H 5635 2007-01-23 15:02:00Z mike $". + */ diff --git a/third_party/windows/fltk-1.1.10/FL/fl_ask.H b/third_party/windows/fltk-1.1.10/FL/fl_ask.H new file mode 100644 index 0000000..7c6b1b7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/fl_ask.H @@ -0,0 +1,81 @@ +// +// "$Id: fl_ask.H 4279 2005-04-13 19:35:28Z mike $" +// +// Standard dialog header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef fl_ask_H +# define fl_ask_H + +# include "Enumerations.H" + +class Fl_Widget; + +enum { + FL_BEEP_DEFAULT = 0, + FL_BEEP_MESSAGE, + FL_BEEP_ERROR, + FL_BEEP_QUESTION, + FL_BEEP_PASSWORD, + FL_BEEP_NOTIFICATION +}; + +# ifdef __GNUC__ +# define __fl_attr(x) __attribute__ (x) +# if __GNUC__ < 3 +# define __deprecated__ +# endif // __GNUC__ < 3 +# else +# define __fl_attr(x) +# endif // __GNUC__ + +FL_EXPORT void fl_beep(int type = FL_BEEP_DEFAULT); +FL_EXPORT void fl_message(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); +FL_EXPORT void fl_alert(const char *,...) __fl_attr((__format__ (__printf__, 1, 2))); +// fl_ask() is deprecated since it uses "Yes" and "No" for the buttons, +// which does not conform to the current FLTK Human Interface Guidelines. +// Use fl_choice() instead with the appropriate verbs instead. +FL_EXPORT int fl_ask(const char *,...) __fl_attr((__format__ (__printf__, 1, 2), __deprecated__)); +FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...) __fl_attr((__format__ (__printf__, 1, 5))); +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(); +extern FL_EXPORT Fl_Font fl_message_font_; +extern FL_EXPORT unsigned char fl_message_size_; +inline void fl_message_font(unsigned char f,unsigned char s) { + fl_message_font_ = (Fl_Font)f; fl_message_size_ = s;} + +// pointers you can use to change FLTK to a foreign language: +extern FL_EXPORT const char* fl_no; +extern FL_EXPORT const char* fl_yes; +extern FL_EXPORT const char* fl_ok; +extern FL_EXPORT const char* fl_cancel; +extern FL_EXPORT const char* fl_close; + +#endif // !fl_ask_H + +// +// End of "$Id: fl_ask.H 4279 2005-04-13 19:35:28Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/fl_draw.H b/third_party/windows/fltk-1.1.10/FL/fl_draw.H new file mode 100644 index 0000000..7dc1f8f --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/fl_draw.H @@ -0,0 +1,207 @@ +// +// "$Id: fl_draw.H 5430 2006-09-15 15:35:16Z matt $" +// +// Portable drawing function header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef fl_draw_H +#define fl_draw_H + +#include "Enumerations.H" // for the color names + +// Image class... +class Fl_Image; + +// Label flags... +FL_EXPORT extern char fl_draw_shortcut; + +// Colors: +FL_EXPORT void fl_color(Fl_Color); // select indexed color +inline void fl_color(int c) {fl_color((Fl_Color)c);} // for back compatability +FL_EXPORT void fl_color(uchar, uchar, uchar); // select actual color +extern FL_EXPORT Fl_Color fl_color_; +inline Fl_Color fl_color() {return fl_color_;} + +// clip: +FL_EXPORT void fl_push_clip(int x, int y, int w, int h); +#define fl_clip fl_push_clip +FL_EXPORT void fl_push_no_clip(); +FL_EXPORT void fl_pop_clip(); +FL_EXPORT int fl_not_clipped(int x, int y, int w, int h); +FL_EXPORT int fl_clip_box(int, int, int, int, int& x, int& y, int& w, int& h); + +// points: +FL_EXPORT void fl_point(int x, int y); + +// line type: +FL_EXPORT void fl_line_style(int style, int width=0, char* dashes=0); +enum { + FL_SOLID = 0, + FL_DASH = 1, + FL_DOT = 2, + FL_DASHDOT = 3, + FL_DASHDOTDOT = 4, + + FL_CAP_FLAT = 0x100, + FL_CAP_ROUND = 0x200, + FL_CAP_SQUARE = 0x300, + + FL_JOIN_MITER = 0x1000, + FL_JOIN_ROUND = 0x2000, + FL_JOIN_BEVEL = 0x3000 +}; + +// rectangles tweaked to exactly fill the pixel rectangle: +FL_EXPORT void fl_rect(int x, int y, int w, int h); +inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);} +FL_EXPORT void fl_rectf(int x, int y, int w, int h); +inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);} + +// line segments: +FL_EXPORT void fl_line(int,int, int,int); +FL_EXPORT void fl_line(int,int, int,int, int,int); + +// closed line segments: +FL_EXPORT void fl_loop(int,int, int,int, int,int); +FL_EXPORT void fl_loop(int,int, int,int, int,int, int,int); + +// filled polygons +FL_EXPORT void fl_polygon(int,int, int,int, int,int); +FL_EXPORT void fl_polygon(int,int, int,int, int,int, int,int); + +// draw rectilinear lines, horizontal segment first: +FL_EXPORT void fl_xyline(int x, int y, int x1); +FL_EXPORT void fl_xyline(int x, int y, int x1, int y2); +FL_EXPORT void fl_xyline(int x, int y, int x1, int y2, int x3); + +// draw rectilinear lines, vertical segment first: +FL_EXPORT void fl_yxline(int x, int y, int y1); +FL_EXPORT void fl_yxline(int x, int y, int y1, int x2); +FL_EXPORT void fl_yxline(int x, int y, int y1, int x2, int y3); + +// circular lines and pie slices (code in fl_arci.C): +FL_EXPORT void fl_arc(int x, int y, int w, int h, double a1, double a2); +FL_EXPORT void fl_pie(int x, int y, int w, int h, double a1, double a2); +FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi + +// scalable drawing code (code in fl_vertex.C and fl_arc.C): +FL_EXPORT void fl_push_matrix(); +FL_EXPORT void fl_pop_matrix(); +FL_EXPORT void fl_scale(double x, double y); +FL_EXPORT void fl_scale(double x); +FL_EXPORT void fl_translate(double x, double y); +FL_EXPORT void fl_rotate(double d); +FL_EXPORT void fl_mult_matrix(double a, double b, double c, double d, double x,double y); +FL_EXPORT void fl_begin_points(); +FL_EXPORT void fl_begin_line(); +FL_EXPORT void fl_begin_loop(); +FL_EXPORT void fl_begin_polygon(); +FL_EXPORT void fl_vertex(double x, double y); +FL_EXPORT void fl_curve(double, double, double, double, double, double, double, double); +FL_EXPORT void fl_arc(double x, double y, double r, double start, double a); +FL_EXPORT void fl_circle(double x, double y, double r); +FL_EXPORT void fl_end_points(); +FL_EXPORT void fl_end_line(); +FL_EXPORT void fl_end_loop(); +FL_EXPORT void fl_end_polygon(); +FL_EXPORT void fl_begin_complex_polygon(); +FL_EXPORT void fl_gap(); +FL_EXPORT void fl_end_complex_polygon(); +// get and use transformed positions: +FL_EXPORT double fl_transform_x(double x, double y); +FL_EXPORT double fl_transform_y(double x, double y); +FL_EXPORT double fl_transform_dx(double x, double y); +FL_EXPORT double fl_transform_dy(double x, double y); +FL_EXPORT void fl_transformed_vertex(double x, double y); + +// current font: +FL_EXPORT void fl_font(int face, int size); +extern FL_EXPORT int fl_font_; +inline int fl_font() {return fl_font_;} +extern FL_EXPORT int fl_size_; +inline int fl_size() {return fl_size_;} + +// information you can get about the current font: +FL_EXPORT int fl_height(); // using "size" should work ok +inline int fl_height(int, int size) {return size;} +FL_EXPORT int fl_descent(); +FL_EXPORT double fl_width(const char*); +FL_EXPORT double fl_width(const char*, int n); +FL_EXPORT double fl_width(uchar); + +// draw using current font: +FL_EXPORT void fl_draw(const char*, int x, int y); +FL_EXPORT void fl_draw(const char*, int n, int x, int y); +FL_EXPORT void fl_measure(const char*, int& x, int& y, int draw_symbols = 1); +FL_EXPORT void fl_draw(const char*, int,int,int,int, Fl_Align, Fl_Image* img=0, + int draw_symbols = 1); +FL_EXPORT void fl_draw(const char*, int,int,int,int, Fl_Align, + void (*callthis)(const char *, int n, int x, int y), + Fl_Image* img=0, int draw_symbols = 1); + +// font encoding: +FL_EXPORT const char *fl_latin1_to_local(const char *, int n=-1); +FL_EXPORT const char *fl_local_to_latin1(const char *, int n=-1); +FL_EXPORT const char *fl_mac_roman_to_local(const char *, int n=-1); +FL_EXPORT const char *fl_local_to_mac_roman(const char *, int n=-1); + +// boxtypes: +FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h); +FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h); +FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color); + +// images: +FL_EXPORT void fl_draw_image(const uchar*, int,int,int,int, int delta=3, int ldelta=0); +FL_EXPORT void fl_draw_image_mono(const uchar*, int,int,int,int, int delta=1, int ld=0); +typedef void (*Fl_Draw_Image_Cb)(void*,int,int,int,uchar*); +FL_EXPORT void fl_draw_image(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=3); +FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb, void*, int,int,int,int, int delta=1); +FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b); +FL_EXPORT char fl_can_do_alpha_blending(); + +FL_EXPORT uchar *fl_read_image(uchar *p, int x,int y, int w, int h, int alpha=0); + +// pixmaps: +FL_EXPORT int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color=FL_GRAY); +FL_EXPORT int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h); +FL_EXPORT int fl_draw_pixmap(const char* const* data, int x,int y,Fl_Color=FL_GRAY); +FL_EXPORT int fl_measure_pixmap(const char* const* data, int &w, int &h); + +// other: +FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy, + void (*draw_area)(void*, int,int,int,int), void* data); +FL_EXPORT const char* fl_shortcut_label(int); +FL_EXPORT void fl_overlay_rect(int,int,int,int); +FL_EXPORT void fl_overlay_clear(); +FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); + +// XForms symbols: +FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color); +FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable); + +#endif + +// +// End of "$Id: fl_draw.H 5430 2006-09-15 15:35:16Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/fl_message.H b/third_party/windows/fltk-1.1.10/FL/fl_message.H new file mode 100644 index 0000000..3cb0411 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/fl_message.H @@ -0,0 +1,32 @@ +// +// "$Id: fl_message.H 4288 2005-04-16 00:13:17Z mike $" +// +// Standard message header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#include "fl_ask.H" + +// +// End of "$Id: fl_message.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/fl_show_colormap.H b/third_party/windows/fltk-1.1.10/FL/fl_show_colormap.H new file mode 100644 index 0000000..2ee716a --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/fl_show_colormap.H @@ -0,0 +1,37 @@ +// +// "$Id: fl_show_colormap.H 4288 2005-04-16 00:13:17Z mike $" +// +// Colormap picker header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef fl_show_colormap_H +#define fl_show_colormap_H + +FL_EXPORT Fl_Color fl_show_colormap(Fl_Color oldcol); + +#endif + +// +// End of "$Id: fl_show_colormap.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/fl_show_input.H b/third_party/windows/fltk-1.1.10/FL/fl_show_input.H new file mode 100644 index 0000000..4ae5ae9 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/fl_show_input.H @@ -0,0 +1,32 @@ +// +// "$Id: fl_show_input.H 4288 2005-04-16 00:13:17Z mike $" +// +// Standard input dialog header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#include "fl_ask.H" + +// +// End of "$Id: fl_show_input.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/forms.H b/third_party/windows/fltk-1.1.10/FL/forms.H new file mode 100644 index 0000000..896d629 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/forms.H @@ -0,0 +1,844 @@ +// +// "$Id: forms.H 4288 2005-04-16 00:13:17Z mike $" +// +// Forms emulation header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef __FORMS_H__ +#define __FORMS_H__ + +#include "Fl.H" +#include "Fl_Group.H" +#include "Fl_Window.H" +#include "fl_draw.H" + +typedef Fl_Widget FL_OBJECT; +typedef Fl_Window FL_FORM; + +//////////////////////////////////////////////////////////////// +// Random constants & symbols defined by forms.h file: + +#ifndef NULL +#define NULL 0 +#endif +#ifndef FALSE +#define FALSE 0 +#define TRUE 1 +#endif + +#define FL_ON 1 +#define FL_OK 1 +#define FL_VALID 1 +#define FL_PREEMPT 1 +#define FL_AUTO 2 +#define FL_WHEN_NEEDED FL_AUTO +#define FL_OFF 0 +#define FL_NONE 0 +#define FL_CANCEL 0 +#define FL_INVALID 0 +#define FL_IGNORE -1 +#define FL_CLOSE -2 + +#define FL_LCOL FL_BLACK +#define FL_COL1 FL_GRAY +#define FL_MCOL FL_LIGHT1 +#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match +#define FL_TOP_BCOL FL_LIGHT2 // 51 +#define FL_BOTTOM_BCOL FL_DARK2 // 40 +#define FL_RIGHT_BCOL FL_DARK3 // 36 +#define FL_INACTIVE FL_INACTIVE_COLOR +#define FL_INACTIVE_COL FL_INACTIVE_COLOR +#define FL_FREE_COL1 FL_FREE_COLOR +#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1)) +#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2)) +#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3)) +#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4)) +#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5)) +#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6)) +#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7)) +#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8)) +#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9)) +#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10)) +#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11)) +#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12)) +#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13)) +#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14)) +#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15)) +#define FL_TOMATO ((Fl_Color)(131)) +#define FL_INDIANRED ((Fl_Color)(164)) +#define FL_SLATEBLUE ((Fl_Color)(195)) +#define FL_DARKGOLD ((Fl_Color)(84)) +#define FL_PALEGREEN ((Fl_Color)(157)) +#define FL_ORCHID ((Fl_Color)(203)) +#define FL_DARKCYAN ((Fl_Color)(189)) +#define FL_DARKTOMATO ((Fl_Color)(113)) +#define FL_WHEAT ((Fl_Color)(174)) + +#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE + +#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE +#define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE +#define FL_NO_FRAME FL_NO_BOX +#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX +#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX +#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX +#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX + +#define FL_MBUTTON1 1 +#define FL_LEFTMOUSE 1 +#define FL_MBUTTON2 2 +#define FL_MIDDLEMOUSE 2 +#define FL_MBUTTON3 3 +#define FL_RIGHTMOUSE 3 +#define FL_MBUTTON4 4 +#define FL_MBUTTON5 5 + +#define FL_INVALID_STYLE 255 +#define FL_NORMAL_STYLE FL_HELVETICA +#define FL_BOLD_STYLE FL_HELVETICA_BOLD +#define FL_ITALIC_STYLE FL_HELVETICA_ITALIC +#define FL_BOLDITALIC_STYLE FL_HELVETICA_BOLD_ITALIC +#define FL_FIXED_STYLE FL_COURIER +#define FL_FIXEDBOLD_STYLE FL_COURIER_BOLD +#define FL_FIXEDITALIC_STYLE FL_COURIER_ITALIC +#define FL_FIXEDBOLDITALIC_STYLE FL_COURIER_BOLD_ITALIC +#define FL_TIMES_STYLE FL_TIMES +#define FL_TIMESBOLD_STYLE FL_TIMES_BOLD +#define FL_TIMESITALIC_STYLE FL_TIMES_ITALIC +#define FL_TIMESBOLDITALIC_STYLE FL_TIMES_BOLD_ITALIC + +// hacks to change the labeltype() when passed to fl_set_object_lstyle(): +#define FL_SHADOW_STYLE (FL_SHADOW_LABEL<<8) +#define FL_ENGRAVED_STYLE (FL_ENGRAVED_LABEL<<8) +#define FL_EMBOSSED_STYLE (FL_EMBOSSED_LABEL<<0) + +// size values are different from XForms, match older Forms: +#define FL_TINY_SIZE 8 +#define FL_SMALL_SIZE 11 // 10 +//#define FL_NORMAL_SIZE 14 // 12 +#define FL_MEDIUM_SIZE 18 // 14 +#define FL_LARGE_SIZE 24 // 18 +#define FL_HUGE_SIZE 32 // 24 +#define FL_DEFAULT_SIZE FL_SMALL_SIZE +#define FL_TINY_FONT FL_TINY_SIZE +#define FL_SMALL_FONT FL_SMALL_SIZE +#define FL_NORMAL_FONT FL_NORMAL_SIZE +#define FL_MEDIUM_FONT FL_MEDIUM_SIZE +#define FL_LARGE_FONT FL_LARGE_SIZE +#define FL_HUGE_FONT FL_HUGE_SIZE +#define FL_NORMAL_FONT1 FL_SMALL_FONT +#define FL_NORMAL_FONT2 FL_NORMAL_FONT +#define FL_DEFAULT_FONT FL_SMALL_FONT + +#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE +#define FL_RETURN_CHANGED FL_WHEN_CHANGED +#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS +#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED) + +#define FL_BOUND_WIDTH 3 + +typedef int FL_Coord; +typedef int FL_COLOR; + +//////////////////////////////////////////////////////////////// +// fltk interaction: + +#define FL_CMD_OPT void +extern FL_EXPORT void fl_initialize(int*, char*[], const char*, FL_CMD_OPT*, int); +inline void fl_finish() {} + +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);} +inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) { + Fl::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);} +inline void fl_remove_timeout(int) {} + +// type of callback is different! +inline void fl_set_idle_callback(void (*cb)()) {Fl::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();} + +// 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_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);} +#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*) +// fl_set_form_atactivate/atdeactivate not implemented! + +//////////////////////////////////////////////////////////////// +// Fl_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_lstyle(Fl_Widget* o,int a) { + o->labelfont((uchar)a); o->labeltype((Fl_Labeltype)(a>>8));} +inline void fl_set_object_lcol(Fl_Widget* o, unsigned 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);} +#define fl_set_object_align fl_set_object_lalign +inline void fl_set_object_color(Fl_Widget* o,unsigned a,unsigned 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_get_object_geometry(Fl_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) { + *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);} +#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) { + 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) {((Fl_Group*)(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_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);} +inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) { + ((Fl_Group*)(b->parent()))->insert(*o,b);} + +inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();} + +//////////////////////////////////////////////////////////////// +// things that appered in the demos a lot that I don't emulate, but +// I did not want to edit out of all the demos... + +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) {} + +//////////////////////////////////////////////////////////////// +// Fl_Window: + +inline void fl_free_form(Fl_Window* x) {delete x;} +inline void fl_redraw_form(Fl_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); + g->box(b); + return g; +} +FL_EXPORT void fl_end_form(); +inline void fl_addto_form(Fl_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();} +#define resizebox _ddfdesign_kludge() + +inline void fl_scale_form(Fl_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) { + f->resize(x,y,w,h);} +#define fl_set_initial_placement fl_set_form_geometry +inline void fl_adjust_form_size(Fl_Window*) {} + +FL_EXPORT void fl_show_form(Fl_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 + FL_PLACE_CENTER = 2, // center of the screen + FL_PLACE_POSITION = 4,// fixed position, resizable + FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior + FL_PLACE_GEOMETRY =16,// fixed size and position + FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored) + FL_PLACE_FULLSCREEN=64,// fill screen + FL_PLACE_HOTSPOT = 128,// enables hotspot + FL_PLACE_ICONIC = 256,// iconic (ignored) + FL_FREE_SIZE=(1<<14), // force resizable + FL_FIX_SIZE =(1<<15) // force off resizable +}; +#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE) +#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE) +enum { // "b" arguement values: + FL_NOBORDER = 0, + FL_FULLBORDER, + 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);} +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_raise_form(Fl_Window* f) {f->show();} + +inline void fl_hide_form(Fl_Window* f) {f->hide();} +inline void fl_pop_form(Fl_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_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);} + +typedef void (*Forms_FormCB)(Fl_Widget*); +inline void fl_set_form_callback(Fl_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_mouse_button() {return Fl::event_button();} +#define fl_mousebutton fl_mouse_button + +#define fl_free free +#define fl_malloc malloc +#define fl_calloc calloc +#define fl_realloc realloc + +//////////////////////////////////////////////////////////////// +// Drawing functions. Only usable inside an Fl_Free object? + +inline void fl_drw_box(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { + fl_draw_box(b,x,y,w,h,bgc);} +inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) { + fl_draw_box(b,x,y,w,h,bgc);} + +inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h, + Fl_Color fgcolor, int size, Fl_Font style, + const char* s) { + fl_font(style,size); + fl_color(fgcolor); + fl_draw(s,x,y,w,h,align); +} + +// this does not work except for CENTER... +inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h, + Fl_Color fgcolor, int size, Fl_Font style, + const char* s) { + fl_font(style,size); + fl_color(fgcolor); + 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_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);} + +#define fl_set_clipping(x,y,w,h) fl_clip(x,y,w,h) +#define fl_unset_clipping() fl_pop_clip() + +//////////////////////////////////////////////////////////////// +// 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;} + +#define forms_constructor(type,name) \ +inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ + return (type*)(fl_add_new(t, new type(x,y,w,h,l)));} +#define forms_constructort(type,name) \ +inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \ + return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} +#define forms_constructorb(type,name) \ +inline type* name(Fl_Boxtype t,int x,int y,int w,int h,const char* l) { \ + return (type*)(fl_add_new(new type(t,x,y,w,h,l)));} + +#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) { + ((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) { + ((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_colorcloseness(int, int, int); + +#include "Fl_Box.H" +forms_constructorb(Fl_Box, fl_add_box) + +#include "Fl_Browser.H" +forms_constructor(Fl_Browser, fl_add_browser) + +inline void fl_clear_browser(Fl_Widget* o) { + ((Fl_Browser*)o)->clear();} +inline void fl_add_browser_line(Fl_Widget* o, const char* s) { + ((Fl_Browser*)o)->add(s);} +inline void fl_addto_browser(Fl_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*) +//#define fl_append_browser fl_addto_browser_chars +inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) { + ((Fl_Browser*)o)->insert(n,s);} +inline void fl_delete_browser_line(Fl_Widget* o, int n) { + ((Fl_Browser*)o)->remove(n);} +inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) { + ((Fl_Browser*)o)->replace(n,s);} +inline char* fl_get_browser_line(Fl_Widget* o, int n) { + return (char*)(((Fl_Browser*)o)->text(n));} +inline int fl_load_browser(Fl_Widget* o, const char* f) { + return ((Fl_Browser*)o)->load(f);} +inline void fl_select_browser_line(Fl_Widget* o, int n) { + ((Fl_Browser*)o)->select(n,1);} +inline void fl_deselect_browser_line(Fl_Widget* o, int n) { + ((Fl_Browser*)o)->select(n,0);} +inline void fl_deselect_browser(Fl_Widget* o) { + ((Fl_Browser*)o)->deselect();} +inline int fl_isselected_browser_line(Fl_Widget* o, int n) { + return ((Fl_Browser*)o)->selected(n);} +inline int fl_get_browser_topline(Fl_Widget* o) { + return ((Fl_Browser*)o)->topline();} +inline int fl_get_browser(Fl_Widget* o) { + return ((Fl_Browser*)o)->value();} +inline int fl_get_browser_maxline(Fl_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) { + ((Fl_Browser*)o)->topline(n);} +inline void fl_set_browser_fontsize(Fl_Widget* o, int s) { + ((Fl_Browser*)o)->textsize(s);} +inline void fl_set_browser_fontstyle(Fl_Widget* o, Fl_Font s) { + ((Fl_Browser*)o)->textfont(s);} +inline void fl_set_browser_specialkey(Fl_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); +//#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) { + ((Fl_Browser*)o)->display(n,i);} +inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) { + return ((Fl_Browser*)o)->displayed(n);} + +#include "Fl_Button.H" + +#define FL_NORMAL_BUTTON 0 +#define FL_TOUCH_BUTTON 4 +#define FL_INOUT_BUTTON 5 +#define FL_RETURN_BUTTON 6 +#define FL_HIDDEN_RET_BUTTON 7 +#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON +#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) { + ((Fl_Button*)b)->shortcut(s);} +//#define fl_set_object_shortcut(b,s) fl_set_button_shortcut(b,s) + +#include "Fl_Light_Button.H" +forms_constructor(Fl_Light_Button, fl_add_lightbutton) + +#include "Fl_Round_Button.H" +forms_constructor(Fl_Round_Button, fl_add_roundbutton) +forms_constructor(Fl_Round_Button, fl_add_round3dbutton) + +#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) { + (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) { + (new Fl_Pixmap(c))->label(o);} // does not delete old Fl_Pixmap! + +// Fl_Canvas object not yet implemented! + +#include "Fl_Chart.H" + +forms_constructor(Fl_Chart, fl_add_chart) +inline void fl_clear_chart(Fl_Widget* o) { + ((Fl_Chart*)o)->clear();} +inline void fl_add_chart_value(Fl_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) { + ((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) { + ((Fl_Chart*)o)->replace(i,v,s,c);} +inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) { + ((Fl_Chart*)o)->bounds(a,b);} +inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) { + ((Fl_Chart*)o)->maxsize(v);} +inline void fl_set_chart_autosize(Fl_Widget* o, int v) { + ((Fl_Chart*)o)->autosize(v);} +inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) { + ((Fl_Chart*)o)->textfont(v);} +inline void fl_set_chart_lsize(Fl_Widget* o, int v) { + ((Fl_Chart*)o)->textsize(v);} +inline void fl_set_chart_lcolor(Fl_Widget* o, unsigned v) { + ((Fl_Chart*)o)->textcolor(v);} +#define fl_set_chart_lcol fl_set_chart_lcolor + +#include "Fl_Choice.H" + +#define FL_NORMAL_CHOICE 0 +#define FL_NORMAL_CHOICE2 0 +#define FL_DROPLIST_CHOICE 0 + +forms_constructor(Fl_Choice, fl_add_choice) +inline void fl_clear_choice(Fl_Widget* o) { + ((Fl_Choice*)o)->clear();} +inline void fl_addto_choice(Fl_Widget* o, const char* s) { + ((Fl_Choice*)o)->add(s);} +inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) { + ((Fl_Choice*)o)->replace(i-1,s);} +inline void fl_delete_choice(Fl_Widget* o, int i) { + ((Fl_Choice*)o)->remove(i-1);} +inline void fl_set_choice(Fl_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) { + 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) { + return ((Fl_Choice*)o)->text();} +inline void fl_set_choice_fontsize(Fl_Widget* o, int x) { + ((Fl_Choice*)o)->textsize(x);} +inline void fl_set_choice_fontstyle(Fl_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*); + +#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) { + *h = ((Fl_Clock*)o)->hour(); + *m = ((Fl_Clock*)o)->minute(); + *s = ((Fl_Clock*)o)->second(); +} + +#include "Fl_Counter.H" +forms_constructor(Fl_Counter, fl_add_counter) +inline void fl_set_counter_value(Fl_Widget* o, double v) { + ((Fl_Counter*)o)->value(v);} +inline void fl_set_counter_bounds(Fl_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) { + ((Fl_Counter*)o)->step(a,b);} +inline void fl_set_counter_precision(Fl_Widget* o, int v) { + ((Fl_Counter*)o)->precision(v);} +inline void fl_set_counter_return(Fl_Widget* o, int v) { + ((Fl_Counter*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));} +inline double fl_get_counter_value(Fl_Widget* o) { + return ((Fl_Counter*)o)->value();} +inline void fl_get_counter_bounds(Fl_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)); + +// Cursor stuff cannot be emulated because it uses X stuff +inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);} +#define FL_INVISIBLE_CURSOR FL_CURSOR_NONE +#define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT + +#include "Fl_Dial.H" + +#define FL_DIAL_COL1 FL_GRAY +#define FL_DIAL_COL2 37 + +forms_constructor(Fl_Dial, fl_add_dial) +inline void fl_set_dial_value(Fl_Widget* o, double v) { + ((Fl_Dial*)o)->value(v);} +inline double fl_get_dial_value(Fl_Widget* o) { + return ((Fl_Dial*)o)->value();} +inline void fl_set_dial_bounds(Fl_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) { + *a = float(((Fl_Dial*)o)->minimum()); + *b = float(((Fl_Dial*)o)->maximum()); +} +inline void fl_set_dial_return(Fl_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) { + ((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) { +// ((Fl_Dial*)o)->direction(d);} +inline void fl_set_dial_step(Fl_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) { + 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); + o->align(FL_ALIGN_TOP_LEFT); + return o; +} + +#include "Fl_Free.H" +inline Fl_Free* +fl_add_free(int t,double x,double y,double w,double h,const char* l, + FL_HANDLEPTR hdl) { + return (Fl_Free*)(fl_add_new( + new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl))); +} + +#include "fl_ask.H" +#include "fl_show_colormap.H" + +inline int fl_show_question(const char* c, int = 0) {return fl_choice("%s",fl_no,fl_yes,0L,c);} +FL_EXPORT void fl_show_message(const char *,const char *,const char *); +FL_EXPORT void fl_show_alert(const char *,const char *,const char *,int=0); +FL_EXPORT int fl_show_question(const char *,const char *,const char *); +inline const char *fl_show_input(const char *l,const char*d=0) {return fl_input(l,d);} +FL_EXPORT /*const*/ char *fl_show_simple_input(const char *label, const char *deflt = 0); +FL_EXPORT int fl_show_choice( + const char *m1, + const char *m2, + const char *m3, + int numb, + const char *b0, + const char *b1, + const char *b2); + +inline void fl_set_goodies_font(uchar a, uchar b) {fl_message_font(a,b);} +#define fl_show_messages fl_message +inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2, + const char* b3, int) { + return fl_show_choice(0,c,0,n,b1,b2,b3); +} + +#include "filename.H" +#include "Fl_File_Chooser.H" +inline int do_matching(char* a, const char* b) {return fl_filename_match(a,b);} + +// Forms-compatable file chooser (implementation in fselect.C): +FL_EXPORT char* fl_show_file_selector(const char* message,const char* dir, + const char* pat,const char* fname); +FL_EXPORT char* fl_get_directory(); +FL_EXPORT char* fl_get_pattern(); +FL_EXPORT char* fl_get_filename(); + +#include "Fl_Input.H" +forms_constructor(Fl_Input, fl_add_input) +inline void fl_set_input(Fl_Widget* o, const char* v) { + ((Fl_Input*)o)->value(v);} +inline void fl_set_input_return(Fl_Widget* o, int x) { + ((Fl_Input*)o)->when((Fl_When)(x | FL_WHEN_RELEASE));} +inline void fl_set_input_color(Fl_Widget* o, unsigned a, unsigned 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*/) { + ((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) { + *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();} + +#include "Fl_Menu_Button.H" + +// types are not implemented, they all act like FL_PUSH_MENU: +#define FL_TOUCH_MENU 0 +#define FL_PUSH_MENU 1 +#define FL_PULLDOWN_MENU 2 +forms_constructor(Fl_Menu_Button, fl_add_menu) + +inline void fl_clear_menu(Fl_Widget* o) { + ((Fl_Menu_Button*)o)->clear();} +inline void fl_set_menu(Fl_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) { + ((Fl_Menu_Button*)o)->add(s);} +inline void fl_replace_menu_item(Fl_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) { + ((Fl_Menu_Button*)o)->remove(i-1);} +inline void fl_set_menu_item_shortcut(Fl_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) { + ((Fl_Menu_Button*)o)->mode(i-1,x);} +inline void fl_show_menu_symbol(Fl_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) { + return ((Fl_Menu_Button*)o)->value()+1;} +inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) { + return ((Fl_Menu_Button*)o)->text(i);} +inline int fl_get_menu_maxitems(Fl_Widget* o) { + return ((Fl_Menu_Button*)o)->size();} +inline int fl_get_menu_item_mode(Fl_Widget* o, int i) { + return ((Fl_Menu_Button*)o)->mode(i);} +inline const char* fl_get_menu_text(Fl_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) { + ((Fl_Positioner*)o)->xvalue(v);} +inline double fl_get_positioner_xvalue(Fl_Widget* o) { + return ((Fl_Positioner*)o)->xvalue();} +inline void fl_set_positioner_xbounds(Fl_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) { + *a = float(((Fl_Positioner*)o)->xminimum()); + *b = float(((Fl_Positioner*)o)->xmaximum()); +} +inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) { + ((Fl_Positioner*)o)->yvalue(v);} +inline double fl_get_positioner_yvalue(Fl_Widget* o) { + return ((Fl_Positioner*)o)->yvalue();} +inline void fl_set_positioner_ybounds(Fl_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) { + *a = float(((Fl_Positioner*)o)->yminimum()); + *b = float(((Fl_Positioner*)o)->ymaximum()); +} +inline void fl_set_positioner_xstep(Fl_Widget* o, double v) { + ((Fl_Positioner*)o)->xstep(v);} +inline void fl_set_positioner_ystep(Fl_Widget* o, double v) { + ((Fl_Positioner*)o)->ystep(v);} +inline void fl_set_positioner_return(Fl_Widget* o, int v) { + ((Fl_Positioner*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));} + +#include "Fl_Slider.H" + +#define FL_HOR_BROWSER_SLIDER FL_HOR_SLIDER +#define FL_VERT_BROWSER_SLIDER FL_VERT_SLIDER + +forms_constructort(Fl_Slider, fl_add_slider) +#define FL_SLIDER_COL1 FL_GRAY +inline void fl_set_slider_value(Fl_Widget* o, double v) { + ((Fl_Slider*)o)->value(v);} +inline double fl_get_slider_value(Fl_Widget* o) { + return ((Fl_Slider*)o)->value();} +inline void fl_set_slider_bounds(Fl_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) { + *a = float(((Fl_Slider*)o)->minimum()); + *b = float(((Fl_Slider*)o)->maximum()); +} +inline void fl_set_slider_return(Fl_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) { + ((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) { + ((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) { + ((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 { +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);} +}; +#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);} +void fl_gettime(long* sec, long* usec); + +// Fl_XYPlot nyi + + +// stuff from DDForms: + +inline int fl_double_click() {return Fl::event_clicks();} +inline void fl_draw() {Fl::flush();} + +#endif /* define __FORMS_H__ */ + +// +// End of "$Id: forms.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/gl.h b/third_party/windows/fltk-1.1.10/FL/gl.h new file mode 100644 index 0000000..6d10075 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/gl.h @@ -0,0 +1,87 @@ +// +// "$Id: gl.h 4288 2005-04-16 00:13:17Z mike $" +// +// OpenGL header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// You must include this instead of GL/gl.h to get the Microsoft +// APIENTRY stuff included (from ) prior to the OpenGL +// header files. +// +// This file also provides "missing" OpenGL functions, and +// gl_start() and gl_finish() to allow OpenGL to be used in any window +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef FL_gl_H +# define FL_gl_H + +# include "Enumerations.H" // for color names +# ifdef WIN32 +# include +# endif +# ifndef APIENTRY +# if defined(__CYGWIN__) +# define APIENTRY __attribute__ ((__stdcall__)) +# else +# define APIENTRY +# endif +# endif + +# ifdef __APPLE__ +# include +# else +# include +# endif + +FL_EXPORT void gl_start(); +FL_EXPORT void gl_finish(); + +FL_EXPORT void gl_color(Fl_Color); +inline void gl_color(int c) {gl_color((Fl_Color)c);} // back compatability + +FL_EXPORT void gl_rect(int x,int y,int w,int h); +inline void gl_rectf(int x,int y,int w,int h) {glRecti(x,y,x+w,y+h);} + +FL_EXPORT void gl_font(int fontid, int size); +FL_EXPORT int gl_height(); +FL_EXPORT int gl_descent(); +FL_EXPORT double gl_width(const char *); +FL_EXPORT double gl_width(const char *, int n); +FL_EXPORT double gl_width(uchar); + +FL_EXPORT void gl_draw(const char*); +FL_EXPORT void gl_draw(const char*, int n); +FL_EXPORT void gl_draw(const char*, int x, int y); +FL_EXPORT void gl_draw(const char*, float x, float y); +FL_EXPORT void gl_draw(const char*, int n, int x, int y); +FL_EXPORT void gl_draw(const char*, int n, float x, float y); +FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align); +FL_EXPORT void gl_measure(const char*, int& x, int& y); + +FL_EXPORT void gl_draw_image(const uchar *, int x,int y,int w,int h, int d=3, int ld=0); + +#endif // !FL_gl_H + +// +// End of "$Id: gl.h 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/gl2opengl.h b/third_party/windows/fltk-1.1.10/FL/gl2opengl.h new file mode 100644 index 0000000..98c6aec --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/gl2opengl.h @@ -0,0 +1,35 @@ +/* gl.h + + GL to OpenGL translator. + If you include this, you might be able to port old GL programs. + There are also much better emulators available on the net. + +*/ + +#include +#include "gl_draw.H" + +inline void clear() {glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);} +#define RGBcolor(r,g,b) glColor3ub(r,g,b) +#define bgnline() glBegin(GL_LINE_STRIP) +#define bgnpolygon() glBegin(GL_POLYGON) +#define bgnclosedline() glBegin(GL_LINE_LOOP) +#define endline() glEnd() +#define endpolygon() glEnd() +#define endclosedline() glEnd() +#define v2f(v) glVertex2fv(v) +#define v2s(v) glVertex2sv(v) +#define cmov(x,y,z) glRasterPos3f(x,y,z) +#define charstr(s) gl_draw(s) +#define fmprstr(s) gl_draw(s) +typedef float Matrix[4][4]; +inline void pushmatrix() {glPushMatrix();} +inline void popmatrix() {glPopMatrix();} +inline void multmatrix(Matrix m) {glMultMatrixf((float *)m);} +inline void color(int n) {glIndexi(n);} +inline void rect(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} +inline void rectf(int x,int y,int r,int t) {glRectf(x,y,r+1,t+1);} +inline void recti(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} +inline void rectfi(int x,int y,int r,int t) {glRecti(x,y,r+1,t+1);} +inline void rects(int x,int y,int r,int t) {gl_rect(x,y,r-x,t-y);} +inline void rectfs(int x,int y,int r,int t) {glRects(x,y,r+1,t+1);} diff --git a/third_party/windows/fltk-1.1.10/FL/gl_draw.H b/third_party/windows/fltk-1.1.10/FL/gl_draw.H new file mode 100644 index 0000000..e0f5f48 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/gl_draw.H @@ -0,0 +1,35 @@ +// +// "$Id: gl_draw.H 4288 2005-04-16 00:13:17Z mike $" +// +// OpenGL header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#include "gl.h" + +extern FL_EXPORT void gl_remove_displaylist_fonts(); + + +// +// End of "$Id: gl_draw.H 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/glu.h b/third_party/windows/fltk-1.1.10/FL/glu.h new file mode 100644 index 0000000..3d2c9f3 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/glu.h @@ -0,0 +1,60 @@ +// +// "$Id:$" +// +// GLu header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2006 by Bill Spitzak and others. +// +// You must include this instead of GL/gl.h to get the Microsoft +// APIENTRY stuff included (from ) prior to the OpenGL +// header files. +// +// This file also provides "missing" OpenGL functions, and +// gl_start() and gl_finish() to allow OpenGL to be used in any window +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef FL_glu_H +# define FL_glu_H + +# include "Enumerations.H" // for color names +# ifdef WIN32 +# include +# endif +# ifndef APIENTRY +# if defined(__CYGWIN__) +# define APIENTRY __attribute__ ((__stdcall__)) +# else +# define APIENTRY +# endif +# endif + +# ifdef __APPLE__ +# include +# else +# include +# endif + +#endif // !FL_glu_H + +// +// End of "$Id: $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/glut.H b/third_party/windows/fltk-1.1.10/FL/glut.H new file mode 100644 index 0000000..0dc1331 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/glut.H @@ -0,0 +1,487 @@ +// +// "$Id: glut.H 5889 2007-06-07 17:28:43Z matt $" +// +// GLUT emulation header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2007 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// Emulation of GLUT using fltk. + +// GLUT is Copyright (c) Mark J. Kilgard, 1994, 1995, 1996: +// "This program is freely distributable without licensing fees and is +// provided without guarantee or warrantee expressed or implied. This +// program is -not- in the public domain." + +// Although I have copied the GLUT API, none of my code is based on +// any GLUT implementation details and is therefore covered by the LGPL. + +// Commented out lines indicate parts of GLUT that are not emulated. + +#ifndef Fl_glut_H +# define Fl_glut_H + +# include "gl.h" + +//////////////////////////////////////////////////////////////// +// GLUT is emulated using this window class and these static variables +// (plus several more static variables hidden in glut_compatability.cxx): + +# include "Fl.H" +# include "Fl_Gl_Window.H" + +class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window { + void _init(); + int mouse_down; +protected: + void draw(); + void draw_overlay(); + int handle(int); +public: // so the inline functions work + int number; + int menu[3]; + void make_current(); + void (*display)(); + void (*overlaydisplay)(); + void (*reshape)(int w, int h); + void (*keyboard)(uchar, int x, int y); + void (*mouse)(int b, int state, int x, int y); + void (*motion)(int x, int y); + void (*passivemotion)(int x, int y); + void (*entry)(int); + void (*visibility)(int); + void (*special)(int, int x, int y); + Fl_Glut_Window(int w, int h, const char *); + Fl_Glut_Window(int x, int y, int w, int h, const char *); + ~Fl_Glut_Window(); +}; + +extern FL_EXPORT Fl_Glut_Window *glut_window; // the current window +extern FL_EXPORT int glut_menu; // the current menu + +// function pointers that are not per-window: +extern FL_EXPORT void (*glut_idle_function)(); +extern FL_EXPORT void (*glut_menustate_function)(int); +extern FL_EXPORT void (*glut_menustatus_function)(int,int,int); + +//////////////////////////////////////////////////////////////// + +//# define GLUT_API_VERSION This does not match any version of GLUT exactly... + +FL_EXPORT void glutInit(int *argcp, char **argv); // creates first window + +FL_EXPORT void glutInitDisplayMode(unsigned int mode); +// the FL_ symbols have the same value as the GLUT ones: +# define GLUT_RGB FL_RGB +# define GLUT_RGBA FL_RGB +# define GLUT_INDEX FL_INDEX +# define GLUT_SINGLE FL_SINGLE +# define GLUT_DOUBLE FL_DOUBLE +# define GLUT_ACCUM FL_ACCUM +# define GLUT_ALPHA FL_ALPHA +# define GLUT_DEPTH FL_DEPTH +# define GLUT_STENCIL FL_STENCIL +# define GLUT_MULTISAMPLE FL_MULTISAMPLE +# define GLUT_STEREO FL_STEREO +// # define GLUT_LUMINANCE 512 + +FL_EXPORT void glutInitWindowPosition(int x, int y); + +FL_EXPORT void glutInitWindowSize(int w, int h); + +FL_EXPORT void glutMainLoop(); + +FL_EXPORT int glutCreateWindow(char *title); +FL_EXPORT int glutCreateWindow(const char *title); + +FL_EXPORT int glutCreateSubWindow(int win, int x, int y, int width, int height); + +FL_EXPORT void glutDestroyWindow(int win); + +inline void glutPostRedisplay() {glut_window->redraw();} + +FL_EXPORT void glutPostWindowRedisplay(int win); + +FL_EXPORT void glutSwapBuffers(); + +inline int glutGetWindow() {return glut_window->number;} + +FL_EXPORT void glutSetWindow(int win); + +inline void glutSetWindowTitle(char *t) {glut_window->label(t);} + +inline void glutSetIconTitle(char *t) {glut_window->iconlabel(t);} + +inline void glutPositionWindow(int x, int y) {glut_window->position(x,y);} + +inline void glutReshapeWindow(int w, int h) {glut_window->size(w,h);} + +inline void glutPopWindow() {glut_window->show();} + +inline void glutPushWindow() { /* do nothing */ } + +inline void glutIconifyWindow() {glut_window->iconize();} + +inline void glutShowWindow() {glut_window->show();} + +inline void glutHideWindow() {glut_window->hide();} + +inline void glutFullScreen() {glut_window->fullscreen();} + +inline void glutSetCursor(Fl_Cursor cursor) {glut_window->cursor(cursor);} +// notice that the numeric values are different than glut: +# define GLUT_CURSOR_RIGHT_ARROW ((Fl_Cursor)2) +# define GLUT_CURSOR_LEFT_ARROW ((Fl_Cursor)67) +# define GLUT_CURSOR_INFO FL_CURSOR_HAND +# define GLUT_CURSOR_DESTROY ((Fl_Cursor)45) +# define GLUT_CURSOR_HELP FL_CURSOR_HELP +# define GLUT_CURSOR_CYCLE ((Fl_Cursor)26) +# define GLUT_CURSOR_SPRAY ((Fl_Cursor)63) +# define GLUT_CURSOR_WAIT FL_CURSOR_WAIT +# define GLUT_CURSOR_TEXT FL_CURSOR_INSERT +# define GLUT_CURSOR_CROSSHAIR FL_CURSOR_CROSS +# define GLUT_CURSOR_UP_DOWN FL_CURSOR_NS +# define GLUT_CURSOR_LEFT_RIGHT FL_CURSOR_WE +# define GLUT_CURSOR_TOP_SIDE FL_CURSOR_N +# define GLUT_CURSOR_BOTTOM_SIDE FL_CURSOR_S +# define GLUT_CURSOR_LEFT_SIDE FL_CURSOR_W +# define GLUT_CURSOR_RIGHT_SIDE FL_CURSOR_E +# define GLUT_CURSOR_TOP_LEFT_CORNER FL_CURSOR_NW +# define GLUT_CURSOR_TOP_RIGHT_CORNER FL_CURSOR_NE +# define GLUT_CURSOR_BOTTOM_RIGHT_CORNER FL_CURSOR_SE +# define GLUT_CURSOR_BOTTOM_LEFT_CORNER FL_CURSOR_SW +# define GLUT_CURSOR_INHERIT FL_CURSOR_DEFAULT +# define GLUT_CURSOR_NONE FL_CURSOR_NONE +# define GLUT_CURSOR_FULL_CROSSHAIR FL_CURSOR_CROSS + +inline void glutWarpPointer(int, int) { /* do nothing */ } + +inline void glutEstablishOverlay() {glut_window->make_overlay_current();} + +inline void glutRemoveOverlay() {glut_window->hide_overlay();} + +inline void glutUseLayer(GLenum layer) { + layer ? glut_window->make_overlay_current() : glut_window->make_current();} +enum {GLUT_NORMAL, GLUT_OVERLAY}; + +inline void glutPostOverlayRedisplay() {glut_window->redraw_overlay();} + +inline void glutShowOverlay() {glut_window->redraw_overlay();} + +inline void glutHideOverlay() {glut_window->hide_overlay();} + +FL_EXPORT int glutCreateMenu(void (*)(int)); + +FL_EXPORT void glutDestroyMenu(int menu); + +inline int glutGetMenu() {return glut_menu;} + +inline void glutSetMenu(int m) {glut_menu = m;} + +FL_EXPORT void glutAddMenuEntry(char *label, int value); + +FL_EXPORT void glutAddSubMenu(char *label, int submenu); + +FL_EXPORT void glutChangeToMenuEntry(int item, char *labela, int value); + +FL_EXPORT void glutChangeToSubMenu(int item, char *label, int submenu); + +FL_EXPORT void glutRemoveMenuItem(int item); + +inline void glutAttachMenu(int b) {glut_window->menu[b] = glut_menu;} + +inline void glutDetachMenu(int b) {glut_window->menu[b] = 0;} + +inline void glutDisplayFunc(void (*f)()) {glut_window->display = f;} + +inline void glutReshapeFunc(void (*f)(int w, int h)) {glut_window->reshape=f;} + +inline void glutKeyboardFunc(void (*f)(uchar key, int x, int y)) { + glut_window->keyboard = f;} + +inline void glutMouseFunc(void (*f)(int b, int state, int x, int y)) { + glut_window->mouse = f;} +# define GLUT_LEFT_BUTTON 0 +# define GLUT_MIDDLE_BUTTON 1 +# define GLUT_RIGHT_BUTTON 2 +# define GLUT_DOWN 0 +# define GLUT_UP 1 + +inline void glutMotionFunc(void (*f)(int x, int y)) {glut_window->motion= f;} + +inline void glutPassiveMotionFunc(void (*f)(int x, int y)) { + glut_window->passivemotion= f;} + +inline void glutEntryFunc(void (*f)(int s)) {glut_window->entry = f;} +enum {GLUT_LEFT, GLUT_ENTERED}; + +inline void glutVisibilityFunc(void (*f)(int s)) {glut_window->visibility=f;} +enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE}; + +inline void glutIdleFunc(void (*f)()) {Fl::set_idle(f);} + +// 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); +} + +inline void glutMenuStateFunc(void (*f)(int state)) { + glut_menustate_function = f;} + +inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) { + glut_menustatus_function = f;} +enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE}; + +inline void glutSpecialFunc(void (*f)(int key, int x, int y)) { + glut_window->special = f;} +# define GLUT_KEY_F1 1 +# define GLUT_KEY_F2 2 +# define GLUT_KEY_F3 3 +# define GLUT_KEY_F4 4 +# define GLUT_KEY_F5 5 +# define GLUT_KEY_F6 6 +# define GLUT_KEY_F7 7 +# define GLUT_KEY_F8 8 +# define GLUT_KEY_F9 9 +# define GLUT_KEY_F10 10 +# define GLUT_KEY_F11 11 +# define GLUT_KEY_F12 12 +// WARNING: Different values than GLUT uses: +# define GLUT_KEY_LEFT FL_Left +# define GLUT_KEY_UP FL_Up +# define GLUT_KEY_RIGHT FL_Right +# define GLUT_KEY_DOWN FL_Down +# define GLUT_KEY_PAGE_UP FL_Page_Up +# define GLUT_KEY_PAGE_DOWN FL_Page_Down +# define GLUT_KEY_HOME FL_Home +# define GLUT_KEY_END FL_End +# define GLUT_KEY_INSERT FL_Insert + +//inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z)); + +//inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z)); + +//inline void glutSpaceballButtonFunc(void (*)(int button, int state)); + +//inline void glutButtonBoxFunc(void (*)(int button, int state)); + +//inline void glutDialsFunc(void (*)(int dial, int value)); + +//inline void glutTabletMotionFunc(void (*)(int x, int y)); + +//inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y)); + +inline void glutOverlayDisplayFunc(void (*f)()) { + glut_window->overlaydisplay = f;} + +//inline void glutWindowStatusFunc(void (*)(int state)); +//enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED, +// GLUT_FULLY_COVERED}; + +//inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); + +//inline GLfloat glutGetColor(int ndx, int component); +//#define GLUT_RED 0 +//#define GLUT_GREEN 1 +//#define GLUT_BLUE 2 + +//inline void glutCopyColormap(int win); + +// Warning: values are changed from GLUT! +// Also relies on the GL_ symbols having values greater than 100 +FL_EXPORT int glutGet(GLenum type); +enum { + GLUT_RETURN_ZERO = 0, + GLUT_WINDOW_X, + GLUT_WINDOW_Y, + GLUT_WINDOW_WIDTH, + GLUT_WINDOW_HEIGHT, + GLUT_WINDOW_PARENT, + GLUT_SCREEN_WIDTH, + GLUT_SCREEN_HEIGHT, + GLUT_MENU_NUM_ITEMS, + GLUT_DISPLAY_MODE_POSSIBLE, + GLUT_INIT_WINDOW_X, + GLUT_INIT_WINDOW_Y, + GLUT_INIT_WINDOW_WIDTH, + GLUT_INIT_WINDOW_HEIGHT, + GLUT_INIT_DISPLAY_MODE, + GLUT_WINDOW_BUFFER_SIZE, + GLUT_VERSION +//GLUT_WINDOW_NUM_CHILDREN, +//GLUT_WINDOW_CURSOR, +//GLUT_SCREEN_WIDTH_MM, +//GLUT_SCREEN_HEIGHT_MM, +//GLUT_ELAPSED_TIME, +}; + +# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS +# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS +# define GLUT_WINDOW_RED_SIZE GL_RED_BITS +# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS +# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS +# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS +# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS +# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS +# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS +# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS +# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER +# define GLUT_WINDOW_RGBA GL_RGBA +# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS +# ifdef GL_SAMPLES_SGIS +# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS +# else +# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO +# endif +# define GLUT_WINDOW_STEREO GL_STEREO + +# define GLUT_HAS_KEYBOARD 600 +# define GLUT_HAS_MOUSE 601 +# define GLUT_HAS_SPACEBALL 602 +# define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 +# define GLUT_HAS_TABLET 604 +# define GLUT_NUM_MOUSE_BUTTONS 605 +# define GLUT_NUM_SPACEBALL_BUTTONS 606 +# define GLUT_NUM_BUTTON_BOX_BUTTONS 607 +# define GLUT_NUM_DIALS 608 +# define GLUT_NUM_TABLET_BUTTONS 609 +FL_EXPORT int glutDeviceGet(GLenum type); + +// WARNING: these values are different than GLUT uses: +# 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);} + +FL_EXPORT int glutLayerGet(GLenum); +# define GLUT_OVERLAY_POSSIBLE 800 +//#define GLUT_LAYER_IN_USE 801 +//#define GLUT_HAS_OVERLAY 802 +# define GLUT_TRANSPARENT_INDEX 803 +# define GLUT_NORMAL_DAMAGED 804 +# define GLUT_OVERLAY_DAMAGED 805 + +extern "C" { +typedef void (*GLUTproc)(); +} + +FL_EXPORT GLUTproc glutGetProcAddress(const char *procName); + +//inline int glutVideoResizeGet(GLenum param); +//#define GLUT_VIDEO_RESIZE_POSSIBLE 900 +//#define GLUT_VIDEO_RESIZE_IN_USE 901 +//#define GLUT_VIDEO_RESIZE_X_DELTA 902 +//#define GLUT_VIDEO_RESIZE_Y_DELTA 903 +//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904 +//#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905 +//#define GLUT_VIDEO_RESIZE_X 906 +//#define GLUT_VIDEO_RESIZE_Y 907 +//#define GLUT_VIDEO_RESIZE_WIDTH 908 +//#define GLUT_VIDEO_RESIZE_HEIGHT 909 + +//inline void glutSetupVideoResizing(); + +//inline void glutStopVideoResizing(); + +//inline void glutVideoResize(int x, int y, int width, int height); + +//inline void glutVideoPan(int x, int y, int width, int height); + +// Font argument must be a void* for compatability, so... +extern FL_EXPORT struct Fl_Glut_Bitmap_Font {uchar font; int size;} + glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, + glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, + glutBitmapHelvetica18; +# define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) +# define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) +# define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) +# define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) +# define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) +# define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) +# define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) + +FL_EXPORT void glutBitmapCharacter(void *font, int character); +FL_EXPORT int glutBitmapHeight(void *font); +FL_EXPORT int glutBitmapLength(void *font, const unsigned char *string); +FL_EXPORT void glutBitmapString(void *font, const unsigned char *string); +FL_EXPORT int glutBitmapWidth(void *font, int character); + +FL_EXPORT int glutExtensionSupported(char *name); + +/* GLUT stroked font sub-API */ +struct Fl_Glut_StrokeVertex { + GLfloat X, Y; +}; + +struct Fl_Glut_StrokeStrip { + int Number; + const Fl_Glut_StrokeVertex* Vertices; +}; + +struct Fl_Glut_StrokeChar { + GLfloat Right; + int Number; + const Fl_Glut_StrokeStrip* Strips; +}; + +struct Fl_Glut_StrokeFont { + char* Name; // The source font name + int Quantity; // Number of chars in font + GLfloat Height; // Height of the characters + const Fl_Glut_StrokeChar** Characters;// The characters mapping +}; +extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeRoman; +extern FL_EXPORT Fl_Glut_StrokeFont glutStrokeMonoRoman; +# define GLUT_STROKE_ROMAN (&glutStrokeRoman) +# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) + +FL_EXPORT void glutStrokeCharacter(void *font, int character); +FL_EXPORT GLfloat glutStrokeHeight(void *font); +FL_EXPORT int glutStrokeLength(void *font, const unsigned char *string); +FL_EXPORT void glutStrokeString(void *font, const unsigned char *string); +FL_EXPORT int glutStrokeWidth(void *font, int character); + +/* GLUT pre-built models sub-API */ +FL_EXPORT void glutWireSphere(GLdouble radius, GLint slices, GLint stacks); +FL_EXPORT void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); +FL_EXPORT void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +FL_EXPORT void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +FL_EXPORT void glutWireCube(GLdouble size); +FL_EXPORT void glutSolidCube(GLdouble size); +FL_EXPORT void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +FL_EXPORT void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +FL_EXPORT void glutWireDodecahedron(); +FL_EXPORT void glutSolidDodecahedron(); +FL_EXPORT void glutWireTeapot(GLdouble size); +FL_EXPORT void glutSolidTeapot(GLdouble size); +FL_EXPORT void glutWireOctahedron(); +FL_EXPORT void glutSolidOctahedron(); +FL_EXPORT void glutWireTetrahedron(); +FL_EXPORT void glutSolidTetrahedron(); +FL_EXPORT void glutWireIcosahedron(); +FL_EXPORT void glutSolidIcosahedron(); + +#endif // !Fl_glut_H + +// +// End of "$Id: glut.H 5889 2007-06-07 17:28:43Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/mac.H b/third_party/windows/fltk-1.1.10/FL/mac.H new file mode 100644 index 0000000..fe37c42 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/mac.H @@ -0,0 +1,136 @@ +// +// "$Id: mac.H 5379 2006-08-29 11:03:05Z matt $" +// +// Mac header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// Do not directly include this file, instead use . It will +// include this file if "__APPLE__" is defined. This is to encourage +// portability of even the system-specific code... + +#ifndef Fl_X_H +# error "Never use directly; include instead." +#endif // !Fl_X_H + +// Standard MacOS Carbon API includes... +#include + +// Now make some fixes to the headers... +#undef check // Dunno where this comes from... + +// Some random X equivalents +typedef WindowPtr Window; +struct XPoint { int x, y; }; +struct XRectangle {int x, y, width, height;}; +typedef RgnHandle Fl_Region; +void fl_clip_region(Fl_Region); +inline Fl_Region XRectangleRegion(int x, int y, int w, int h) { + Fl_Region R = NewRgn(); + SetRectRgn(R, x, y, x+w, y+h); + return R; +} +inline void XDestroyRegion(Fl_Region r) { + DisposeRgn(r); +} + +# include "Fl_Window.H" + +// This object contains all mac-specific stuff about a window: +// WARNING: this object is highly subject to change! +class Fl_X +{ +public: + Window xid; // Mac WindowPtr + GWorldPtr other_xid; // pointer for offscreen bitmaps (doublebuffer) + Fl_Window *w; // FLTK window for + Fl_Region region; + Fl_Region subRegion; // region for this specific subwindow + Fl_X *next; // linked tree to support subwindows + Fl_X *xidChildren, *xidNext; // more subwindow tree + int wait_for_expose; + CursHandle cursor; + 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*); + void flush(); + // Quartz additions: + CGContextRef gc; // graphics context (NULL when using QD) + static ATSUTextLayout atsu_layout; // windows share a global font + static ATSUStyle atsu_style; + static void q_fill_context(); // fill a Quartz context with current FLTK state + static void q_clear_clipping(); // remove all clipping from a Quartz context + static void q_release_context(Fl_X *x=0); // free all resources associated with fl_gc + static void q_begin_image(CGRect&, int x, int y, int w, int h); + static void q_end_image(); +}; + +extern void MacDestroyWindow(Fl_Window*,WindowPtr); +extern void MacMapWindow(Fl_Window*,WindowPtr); +extern void MacUnmapWindow(Fl_Window*,WindowPtr); +extern int MacUnlinkWindow(Fl_X*,Fl_X*start=0L); + +inline Window fl_xid(const Fl_Window*w) +{ + return Fl_X::i(w)->xid; +} + +extern CursHandle fl_default_cursor; + +extern struct Fl_XMap { + RGBColor rgb; + ulong pen; +} *fl_current_xmap; + +extern FL_EXPORT void *fl_display; +extern FL_EXPORT Window fl_window; +extern FL_EXPORT CGContextRef fl_gc; +extern FL_EXPORT Handle fl_system_menu; +extern FL_EXPORT class Fl_Sys_Menu_Bar *fl_sys_menu_bar; + +typedef GWorldPtr Fl_Offscreen; + +extern Fl_Offscreen fl_create_offscreen(int w, int h); +extern void fl_copy_offscreen(int x,int y,int w,int h, Fl_Offscreen gWorld, int srcx,int srcy); +extern void fl_delete_offscreen(Fl_Offscreen gWorld); +extern void fl_begin_offscreen(Fl_Offscreen gWorld); +extern void fl_end_offscreen(); + +typedef GWorldPtr Fl_Bitmask; // Carbon requires a 1-bit GWorld instead of a BitMap + +extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); +extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); +extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); + +extern void fl_open_display(); + +// Register a function for opening files via the finder... +extern void fl_open_callback(void (*cb)(const char *)); + +extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); + +// +// End of "$Id: mac.H 5379 2006-08-29 11:03:05Z matt $". +// + diff --git a/third_party/windows/fltk-1.1.10/FL/mac.r b/third_party/windows/fltk-1.1.10/FL/mac.r new file mode 100644 index 0000000..cbd53a7 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/mac.r @@ -0,0 +1,13 @@ +data 'MBAR' (128) { + $"0001 0080" /* ...€ */ +}; + +data 'MENU' (128, "Apple") { + $"0080 0000 0000 0000 0000 FFFF FFFB 0114" /* .€........ÿÿÿû.. */ + $"0A41 626F 7574 2046 4C54 4B00 0000 0001" /* ÂAbout FLTK..... */ + $"2D00 0000 0000" /* -..... */ +}; + +data 'carb' (0) { +}; + diff --git a/third_party/windows/fltk-1.1.10/FL/math.h b/third_party/windows/fltk-1.1.10/FL/math.h new file mode 100644 index 0000000..677d6ac --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/math.h @@ -0,0 +1,72 @@ +// +// "$Id: math.h 4288 2005-04-16 00:13:17Z mike $" +// +// Math header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +#ifndef fl_math_h +# define fl_math_h + +// Apple's ProjectBuilder has the nasty habit of including recursively +// down the file tree. To avoid re-including we must +// directly include the systems math file. (Plus, I could not find a +// predefined macro for ProjectBuilder builds, so we have to define it +// in the project) +# if defined(__APPLE__) && defined(__PROJECTBUILDER__) +# include "/usr/include/math.h" +# else +# include +# endif + +# ifdef __EMX__ +# include +# endif + + +# ifndef M_PI +# define M_PI 3.14159265358979323846 +# define M_PI_2 1.57079632679489661923 +# define M_PI_4 0.78539816339744830962 +# define M_1_PI 0.31830988618379067154 +# define M_2_PI 0.63661977236758134308 +# endif // !M_PI + +# ifndef M_SQRT2 +# define M_SQRT2 1.41421356237309504880 +# define M_SQRT1_2 0.70710678118654752440 +# endif // !M_SQRT2 + +# if (defined(WIN32) || defined(CRAY)) && !defined(__MINGW32__) && !defined(__MWERKS__) + +inline double rint(double v) {return floor(v+.5);} +inline double copysign(double a, double b) {return b<0 ? -a : a;} + +# endif // (WIN32 || CRAY) && !__MINGW32__ && !__MWERKS__ + +#endif // !fl_math_h + + +// +// End of "$Id: math.h 4288 2005-04-16 00:13:17Z mike $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/names.h b/third_party/windows/fltk-1.1.10/FL/names.h new file mode 100644 index 0000000..767f2bc --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/names.h @@ -0,0 +1,85 @@ +// +// "$Id:$" +// +// Event names header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2007 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// Thanks to Greg Ercolano for this addition. + +#ifndef FL_NAMES_H +#define FL_NAMES_H + +char *fl_eventnames[] = +{ + "FL_NO_EVENT", + "FL_PUSH", + "FL_RELEASE", + "FL_ENTER", + "FL_LEAVE", + "FL_DRAG", + "FL_FOCUS", + "FL_UNFOCUS", + "FL_KEYDOWN", + "FL_KEYUP", + "FL_CLOSE", + "FL_MOVE", + "FL_SHORTCUT", + "FL_DEACTIVATE", + "FL_ACTIVATE", + "FL_HIDE", + "FL_SHOW", + "FL_PASTE", + "FL_SELECTIONCLEAR", + "FL_MOUSEWHEEL", + "FL_DND_ENTER", + "FL_DND_DRAG", + "FL_DND_LEAVE", + "FL_DND_RELEASE", +}; + +char *fl_fontnames[] = +{ + "FL_HELVETICA", + "FL_HELVETICA_BOLD", + "FL_HELVETICA_ITALIC", + "FL_HELVETICA_BOLD_ITALIC", + "FL_COURIER", + "FL_COURIER_BOLD", + "FL_COURIER_ITALIC", + "FL_COURIER_BOLD_ITALIC", + "FL_TIMES", + "FL_TIMES_BOLD", + "FL_TIMES_ITALIC", + "FL_TIMES_BOLD_ITALIC", + "FL_SYMBOL", + "FL_SCREEN", + "FL_SCREEN_BOLD", + "FL_ZAPF_DINGBATS", +}; + +#endif /* FL_NAMES_H */ + +// +// End of "$Id:$". +// diff --git a/third_party/windows/fltk-1.1.10/FL/win32.H b/third_party/windows/fltk-1.1.10/FL/win32.H new file mode 100644 index 0000000..0737d97 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/win32.H @@ -0,0 +1,152 @@ +// +// "$Id: win32.H 5436 2006-09-16 16:02:00Z matt $" +// +// WIN32 header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// Do not directly include this file, instead use . It will +// include this file if WIN32 is defined. This is to encourage +// portability of even the system-specific code... + +#ifndef Fl_X_H +# error "Never use directly; include instead." +#endif // !Fl_X_H + +#include +// In some of the distributions, the gcc header files are missing some stuff: +#ifndef LPMINMAXINFO +#define LPMINMAXINFO MINMAXINFO* +#endif +#ifndef VK_LWIN +#define VK_LWIN 0x5B +#define VK_RWIN 0x5C +#define VK_APPS 0x5D +#endif + +// some random X equivalents +typedef HWND Window; +typedef POINT XPoint; +struct XRectangle {int x, y, width, height;}; +typedef HRGN Fl_Region; +FL_EXPORT void fl_clip_region(Fl_Region); +inline Fl_Region XRectangleRegion(int x, int y, int w, int h) { + return CreateRectRgn(x,y,x+w,y+h); +} +inline void XDestroyRegion(Fl_Region r) {DeleteObject(r);} +inline void XClipBox(Fl_Region r,XRectangle* rect) { + RECT win_rect; GetRgnBox(r,&win_rect); + rect->x=win_rect.left; + rect->y=win_rect.top; + rect->width=win_rect.right-win_rect.left; + rect->height=win_rect.bottom-win_rect.top; +} +#define XDestroyWindow(a,b) DestroyWindow(b) +#define XMapWindow(a,b) ShowWindow(b, SW_RESTORE) +#define XUnmapWindow(a,b) ShowWindow(b, SW_HIDE) + +#include "Fl_Window.H" +// this object contains all win32-specific stuff about a window: +// Warning: this object is highly subject to change! +class FL_EXPORT Fl_X { +public: + // member variables - add new variables only at the end of this block + Window xid; + HBITMAP other_xid; // for double-buffered windows + Fl_Window* w; + Fl_Region region; + Fl_X *next; + int wait_for_expose; + HDC private_dc; // used for OpenGL + HCURSOR cursor; + 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, + int &bt,int &bx,int &by); + void setwindow(Fl_Window* wi) {w=wi; wi->i=this;} + void flush() {w->flush();} + void set_minmax(LPMINMAXINFO minmax); + void mapraise(); + static Fl_X* make(Fl_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() + +// most recent fl_color() or fl_rgbcolor() points at one of these: +extern FL_EXPORT struct Fl_XMap { + COLORREF rgb; // this should be the type the RGB() macro returns + HPEN pen; // pen, 0 if none created yet + int brush; // ref to solid brush, 0 if none created yet +} *fl_current_xmap; +inline COLORREF fl_RGB() {return fl_current_xmap->rgb;} +inline HPEN fl_pen() {return fl_current_xmap->pen;} +FL_EXPORT HBRUSH fl_brush(); // allocates a brush if necessary +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 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 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); + +// off-screen pixmaps: create, destroy, draw into, copy to window +typedef HBITMAP Fl_Offscreen; +#define fl_create_offscreen(w, h) CreateCompatibleBitmap(fl_gc, w, h) + +extern FL_EXPORT HDC fl_makeDC(HBITMAP); + +#define fl_begin_offscreen(b) \ + HDC _sgc=fl_gc; Window _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() \ + fl_pop_clip(); RestoreDC(fl_gc, _savedc); DeleteDC(fl_gc); fl_window=_sw; fl_gc = _sgc + +FL_EXPORT void fl_copy_offscreen(int x,int y,int w,int h,HBITMAP pixmap,int srcx,int srcy); +FL_EXPORT void fl_copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP pixmap,int srcx,int srcy); +#define fl_delete_offscreen(bitmap) DeleteObject(bitmap); + +// Bitmap masks +typedef HBITMAP Fl_Bitmask; + +extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); +extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); +extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); + +// Dummy function to register a function for opening files via the window manager... +inline void fl_open_callback(void (*)(const char *)) {} + +extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); + +// +// End of "$Id: win32.H 5436 2006-09-16 16:02:00Z matt $". +// diff --git a/third_party/windows/fltk-1.1.10/FL/x.H b/third_party/windows/fltk-1.1.10/FL/x.H new file mode 100644 index 0000000..231ecb1 --- /dev/null +++ b/third_party/windows/fltk-1.1.10/FL/x.H @@ -0,0 +1,148 @@ +// +// "$Id: x.H 5262 2006-07-18 11:23:20Z matt $" +// +// X11 header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2005 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +// These are internal fltk symbols that are necessary or useful for +// calling Xlib. You should include this file if (and ONLY if) you +// need to call Xlib directly. These symbols may not exist on non-X +// systems. + +#ifndef Fl_X_H +# define Fl_X_H + +# include "Enumerations.H" + +# ifdef WIN32 +# include "win32.H" +# elif defined(__APPLE__) +# include "mac.H" +# else +# if defined(_ABIN32) || defined(_ABI64) // fix for broken SGI Irix X .h files +# pragma set woff 3322 +# endif +# include +# include +# if defined(_ABIN32) || defined(_ABI64) +# pragma reset woff 3322 +# endif +# include +# include "Fl_Window.H" + +// Mirror X definition of Region to Fl_Region, for portability... +typedef Region Fl_Region; + +FL_EXPORT void fl_open_display(); +FL_EXPORT void fl_open_display(Display*); +FL_EXPORT void fl_close_display(); + +// constant info about the X server connection: +extern FL_EXPORT Display *fl_display; +extern FL_EXPORT Window 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 XFontStruct* fl_xfont; +extern FL_EXPORT void *fl_xftfont; +FL_EXPORT ulong fl_xpixel(Fl_Color i); +FL_EXPORT ulong fl_xpixel(uchar r, uchar g, uchar b); +FL_EXPORT void fl_clip_region(Fl_Region); +FL_EXPORT Fl_Region fl_clip_region(); +FL_EXPORT Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.cxx + +// feed events into fltk: +FL_EXPORT int fl_handle(const XEvent&); + +// you can use these in Fl::add_handler() to look at events: +extern FL_EXPORT const XEvent* fl_xevent; +extern FL_EXPORT ulong fl_event_time; + +// off-screen pixmaps: create, destroy, draw into, copy to window: +typedef ulong Fl_Offscreen; +#define fl_create_offscreen(w,h) \ + 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() +# define fl_end_offscreen() \ + fl_pop_clip(); fl_window = _sw + +# define fl_copy_offscreen(x,y,w,h,pixmap,srcx,srcy) \ + XCopyArea(fl_display, pixmap, fl_window, fl_gc, srcx, srcy, w, h, x, y) +# define fl_delete_offscreen(pixmap) XFreePixmap(fl_display, pixmap) + +// Bitmap masks +typedef ulong Fl_Bitmask; + +extern FL_EXPORT Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); +extern FL_EXPORT Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); +extern FL_EXPORT void fl_delete_bitmask(Fl_Bitmask bm); + +// this object contains all X-specific stuff about a window: +// Warning: this object is highly subject to change! It's definition +// 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; + 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;} + void sendxjunk(); + static void make_xid(Fl_Window*,XVisualInfo* =fl_visual, Colormap=fl_colormap); + static Fl_X* set_xid(Fl_Window*, Window); + // 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);} +}; + +// 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); + +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() + +// Dummy function to register a function for opening files via the window manager... +inline void fl_open_callback(void (*)(const char *)) {} + +extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); + +# endif +#endif + +// +// End of "$Id: x.H 5262 2006-07-18 11:23:20Z matt $". +// -- cgit v1.3.1