summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore357
-rw-r--r--CHANGES3598
-rw-r--r--CHANGES_1.0799
-rw-r--r--CHANGES_1.12660
-rw-r--r--CMake/FLTKConfig.cmake.in51
-rw-r--r--CMake/UseFLTK.cmake.in25
-rw-r--r--CMake/export.cmake99
-rw-r--r--CMake/install.cmake89
-rw-r--r--CMake/macros.cmake128
-rw-r--r--CMake/options.cmake298
-rw-r--r--CMake/resources.cmake125
-rw-r--r--CMake/setup.cmake123
-rw-r--r--CMakeLists.txt655
-rw-r--r--CREDITS24
-rw-r--r--FL/Enumerations.H90
-rw-r--r--FL/Fl.H184
-rw-r--r--FL/Fl_Bitmap.H8
-rw-r--r--FL/Fl_Browser_.H23
-rw-r--r--FL/Fl_Button.H19
-rw-r--r--FL/Fl_Check_Button.H28
-rw-r--r--FL/Fl_Copy_Surface.H135
-rw-r--r--FL/Fl_Device.H7
-rw-r--r--FL/Fl_Export.H6
-rw-r--r--FL/Fl_File_Chooser.H49
-rw-r--r--FL/Fl_Gl_Window.H5
-rw-r--r--FL/Fl_Group.H11
-rw-r--r--FL/Fl_Help_Dialog.H34
-rw-r--r--FL/Fl_Help_View.H16
-rw-r--r--FL/Fl_Image.H39
-rw-r--r--FL/Fl_Image_Surface.H90
-rw-r--r--FL/Fl_Input_.H9
-rw-r--r--FL/Fl_Menu_Item.H12
-rw-r--r--FL/Fl_Multiline_Input.H6
-rw-r--r--FL/Fl_Native_File_Chooser.H169
-rw-r--r--FL/Fl_PostScript.H22
-rw-r--r--FL/Fl_Preferences.H5
-rw-r--r--FL/Fl_Printer.H9
-rw-r--r--FL/Fl_Radio_Button.H8
-rw-r--r--FL/Fl_Radio_Light_Button.H8
-rw-r--r--FL/Fl_Radio_Round_Button.H8
-rw-r--r--FL/Fl_Round_Button.H11
-rw-r--r--FL/Fl_Scroll.H57
-rw-r--r--FL/Fl_Secret_Input.H5
-rw-r--r--FL/Fl_Spinner.H69
-rw-r--r--FL/Fl_Sys_Menu_Bar.H71
-rw-r--r--FL/Fl_Table.H41
-rw-r--r--FL/Fl_Tabs.H162
-rw-r--r--FL/Fl_Text_Buffer.H6
-rw-r--r--FL/Fl_Text_Display.H84
-rw-r--r--FL/Fl_Tile.H68
-rw-r--r--FL/Fl_Tree.H202
-rw-r--r--FL/Fl_Tree_Item.H172
-rw-r--r--FL/Fl_Tree_Item_Array.H25
-rw-r--r--FL/Fl_Tree_Prefs.H36
-rw-r--r--FL/Fl_Widget.H34
-rw-r--r--FL/Fl_Window.H174
-rw-r--r--FL/fl_ask.H26
-rw-r--r--FL/fl_draw.H34
-rw-r--r--FL/fl_utf8.h7
-rw-r--r--FL/forms.H6
-rw-r--r--FL/mac.H72
-rw-r--r--FL/win32.H14
-rw-r--r--FL/x.H20
-rw-r--r--Makefile15
-rw-r--r--README58
-rw-r--r--README.CMake.txt107
-rw-r--r--README.MSWindows.txt24
-rw-r--r--README.OSX.txt31
-rw-r--r--README.Unix.txt153
-rw-r--r--VERSION1
-rwxr-xr-xautogen.sh16
-rw-r--r--cairo/CMakeLists.txt26
-rw-r--r--cairo/Fl_Cairo.cxx22
-rw-r--r--cairo/Makefile2
-rwxr-xr-xconfig.guess1558
-rwxr-xr-xconfig.sub1791
-rw-r--r--configh.cmake.in30
-rw-r--r--configh.in30
-rwxr-xr-xconfigure2018
-rw-r--r--configure.in443
-rw-r--r--debian/changelog6
-rw-r--r--documentation/Doxybook9
-rw-r--r--documentation/Doxyfile8
-rw-r--r--documentation/Makefile17
-rw-r--r--documentation/src/Fl_Check_Button.pngbin461 -> 1652 bytes
-rw-r--r--documentation/src/Fl_Native_File_Chooser.pngbin37096 -> 410508 bytes
-rw-r--r--documentation/src/Fl_Tile.pngbin1375 -> 8453 bytes
-rw-r--r--documentation/src/Fl_Tree_Item-dimensions.pngbin0 -> 64350 bytes
-rw-r--r--documentation/src/advanced.dox2
-rw-r--r--documentation/src/basics.dox6
-rw-r--r--documentation/src/common.dox10
-rw-r--r--documentation/src/development.dox106
-rw-r--r--documentation/src/drawing.dox22
-rw-r--r--documentation/src/editor-linenumbers.pngbin0 -> 56078 bytes
-rw-r--r--documentation/src/enumerations.dox13
-rw-r--r--documentation/src/events.dox6
-rw-r--r--documentation/src/examples.dox40
-rw-r--r--documentation/src/faq.dox8
-rw-r--r--documentation/src/fltk-book.tex.in (renamed from documentation/src/fltk-book.tex)6
-rw-r--r--documentation/src/fltk.book108
-rw-r--r--documentation/src/fluid.dox38
-rw-r--r--documentation/src/forms.dox6
-rw-r--r--documentation/src/glut.dox4
-rw-r--r--documentation/src/hello_cxx.png (renamed from documentation/src/hello.C.png)bin1195 -> 1195 bytes
-rw-r--r--documentation/src/html_footer4
-rw-r--r--documentation/src/index.dox5
-rw-r--r--documentation/src/intro.dox12
-rw-r--r--documentation/src/osissues.dox52
-rw-r--r--documentation/src/preface.dox4
-rw-r--r--documentation/src/tabs_default.pngbin0 -> 1054 bytes
-rw-r--r--documentation/src/tabs_selection.pngbin0 -> 1127 bytes
-rw-r--r--documentation/src/tabs_uniform.pngbin0 -> 1199 bytes
-rw-r--r--documentation/src/tree-dimensions.pngbin0 -> 5186 bytes
-rw-r--r--documentation/src/unicode.dox21
-rw-r--r--examples/Makefile7
-rw-r--r--examples/clipboard.cxx172
-rw-r--r--examples/howto-browser-with-icons.cxx186
-rw-r--r--examples/nativefilechooser-simple-app.cxx8
-rw-r--r--examples/shapedwindow.cxx125
-rw-r--r--examples/table-sort.cxx35
-rw-r--r--examples/table-spreadsheet-with-keyboard-nav.cxx5
-rw-r--r--examples/table-spreadsheet.cxx38
-rw-r--r--examples/table-with-keynav.cxx51
-rw-r--r--examples/tree-as-container.cxx8
-rw-r--r--examples/tree-custom-draw-items.cxx191
-rw-r--r--examples/tree-custom-sort.cxx81
-rw-r--r--examples/tree-of-tables.cxx8
-rw-r--r--examples/tree-simple.cxx11
-rw-r--r--fltk-config.cmake.in2
-rwxr-xr-xfltk-config.in6
-rw-r--r--fltk.spec136
-rw-r--r--fluid/CMakeLists.txt55
-rw-r--r--fluid/CodeEditor.cxx10
-rw-r--r--fluid/CodeEditor.h7
-rw-r--r--fluid/Fl_Type.cxx8
-rw-r--r--fluid/Fl_Type.h6
-rw-r--r--fluid/Fl_Widget_Type.cxx12
-rw-r--r--fluid/Fluid_Image.cxx12
-rw-r--r--fluid/Makefile8
-rw-r--r--fluid/about_panel.cxx15
-rw-r--r--fluid/about_panel.fl25
-rw-r--r--fluid/about_panel.h9
-rw-r--r--fluid/alignment_panel.cxx131
-rw-r--r--fluid/alignment_panel.fl144
-rw-r--r--fluid/alignment_panel.h10
-rw-r--r--fluid/factory.cxx36
-rw-r--r--fluid/file.cxx6
-rw-r--r--fluid/fluid.app/Contents/Info.plist69
-rw-r--r--fluid/fluid.cxx7
-rw-r--r--fluid/function_panel.cxx19
-rw-r--r--fluid/function_panel.fl34
-rw-r--r--fluid/function_panel.h6
-rw-r--r--fluid/makedepend365
-rw-r--r--fluid/print_panel.cxx8
-rw-r--r--fluid/print_panel.fl35
-rw-r--r--fluid/print_panel.h6
-rw-r--r--fluid/template_panel.cxx10
-rw-r--r--fluid/template_panel.fl55
-rw-r--r--fluid/template_panel.h6
-rw-r--r--fluid/widget_panel.cxx32
-rw-r--r--fluid/widget_panel.fl36
-rw-r--r--fluid/widget_panel.h6
-rwxr-xr-xide/README.IDE2
-rw-r--r--ide/VisualC2008/fltk.lib.vcproj202
-rw-r--r--ide/VisualC2008/fltkdll.vcproj172
-rw-r--r--ide/VisualC2010/fltk.lib.vcxproj73
-rw-r--r--ide/VisualC2010/fltk.lib.vcxproj.filters13
-rw-r--r--ide/VisualC2010/fltkdll.vcxproj53
-rw-r--r--ide/VisualC6/fltk.dsp24
-rw-r--r--ide/VisualC6/fltk.dsw6
-rw-r--r--ide/VisualC6/fltkdll.dsp26
-rw-r--r--ide/Xcode3/FLTK.xcodeproj/project.pbxproj49
-rw-r--r--ide/Xcode4/FLTK.xcodeproj/project.pbxproj149
-rw-r--r--ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/___PROJECTNAMEASIDENTIFIER___-Info.plist2
-rw-r--r--ide/Xcode4/Resources/English.lproj/Localizable.strings7
-rw-r--r--ide/Xcode4/Resources/French.lproj/Localizable.strings7
-rw-r--r--ide/Xcode4/Resources/German.lproj/Localizable.strings7
-rw-r--r--ide/Xcode4/Resources/Italian.lproj/Localizable.strings7
-rw-r--r--ide/Xcode4/Resources/Spanish.lproj/Localizable.strings7
-rw-r--r--ide/Xcode4/plists/CubeView-Info.plist4
-rw-r--r--ide/Xcode4/plists/Demo-Info.plist4
-rw-r--r--ide/Xcode4/plists/Fluid-Info.plist11
-rw-r--r--ide/Xcode4/plists/adjuster-Info.plist4
-rw-r--r--ide/Xcode4/plists/arc-Info.plist4
-rw-r--r--ide/Xcode4/plists/ask-Info.plist4
-rw-r--r--ide/Xcode4/plists/bitmap-Info.plist4
-rw-r--r--ide/Xcode4/plists/blocks-Info.plist4
-rw-r--r--ide/Xcode4/plists/boxtype-Info.plist4
-rw-r--r--ide/Xcode4/plists/browser-Info.plist4
-rw-r--r--ide/Xcode4/plists/button-Info.plist4
-rw-r--r--ide/Xcode4/plists/buttons-Info.plist4
-rw-r--r--ide/Xcode4/plists/checkers-Info.plist4
-rw-r--r--ide/Xcode4/plists/clock-Info.plist4
-rw-r--r--ide/Xcode4/plists/colbrowser-Info.plist4
-rw-r--r--ide/Xcode4/plists/color_chooser-Info.plist4
-rw-r--r--ide/Xcode4/plists/cube-Info.plist4
-rw-r--r--ide/Xcode4/plists/cursor-Info.plist4
-rw-r--r--ide/Xcode4/plists/curve-Info.plist4
-rw-r--r--ide/Xcode4/plists/device-Info.plist2
-rw-r--r--ide/Xcode4/plists/doublebuffer-Info.plist4
-rw-r--r--ide/Xcode4/plists/editor-Info.plist2
-rw-r--r--ide/Xcode4/plists/fast_slow-Info.plist4
-rw-r--r--ide/Xcode4/plists/file_chooser-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_forms-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_gl-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_images-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_jpeg-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_png-Info.plist4
-rw-r--r--ide/Xcode4/plists/fltk_zlib-Info.plist4
-rw-r--r--ide/Xcode4/plists/fonts-Info.plist4
-rw-r--r--ide/Xcode4/plists/forms-Info.plist4
-rw-r--r--ide/Xcode4/plists/fractals-Info.plist4
-rw-r--r--ide/Xcode4/plists/fullscreen-Info.plist4
-rw-r--r--ide/Xcode4/plists/gl_overlay-Info.plist4
-rw-r--r--ide/Xcode4/plists/glpuzzle-Info.plist4
-rw-r--r--ide/Xcode4/plists/hello-Info.plist4
-rw-r--r--ide/Xcode4/plists/help-Info.plist4
-rw-r--r--ide/Xcode4/plists/iconize-Info.plist4
-rw-r--r--ide/Xcode4/plists/image-Info.plist4
-rw-r--r--ide/Xcode4/plists/inactive-Info.plist4
-rw-r--r--ide/Xcode4/plists/input-Info.plist4
-rw-r--r--ide/Xcode4/plists/input_choice-Info.plist4
-rw-r--r--ide/Xcode4/plists/keyboard-Info.plist4
-rw-r--r--ide/Xcode4/plists/label-Info.plist4
-rw-r--r--ide/Xcode4/plists/line_style-Info.plist4
-rw-r--r--ide/Xcode4/plists/list_visuals-Info.plist4
-rw-r--r--ide/Xcode4/plists/mandelbrot-Info.plist4
-rw-r--r--ide/Xcode4/plists/menubar-Info.plist4
-rw-r--r--ide/Xcode4/plists/message-Info.plist4
-rw-r--r--ide/Xcode4/plists/minimum-Info.plist4
-rw-r--r--ide/Xcode4/plists/native-filechooser-Info.plist4
-rw-r--r--ide/Xcode4/plists/navigation-Info.plist4
-rw-r--r--ide/Xcode4/plists/output-Info.plist4
-rw-r--r--ide/Xcode4/plists/overlay-Info.plist4
-rw-r--r--ide/Xcode4/plists/pack-Info.plist4
-rw-r--r--ide/Xcode4/plists/pixmap-Info.plist4
-rw-r--r--ide/Xcode4/plists/pixmap_browser-Info.plist4
-rw-r--r--ide/Xcode4/plists/preferences-Info.plist4
-rw-r--r--ide/Xcode4/plists/radio-Info.plist4
-rw-r--r--ide/Xcode4/plists/resize-Info.plist4
-rw-r--r--ide/Xcode4/plists/resizebox-Info.plist4
-rw-r--r--ide/Xcode4/plists/rotated_text-Info.plist4
-rw-r--r--ide/Xcode4/plists/scroll-Info.plist4
-rw-r--r--ide/Xcode4/plists/shape-Info.plist4
-rw-r--r--ide/Xcode4/plists/subwindow-Info.plist4
-rw-r--r--ide/Xcode4/plists/sudoku-Info.plist4
-rw-r--r--ide/Xcode4/plists/symbols-Info.plist4
-rw-r--r--ide/Xcode4/plists/table-Info.plist4
-rw-r--r--ide/Xcode4/plists/tabs-Info.plist4
-rw-r--r--ide/Xcode4/plists/threads-Info.plist4
-rw-r--r--ide/Xcode4/plists/tile-Info.plist4
-rw-r--r--ide/Xcode4/plists/tiled_image-Info.plist4
-rw-r--r--ide/Xcode4/plists/tree-Info.plist4
-rw-r--r--ide/Xcode4/plists/utf8-Info.plist2
-rw-r--r--ide/Xcode4/plists/valuators-Info.plist4
-rw-r--r--ide/Xcode4/plists/zlib-Info.plist4
-rw-r--r--jpeg/CMakeLists.txt31
-rw-r--r--makeinclude.in10
-rwxr-xr-xmisc/config.guess1558
-rwxr-xr-xmisc/config.sub1788
-rw-r--r--png/CMakeLists.txt39
-rw-r--r--src/CMakeLists.txt247
-rw-r--r--src/Fl.cxx313
-rw-r--r--src/Fl_Bitmap.cxx131
-rw-r--r--src/Fl_Button.cxx50
-rw-r--r--src/Fl_Check_Button.cxx36
-rw-r--r--src/Fl_Color_Chooser.cxx6
-rw-r--r--src/Fl_Copy_Surface.cxx399
-rw-r--r--src/Fl_Double_Window.cxx13
-rw-r--r--src/Fl_File_Browser.cxx116
-rw-r--r--src/Fl_File_Chooser.cxx19
-rw-r--r--src/Fl_File_Chooser.fl137
-rw-r--r--src/Fl_File_Chooser2.cxx13
-rw-r--r--src/Fl_File_Icon2.cxx15
-rw-r--r--src/Fl_Font.H7
-rw-r--r--src/Fl_GDI_Printer.cxx10
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx37
-rw-r--r--src/Fl_Gl_Window.cxx61
-rw-r--r--src/Fl_Group.cxx8
-rw-r--r--src/Fl_Help_Dialog.cxx57
-rw-r--r--src/Fl_Help_Dialog.fl36
-rw-r--r--src/Fl_Help_View.cxx8
-rw-r--r--src/Fl_Image.cxx134
-rw-r--r--src/Fl_Image_Surface.cxx157
-rw-r--r--src/Fl_Input.cxx60
-rw-r--r--src/Fl_Input_.cxx82
-rw-r--r--src/Fl_JPEG_Image.cxx56
-rw-r--r--src/Fl_Menu.cxx16
-rw-r--r--src/Fl_Menu_Window.cxx5
-rw-r--r--src/Fl_Native_File_Chooser_FLTK.cxx552
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx732
-rw-r--r--src/Fl_Native_File_Chooser_MAC.mm120
-rw-r--r--src/Fl_Native_File_Chooser_WIN32.cxx182
-rw-r--r--src/Fl_Native_File_Chooser_common.cxx5
-rw-r--r--src/Fl_PNG_Image.cxx32
-rw-r--r--src/Fl_Paged_Device.cxx18
-rw-r--r--src/Fl_PostScript.cxx131
-rw-r--r--src/Fl_Preferences.cxx17
-rw-r--r--src/Fl_Printer.cxx10
-rw-r--r--src/Fl_Quartz_Printer.mm71
-rw-r--r--src/Fl_Round_Button.cxx43
-rw-r--r--src/Fl_Scroll.cxx139
-rw-r--r--src/Fl_Sys_Menu_Bar.cxx289
-rw-r--r--src/Fl_Sys_Menu_Bar.mm508
-rw-r--r--src/Fl_Table.cxx41
-rw-r--r--src/Fl_Tabs.cxx32
-rw-r--r--src/Fl_Text_Buffer.cxx27
-rw-r--r--src/Fl_Text_Display.cxx390
-rw-r--r--src/Fl_Text_Editor.cxx25
-rw-r--r--src/Fl_Tile.cxx146
-rw-r--r--src/Fl_Tiled_Image.cxx19
-rw-r--r--src/Fl_Tree.cxx1602
-rw-r--r--src/Fl_Tree_Item.cxx1013
-rw-r--r--src/Fl_Tree_Item_Array.cxx166
-rw-r--r--src/Fl_Tree_Prefs.cxx12
-rw-r--r--src/Fl_Window.cxx276
-rw-r--r--src/Fl_Window_fullscreen.cxx25
-rw-r--r--src/Fl_Window_shape.cxx407
-rw-r--r--src/Fl_XPM_Image.cxx25
-rw-r--r--src/Fl_arg.cxx8
-rw-r--r--src/Fl_cocoa.mm2173
-rw-r--r--src/Fl_compose.cxx107
-rw-r--r--src/Fl_get_key_mac.cxx22
-rw-r--r--src/Fl_get_system_colors.cxx61
-rw-r--r--src/Fl_mac.cxx2861
-rw-r--r--src/Fl_win32.cxx885
-rw-r--r--src/Fl_x.cxx1109
-rw-r--r--src/Makefile31
-rw-r--r--src/Xutf8.h (renamed from FL/Xutf8.h)10
-rw-r--r--src/aimm.h422
-rw-r--r--src/fastarrow.h2
-rw-r--r--src/fl_ask.cxx24
-rw-r--r--src/fl_boxtype.cxx14
-rw-r--r--src/fl_call_main.c10
-rw-r--r--src/fl_cursor.cxx389
-rw-r--r--src/fl_cursor_help.xpm39
-rw-r--r--src/fl_cursor_nesw.xpm46
-rw-r--r--src/fl_cursor_none.xpm19
-rw-r--r--src/fl_cursor_nwse.xpm46
-rw-r--r--src/fl_cursor_wait.xpm28
-rw-r--r--src/fl_diamond_box.cxx38
-rw-r--r--src/fl_dnd_x.cxx10
-rw-r--r--src/fl_draw.cxx191
-rw-r--r--src/fl_draw_pixmap.cxx342
-rw-r--r--src/fl_engraved_label.cxx12
-rw-r--r--src/fl_font_mac.cxx102
-rw-r--r--src/fl_font_win32.cxx57
-rw-r--r--src/fl_font_xft.cxx22
-rw-r--r--src/fl_gleam.cxx137
-rw-r--r--src/fl_gtk.cxx8
-rw-r--r--src/fl_open_uri.cxx12
-rw-r--r--src/fl_plastic.cxx20
-rw-r--r--src/fl_read_image.cxx12
-rw-r--r--src/fl_read_image_mac.cxx5
-rw-r--r--src/fl_rect.cxx6
-rw-r--r--src/fl_round_box.cxx46
-rw-r--r--src/fl_scroll_area.cxx16
-rw-r--r--src/fl_set_fonts_mac.cxx70
-rw-r--r--src/fl_set_fonts_xft.cxx54
-rw-r--r--src/fl_shortcut.cxx75
-rw-r--r--src/fl_utf8.cxx12
-rw-r--r--src/flstring.h6
-rw-r--r--src/forms_timer.cxx5
-rw-r--r--src/gl_draw.cxx15
-rw-r--r--src/gl_start.cxx5
-rw-r--r--src/makedepend1590
-rw-r--r--src/mediumarrow.h2
-rw-r--r--src/numericsort.c8
-rw-r--r--src/print_panel.cxx10
-rw-r--r--src/ps_image.cxx84
-rw-r--r--src/scandir.c46
-rw-r--r--src/scandir_posix.c205
-rw-r--r--src/scandir_win32.c6
-rw-r--r--src/screen_xywh.cxx110
-rw-r--r--src/slowarrow.h2
-rw-r--r--src/tile.xpm2
-rw-r--r--src/vsnprintf.c8
-rw-r--r--src/xutf8/headers/dingbats_.h250
-rw-r--r--src/xutf8/headers/symbol_.h190
-rw-r--r--src/xutf8/imKStoUCS.c2
-rw-r--r--src/xutf8/is_right2left.c10
-rw-r--r--src/xutf8/keysym2Ucs.c2
-rw-r--r--src/xutf8/ucs2fontmap.c5
-rw-r--r--src/xutf8/utf8Input.c20
-rw-r--r--src/xutf8/utf8Utils.c2
-rw-r--r--src/xutf8/utf8Wrap.c10
-rw-r--r--test/CMakeLists.txt45
-rw-r--r--test/CubeViewUI.fl2
-rw-r--r--test/Makefile78
-rw-r--r--test/blocks.app/Contents/Info.plist3
-rw-r--r--test/blocks.cxx7
-rw-r--r--test/browser.cxx31
-rw-r--r--test/checkers.app/Contents/Info.plist3
-rw-r--r--test/colbrowser.cxx6
-rw-r--r--test/cursor.cxx46
-rw-r--r--test/demo.cxx21
-rw-r--r--test/device.cxx124
-rw-r--r--test/editor.cxx37
-rw-r--r--test/fast_slow.fl9
-rw-r--r--test/forms.cxx5
-rw-r--r--test/fracviewer.cxx31
-rw-r--r--test/fullscreen.cxx62
-rw-r--r--test/help-test.html254
-rw-r--r--test/help.cxx8
-rw-r--r--test/icon.cxx51
-rw-r--r--test/inactive.fl14
-rw-r--r--test/keyboard_ui.fl2
-rw-r--r--test/list_visuals.cxx5
-rw-r--r--test/makedepend849
-rw-r--r--test/mandelbrot_ui.fl12
-rw-r--r--test/native-filechooser.cxx30
-rw-r--r--test/preferences.fl4
-rw-r--r--test/radio.fl2
-rw-r--r--test/resize.fl4
-rw-r--r--test/sudoku.app/Contents/Info.plist3
-rw-r--r--test/sudoku.cxx20
-rw-r--r--test/tabs.fl2
-rw-r--r--test/threads.cxx6
-rw-r--r--test/threads.h19
-rw-r--r--test/tile.cxx26
-rw-r--r--test/trackball.c2
-rw-r--r--test/tree.fl213
-rw-r--r--test/twowin.cxx60
-rw-r--r--test/unittest_schemes.cxx301
-rw-r--r--test/unittest_symbol.cxx95
-rw-r--r--test/unittests.cxx11
-rw-r--r--test/valuators.fl4
-rw-r--r--test/windowfocus.cxx64
-rw-r--r--zlib/CMakeLists.txt32
430 files changed, 32581 insertions, 16522 deletions
diff --git a/.gitignore b/.gitignore
index 90e831f..8d35a2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,111 +1,248 @@
-.pc
-FL/Makefile
-config.*
-documentation/fltk.pdf
-documentation/html
-documentation/latex
-documentation/pdfall.log
-documentation/src/*.[0-9]
-fltk-config
-fltk-config.unhardened
-fltk.list
-fltk.spec
-fluid/fluid
-fluid/fluid-shared
-lib*.so*
-lib/lib*.a
-makeinclude
-test/CubeView
-test/CubeViewUI.cxx
-test/CubeViewUI.h
-test/adjuster
-test/arc
-test/ask
-test/bitmap
-test/blocks
-test/boxtype
-test/browser
-test/button
-test/buttons
-test/cairo_test
-test/checkers
-test/clock
-test/colbrowser
-test/color_chooser
-test/cube
-test/cursor
-test/curve
-test/demo
-test/device
-test/doublebuffer
-test/editor
-test/fast_slow
-test/fast_slow.cxx
-test/fast_slow.h
-test/file_chooser
-test/fonts
-test/forms
-test/fractals
-test/fullscreen
-test/gl_overlay
-test/glpuzzle
-test/hello
-test/help
-test/iconize
-test/image
-test/inactive
-test/inactive.cxx
-test/inactive.h
-test/input
-test/input_choice
-test/keyboard
-test/keyboard_ui.cxx
-test/keyboard_ui.h
-test/label
-test/line_style
-test/list_visuals
-test/mandelbrot
-test/mandelbrot_ui.cxx
-test/mandelbrot_ui.h
-test/menubar
-test/message
-test/minimum
-test/native-filechooser
-test/navigation
-test/output
-test/overlay
-test/pack
-test/pixmap
-test/pixmap_browser
-test/preferences
-test/preferences.cxx
-test/preferences.h
-test/radio
-test/radio.cxx
-test/radio.h
-test/resize
-test/resize.cxx
-test/resize.h
-test/resizebox
-test/rotated_text
-test/scroll
-test/shape
-test/subwindow
-test/sudoku
-test/symbols
-test/table
-test/tabs
-test/tabs.cxx
-test/tabs.h
-test/threads
-test/tile
-test/tiled_image
-test/tree
-test/tree.cxx
-test/tree.h
-test/unittests
-test/utf8
-test/valuators
-test/valuators.cxx
-test/valuators.h
+# Start Debian additions
+/.pc
+/cairo/libfltk_cairo.so*
+/documentation/doxygen_sqlite3.db
+/fltk-config.unhardened
+# End Debian additions
+
+# ignore file for git - generated from subversion with:
+# git svn show-ignore
+
*.o
+*.exe
+
+# /
+/autom4te*.cache
+/clang
+/config.cache
+/config.guess
+/config.h
+/config.log
+/config.status
+/config.sub
+/configure
+/fltk-config
+/fltk.list
+/fltk.spec
+/makeinclude
+/*.bck
+/TAGS
+
+# /FL/
+/FL/Makefile
+/FL/*.bck
+
+# /documentation/
+/documentation/.xvpics
+/documentation/blocks.0
+/documentation/blocks.6
+/documentation/blocks.z
+/documentation/checkers.0
+/documentation/checkers.6
+/documentation/checkers.z
+/documentation/fltk.0
+/documentation/fltk.3
+/documentation/fltk-config.0
+/documentation/fltk-config.1
+/documentation/fltk-config.z
+/documentation/fltk.d
+/documentation/fltk.pdf
+/documentation/fltk.z
+/documentation/fluid.0
+/documentation/fluid.1
+/documentation/fluid.z
+/documentation/html
+/documentation/latex
+/documentation/sudoku.0
+/documentation/sudoku.6
+/documentation/sudoku.z
+/documentation/*.bck
+/documentation/*.bak
+/documentation/*.log
+
+# /documentation/src/
+/documentation/src/*.0
+/documentation/src/*.1
+/documentation/src/*.3
+/documentation/src/*.6
+/documentation/src/*.z
+/documentation/src/fltk-book.tex
+
+# /examples/
+/examples/*.exe
+/examples/howto-add_fd-and-popen
+/examples/howto-parse-args
+/examples/howto-text-over-image-button
+/examples/menubar-add
+/examples/nativefilechooser-simple-app
+/examples/table-as-container
+/examples/table-simple
+/examples/table-sort
+/examples/table-spreadsheet
+/examples/table-spreadsheet-with-keyboard-nav
+/examples/tabs-simple
+/examples/textdisplay-with-colors
+/examples/texteditor-simple
+/examples/tree-simple
+/examples/wizard-simple
+
+# /fluid/
+/fluid/fluid
+/fluid/fluid-shared
+/fluid/*.bck
+/fluid/*.exe
+/fluid/*.ilk
+/fluid/TAGS
+
+# /fluid/fluid.app/Contents/MacOS/
+/fluid/fluid.app/Contents/MacOS/fluid
+
+# /fluid/pixmaps/
+/fluid/pixmaps/*.bck
+
+# /ide/Xcode3/
+/ide/Xcode3/build
+
+# /ide/Xcode3/FLTK.xcodeproj/
+/ide/Xcode3/FLTK.xcodeproj/*.pbxuser
+/ide/Xcode3/FLTK.xcodeproj/*.perspectivev3
+
+# /ide/Xcode4/
+/ide/Xcode4/build
+
+# /ide/Xcode4/FLTK.xcodeproj/
+/ide/Xcode4/FLTK.xcodeproj/*.pbxuser
+/ide/Xcode4/FLTK.xcodeproj/*.perspectivev3
+
+# /lib/
+/lib/lib*
+/lib/*.lib
+/lib/*.a
+
+# /misc/
+/misc/doxystar
+
+# /src/
+/src/*.so*
+/src/*.sl*
+/src/*.a
+/src/*.bck
+/src/*.sav
+/src/*.dylib
+
+# /test/
+/test/CubeView
+/test/CubeViewUI.cxx
+/test/CubeViewUI.h
+/test/adjuster
+/test/arc
+/test/ask
+/test/bitmap
+/test/blocks
+/test/boxtype
+/test/browser
+/test/button
+/test/buttons
+/test/cairo_test
+/test/checkers
+/test/clock
+/test/colbrowser
+/test/color_chooser
+/test/cube
+/test/cursor
+/test/curve
+/test/demo
+/test/device
+/test/doublebuffer
+/test/editor
+/test/fast_slow
+/test/fast_slow.cxx
+/test/fast_slow.h
+/test/file_chooser
+/test/fonts
+/test/forms
+/test/fractals
+/test/fullscreen
+/test/gl_overlay
+/test/glpuzzle
+/test/hello
+/test/help
+/test/icon
+/test/iconize
+/test/image
+/test/inactive
+/test/inactive.cxx
+/test/inactive.h
+/test/input
+/test/input_choice
+/test/keyboard
+/test/keyboard_ui.cxx
+/test/keyboard_ui.h
+/test/label
+/test/line_style
+/test/list_visuals
+/test/mandelbrot
+/test/mandelbrot_ui.cxx
+/test/mandelbrot_ui.h
+/test/menubar
+/test/message
+/test/minimum
+/test/native-filechooser
+/test/navigation
+/test/output
+/test/overlay
+/test/pack
+/test/pixmap
+/test/pixmap_browser
+/test/preferences
+/test/preferences.cxx
+/test/preferences.h
+/test/print
+/test/radio
+/test/radio.cxx
+/test/radio.h
+/test/resize
+/test/resize.cxx
+/test/resize.h
+/test/resizebox
+/test/rotated_text
+/test/scroll
+/test/shape
+/test/shiny
+/test/shiny_panel.cxx
+/test/shiny_panel.h
+/test/subwindow
+/test/sudoku
+/test/symbols
+/test/table
+/test/tabs
+/test/tabs.cxx
+/test/tabs.h
+/test/threads
+/test/tile
+/test/tiled_image
+/test/tree
+/test/tree.cxx
+/test/tree.h
+/test/twowin
+/test/unittests
+/test/utf8
+/test/valuators
+/test/valuators.cxx
+/test/valuators.h
+/test/windowfocus
+/test/*.bck
+/test/*.exe
+/test/*.ilk
+/test/fltk*.lib
+/test/fltk*.exp
+/test/fltk*.dll
+
+# /test/blocks.app/Contents/MacOS/
+/test/blocks.app/Contents/MacOS/blocks
+
+# /test/checkers.app/Contents/MacOS/
+/test/checkers.app/Contents/MacOS/checkers
+
+# /test/sudoku.app/Contents/MacOS/
+/test/sudoku.app/Contents/MacOS/sudoku
diff --git a/CHANGES b/CHANGES
index 91e96d2..31088f2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,19 +1,170 @@
-CHANGES IN FLTK 1.3.2
+CHANGES IN FLTK 1.3.3 RELEASED: Nov 03 2014
+
+ New features and extensions
+
+ - New class Fl_Copy_Surface allows copying graphical data to the
+ clipboard in a cross-platform way (STR #3058).
+ - Support for pasting graphical data from the clipboard to a widget.
+ - New class Fl_Image_Surface allows drawing into an Fl_Image object.
+ - Methods Fl::add_clipboard_notify() and Fl::remove_clipboard_notify()
+ to get notifications whenever the clipboard changes (STR #2636).
+ - New method Fl_Window::wait_for_expose() (STR #3124, STR #3129).
+ - New bilinear scaling method for RGB images (STR #2869, STR #3062).
+ - New method Fl_Widget::top_window() (STR #2948).
+ - New method Fl_Widget::top_window_offset() (part of STR #2944).
+ - New Fl_Tree_Item methods label_x(), label_y(), label_w(), label_h().
+ - New methods Fl::enable_im() and Fl::disable_im() to enable/disable
+ system Input Methods (IM).
+ - New methods Fl::add_system_handler() and Fl::remove_system_handler()
+ to intercept low level system events.
+ - New FLTK scheme "gleam" (STR #2672).
+ - New method Fl::is_scheme() to compare the current scheme name.
+ - New method to set custom icons for windows (STR #2816),
+ see Fl_Window::icon() for more info.
+ - New method to set any custom cursor, based on a Fl_RGB_Image object.
+ Also changed fallback cursors to use this method, so that fallback
+ cursors are handled in a platform independent manner (STR #2660).
+ - New ability to convert Fl_Pixmap to Fl_RGB_Image (STR #2659).
+ - Support for full screen windows over multiple monitors.
+ - New optional line numbers in Fl_Text_Display and options to control
+ line numbers and word wrapping (on/off) in example test/editor.cxx.
+ - On Linux/Unix, class Fl_Native_File_Chooser uses file dialogs from
+ the Gnome environment (provided by the libgtk dynamic library) if
+ available, and falls back to Fl_File_Chooser if not (STR #3088).
+ Use option Fl::OPTION_FNFC_USES_GTK to enable/disable this feature.
+ - New support for the Mac OS text input system that deals with character
+ composition and input of languages with large character sets (e.g.
+ Chinese and Japanese). This implementation has been reported to work
+ well for Chinese. Superficial testing suggests it's also operational
+ for Japanese. In-depth testing remains needed though.
+
+ Other improvements
+
+ - Many CMake improvements (e.g. STR #2962, 2977, 2994, 3045, 3055).
+ - Some autoconf, configure improvements.
+ - Removed 1024 bytes constraint in labels and browser lines (STR #2990).
+ - Mac OS version of Fl_Native_File_Chooser: when using filters in a
+ save file dialog, the output file extension gets changed when the
+ user modifies the output file type.
+ - Many Mac OS X improvements related to Fl_Sys_Menu_Bar.
+ - Improved Mac OS X keyboard handling of special keys or combinations.
+ - General Mac OS X improvements, incl. high resolution (Retina)
+ displays, and support up to Mac OS X 10.10.
+ - Documentation improvements and clarifications.
+ - Printing support improvements, including GL windows.
+ - Many improvements related to Fl_Tree (some of them only as ABI
+ breaking features, see below).
+ - Some static data has been made 'const' to improve memory usage
+ with shared libraries.
+ - Don't grab navkeys with modifiers (CTRL, ALT), as the application
+ may want them (STR #3104).
+ - Check compiler support of -fvisibility, -fvisibility-inlines-hidden,
+ and use it, if available. Reduces shared library size.
+ - Drag'n'drop behaves better now: if text is dropped in the widget it
+ comes from, then it works like cut and paste.
+ - Other improvements of DND handling when dragging text from other
+ applications, e.g. Firefox and Thunderbird.
+ - Windows message WM_QUIT is processed like SIGTERM, i.e. as a
+ request to terminate the program.
+ - Fluid no longer closes the code window when hitting ESC (STR #2997).
+ - Improved Fl_Widget::when() handling in Fl_Tabs (STR #2939).
+ - Improved support for more recent compilers (clang and gcc) that
+ issue more warnings, and fixed some 32-/64-bit compilation issues.
+ - Added method Fl_Window::clear_modal_states() to make it possible
+ to remove the modal or non-modal state from a window (STR #3123).
+
+ Bug fixes
+
+ - Fixed word selection dragging in text input (STR #3014).
+ - Fixed border padding for special cases (STR #3061, Windows only).
+ - Fixed crash if Fl_Window::flush() called while window not shown()
+ (STR #3028).
+ - Fixed segfault in fl_set_fonts_xft.cxx when loading fonts not named
+ as expected (STR #2976).
+ - Fixed a memory leak in font loading/allocation (STR #3069).
+ - Fixed minor memory leaks in handling/freeing of X11 objects.
+ - Fixed OS X fl_read_image() and Fl_Paged_Device::print_window_part()
+ when using a Retina display.
+ - Fixed MinGW build if configure didn't find strcasecmp() (STR #2994).
+ - Fixed access of protected member under Linux/Unix (STR #2903).
+ - Fixed various Mac specific OpenGL issues (STR #2944)
+ - Fixed PostScript printing with non-english locale (STR #3130).
+ - Fixed a regression in Fl_File_Chooser since FLTK 1.1.8: the
+ Enter key now selects the file again.
+ - Fixed a bug in Fl_Native_File_Chooser (Windows) for some file name
+ input filters (STR #3101).
+ - Fixed out-of-bounds memory access in Fl_Text_Display (STR #2730).
+
+ 1.3.3 ABI FEATURES
+
+ To enable the following ABI features, put:
+ #define FLTK_ABI_VERSION 10303
+ ..at the top of your FL/Enumerations.H and rebuild FLTK and your app.
+
+ - Added Fl_Window::shape(const Fl_Image*) to create arbitrarily-shaped
+ windows
+ - Made Fl_Help_View::handle() public and Fl_Help_View::draw() protected
+ to enable inheritance and for consistency (STR #2834).
+ Note: both methods were private.
+ - Made Fl_Scroll::recalc_scrollbars() protected so that it can be used
+ in derived widgets to calculate scrollbar visibility and positions.
+ - Added Fl_Table::tab_cell_nav() for controlling Tab key navigation of table
+ - Added Fl_Tree::get_selected_items(), returns the selected items as an array
+ - Added Fl_Tree::item_draw_callback(), letting one define a custom draw
+ function for Fl_Tree_Item's.
+ - Fl_Tree: various related changes:
+ o Added horizontal scrollbar
+ o Separated draw() and tree size calculation
+ o Added new public methods:
+ > resize() -- uses optimized dim calc, avoids tree recalc
+ > next_item() -- added parameters: direction, visibility
+ > extend_selection() -- added parameters, improved algorithm
+ > calc_dimensions() -- calc tix/y/w/h, tox/y/w/h and scrollbars
+ > calc_tree() -- calc tree_w/tree_h
+ > recalc_tree() -- schedules calc_tree()
+ > first_visible_item(), last_visible_item(), next_visible_item()
+ > first_selected_item(), last_selected_item(), next_selected_item()
+ o Added protected variables:
+ > _tix/y/w/h -- tree widget 'inner' dimension
+ > _tox/y/w/h -- tree widget 'outer' dimension
+ > _tree_w,_tree_h -- entire tree hierarchy width/height
+ o Deprecated:
+ > item_clicked() -- use callback_item() instead
+ > first_visible() -- use first_visible_item() instead
+ > last_visible() -- use last_visible_item() instead
+
+ - Fl_Tree_Item: various related changes:
+ o Added Fl_Tree ptr: needed for auto-recalc when item modified directly
+ o Added new methods tree(), recalc_tree()
+ o Added new ctor that accepts Fl_Tree*
+ o draw() parameters changed to include tree size calculations
+ o Deprecated:
+ > ctor using Fl_Tree_Prefs parameter (Fl_Tree* version better,
+ and must be used for 1.3.3 ABI features to work correctly)
+ > next_displayed() -- use next_visible() instead
+ > prev_displayed() -- use prev_visible() instead
+ - test/tree: added tests for newly added features
+
+CHANGES IN FLTK 1.3.2 RELEASED: Dec 12 2012
- Removed unnecessary drawing calls (STR #2898)
- - Fixed regression in FLTK 1.3.1 for unbundled Mac OS FLTK applications that
- did not appear in dock nor have a menu bar (STR #2890).
+ - Fixed regression in FLTK 1.3.1 for unbundled Mac OS FLTK applications
+ that did not appear in dock nor have a menu bar (STR #2890).
- Fl_Table::clear() now calls table->clear() for consistency. (STR #2889)
- - Fixed Fl_Scroll widget that fails under Mac OS X 10.8 and retina display (STR #2887).
- - Prevents scrollbars from drawing when widget is sized too small to be visible (STR #2886).
- - Documented how to make a Mac OS X FLTK application launchable by dropping files on its icon.
- - Fixed a Mac-specific issue appeared with OS 10.8 (Mountain Lion): long delay before
- opening when the application is started by dragging a file on the application icon.
- - Fixed use of PNG image from im-memory data (STR #2884).
- - Added static Fl_RGB_Image::max_size(size_t) to limit the maximum memory size allowed to
- RGB images (STR #2881).
-
-CHANGES IN FLTK 1.3.1
+ - Fixed Fl_Scroll widget that fails under Mac OS X 10.8 and Retina
+ display (STR #2887).
+ - Prevents scrollbars from drawing when widget is sized too small
+ to be visible (STR #2886).
+ - Documented how to make a Mac OS X FLTK application launchable
+ by dropping files on its icon.
+ - Fixed a Mac-specific issue that appeared with OS 10.8 (Mountain Lion):
+ long delay before opening when the application is started by dragging
+ a file on the application icon.
+ - Fixed use of PNG image from in-memory data (STR #2884).
+ - Added static Fl_RGB_Image::max_size(size_t) to limit the maximum
+ memory size allowed to RGB images (STR #2881).
+
+CHANGES IN FLTK 1.3.1 RELEASED: Nov 06 2012
- Fixed utf_strncasecmp and utf_strcasecmp
- Moved all inline constructors into source file to avoid bad DLLs
@@ -38,8 +189,8 @@ CHANGES IN FLTK 1.3.1
(STR #2600)
- Improved the description of page size and orientation by
Fl_PostScript_File_Device.
- - Added support for horizontal wheel movement under X11 and MSWindows Vista
- and above (STR #2644).
+ - Added support for horizontal wheel movement under X11 and Windows
+ Vista and above (STR #2644).
1.3.1 ABI FEATURES
(To enable the following ABI features, put: #define FLTK_ABI_VERSION 10301
@@ -49,9 +200,9 @@ CHANGES IN FLTK 1.3.1
and support methods.
-CHANGES IN FLTK 1.3.0
+CHANGES IN FLTK 1.3.0 RELEASED: Jun 16 2011
- New Features
+ New Features
- Added UTF-8 Unicode support throughout FLTK and Fluid
- Added Fl_Tree widget for hierarchical views
@@ -64,7 +215,7 @@ CHANGES IN FLTK 1.3.0
- Moved OS X code base to the more modern Cocoa toolkit thanks
to the awesome work of Manolo Gouy (STR #2221)
- API and ABI compatibility to FLTK 1.1.x
+ API and ABI Compatibility to FLTK 1.1.x
- All strings are expected to be in UTF-8 Unicode encoding
- Replaced Fl_Scroll::position(int,int) with scroll_to(int,int)
@@ -75,7 +226,7 @@ CHANGES IN FLTK 1.3.0
- Updated the bundled libjpeg to v8c (released Jan 16, 2011)
- Updated the bundled zlib to v1.2.5 (released Apr 19, 2010)
- API enhancements and changes
+ API Enhancements and Changes
- Changed font index to 32 bit
- Changed font size to 32 bit
@@ -108,7 +259,7 @@ CHANGES IN FLTK 1.3.0
- Common dialogs like fl_message() and fl_ask() can now have a window
title (STR #2562).
- IDE support and command line build options
+ IDE Support and Command Line Build Options
- FLTK now supports Apple Xcode 3, MS VisualC 2008, and
MS VisualC 2010. MS VisualC 6 support is maintained as a
@@ -130,7 +281,7 @@ CHANGES IN FLTK 1.3.0
The new default is --without-links; use --with-links on
Unix/Linux only if you need the links (e.g. lowercase '.h')
- Fluid
+ Fluid
- Added argument-less constructor in Fluid Widget Class
- Added jpeg support to Fluid image() element
@@ -144,7 +295,7 @@ CHANGES IN FLTK 1.3.0
- Fixed Fluid textcolor output (STR #1992)
- Fixed wrong default value of Fl_Spinner in Fluid (STR #1991)
- Documentation
+ Documentation
- Added documentation for event delivery (STR #1983)
- Added Fl_Scroll::bbox() documentation (STR #1893)
@@ -154,7 +305,7 @@ CHANGES IN FLTK 1.3.0
- Fixed documentation for Fl_Progress (STR #2209)
- Fixed documentation (added missing COMCTL32.LIB dependency)
- Other Improvements
+ Other Improvements
- Added drag'n'drop support for Fl_Text_*
- Added visual feedback for button shortcuts (STR #2372)
@@ -194,7 +345,7 @@ CHANGES IN FLTK 1.3.0
- Changed Fl_Group and Fl_Scroll to resize themselves before
resizing their children (STR #2032)
- Bug Fixes
+ Bug Fixes
- Fixed potential crash in fl_xid() on Linux (STR #2635)
- Fixed keyboard navigation in fl_choice() (STR #2591)
@@ -279,7 +430,7 @@ CHANGES IN FLTK 1.3.0
- Fixed first modifier key event (STR #1952)
- Fixed Fl_Scroll inside Fl_Scroll (STR #265)
- Removed features
+ Removed Features
- Removed Watcom compiler support because it was introduced in
1.1.6 as a partial solution and never completed.
@@ -288,3401 +439,12 @@ CHANGES IN FLTK 1.3.0
- Removed support for gcc 2.x (or older)
- Removed redundant Fl_Group casts
-CHANGES IN FLTK 1.1.9
-
- - Improved color contrast in secondary selection blocks
- of Fl_Text_Display (STR #1917)
- - Fixed regression in callback handling (STR #1918)
- - Fixed wrong relative path when absolute path has a
- trailing slash in fl_filename_relative (STR #1920)
- - Fixed multiple selection of files and directories in
- Fl_File_Chooser (STR #1913)
- - Fixed MSWindows crash when selecting umlauts
- in Fl_Help_View (STR #1912)
-
-
-CHANGES IN FLTK 1.1.8
-
- - Documentation fixes (STR #1454, STR #1455, STR #1456,
- STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
- STR #1639, STR #1645, STR #1644, STR #1792, STR #1793,
- STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
- STR #1796, STR #1815, STR #1726, STR #1753, STR #1855,
- STR #1862, STR #1867, STR #1874, STR #1888)
- - Fixed library path in Makefile (STR #1885)
- - Fixed image read for partial regions on X11
- (STR #1716)
- - Fixed KDE/Gnome icon paths (STR #1795)
- - Fixed Tab key to wrap around menu bars (STR #1877)
- - Fixed possible timer leak in Scrollbar (STR #1880)
- - Added documentation about the potential limitations
- of Fl::grab on newer operating systems (STR #1747)
- - Fixed lockout when mixing popups and alerts
- (STR # 1869)
- - Fixed recursion crash in event handling (STR #1873)
- - Fixed missing return code in 'fltk-config' (STR #1875)
- - Fixed inconsistencies with CHANGED flags (STR #1719)
- - Fixed message sent to hidden widgets (STR #1849)
- - Fixed width calculation in Fl_Help_View (STR #1868)
- - Fixed offset bug in OS X pixmap code (STR #1856)
- - Fixed potential buffer overrun
- in Fl_Preferences (STR #1853)
- - Fixed method attributes in consecutive class
- declarations in FLUID (STR #1741)
- - FLUID checks for seperately declared callbacks to
- avoid a bogus "extern" declaration (STR #1776)
- - Added "protected" class memebrs in FLUID
- - Double-clicking a widget in a FLUID layout will show
- the item in the widget browser
- - Fixed color highlighting in Text_Display
- - Fixed 16 bit PNM image support (STR #1847)
- - Fixed exposure event on zero size windows (STR #1824)
- - Fixed overlay offset for OS X Quartz (STR #1729)
- - gl_font() support for Xft+X11 (STR #1809)
- - Fl_Gl_Window::mode() needed to hide and show the window
- when toggling stereo mode (STR #1846)
- - Fl_Gl_Window::show() did not work reliably on Mac OS X
- (STR #1707)
- - Added Fl_Group::clip_children() methods to support
- automatic clipping of child widget drawing (STR #1844)
- - Fl_Browser_ and friends now support FL_WHEN_ENTER_KEY
- for both Enter/Return and double-clicks (STR #1818)
- - Fl_Help_View did not release the images it used (STR
- #1817)
- - Shared libraries would not build on 64-bit Linux
- systems with an existing non-PIC FLTK installation
- (STR #1791)
- - Fl_Browser::hide() and Fl_Browser::show() did not
- correctly update the scrollbar (STR #1724)
- - The configure script now shows a summry of the
- configuration results (STR #1810)
- - "fltk-config --use-* --libs" did not list all of the
- dependent libraries (STR #1799)
- - Hiding a nested window on WIN32 caused 100% CPU (STR #1748)
- - Changing the window size in FLUID would not mark the
- project as modified (STR #1751)
- - Fixed fl_filename_isdir for "/"-path (STR #1761)
- - Fixed Fl_Chart drawing (STR #1756)
- - Fixed mapping of subwindows with unmapped parent
- windows (STR #1706)
- - Fixed rendering of grayscale images with alpha
- channel (STR #1703)
- - Fixed occasional incomplete refresh (STR #1681)
- - Improved fl_down, fl_frame, added fl_box (STR #1678)
- - Fixed selection of submenu items in
- input_choice (STR #1676)
- - Fixed calculation of stride for image scaling and
- color manipulation (STR #1673)
- - Made -O3 the default optimization on Cygwin/Mingw since
- -Os currently creates bad code (STR #1656)
- - OSF/Tru64 now uses 'install-sh' instead of 'install' to
- accomodate for a missing '-d' option (STR #1632)
- - New option in Fluid project settings to translate all
- shortcut modifiers from FL_META or FL_CTRL to FL_COMMAND
- - Made icon size fixed (50x50) in fl_message etc. (STR #1626)
- - Fixed selection of first word in Fl_Help_View
- - Fixed endless loop in Fl_Text_Display (STR #1655)
- - Allowing shortcuts in Tabs (STR #1652)
- - Fixed Makefile "make clean" (STR #1642,
- STR #1643, STR #1641)
- - The sample RPM spec file now enables large file support
- and threading support (STR #1603)
- - Changed minimum contrast between background and text to
- 99 and added more weight to the blue component to improve
- readability for certain color combinations (STR #1625)
- - Fixed VCNet OpenGL project file (STR #1617)
- - Fixed scrolling of clipped areas in MSWindows (STR
- #1601)
- - Fixed clipping in OS X Quartz offscreen buffers (STR
- #1595)
- - Now flush file chooser preferences after every change to
- avoid data loss (STR #1609)
- - The Fl_File_Chooser constructor now saves and restores the
- current group (STR #1611)
- - Added Fl::awake(fn*,void*) to set a handler for thread
- messages (STR #1536)
- - Added "mute sound" option to Sudoku game.
- - Updated the bundled zlib to v1.2.3.
- - Updated the bundled libpng to v1.2.16.
- - "make install" now uses the install command (or the
- included install-sh script) to copy files to the
- install directories, to ensure that permissions are
- correct.
- - Fixed DLL generation via MingW/Cygwin (STR #1546)
- - FLUID incorrectly opened the display when generating
- source code for Fl_Help_View widgets (STR #1318)
- - Fl_Double_Window did not always show the scheme
- background image.
- - Fixed first window behavior in OS X (STR #1548)
- - Fixed calculation of character widths for OS X
- Quartz rendering (no STR)
- - Fixed OS X mouse click handling (STR #1504)
- - Added missing GLUT functions so that FLTK can be used
- as a fairly complete C++ replacement for the original
- GLUT library (STR #1522)
- - Fl::awake() could block on X11 and OSX (STR #1537)
- - Updated recursive mutex code to run on platforms other
- than Linux and to do a run-time check to determine
- whether they are supported by the kernel (STR #1575)
- - WIN32 did check callbacks after the event processing instead of
- before as documented (STR #1535)
- - Fl_File_Chooser now hides the window before doing a callback
- when the user clicks on the OK button (STR #1565)
- - Fixed indentation of nested HTML elements (STR #1549)
- - Made layout of Fl_Help_Dialog consistent with other
- help windows and web browsers.
- - Improved GTK+ schemed round box (STR #1531)
- - Fluid avoids writing unsupported combinations of the
- "when()" flags (STR #1501)
- - Fl_Browser_ would allow keyboard callbacks even though
- "when()" was set to "never" (STR #1501)
- - Added automated little helpers to Sudoku
- - Added example code for Wizard with the
- Tabs demo (STR #1564)
- - Optimized Fl_Tabs drawing for speed (STR #1520)
- - OS X resource fork now obsolete (STR #1453)
- - Added chapter 10 about multithreading (STR #1532,
- 1533)
- - OS X system menu bar top level attribute support
- improved (STR #1505)
- - Fixed Quartz image drawing bug (STR #1438)
- - Fixed Quartz fl_read_image
- - Overlay drawing is now avoiding XOR mode (STR #1438)
- - Fixed Scroll crash in Fluid Live Mode (STR #1524)
- - Fixed mousewheel event propagation (STR #1521)
- - Fixed drawing issues of a tile in a scroll (STR #1507)
- - Fixed dismissing buttons in menu bars (STR #1494)
- - Making a child group visible in a Fl_Tabs or Fl_Wizard
- group now shows that tab or pane.
- - Added fl_open_uri() function as proposed on
- fltk.development.
- - Added Fl::has_check() which previously was prototyped
- and documented, but not implemented (STR #1542)
- - Enabled Fl::add_check() on OS X (STR #1534)
- - Documented tooltip inheritance (STR #1467)
- - Better event mouse handling fixing detached menus and
- sticky tooltips (STR #1463, STR #449)
- - Added Fl::scrollbar_size() methods that are used by all
- of the scrollbar-using widgets (STR #1500)
- - fl_read_image() was broken on Intel-based Macs (STR
- #1490)
- - Fl_Progress was using the wrong width to calculate
- progress (STR #1492)
- - Fl::x(), Fl::y(), Fl::w(), and Fl::h() did not report
- the desktop work area on X11 (STR #1482)
- - Shortcut events could be sent to the wrong window (STR
- #1451)
- - Fl_Spinner did not handle the arrow keys properly (STR
- #1476)
- - Fl_File_Browser did not calculate the width of
- directory items correctly (STR #1469, STR #1470)
- - Fl_Pack incorrectly started widgets at an offset of 1/2
- the spacing value.
- - FLUID did not generate correct window class code if
- the class name was not a standard FLTK window class.
- - FLUID incorrectly included <FL/Fl_classname.H> for
- widget classes that were not subclassed from a standard
- FLTK widget class.
- - The demo master test program now supports scheme
- selection and all demos use it (STR #1459)
- - fl_arc() and fl_pie() did not draw properly on WIN32
- when the start and end points were identical (STR
- #1461)
- - Fl_Input and Fl_Text_Editor now hide the mouse pointer
- when typing into them (STR #1466)
- - Implemented alpha blending for Quartz, WIN32, and X11
- - Check buttons did not redraw properly with box() set to
- FL_NO_BOX (STR #1440)
- - Added the Bluecurve-inspired scheme "gtk+".
- - Updated documentation (STR #1420, STR #1421)
- - Fixed font caching issue (STR #1415)
- - Fixed crash in fl_file_chooser (STR #1410)
- - Fixed Fluid hotspot bug (STR #1416)
- - Fixed image copy code (STR #1412)
- - Fixed latin-to-roman text conversion (STR #1411)
- - Fixed Cygwin timeout for "select" calls (STR #1151)
- - Improved Mac OS X subwindow handling (STR #1402)
- - Fixed more inconsistencies between fl_draw and
- fl_measure (STR #1408)
- - Fixed fl_measure which mistook a trailing '@@' for a
- symbol (STR #1406)
- - Fixed GLUT behavior on window creation (STR #1403)
- - Fixed OS X bug that would hide tooltips before they
- were shown (STR #1392)
- - Fixed Fl_Tabs tooltip reappearing (STR #1324)
- - Added a new demo game called "Block Attack!"
- - Updated the Sudoku game to show a notice about Hard and
- Impossible puzzles having multiple solutions which are
- not a bug or error (STR #1361)
- - Fixed filechooser to behave as documented when file
- pattern changes (STR #1359)
- - Completed the global function index and added an
- alphabetical list of all methods (STR #1319)
- - Avoiding problems with some platforms that don't
- implement hypot() (STR #1366)
- - Fixed floating point value formatting for Fl_Spinner
- (STR #1331)
- - Fixed Fl_Positioner callback when released (STR #1387)
- - Fixed WIN32 zero size window issue (STR #1387)
- - Fixed Sudoku window positioning (STR #1398)
- - Fluid Code Declarations can now handle C++ style
- comments (STR #1383)
- - Fixed uninitialized data in OS X and WIN32 timeout
- functions (STR #1374).
- - Fixed speed issues when measuring text on OS X with
- Quartz (STR #1386).
- - Fixed focus issues on OS X (STR #1377)
- - Optional precision argument when storing floats or
- doubles in a Preferences file (STR #1381)
- - Fixed callback not called when using arrow keys in
- Fl_Slider (STR #1333)
- - Changing the shortcut of a widget in fluid now marks the
- document as dirty (STR #1382)
- - Fl_Text_Editor now correctly handles middle mouse
- clicks (STR #1384)
- - Added some GLUT4 functions (STR #1370)
- - Added "context_changed()" function for OpenGL windows
- which allows efficient texture loading (STR #1372)
- - Added missing "const" to GLUT call (STR #1371)
- - Fixed stray FL_RELEASE events after clicking system
- areas on OS X (STR #1376)
- - FLUID now only writes definitions of "o" and "w"
- variables as needed, reducing the number of "variable
- is shadowed" warnings from GCC.
- - Added access to Xft font pointer (STR #1328)
- - Fixed endianness in OS X mouse cursor graphics (STR
- #1348)
- - Fixed crash on mixed use of keyboard and mouse for
- Fl_Menu_Button (STR #1356)
- - Fixed Fl_Window::visible() and shown() for OS X
- (STR #1341)
- - Fixed Fl_Window::copy_label() losing copy (STR #1332)
- - Documentation fixes (STR #1336, STR #1329, STR #1339,
- STR #1340)
- - Added support for floating point Fl_Spinner in the
- API, documentation, and Fluid (STR #1331)
- - Repeat button now cancels timeout if it should get
- deactivated during a callback (STR #1330)
- - Added support for assigning Fl_Menu_Items to array
- variables in Fluid (STR #1280)
- - Added --with-archflags configure option to allow
- passing of specific architecture-selection options to
- the compiler and linker.
- - Fixed WIN32 window stacking bug (STR #1296)
- - Fixed wrong code generated by FLUID for Scrollbars (STR
- #1287)
- - Loading a file would not update the Widget Properties
- dialog in FLUID (STR #1326)
- - Fixed key compose sequences for shifted keys (STR
- #1194)
- - Added text selection and copy to Fl_Help_View.
- - Fixed position of popup menu titles (STR #1322)
- - Showing any window will disable the current tooltip
- so it won't pop over menus (STR #1321)
- - Updated documentation to reflect limitation of
- Fl::delete_widget() (STR #1306)
- - Fixed line wrapping in Fl_Text_Display (STR #1227)
- - New function Fl::event_original_key() returns key code
- before NumLock handling.
- - Many OS X Quartz fixes (STR #1310, etc.)
- - Fixed shortcut and default focus for message dialogs
- (STR #1298)
- - Fixed focus issues (STR #1286, STR #1289, STR #1296)
- - Fixed window resizing in OS X (STR #1297)
- - In FLUID, declarations starting with the keyword
- 'typedef', 'class', or 'struct' are now treated
- correctly if inside a class (STR #1283)
- - Tabs now show the correct tooltip (STR #1282)
- - Included fltk.spec in configure.in (STR #1274)
- - Fixed insufficiently invalidated cache
- in Fl_Browser (STR #1265)
- - Attempt to fix multi monitor issues (STR #1153)
- - Fixed warnings when compiling w/Cygwin (STR #1152)
- - Fixed missing reset of flag in FLUID (STR #1187)
- - Fixed maximizing in OS X (STR #1221)
- - Fixed 'make distclean' to remove binaries inside
- MacOS app packages (STR #1169)
- - FLUID Code Viewer is now truly a viewer, not a text
- editor because edited text can not be saved.
- - Fl_Spinner is now fully supported by FLUID (STR #1158)
- - Fixed usage of deleted object after menu pulldown
- (STR #1162)
- - Calling fl_font(0, 0) under Xft would access a NULL
- pointer (STR #1205)
- - Setting a new value in Fl_Input_ wil now actually move
- cursor to the end of the input field as documented
- (STR #1161)
- - FLUID crashed on WIN32 with international characters
- (STR #1176)
- - Fl_Check_Browser did not allow the user to toggle the
- check boxes (STR #1232)
- - Fl_Help_View crashed on WIN32 with international
- characters (STR #1228)
- - Fl::run() no longer clears resources on WIN32 (STR
- #1231)
- - Fl::add_timeout() leaked resources on OSX (STR #1233)
- - Accented characters could not be entered on OSX (STR
- #1195)
- - The caret key lookup was missing for OS X
- - FLUID didn't handle loading .fl files with
- international characters properly with all compilers
- (STR #1150)
- - Fl_Spinner's minimum() and maximum() "get" methods were
- misspelled (STR #1146)
- - The largefile support changes in 1.1.7 broke binary
- compability for fl_filename_list(); you must now use
- "--enable-largefile" when configuring to get large file
- support, and the large file support definitions are
- added to the output of "fltk-config --cflags" (STR
- #1159)
-
-
-CHANGES IN FLTK 1.1.7
-
- - Documentation fixes (STR #571, STR #648, STR #692, STR
- #730, STR #744, STR #745, STR #931, STR #942, STR #960,
- STR #969)
- - Various menu widget fixes (STR #1140, STR #1143, STR
- #1144)
- - The threads demo would display negative prime numbers
- on MacOS X; this appears to be a MacOS X bug, but we
- added a workaround to "fix" this (STR #1138)
- - Fl::dnd() now sets the content type of the drag to
- "text/uri-list" when it sees the dragged text is
- composed of URIs.
- - Fixed keyboard shortcut handling in FLUID and shortcut
- labeling in FLTK (STR #1129)
- - Fixed include path for CMake build (STR #1123)
- - Fixed unnecessary delay in WIN32 event handling
- (STR #1104)
- - Fixed handling of Ctrl-C in Fl_Text_Display (STR #1122)
- - OS X Quartz version now draw a nice resize control (STR
- #1099)
- - FLTK now enables large file support when available (STR
- #1087)
- - Fl_Clock_Output depended on a time value that was the
- same as an unsigned long, which is incorrect for WIN64
- and VC++ 2005 (STR #1079)
- - Fl_Text_Display::wrap_mode() would crash if no buffer
- was associated with the widget (STR #1069)
- - Updated the default label and text colors of all widgets
- to use FL_FOREGROUND_COLOR instead of FL_BLACK (STR
- #1052)
- - Fl::set_fonts() now works with Xft (STR #1012)
- - Fl_Value_Input now uses the screen-absolute position
- instead of the window-relative position when dragging
- the value; this avoids some jumping conditions (STR
- #1037)
- - Menus now pop up fully inside the screen if possible
- (STR #973)
- - Fixed illegal access in Preferences (STR #1025)
- - Fixed x-offset problem in Help_Widget (STR #998)
- - Clipboard will persist if owner window is hidden (STR
- #1019)
- - Fixed handling of Win32 Device Contexts (STR #1007)
- - Fixed C++ style comments in C files (STR #997)
- - Fixed signedness of scanf() argument (STR #996)
- - Fixed cross-compiling problem (STR #995).
- - FLUID now knows if a static callback is already
- declared in a class and won't declare it 'extern' (STR
- #776)
- - Some actions in FLUID would not set the "changed" flag
- (STR #984, STR #999)
- - fl_filename_list now always appends a forward slash to
- directory names (STR #874)
- - Multiline Input will update right if a space character is
- inserted in word wrap mode (STR #981)
- - FLUID group labels redraw correctly (STR #959)
- - FLUID now updates color of Fl_Tabs children (STR #979)
- - FLUID now supports 'size_range()' (STR #851)
- - FLUID selection boxes now synchronised (STR #964)
- - fl_filename_list() now recognizes pathnames without
- trailing slash as directions (STR #854)
- - Fl_Text_Display now auto-scrolls in all
- directions (STR #915)
- - Borderless windows will not show in the taskbar anymore
- on X11 (STR #933)
- - Fixed event_text() field on FL_DND_* event on
- OS X and WIN32 (STR #968)
- - The fltk-config utility now supports "--cc" and "--cxx"
- options to get the C and C++ compilers that were used
- to compile FLTK (STR #868)
- - Fl_Valuator-derived widgets could show more digits than
- were necessary (STR #971)
- - Fl_GIF_Image did not handle images with an incorrect
- number of data bits (STR #914)
- - Fixed some plastic drawing artifacts (STR #906)
- - Fl_Help_View now draws the box outside the scrollbars,
- like the other scrollable widgets (STR #871)
- - The fltk-config script now handles invocation via a
- symlink (STR #869)
- - Updated WIN32 cut/paste code to consistently handle DOS
- text (STR #961)
- - Added shared library support for Cygwin and MingW (STR
- #893)
- - Fl_File_Chooser did not implement the user_data()
- methods (STR #970)
- - Compilation could fail if a previous installation of
- FLTK was in the same (non-standard) directory as an
- image library (STR #926)
- - Fixed OSX compilation problems with non-HFS filesystems
- (STR #972)
- - Problems with CMake on MinGW have been solved, thanks
- to Mr. "fltk.x0", who submitted the patch. (STR #863)
- - Fixed memory leak in Fl_Check_Browser reported by
- "miguel2i". (STR #967)
- - Fl_File_Input could draw in the wrong window (STR #958)
- - WIN32: Internal WM_PAINT message now ignored (STR #831)
- - Added Windows support for Fl_Window::xclass() (STR #848)
- - Floating point input field allows characters from
- current locale (STR #903)
- - Fixed integration of Fl_Input_Choice into FLUID (STR
- #879)
- - New windows touching the right screen border would be
- positioned all the way to the left (STR #898)
- - Made pie drawing size for WIN32 and OS X the same as
- X11 (STR #905)
- - Fixed OS X issue with OpenGL windows inside of Tabs
- (STR #602)
- - FLUID Code Editor would occasionally not draw the last
- character in the buffer (STR #798)
- - FLUID Declaration private flag fixed (STR #799)
- - FLUID overlay now shows a seperate bounding box of
- selected items with correct handles and a dotted
- boundig box for all labels (STR #790)
- - Fixed left overhang of large chracters in Fl_Input_
- (STR #941)
- - Fixed button resizing in File Chooser (STR #884)
- - Fixed FLUID redraw issue (STR #912)
- - Added 32bit BMP Image file format support (STR #918)
- - Value Sliders would not receive focus when clicked on
- (STR #911)
- - Added redraw of some widgets to show focus change (STR
- #910)
- - Fl::set_font would not clear 'pretty' name (STR #902)
- - Fixed unescaped '@' in fonts demo (STR #867)
- - FLUID should not open the Display connection anymore if
- creating code only (STR #904)
- - Improved hidden copy / ctor implementation (STR #860)
- - Increased matrix stack depth and added over/underflow
- error (STR #924)
- - Reverted Mac Carbon Clipping simplification that broke
- subwindow clipping (STR #908, SVN r4386)
- - Fixed bitmap scaling code
- - Fixed tiny memory leak (STR #878)
- - Fixed hang on corrupt jpeg (STR #915)
- - Fixed static allocation of font buffer in demo (STR #909)
- - Added symbols 'refresh', 'reload', 'undo', and 'redo'.
- - Fixed focus loss on Fl_Window:resize()
- - Fl::delete_widget would hang fl_wait after deleting the
- window (STR #679)
- - Fl::paste would sometimes not recoginze external
- changes of the clipboard (STR #722)
- - Clipping fixes for OSX
- - Removed attempt to find items via
- Fl_Menu_::find_item() in linked submenus
- - FLUID interactive window resizing fixes (STR #873, 791)
- - FLUID panel resize and alignment fixes (STR #891)
- - Fl_Window::show(argc, argv) now sets the scheme before
- showing the window; this should eliminate any
- flickering between the standard and plastic schemes on
- startup (STR #886)
- - Selected tabs are now drawn slightly larger than
- unselected tabs so they stand out more (STR #882)
- - Round Plastic boxes now draw round (STR #841)
- - FL_PLASTIC_DOWN_BOX drew with artifacts (STR #852)
- - Changed initializations on WIN32 (STR #862)
- - Fl_Preferences::getUserdataPath() didn't work for
- sub-groups (STR #872)
- - Fixed some redraw issues on Windows XP.
- - FLUID didn't set the initial size of widgets properly
- (STR #850)
- - Fl_Tabs would steal focus away from its children on a
- window focus change (STR #870)
- - filename_relative() now converts the current directory
- to forward slashes as needed on WIN32 (STR #816)
- - Fl_File_Chooser::value() and ::directory() now handle
- paths with backslashes on WIN32 (STR #811)
- - Added the standard rgb.txt file from X11 to the test
- directory, allowing all platforms to try the colbrowser
- demo (STR #843)
- - Resizing of OpenGL subwindows was broken on OSX (STR #804)
- - The fltk-config script now supports running from a
- source directory (STR #840)
- - Fl_Browser_ didn't update the position properly when an
- item was deleted (STR #839)
- - fl_contrast() now compares the luminosity of each color
- (STR #837)
- - Fl_Input_ crashed on some platforms when wrapping
- international text characters (STR #836)
- - Fixed some BMP images loading bugs (STR #825)
- - Fl_File_Chooser now returns directory names with a
- trailing slash to avoid problems with relative
- filenames (STR #819)
- - Fl_Help_View now supports the FONT and U elements (STR
- #815)
- - OpenGL windows that were completely off-screen caused
- problems with some graphics cards on WIN32 (STR #831)
- - Multiple screen support didn't work on Windows NT and
- 95 (STR #821)
- - Fl_Scrollbar didn't compute the correct knob size when
- using the "nice" types (STR #845)
- - fl_draw() would segfault on WIN32 if no font was set;
- it now uses the default font (STR #828)
- - Fl_Browser_ was calling the callback multiple times for
- a single selection change with FL_WHEN_CHANGED (STR
- #834)
- - Added "filenew", "fileopen", "filesave", "filesaveas",
- and "fileprint" symbols with standard toolbar
- symbology.
- - Updated Fl_Tabs to check the contrast of the label
- color against the tab background, and to highlight the
- top 5 lines of the tab pane with the selection color so
- that selected tabs stand out more.
- - The example programs can now compile separate from the
- FLTK source distribution (STR #809)
- - The example programs are now installed with the
- documentation (STR #809)
- - Fixed the drawing of the Fl_Browser_ selection box (STR
- #786)
- - Dropped Codewarrier project files and support.
- - The FLTK string functions are now compiled in on all
- systems (STR #774)
- - Fixed symbol demo label bug (STR #777)
- - Fixed position of menu titles (STR #795)
- - Added missing Fl_Window::copy_label() method.
- - Fixed wrong tooltip in FLUID (STR #784)
- - Added zlib path to FLUID (STR #783)
- - Menus and other pop-up windows now obey screen
- boundaries on multi-screen displays (STR #781)
- - Fl_Chart would draw outside its bounding box (STR #780)
- - Added Fl::screen_count() and Fl::screen_xywh() APIs to
- support multi-screen displays.
- - FLUID now supports direct creation of widget classes.
- - Fl_File_Chooser now correctly handles multiple
- selections that are a mix of files and directories.
- - Fl_File_Chooser no longer resets the type() when
- choosing a single file, and it now works when selecting
- multiple directories (STR #747)
- - Fl_File_Icon::load_system_icons() now only loads 16x16
- and 32x32 icon images to improve startup performance.
- - Pressing Enter in the file chooser when selecting a
- directory will choose that directory if it is currently
- shown (STR #746)
- - Added a fl_file_chooser_ok_label() function to set the
- "OK" button label for the fl_file_chooser() and
- fl_dir_chooser() functions.
- - Added Fl_File_Chooser::ok_label() methods to set the
- "OK" button label.
- - The fl_ask() function is now deprecated since it does
- not conform to the FLTK Human Interface Guidelines.
- - The Fl_File_Chooser window now properly resizes its
- controls (STR #766)
- - The Fl_Help_Dialog window now properly resizes its
- controls (STR #768)
- - The Fl_File_Chooser favorites window is now resizable
- (STR #770)
- - Now provide FL_PLASTIC_ROUND_UP/DOWN_BOX box types
- which are used by the plastic scheme.
- - FLUID windows that are resized through the widget panel
- now remain resizable by the window manager.
- - Increased the size of the background image used by
- the plastic scheme to reduce the CPU load of redraws
- (STR #769)
- - Fixed a syntax highlighting bug in the editor demo.
- - Fl_Progress now contrasts the label color with the bar
- color, so labels will be readable at all times.
- - fl_read_image() didn't use the right red, green, and
- blue masks on XFree86.
- - Fixed Quickdraw drawing of 3 and 4 sided polygons (STR
- #765)
- - Fixed fl_message() code so that it does not get
- accidentaly addded to the current group (STR #253)
- - FLUID now highlights code in the widget callback and
- code editors.
- - FLUID now supports printing of windows.
- - Fixed inactive drawing of border, embossed, and
- engraved box types.
- - Added Fl_Spinner widget (another combination of
- existing widgets in a header file)
- - FLUID now provides support for UI templates.
- - fl_not_clipped() incorrectly used the current window
- dimensions for gross clipping, which interfered with
- off-screen rendering.
- - Fl_Window::draw() and Fl_Window::iconlabel() could leak
- memory if copy_label() was used on the window.
- - fl_shortcut_label() now shows letter shortcuts in
- uppercase, e.g. "Ctrl+N" instead of "Ctrl+n" to be
- consistent with other toolkits.
- - FLUID now provides unlimited undo/redo support.
- - FLUID now provides an option to choose which scheme
- (default, none, plastic) to display.
- - Fixed scheme background issue with windows in FLUID.
- - In FLUID, new widgets are now created with the ideal
- size by default, and menu bars are positioned to use
- the entire width of the window.
- - Added Layout/Widget Size submenu to select default
- label and text size (Tiny, Small, and Normal).
- - Added Edit/Duplicate command to FLUID to duplicate the
- current selection.
- - FLUID now tracks the current state of the widget bin
- and overlays.
- - Now fill the widget image paths with relative
- filenames.
- - Fixed frame drawing of Fl_Text_Display (STR #762)
- - Fl_Clock_Output::value() did not return the previously
- set value (STR #748)
- - Added comment type to FLUID. This is useful for
- generating copyright notices in the source and header
- files.
- - Fl_Valuator would not format text output with decimal
- point when the step value was fractional, but above 1.
- - fl_filename_relative() didn't compare drive letters in
- a case-insensitive way (STR #741)
- - Fixed menu item width calculations with symbols (STR
- #740)
- - The keyboard shortcut handling code did not handle
- 8-bit characters properly (STR #731)
- - Fl_JPEG_Image could still crash an app with a corrupt
- JPEG file (STR #739)
- - Using the layout alignment controls on a menu widget
- would cause FLUID to crash (STR #742)
- - Added QNX bug workaround for menu handling (STR #704)
- - Added Greg Ercolano's simple Fl_Input_Choice widget
- which is a combination of the Fl_Input and
- Fl_Menu_Button widgets (STR #650)
- - Fl_Multiline_Input now scrolls the full height of the
- widget instead of 5 lines when the user presses PageUp
- or PageDown (STR #727)
- - CMake build fixes (STR #724)
- - Fl_Browser::swap() didn't handle redraws properly when
- the swapped lines had different heights (STR #729)
- - FL_MOUSEWHEEL events are now sent first to the widget
- under the mouse pointer and then to the first widget
- which accepts them. This is similar to the way
- shortcut events are handled and is consistent with the
- way the mouse wheel is handled by other toolkits.
- - Fl::wait() could block on WIN32 if the window was
- deleted via Fl::delete_widget() (STR #679)
- - Fl_Preferences::RootNode did not find the user's home
- directory on some non-US versions of Windows (STR
- #720)
- - Fl_Window::hide() didn't delete the current clipping
- region on WIN32, causing a GDI resource leak in some
- situations (STR #723)
- - Removed a few warnings when compiling on OS X
- - Fl_Menu now draws the arrow more like other toolkits
- and 2.0 (STR #651)
- - Fixed a VC++ compiler error in Fl_JPEG_Image.cxx (STR
- #676)
- - FL_SHADOW_BOX/FRAME drew outside of the bounding box
- (STR #694)
- - Fl_Widget::copy_label(NULL) didn't work (STR #707)
- - Fl_Choice now allows click selection like
- Fl_Menu_Button and Fl_Menubar (STR #706)
- - Updated cmake support (STR #645)
- - Fl_Check_Browser didn't draw properly when inactive
- (STR #681)
- - Removed some redundant code in Fl_Group::handle() (STR
- #669)
- - The file chooser didn't always deactivate the OK
- button when necessary (STR #653)
- - Image drawing on OSX changed the current drawing
- colors (STR #662)
- - Fixed some compiler errors on WIN32 (STR #647, STR
- #726)
- - FLUID didn't update the widget panel X/Y/W/H values
- when moving the selected window (STR #701)
- - FLUID didn't use the label type constant names for
- menu items, causing them to be drawn using the normal
- label type (STR #668)
- - Fl_File_Chooser was slow with large directories (STR
- #654)
- - FLUID didn't add xclass() calls to windows (STR #718)
- - The X11 DND code did not correctly select a text
- format for incoming data (STR #711)
- - Fixes to Fl_JPEG_Image error handler.
- - Fl_Menu::popup() and ::pulldown() would crash an
- application if a callback created widgets before they
- returned (STR #685)
- - Fl_Double_Window would cause a full redraw, even if
- only small parts of the UI were changed on Mac OS X.
- - Fl_JPEG_Image did not correctly handle errors reported
- by the JPEG library (STR #652)
- - Fl_Menu now draws sub-menu arrows like other toolkits
- and FLTK 2.0 (STR #651)
- - Fixed a compiler warning in Fl_Window.H (STR #641)
- - Tooltips disabled shortcut processing (STR #643)
- - Fl::event_number() didn't always match the value sent
- to the handle() method (STR #634)
- - Fl_Shared_Image::reload() didn't set the image_
- pointer properly in all cases (STR #632)
- - Fl_Help_View::topline() incorrectly set the changed()
- flag (STR #631)
- - Fl_Choice::value() now supports NULL or -1 to deselect
- the current item (STR #637)
- - More VC++ 6 project file fixes (STR #638)
- - Added missing Watcom makefile in the test directory
- (STR #636)
- - Fl_Text_Display::word_left would hang if the cursor
- was at position 0 (STR #635)
-
-
-CHANGES IN FLTK 1.1.6
-
- - Documentation updates (STR #552, STR #608)
- - Added the 2.0 Fl_Widget::copy_label() method to
- allow FLTK 1.x applications to have their label
- strings managed by FLTK (STR #630)
- - Added Fl::delete_widget() method to safely delete
- widgets in callback methods (STR #629)
- - Fl_Widget::damage(uchar,int,int,int,int) didn't clip
- the bounding box properly (STR #626)
- - Windows could appear on the wrong screen on OSX (STR
- #628)
- - Fl_Double_Window produced an error on resize with X11
- - FLUID didn't display menu items using images properly
- (STR #564)
- - Fl_Sys_Menu_Bar didn't compile on case-sensitive
- file-systems (STR #622)
- - FLUID didn't handle default function parameters
- properly (STR #579)
- - Moving or resizing widgets in FLUID didn't always
- update the widget panel (STR #600)
- - FLTK windows could appear off-screen on X11 (STR #586)
- - The configure script did not support
- --disable-localfoo to completely disable image file
- support (STR #582)
- - The Visual C++ 6.0 project files still listed the old
- JPEG, PNG, and ZLIB library names (STR #577)
- - Fixed the scandir() conditional code for HP-UX 11i
- (STR #585)
- - Fl_Text_Display didn't support CTRL/CMD-A/C (STR #601)
- - Watcom fixes (STR #581, STR #584, STR #594, STR #595,
- STR #623, STR #627)
- - Fixed library include order when building DSOs on
- MacOS X (STR #596)
- - fl_xid() could cause a WIN32 application to crash (STR
- #560, STR #576, STR #618)
- - Fl_Browser::remove_() removed the item from the list
- before computing the item height, which caused
- problems with some programs (STR #613)
-
-
-CHANGES IN FLTK 1.1.5
-
- - Documentation updates (STR #568, STR #570)
- - Shortcuts were incorrectly underlined in multi-line
- labels (STR #566)
- - More CMake updates (STR #499)
- - The Watcom C++ compiler needed a small change (STR
- #567)
- - Added DESTDIR support and now remove all man pages for
- the "uninstall" target (STR #545)
- - Fix PNG drawing on buggy WIN32 graphics cards (STR
- #548)
- - The configure script didn't propagate the CPPFLAGS
- environment variable (STR #549)
- - The numpad keys didn't work properly on WIN32 (STR
- #502)
- - fl_input() and friends now set the input focus to the
- text field when the dialog is shown (STR #553)
- - Fixed background color mixup when drawing Fl_Choice
- menus (STR #544)
- - Fixed MingW makefiles (STR #550)
- - More VC++ project file tweaking (STR #559)
- - Fl_PNG_Image didn't use the png_set_trns_to_alpha
- function when available (STR #547)
- - The FL_UNFOCUS event wasn't always sent when switching
- tabs (STR #558)
-
-
-CHANGES IN FLTK 1.1.5rc3
-
- - Documentation updates (STR #505, STR #513)
- - Updated PNG library source to 1.2.7.
- - Updated ZLIB library source to 1.2.1.
- - Fixed VC++ project file problems (STR #476, STR #478,
- STR #520, STR #527, STR #537)
- - Now look for 8 bits of alpha when the developer has
- requested FL_RGB8 (STR #541)
- - The last line in an Fl_Help_View widget was not
- aligned properly (STR #536)
- - The "search" symbol looked like a Q (STR #536)
- - Changed Fl_Help_View::get_color() to use a lookup
- table to avoid serious Borland C++ 5.5 compiler bugs
- (STR #533)
- - Fixed Watcom compiler warnings with FL/Fl_Widget.H
- (STR #540)
- - The image class copy() methods did not always make a
- separate copy of the image data (STR #539)
- - Fixed an edge case in fl_old_shortcut() that could
- cause it to read beyond then end of the shortcut
- string (used for XForms named shortcuts)
- - Added (unsupported) CMake files (STR #499)
- - Tooltips would not reappear on the same widget, and
- the initial tooltip delay was not used after a tooltip
- was shown (STR #465)
- - Fixed a compile problem with the Linux 2.6 threading
- support (STR #483)
- - Fixed problems with 2-byte Xpm files on 64-bit
- platforms (STR #525)
- - FLTK didn't handle the ReparentNotify event on X11
- (STR #524)
- - The old source file "fl_set_gray.cxx" is not needed
- (STR #516)
- - Fl_Text_Display still called delete[] instead of
- free() in one place (STR #503)
- - The symbol test program did not handle the @+ symbol
- properly (STR #490)
- - Fl_File_Chooser didn't correctly call isprint() and
- isspace() when checking to see if the current file was
- text that can be previewed (STR #517)
- - FLUID didn't compile with Borland C++ due to a
- compiler bug (STR #496)
- - Fl_Positioner did not handle reversed min and max
- values (STR #510)
- - fl_descent(), fl_height(), and fl_width() would crash
- a program if you didn't call fl_font() first; they now
- return -1 if no font is set (STR #500)
- - Added test/unittests to verify pixel drawing and
- alignment across platforms
- - Fl_Menu_::find_item() didn't determine the menu path
- properly (STR #481)
- - The build system now installs image library header
- files in FL/images/filename.h so that FLTK programs
- will use the same header files as the FLTK image
- libraries.
- - The build system now creates image libraries named
- "libfltk_name.a" instead of "libname.a" to avoid
- clobbering an existing installed library (STR #480)
-
-
-CHANGES IN FLTK 1.1.5rc2
-
- - Documentation updates (STR #365, STR #399, STR #407,
- STR #412, STR #414, STR #452, STR #462)
- - Fl_Text_Display did not handle drawing of overlapping
- text (italic next to plain, etc.) properly (STR #381)
- - All of the core widgets now consistently set changed()
- before calling the callback function for a change in
- value; this allows programs to check the changed()
- state in a callback to see why they are being called
- (STR #475)
- - Fl_File_Chooser did not handle some cases for filename
- completion (STR #376)
- - Fl_Help_View didn't properly compute the default
- maximum width of the page properly, resulting in
- non-wrapped text in table cells (STR #464)
- - Fl_Text_Editor no longer tries to emulate the Emacs
- CTRL-A shortcut to move to the first column, since
- there is a key for that and the widget does not
- emulate any other Emacs keys (STR #421)
- - Fl_File_Chooser always disabled the OK button when the
- user pressed DELETE or BACKSPACE (STR #397)
- - Added Fl_Browser::swap() methods (STR #459)
- - Fl_Counter didn't use a thin down box for the text
- field if the box type was set to FL_THIN_UP_BOX (STR
- #467)
- - Fl_Help_View now resets the scrollbars if they go
- outside the current view (STR #464)
- - fl_dir_chooser() did not show the previous selection
- as documented (STR #443)
- - Fl_Text_Display used delete[] instead of free() in
- some places (STR #466)
- - FLTK now includes copies of the PNG, JPEG, and ZLIB
- libraries for platforms that do not have them (STR
- #441)
- - The fltk-config script did not include the
- "-mno-cygwin" option under CygWin (STR #434)
- - Fl_Help_View::find() did not check for a NULL value
- (STR #442)
- - Added search symbol to the search field of
- Fl_Help_Dialog (STR #417)
- - Added two new symbols, @search and @FLTK, which can be
- used in labels.
- - MacOS X: fixed NumLock mixup, added support for
- FL_Menu and FL_Delete keys on external (PC) keyboards
- (STR #445)
- - Fl_File_Icon::draw() did not support drawing of complex
- polygons in icon descriptions (STR #474)
- - The configure script now offers options for JPEG, PNG,
- and ZLIB libraries (STR #416)
- - The first menu item in a list would not go invisible
- (STR #406)
- - Fl_Text_Buffer::replace() now range checks its input
- (STR #385)
- - FLTK now builds with the current release of MinGW (STR
- #325, STR #401, STR #402)
- - FLTK now honors the numlock key state (STR #369)
- - The Fl_Text_Display widget did not redraw selections
- when focus changed (STR #390)
- - The plastic background image is now less contrasty
- (STR #394)
- - Fl_Scroll now uses a full redraw when the scheme is
- set to plastic and the box type is a frame (STR #205)
- - Fl_Window::resize() did not work properly with KDE 3.2
- (STR #356)
- - FLTK didn't delete font bitmaps when the last OpenGL
- window was deleted, preventing future text from
- displaying (STR #310)
- - FLUID didn't include a full initialization record for
- the trailing NULL menu items (STR #375)
- - Fl_Browser::item_width() did not properly handle
- format modifiers (STR #372)
- - Fl_Browser::item_height() did not handle columns
- properly (STR #371)
- - Fl_Gl_Window's on WIN32 now prefer accelerated pixel
- formats over generic formats (STR #382)
- - Fl_Window::resize() did not work on some systems if
- the window was not shown (STR #373)
- - FLUID did not write the user_data type if the
- user_data field was empty (STR #374)
- - The value(const Fl_Menu_Item*) method was not
- implemented for Fl_Choice (STR #366)
- - Fl_Pack didn't draw child widget labels the same way
- as Fl_Group, causing display problems (STR #360)
- - fl_read_image() didn't work when reading from an
- offscreen buffer with some X11 servers (STR #364)
-
-
-CHANGES IN FLTK 1.1.5rc1
-
- - Documentation updates (STR #186, STR #245, STR #250,
- STR #277, STR #281, STR #328, STR #338)
- - fl_scroll() did not handle scrolling from off-screen on
- WIN32 (STR #315)
- - Fl_File_Chooser did not allow manual entry of a drive
- letter (STR #339)
- - Fl_Menu now uses the boxtype to redraw the menu
- background (STR #204)
- - Fl_Scroll now shows the background image when a framed
- box type is used and the Fl_Scroll is a direct
- decendent of a window (STR #205)
- - Added a new_directory_tooltip string pointer to allow
- localization of the file chooser's new directory
- button (STR #340)
- - Added Fl_Menu_::find_item() method (STR #316)
- - The Fl_Widget copy operator definitions were not
- conditionally compiled properly (STR #329)
- - FLUID's Layout functionality did not move child
- widgets when laying out group widgets (STR #319)
- - FLUID's Layout->Center In Group functionality did not
- properly handle widgets that were children of a
- Fl_Window widget (STR #318)
- - The Fl_Text_Display destructor did not remove the
- predelete callback associated with the current buffer
- (STR #332)
- - Fixed several bugs in the MacOS X Fl::add_fd()
- handling (STR #333, STR #337)
- - The Fl_Text_Display widget did not display selections
- set by the application (STR #322)
- - FLUID crashed if you did layout with a window widget
- (STR #317)
- - Fl_Scroll::clear() didn't remove the child widget from
- the Fl_Scroll widget (STR #327)
- - Fl_Value_Slider::draw_bg() didn't always apply the
- clipping rectangle (STR #235)
- - fl_filename_relative() returned the wrong string if
- the absolute pathname was equal to the current working
- directory (STR #224)
- - Fl_Help_Dialog didn't correctly restore the scroll
- position when going forward/back in the link history
- if the file changed (STR #218)
- - glutGetModifiers() did not mask off extra state bits,
- confusing some GLUT-based applications (STR #213)
- - Fixed mouse capture problems on MacOS X (STR #209, STR
- #229)
- - Fl_Sys_Menu_Bar is now built into the library for
- MacOS X (STR #229)
- - Fl_Menu_ now provides item_pathname() methods to get
- the "pathname" of a menu item, e.g. "File/Quit" (STR
- #283)
- - Fl_Text_Display now provides cursor_color() methods to
- get and set the cursor color (STR #271)
- - Fl_Scroll didn't honor FL_NO_BOX (STR #305)
- - FLUID declaration blocks didn't support public/private
- definitions (STR #301)
- - Fl_Preferences incorrectly created the preferences
- directory before necessary (STR #247)
- - The WIN32 project files still defined the (obsolete)
- FL_STATIC constant (STR #279)
- - Fl_Text_Display::buffer() did not support NULL values,
- making it impossible to clean up text buffers from a
- subclass (STR #295)
- - Fl_Text_Display did not support a NULL
- unfinishedStyleCB function (STR #241)
- - Fl::background2() incorrectly marked the foreground
- color as initialized (STR #255)
- - Fixed the X11 CTRL + "-" detection code to properly
- track the state of the CTRL key (STR #264)
- - Fl_File_Icon::load_system_icons() didn't support KDE
- 3.x (STR #299)
- - WIN32's scandir() emulation did not allocate enough
- memory for directory names (STR #263)
- - Fl::compose() did not handle special keys like
- backspace properly (STR #293)
- - Fl_Choice did not clip its text when drawing using the
- plastic scheme (STR #287)
- - Fl_Group incorrectly mapped the emacs CTRL keys to
- keyboard navigation (STR #228)
- - Fl_File_Browser::load() didn't handle a NULL directory
- name (STR #266)
- - 64-bit library fixes (STR #261)
- - The Fl_Valuator::format() function did not limit the
- size of the number buffer (STR #268)
- - The keypad Enter key works as the normal Enter/Return
- key in common widgets (STR #191)
- - Fixed some OS/2-specific build problems (STR #185, STR
- #197)
- - Calling Fl_Text_Display::buffer() with the same buffer
- would cause an application to lockup (STR #196)
- - Some of the widgets could crash an application if the
- cursor was changed after a window was deleted (STR
- #181)
- - The Fl_Gl_Window WIN32 pixel format code did not
- choose the pixel format with the largest depth buffer
- (STR #175)
- - The configure script didn't leave space between the
- CFLAGS/CXXFLAGS and X_CFLAGS variables (STR #174)
- - The Fl_JPEG_Image and Fl_PNG_Image classes did not
- trap errors from the corresponding image libraries
- (STR #168)
- - Added "--with-links" configure option to control
- whether symlinks are created for the FLTK header files
- (STR #164)
- - Added new hoverdelay() to Fl_Tooltip to control how
- quickly recent tooltips appear (STR #126)
- - FLUID now sets the size range when a window is shown.
- This seems to be necessary with some window managers
- (STR #166)
-
-
-CHANGES IN FLTK 1.1.4
-
- - The fl_read_image() function was not implemented on
- OSX (STR #161)
- - VC++ 7.1 didn't like how the copy operators were
- disabled for the Fl_Widget class; now include inline
- code which will never be used but makes VC++ happy
- (STR #156)
- - Fixed an IRIX compile problem caused by a missing
- #include (STR #157)
- - FLUID didn't write color/selection_color() calls using
- the symbolic names when possible, nor did it cast
- integer colors to Fl_Color (STR #146)
- - Fl_File_Chooser was very close for multiple file
- selection in large directories (STR #140)
- - Fl_Text_Display/Editor did not disable the current
- selection when focus was shifted to another widget
- (STR #131)
- - Fl_Choice didn't use the normal focus box when the
- plastic scheme was in use (STR #129)
- - Fl_Text_Editor didn't use selection_color()
- consistently (STR #130)
- - The fltk_forms, fltk_gl, and fltk_images DSO's and
- HP-UX shared libraries are now linked against the fltk
- shared library to provide complete dependency
- resolution (STR #118)
- - The configure.in file did not work with autoconf 2.57.
- - FLUID didn't redraw widgets when changing the X, Y, W,
- or H values in the widget panel (STR #120)
- - Fl_Window::show(argc, argv) wasn't calling
- Fl::get_system_colors() as documented (STR #119)
- - DSO (shared library) building wasn't quite right for
- some platforms (STR #118)
- - OSX: some changes to make ProjectBuilder compiles
- possible.
- - OSX: FLTK would not know where a window was positioned
- by the OS. As a result, popup menus could open at
- wrong positions.
-
-
-CHANGES IN FLTK 1.1.4rc2
-
- - Fl_Window::show(argc,argv) incorrectly opened the
- display prior to parsing the arguments; this prevented
- the "-display foo" option from working (STR #111)
- - Images were not clipped properly on MacOS X (STR #114)
- - Fl::reload_scheme() and Fl::scheme("foo") incorrectly
- called Fl::get_system_colors(). This prevented an
- application from setting its own color preferences
- (STR #115)
- - The 'Enter' key event on OS X would not set
- Fl::e_text.
- - Changed behaviour of FLUID to always paste into
- a selected group (STR #88)
- - Menuitem now changes font, even if fontsize
- is not set (STR #110)
- - Swapped shortcut labels in OS X (STR #86)
- - Non-square Fl_Dial would calculate angle from user
- input wrong (STR #101)
- - Updated documentatiopn of fl_draw (STR #94)
- and Fl_Menu_::add() (STR #99)
- - FLUID collapse triangle events were not offset by
- horizontal scroll (STR #106)
- - QuitAppleEvent now correctly returns from Fl::run()
- instead of just exiting (STR #87)
- - Hiding the first created OpenGL context was not
- possible. FLTK now manages a list of contexts (STR #77)
- - FLUID didn't keep the double/single buffer type for
- windows.
- - FLTK didn't work with Xft2.
- - OSX window resizing didn't work (STR #64)
- - Fixed MacOS X shared library generation (STR #51)
- - Several widgets defined their own size() method but
- didn't provide an inline method that mapped to the
- Fl_Widget::size() method (STR #62)
- - Fl_Scroll didn't provide its own clear() method, so
- calling clear() on a Fl_Scroll widget would also
- destroy the scrollbars (STR #75)
- - Fl::event_text() was sometimes initialized to NULL
- instead of an empty string (STR #70)
- - fl_draw() didn't properly handle a trailing escaped
- "@" character (STR #84)
- - Added documentation for all forms of
- Fl_Widget::damage() (STR #61)
- - Fl_Double_Window now has a type() value of
- FL_DOUBLE_WINDOW, to allow double-buffered windows to
- process redraws properly on WIN32 (STR #46)
- - Added FL_DAMAGE_USER1 and FL_DAMAGE_USER2 damage bits
- for use by widget developers (STR #57)
- - Fl_Help_View didn't support numeric character entities
- (STR #66)
- - Menu shortcuts didn't use the Mac key names under
- MacOS X (STR #71)
- - CodeWarrior Mac OS X updated to work with current
- CW8.3 (STR #34)
- - Apple-C/X/V/Z didn't work in the Fl_Input widget due
- to a bad mapping to control keys (STR #79)
- - Added the OSX-specific fl_open_callback() function to
- handle Open Documents messages from the Finder (STR
- #80)
- - The configure script contained erroneous whitespace in
- various tests which caused errors on some platforms
- (STR #60)
- - The fltk-config script still supported the deprecated
- --prefix and --exec-prefix options; dropped them since
- they serve no useful purpose and would never have
- worked for the intended purpose anyways... (STR #56)
- - fl_filename_list returned 0 on Win32 if no directory
- existed (STR #54)
- - Pressing 'home' after the last letter in a Text_Editor
- would move the cursor to pos 0 (STR #39)
- - Fl::get_key(x) would mix up Ctrl and Meta on OS X (STR
- #55)
- - The configure script used the wrong dynamic library
- linking command for OSX (STR #51)
- - The Fl_Text_Editor widget did not set changed() nor
- did it call the widget's callback function for
- FL_WHEN_CHANGED when processing characters that
- Fl::compose() handles (STR #52)
-
-
-CHANGES IN FLTK 1.1.4rc1
-
- - The file chooser did not reset the click count when
- changing directories; if you clicked on a file in the
- same position after changing directories with a
- double-click, the chooser treated it as a triple
- click (STR #27)
- - Symbols with outlines did not get drawn inactive.
- - The Fl_Help_View widget now provides a find() method
- to search for text within the page.
- - The Fl_Help_Dialog widget now provides a search box
- for entering text to search for.
- - The default font encoding on OSX did not match the
- default on WIN32 or X11.
- - Menu items were not drawn using the font specified in
- the Fl_Menu_Item structure (STR #30)
- - Long menus that were aligned such that the top of an
- item was exactly at the top of the screen would not
- scroll (STR #33)
- - The OS issues appendix incorrectly stated that MacOS
- 8.6 and 9 were supported; they are not (STR #28)
- - Fixed handling of nested double-buffered windows (STR
- #1)
- - Showing a subwindow inside a hidden window would crash
- the application (STR #23)
- - OSX users couldn't enter some special chars when using
- some foreign key layouts (STR #32)
- - Hiding subwindows on OSX would hide the parent window
- (STR #22)
- - Added thin plastic box types.
- - Fl_Pack ignored the box() setting and cleared any
- unused areas to the widget color; it now only does so
- if the box() is set to something other than FL_NO_BOX.
- - Updated the Fl_Tabs widget to offset the first tab by
- the box dx value to avoid visual errors.
- - Updated the plastic up box to draw only a single
- border frame instead of the old double one for
- improved appearance.
- - Updated the default background color on OSX to provide
- better contrast.
- - Fl_Text_Display and friends now look for the next
- non-punctuation/space character for word boundaries
- (STR #26)
- - gl_font() didn't work properly for X11 when Xft was
- used (STR #12)
- - Fl_File_Browser incorrectly included "." on WIN32 (STR
- #9)
- - Include shellapi.h instead of ShellAPI.h in the WIN32
- drag-n-drop code in order to work with the MingW cross
- compiler (STR #6)
- - The cursor was not properly restored when doing
- drag-n-drop on X11 (STR #4)
- - Fl::remove_fd() didn't recalculate the highest file
- descriptor properly (STR #20)
- - Fl_Preferences::deleteGroup() didn't work properly
- (STR #13)
- - Fixed the fl_show_file_selector() function - it was
- copying using the wrong string size (STR #14)
- - fl_font() and fl_size() were not implemented on MacOS
- X.
- - Sorted the icon menu bar in FLUID.
- - Fixed minor memory access complaints from Valgrind
- - Compiling src/flstring.h on OS X with BSD header would
- fail.
- - Fl_Text_Editor didn't scroll the buffer when the user
- pressed Ctrl+End or Ctrl+Home.
- - Fl_Text_Editor didn't show its cursor when the mouse
- was moved inside the window.
- - FLUID now uses an Fl_Text_Display widget for command
- output, which allows you to copy and paste text from
- command output into other windows.
- - Fl_Gl_Window could cause a bus error on MacOS X if the
- parent window was not yet shown.
- - FLUID could crash after displaying a syntax error
- dialog for the callback code.
- - FLUID would reset the callback code if you opened the
- widget panel for multiple widgets.
- - Added a NULL check to Fl_Text_Display (SF Bug #706921).
- - The fltk-config script placed the LDFLAGS at the wrong
- place in the linker options.
- - Fl_Text_Display didn't draw the outer box in the right
- dimensions, so it was invisible.
- - Fl_Help_Dialog used the same color for links as for
- the background, causing links to be invisible on pages
- without a background color set.
-
-
-CHANGES IN FLTK 1.1.3
-
- - Documentation updates.
- - FLTK now ignores KeyRelease events when X11 sends them
- for repeating keys.
- - FLUID now supports up to two additional qualifiers
- before a class name (FL_EXPORT, etc.) to aide in
- developing DLL interfaces for WIN32.
- - Additional NULL checks in Fl_Button,
- fl_draw_boxtype(), Fl_File_Chooser, and
- Fl_Window::hotspot().
- - The Fl_Preferences header file needed to FL_EXPORT all
- of the nested classes for WIN32.
- - Fl_Double_Window couldn't be nested on WIN32. [SF Bug
- #658219]
- - Fl_Slider didn't call the callback function when the
- user changed the value using the keyboard and the
- "when" condition was FL_WHEN_RELEASE. [SF Bug #647072]
- - Lines with less than 2 unique vertices and polygons
- with less the 3 unique vertices were not drawn
- properly. [SF Bug #647067]
- - The size_range() values were not honored under MacOS
- X. [SF Bug #647074]
- - OpenGL windows didn't resize correctly on MacOS X.
- [SF Bug #667855]
- - The menus incorrectly used the overlay visual when one
- or more menu items contained an image. [SF Bug #653846]
- - Changed some error messages to use Fl::error() instead
- of fprintf()...
- - Fl_Text_Buffer and Fl_Text_Display used free to free
- memory that was allocated using the new operator.
- - Tweeked the plastic scheme under MacOSX to better
- match the colors.
- - The Fl_Image.H always included the x.H header file,
- which included many system headers that could
- interfere with normal GUI applications. It now uses
- the corresponding based types for the image id and
- mask to avoid this.
- - The FLUID widget panel wasn't sorted, so keyboard
- navigation was strange. [SF Bug #647069]
- - Fl_Scroll didn't compute the location of labels to the
- right or below when determining the area to erase.
- - Added backward-compatibility macro for
- filename_setext().
- - Fl_Bitmap::copy(), Fl_Pixmap::copy(), and
- Fl_RGB_Image::copy() all could overflow the source
- image when scaling the image.
- - Double/triple clicks in Fl_Input fields didn't copy
- the expanded selection to the clipboard.
- - Fl_Glut_Window and Fl_Gl_Window didn't always initialize
- the OpenGL context on MacOS.
-
-
-CHANGES IN FLTK 1.1.2
-
- - Fl_Menu_Bar now supports drawing vertical dividers
- between menu items and submenus in the menu bar.
- - Fl_File_Chooser::value() didn't return NULL when the
- user clicked Cancel while selecting a directory. This
- bug also affected fl_dir_chooser().
- - Fl_Menu_::add(const char *) used too small a menu item
- label buffer and didn't do bounds checking.
- - Eliminate some compiler warnings with CodeWarrier
- under WIN32 (Paul Chambers)
- - Fl_Gl_Window widgets did not resize properly under
- MacOS X.
- - The cursor could be set for the wrong window in the
- text widgets.
- - Fl_Check_Browser didn't provide const char * add
- methods as documented.
- - Fl_Check_Browser didn't draw the same style of check
- marks at the other widgets.
- - Fl_Button, Fl_Choice, and Fl_Menu_Button incorrectly
- activated the button/menu when the spacebar was
- pressed in conjunction with shift, control, alt, or
- meta.
- - FLTK should now compile with Xft 2.0.
- - Some versions of Tru64 4.0 have snprintf and
- vnsprintf, but don't have the prototypes for those
- functions.
- - FLTK had trouble doing character composition with some
- keyboard layouts under X11 (in particular, Belgian).
- - Fl_Text_Editor would cause a segfault if the user
- pressed CTRL-V (paste) without having any data in the
- clipboard...
- - The tab key moved backwards in menus instead of
- forwards. Shift-tab still moves backwards.
- - The redraw_label() method didn't damage the parent
- window when the label was outside the widget's
- bounding box.
- - Added a "draw_children()" method to Fl_Group to make
- subclassing Fl_Group with a custom draw() function
- easier.
- - Fl_Text_Editor now supports basic undo functionality.
- - FLUID now uses Fl_Text_Editor widgets for all
- multi-line code fields.
- - Added new widget bin and icons to FLUID.
- - FLUID would try running multiple commands in parallel,
- even though it wasn't capable of handling it.
- - FLUID didn't generate code for some attributes when
- using custom/named widget classes.
- - Added a new FL_COMMAND state bit which maps to FL_CTRL
- on X11 and WIN32 and FL_META on MacOS.
- - MacOS keyboard modifiers mapping corrections. Cmd and
- Control are no longer swapped, event_key and event_text
- return (mostly) the same values as on other platforms.
- - The Fl_Tabs widget should no longer be a focus hog;
- previously it would take focus from child widgets.
- - The file chooser now activates the OK button when
- opening a directory in directory selection mode.
- - Fixed a bug in the file chooser when entering an
- absolute path.
- - Back-ported some FLTK 2.0 tooltip changes to eliminate
- erroneous tooltip display.
- - MacOS windows were resizable, even when size_range
- would not allow for resizing.
- - Fl_Text_Editor now supports Shift+Delete, Ctrl+Insert,
- and Shift+Insert for cut, copy, and paste,
- respectively.
- - Fl_Text_Display didn't restore the mouse pointer when
- hidden.
- - Fl::arg() now ignores the MacOS X -psn_N_NNNNN option.
- - Added another change to the WIN32 redraw handling for
- the MingW compilers.
- - Fl_File_Chooser didn't handle WIN32 home directories
- that used backslashes instead of forward slashes.
- - Fl_Text_Display didn't limit the resize height to 1
- line.
- - Fl_Scrollbar widgets incorrectly took keyboard focus
- when clicked on. This caused widgets such as
- Fl_Text_Display to hide the cursor when you scrolled
- the text.
-
-
-CHANGES IN FLTK 1.1.1
-
- - Fl_Text_Display didn't always show the cursor.
- - Fl_Tabs now only redraws the tabs themselves when
- making focus changes. This reduces flicker in tabbed
- interfaces.
- - The WIN32 redraw handler now correctly merges the FLTK
- and Windows redraw regions.
- - The Fl_Text_* widgets use the C++ bool type, which is
- not supported by older C++ compilers. Added a
- configure check and workaround code for this.
- - Fl_X::set_xid() didn't initialize the backbuffer_bad
- element that was used with XDBE.
- - Fl_Shared_Image::uncache() was not implemented.
- - Fl::set_font() didn't 0-initialize all font descriptor
- data.
- - Some OpenGL implementations don't support single-
- buffered visuals. The Fl_Gl_Window class now emulates
- single-buffered windows using double-buffered
- windows.
- - Added a workaround for a compiler bug in Borland C++
- that prevented Fl_Help_View.cxx from compiling.
- - Checkmarks didn't scale properly; copied the 2.0 check
- mark code over.
- - Replaced several memcpy's with memmove's for
- portability (memmove allows for overlapping copies,
- memcpy does not)
- - Bug #621737: Fl_Bitmap::copy(), Fl_Pixmap::copy(), and
- Fl_RGB_Image::copy() now range-check the new width and
- height to make sure they are positive integers.
- - Bug #621740: the WIN32 port needed to handle WM_MOUSELEAVE events
- in order to avoid problems with tooltips.
- - Fl_PNM_Image didn't set the "alloc" flag for the data,
- which could lead to a memory leak.
- - fl_filename_match() was inconsistently doing case-
- insensitive matching.
- - Fl_Button redraw fix for bug #620979 (focus boxes and
- check buttons).
- - Fl_Text_Display fix for bug #620633 (crash on
- redisplay).
- - Fl_Output now calls its callback when the user clicks
- or drags in the widget.
- - Shortcuts now cause buttons to take focus when visible
- focus is enabled.
- - fl_filename_relative() didn't check that the path was
- absolute under WIN32.
- - fl_filename_relative() didn't check that the path was
- on the current drive under WIN32.
- - The Fl_BMP_Image class now handles 16-bit BMP files
- and BMP files with a transparency mask.
- - The fltk-config script didn't add the required include
- path, if any, when compiling a program.
- - Added a license clarification that the FLTK manual is
- covered by the same license as FLTK itself.
- - Fl_Check_Browser wasn't documented.
- - Fl_Preferences::Node::addChild(), deleteEntry(), and
- remove() didn't set the "dirty" flag.
- - The "no change" button didn't work in the FLUID widget
- panel.
- - Vertical scrollbars did not draw the arrows inactive
- when the scrollbar was inactive.
-
-
-CHANGES IN FLTK 1.1.0
-
- - Documentation updates.
- - Added a Fl_Widget::redraw_label() method which flags a
- redraw of the appropriate area. This helps to
- eliminate flicker when updating the value of a widget.
- - Fl_Wizard::value() now resets the mouse cursor to the
- window's default cursor.
- - Fl_File_Chooser::type() didn't enable/disable the new
- directory button correctly.
- - Fl_Preferences::entryExists() did not work properly.
- - FLUID's image file chooser pattern was incorrect.
- - Fl_File_Icon::load_system_icons() now detects KDE
- icons in /opt/kde, /usr/local, and /usr automatically,
- and supports the KDEDIR environment variable as well.
- - Submenus now display to the left of the parent menu if
- they won't fit to the right. Previously they would
- display right on top of the parent menu...
- - Fl_Menu_:add() didn't handle a trailing "\" character
- gracefully.
- - Clicking/dragging the middle mouse button in a
- scrollbar now moves directly to that scroll position,
- matching the behavior of other toolkits.
- - Added some more range checking to the Fl_Text_Display
- widget.
- - The editor demo did not correctly update the style
- (syntax highlighting) information.
-
-
-CHANGES IN FLTK 1.1.0rc7
-
- - Updated the Fl_Text_Buffer and Fl_Text_Display classes
- to be based on NEdit 5.3 (patch from George Garvey).
- - Fixed a problem with Fl::wait(0.0) on MacOS X 10.2;
- this affected the fractals demo and other OpenGL
- applications.
- - Fl_Glut_Window now takes keyboard focus and handles
- shortcut events.
- - The MacOS X implementation of fl_ready() now checks
- the event queue for events.
- - Fl_PNM_Image now supports the XV/GIMP thumbnail format
- (P7).
- - Fl_Preferences would not find groups inside the root
- group.
- - Small bug fixes for Fl_Chart, Fl_Scrollbar, Fl_Tabs,
- and FLUID from Matthew Morrise.
- - Fl_Chart didn't have its own destructor, so data in
- the chart wasn't freed.
- - Fl_Menu_Button no longer responds to focus or keyboard
- events when box() is FL_NO_BOX.
- - FLTK convenience dialogs put the buttons in the wrong
- order.
- - Fl_BMP_Image didn't load 4-bit BMP files properly.
- - Minor tweeks to the WIN32 DLL support.
- - Fl_Text_Display::resize() could go into an infinite
- loop if the buffer is emptied.
- - Fl::handle() didn't pass FL_RELEASE events to the
- grab() widget if pushed() was set (for proper menu
- handling...)
- - DND events were being sent to the target window
- instead of the target widget under WIN32.
- - The newest Cygwin needs the same scandir() handling as
- HP-UX.
- - FLUID didn't register the image formats in the
- fltk_images library, and had some other image
- management problems.
- - Fixed one more redraw bug in Fl_Browser_ where we
- weren't using the box function to erase empty space in
- the list.
- - Fl_Text_Display::buffer() now calls resize() to show
- the buffer.
- - Fl_Help_View didn't support HTML comments.
- - Fl_Help_View didn't include the extra cellpadding when
- handling colspan attributes in cells.
- - Fl_Help_View didn't support table alignment.
-
-
-CHANGES IN FLTK 1.1.0rc6
-
- - Documentation updates.
- - Fl::handle() didn't apply the modal tests for
- FL_RELEASE events, which caused Fl_Tabs to allow users
- to change tabs even when a modal window was open.
- - Fl_Browser_, Fl_Input_, Fl_Slider now use the box
- function to erase the background. This fixes some
- long-standing redraw problems.
- - More snprintf/strlcpy/strlcat changes where needed.
- - Fl::get_font_name() would leak 128 bytes.
- - Eliminated most of the "shadowed" variables to avoid
- potential problems with using the wrong copy of "foo"
- in a class method.
- - Moved Fl_BMP_Image, Fl_GIF_Image, and Fl_PNM_Image to
- the fltk_images library, so the only image formats
- that are supported by the core library are XBM and XPM
- files. This reduces the size of the FLTK core library
- by about 16k...
- - The Fl_Text_Display::resize() method was incorrectly
- flagged as protected.
- - Fixed some memory/initialization bugs in
- Fl_File_Chooser that valgrind caught.
- - The PNG library png_read_destroy() is deprecated and
- does not free all of the memory allocated by
- png_create_read_struct(). This caused a memory leak in
- FLTK apps that loaded PNG images.
- - Added uncache() method to Fl_Image and friends.
- - Added image() methods to Fl_Menu_Item.
- - Added default_cursor() method and data to Fl_Window.
- - Fl_Group would send FL_ENTER events before FL_LEAVE
- events, causing problems with adjacent widgets.
- - Fixed filename problems with Fl_File_Chooser -
- changing the filename field directly or choosing files
- from the root directory could yield interesting
- filenames.
- - Fl_Input_ could crash if it received an empty paste
- event.
- - The mouse pointer now changes to the I beam
- (FL_CURSOR_INSERT) when moved over an input field or
- text widget.
- - "make install" didn't automatically (re)compile the
- FLUID executable.
- - Added an Fl::get_boxtype() method to get the current
- drawing function for a specific box type.
- - Fl_Output and Fl_Multiline_Output didn't prevent
- middle-mouse pastes.
- - Fl_JPEG_Image didn't compile out-of-the-box with Cygwin
- due to a bug in the Cygwin JPEG library headers.
- - Fl_BMP_Image still didn't work with some old BMP files.
- - "make distclean" didn't really clean out everything.
- - Tweeked the look of the check button with a patch from
- Albrecht Schlosser.
-
-
-CHANGES IN FLTK 1.1.0rc5
-
- - Added "wrap" type bit to Fl_Input_, so you can now
- have a multiline text field that wraps text.
- - Setting the value() of an output text field no longer
- selects the text in it.
- - Output text fields now show a caret for the cursor
- instead of the vertical bar.
- - The newButton and previewButton widgets are now public
- members of the Fl_File_Chooser class. This allows
- developers to disable or hide the "new directory" and
- "preview" buttons as desired.
- - Added new visible focus flag bit and methods to
- Fl_Widget, so it is now possible to do both global and
- per-widget keyboard focus control.
- - Removed extra 3 pixel border around input fields.
- - No longer quote characters from 0x80 to 0x9f in input
- fields.
- - Improved speed of Fl_Browser_::display() method with
- large lists (patch from Stephen Davies.)
- - Fl_Help_View didn't properly handle NULL from the link
- callback (the original filename/directory name were
- not preserved...)
- - Fl_Help_View didn't use the boxtype border values when
- clipping the page that was displayed.
- - Added first steps to CodeWarrior/OS_X support (see
- fltk-1.1.x/CodeWarrior/OS_X.sit)
- - Cleaned up the WIN32 export definitions for some of
- the widget classes.
- - Fixed a filename completion bug when changing
- directories.
- - Fl_File_Chooser::value() would return directories with
- a trailing slash, but would not accept a directory
- without a trailing slash.
- - When installing shared libraries, FLUID is now linked
- against the shared libraries.
- - MacOS: missing compile rule for .dylib files.
- - Fl_Group::current(), Fl_Group::begin(), and
- Fl_Group::end() are no longer inlined so that they are
- properly exported in DLLs under WIN32. Similar
- changes for all static inline methods in other
- classes.
- - MacOS: support for Mac system menu (Fl_Sys_Menu_Bar)
- - MacOS: wait(0) would not handle all pending events
- - Added new makeinclude file for MingW using GCC 3.1.x.
- - Fl_Choice::value(n) didn't range check "n".
- - The MingW and OS/2 makeinclude files didn't have the
- new fltk_images library definitions.
- - Fl_Text_Editor didn't scroll the text in the widget
- when dragging text.
- - Config header file changes for Borland C++.
- - FLTK didn't provide a Fl::remove_handler() method.
-
-
-CHANGES IN FLTK 1.1.0rc4
-
- - Added new filter_value() methods to Fl_File_Chooser to
- get and set the current file filters.
- - Added support for custom filters to Fl_File_Chooser.
- - Added Borland C++ Builder IDE project files from
- Alexey Parshin.
- - Resource leak fixes under WIN32 from Ori Berger.
- - Now register a WIN32 message for thread messages.
- - Fl_Window didn't initialize the min and max window
- size fields.
- - The JPEG and PNG image classes have been moved to the
- fltk_images library, a la FLTK 2.0. You can register
- all image file formats provided in fltk_images using
- the new fl_register_images() function.
- - Fl_XBM_Image didn't correctly load XBM files.
- - MacOS: Added Greg Ercolano's file descriptor support.
- - MacOS: Fixed text width bug.
- - A change in fl_fix_focus() broken click-focus in FLWM.
- - Cygwin with -mnocygwin didn't like the FL/math.h
- header file.
- - Fl_Browser_ cleared the click count unnecessarily.
- - MacOS: Pixmap draw fix, gl_font implemented
- FL_FOCUS fix, window type fix for modal and nonmodal
- windows, glut uninitialised 'display' proc fix
- - Now support FLTK_1_0_COMPAT symbol to define
- compatibility macros for the old FLTK 1.0.x function
- names to the 1.1.x names.
- - Now translate the window coordinates when a window is
- shown, moved, or resized. This should fix the "menus
- showing up at the wrong position" bug under XFree86.
- - Fixed some more problems with the Fl_BMP_Image file
- loader.
- - BC++ fixes.
- - The pixmap_browser demo didn't check for a NULL image
- pointer.
- - Fl_File_Icon::find() now uses fl_filename_isdir()
- under WIN32 to check for directories.
- - Fl_File_Chooser's preview code called refcount()
- on the deleted image's object.
- - Fixed another problem with the Fl_BMP_Image loader.
- - The fl_file_chooser() callback was being called with a
- NULL filename.
- - Documented that fl_push_clip() is preferred over
- fl_clip(), with a corresponding source change.
- - Minor changes to the MacOS X event handling code.
- - Added syntax highlighting example code to the editor
- test program.
- - Fl_Text_Display didn't range check style buffer
- values.
- - Added "dark" color constants (FL_DARK_RED, etc.)
- - The MacOS font code was missing definitions for
- fl_font_ and fl_size_.
-
-
-CHANGES IN FLTK 1.1.0rc3
-
- - Documentation updates.
- - New file chooser from design contest.
- - Did some testing with Valgrind and fixed some memory
- problems in Fl_Help_View::Fl_HelpView,
- Fl_Menu_::remove(), Fl_Text_Display::draw_vline(), and
- resizeform() (convenience dialogs).
- - Fixed some redraw() bugs, and now redraw portions of
- the parent widget when the label appears outside the
- widget.
- - The boolean (char) value methods in Fl_Preferences
- have been removed since some C++ compilers can't
- handle char and int value methods with the same name.
- - Added fl_read_image() function.
- - Fixed Fl_Valuator::format() so that the correct format
- type is used when step == 1.0.
- - Fl_Help_View didn't support the TT markup.
- - Fl_Shared_Image used a double-pointer to the image
- handler functions, which was unnecessary and
- unintuitive.
- - Fl_PNM_Image didn't load the height of the image
- properly.
- - Fl_BMP_Image, Fl_JPEG_Image, Fl_PNG_Image, and
- Fl_Shared_Image didn't delete image data that was
- allocated.
- - Enabled the OpenGL and threads demos when compiling
- for MingW.
- - Fl_File_Input didn't update the directory buttons if a
- callback was registered with the widget.
- - The file chooser would return the last selected
- file(s) when cancel was pressed.
- - The file chooser limited the resizing of the chooser
- window unnecessarily.
- - Fixed WM_PAINT handling under WIN32.
- - Minor tweeks to MingW and OS/2 config headers.
- - Fl_Value_Input now correctly determines if step()
- specifies an integer value.
- - Fl_Help_View didn't add links inside PRE elements.
- - OS/2 build fixes from Alexander Mai.
- - Now use strlcat() instead of strncat() which could
- cause buffer overflows.
- - Now use of strlcpy() instead of strncpy() to simplify
- the code.
- - Drag-n-drop under WIN32 now shows a [+] cursor instead
- of the link cursor.
- - Fixed widget width tooltip and default argument
- handling code in FLUID.
- - Fixed colors used when drawing antialiased text using
- Xft.
- - Fl_Preferences::makePath() now uses access() instead
- of stat() when checking to see if the destination
- directory already exists.
- - Fl_BMP_Image now supports older BMP files with the 12
- byte header.
- - Optimized the redrawing of tabs and radio/check
- buttons when the keyboard focus changes.
- - More tooltip fixes.
- - DND text operations would loop under X11.
-
-
-CHANGES IN FLTK 1.1.0rc2
-
- - Portability fixes.
- - Backported 2.0 tooltip changes.
- - Several of the valuators did not support tooltips.
- - The last menu item in a menu didn't pick up on font
- changes.
- - FLUID now properly handles default argument parameters
- properly.
- - Fixed WM_PAINT handling under WIN32 - didn't validate
- the correct region that was drawn.
- - Fl_Multiline_Output would insert the enter key.
- - Fl_File_Browser didn't clip items to the column width.
- - Fl_Window::draw() cleared the window label but didn't
- restore it, so windows could lose their titles.
- - Eliminated multiple definitions of dirent structure
- when compiling under WIN32.
- - Adjusted the size of the circle that is drawn inside
- radio buttons to scale better for larger labels.
- - FLUID was opening the display when it shouldn't have.
- - Fl_File_Chooser.cxx defined the file chooser functions
- again; they should only be defined in the header file.
- - Wide arcs would draw with "teeth".
- - The preferences demo included Fl/Fl_Preferences.H
- instead of FL/Fl_Preferences.H.
-
-
-CHANGES IN FLTK 1.1.0rc1
-
- - The fl_file_chooser() and fl_dir_chooser() functions
- now support an optional "relative" argument to get
- relative pathnames; the default is to return absolute
- pathnames.
- - The backspace and delete keys now work as expected in
- the file chooser when doing filename completion.
- - FLUID now supports running shell commands.
- - New Fl_File_Input widget that shows directory
- separators with filename in input field.
- - The Fl_File_Chooser dialog now shows the absolute path
- in the filename field using the Fl_File_Input widget.
- - FLUID now keeps track of grid, tooltip, and other
- GUI options, along with the last 10 files opened.
- - Tooltip windows would show up in the task bar under
- WIN32.
- - Now append trailing slash to directory names in names
- in WIN32 version of scandir(). This takes care of a
- file chooser performance problem with large
- directories.
- - Added Fl_Preferences class from Matthias Melcher,
- including binary data support.
- - FLUID now recognizes the "using" keyword in
- declarations.
- - fl_file_chooser() didn't highlight the requested file
- the second time the file chooser dialog was shown.
- - Fixed rendering of Fl_Light_Button with the plastic
- scheme.
- - Fixed a bug in the MacOS font enumeration code.
- - Now show a "locked" icon next to static/private
- elements in FLUID, and "unlocked" icon next to
- global/public elements.
- - Implemented Fl_Menu_Item image labels using older
- 1.0.x labeltype method.
- - Updated the PNG library check to support both png.h
- and libpng/png.h.
- - Fixed a recursion bug in tooltips that was causing
- random crashes.
- - fl_file_chooser() could cause a segfault when passed a
- NULL filename parameter in some situations.
- - Added a "-g" option to fltk-config to support quick
- compiling with debugging enabled.
- - Fixed redraw problem with Fl_Input and anti-aliased
- text.
- - Added threading support for MacOS X and Darwin.
- - The filesystem list in the file chooser now works under
- MacOS X and Darwin.
- - The fl_msg structure now contains all data passed to
- the WndProc function under WIN32.
- - Fixed some window focus/positioning problems under
- MacOS X.
- - Added fl_create_alphamask() function to create an alpha
- mask from 8-bit data; currently this always generates a
- 1-bit screen-door bitmask, however in the future it will
- allow us to generate N-bit masks as needed by various
- OS's.
- - Fl_File_Browser::load() didn't properly show drives
- when compiled in Cygwin mode.
- - Now pass correctly pass keyboard and mouse events to
- widget under tooltip as needed...
- - Added new Fl::dnd_text_ops() methods to enable/disable
- drag-and-drop text operations.
- - Fl_Input now supports clicking inside a selection to
- set the new text position when drag-and-drop is
- enabled.
- - Added support of X resources for scheme, dnd_text_ops,
- tooltips, and visible_focus...
- - Fixed some case problems in includes for the MacOS X
- code.
- - Fl_Widget::handle() returned 1 for FL_ENTER and
- FL_LEAVE events, which caused some compatibility
- problems with 1.0 code.
- - Fl_Box::handle() now returns 1 for FL_ENTER and
- FL_LEAVE events so that tooltips will work with Fl_Box
- widgets.
- - Some source files still defined strcasecmp and
- strncasecmp under WIN32.
- - Some source files still used the "false" and "true"
- C++ keywords, even though several of our "supported"
- C++ compilers don't support them. Using 0 and 1 until
- FLTK 2.0 (which uses the bool type instead of int for
- any boolean values...)
- - Minor Fl_Color revamping, so that color constants map
- to the color cube and FL_FOREGROUND_COLOR,
- FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR,
- FL_INACTIVE_COLOR, and FL_SELECTION_COLOR map to the
- user-defined colors.
-
-
-CHANGES IN FLTK 1.1.0b13
-
- - Fixed a bug in the Xft support in Fl_Window::hide()
- (the config header wasn't included, so the Xft code
- wasn't getting called)
- - Xdbe support must now be enabled explicitly using
- --enable-xdbe due to inconsistent bugs in XFree86 and
- others.
- - Windows resized by a program would revert to their
- original size when moved under WIN32.
- - Cygwin can only compile the new WIN32 drag-n-drop code
- using GCC 3.x.
- - Tooltips now appear for inactive and output widgets.
- - Tooltips no longer steal keyboard events other than
- ESCape.
- - Tooltips are no longer delayed when moving between
- adjacent widgets.
- - fl_beep(FL_BEEP_DEFAULT) now uses the PC speaker under
- Windows (0xFFFFFFFF) rather than an event sound.
- - The configure script didn't include the -mwindows or
- -DWIN32 compiler options in the output of fltk-config
- when using the Cygwin tools.
- - Fl_Output didn't take input focus when needed, so it
- was unable to support CTRL-C for copying text in the
- field and did not unhighlight selections when the
- widget lost focus.
- - The fl_filename_name() function didn't handle a NULL
- input string.
- - The input field used by the fl_input() and
- fl_password() functions was resized too small in
- 1.1.0b12.
- - Added casts in fl_set_fonts_win32.cxx for VC++ 5.0.
- - Fl_File_Icon::find() did not check the basename of a
- filename for a match; this caused matches for a
- specific filename (e.g. "fluid") to fail.
- - The Fl_Shared_Image class now supports additional
- image handling functions - this allows you to support
- additional image file formats transparently.
-
-
-CHANGES IN FLTK 1.1.0b12
-
- - Documentation updates.
- - Fl_Choice didn't clip the current value properly - it
- wasn't accounting for the box border width.
- - The forms compatibility functions are now placed in a
- "fltk_forms" library to match FLTK 2.0.
- - Renamed down() and frame() to fl_down() and
- fl_frame(), filename_xyz() to fl_filename_xyz(), and
- all of the define_FL_FOO() functions for the custom
- boxtypes to fl_define_FL_FOO() to avoid namespace
- clashes.
- - Stereo OpenGL support (patch from Stuart Levy)
- - All of the convenience functions defined in fl_ask.H
- now resize the widgets and dialog window as needed for
- the labels and prompt.
- - Backported FLTK 2.0 dual cut/paste buffer code.
- - Added support for Xft library to provide anti-aliased
- text on X11.
- - Fl_Help_View didn't keep track of the background color
- of cells properly.
- - Fl_Browser::item_width() didn't compute the width of
- the item properly when column_widths() was set.
- - Fl_Button didn't check to see if the widget could
- accept focus before taking input focus.
- - Fl_Help_View didn't preserve target names (e.g.
- "filename.html#target") when following links.
- - Drag-and-drop support for MacOS.
- - Updated MacOS issues documentation.
-
-
-CHANGES IN FLTK 1.1.0b11
-
- - Now conditionally use the WIN32 TrackMouseEvent API
- (default is no...)
- - Fixed a table rendering bug in the Fl_Help_View
- widget.
- - The fltk-config script now recognizes all common C++
- extensions.
- - The menu code was using overlay visuals when the
- scheme was set to "plastic".
- - Fixed some drawing problems with Fl_Light_Button and
- its subclasses.
- - Fixed a minor event propagation bug in Fl_Group that
- caused mousewheel events to be passed to scrollbars
- that were not visible.
- - The fl_file_chooser() function did not preserve the
- old file/directory like the old file chooser did.
- - The prototypes for fl_input() and fl_password() did
- not default the "default value" to NULL.
- - Fl_Tabs now draws tabs using the selection_color() of
- the child groups; this allows the tabs to be colored
- separately from the body. Selected tabs are a mix of
- the Fl_Tabs selection_color() and the child group's
- selection_color().
- - Fl_Tabs didn't include images in the measurement of
- the tabs if no label text was defined.
- - The WIN32 code didn't return 0 from the window
- procedure after handling WM_PAINT messages.
- - fl_draw() would incorrectly test the clipping of
- labels the lay outside the bounding box.
- - filename_relative() didn't always return the correct
- relative path.
- - Updated the test makefile to work with more versions
- of "make".
- - Added new "--with-optim" configure option to set the
- optimization flags to use when compiling FLTK.
- - The fltk-config script no longer reports the
- optimization flags that were used to compile FLTK.
- - Initial port of FLTK 2.0 drag-and-drop support.
-
-
-CHANGES IN FLTK 1.1.0b10
-
- - Fixed the new WIN32 TrackMouseEvent code.
- - Fixed the VC++ project files to link against
- comctl32.lib.
-
-
-CHANGES IN FLTK 1.1.0b9
-
- - Better FL_LEAVE event handling for WIN32.
- - The alpha mask was bit-reversed.
- - Fl::scheme() applied the scheme tile image to overlay
- and menu windows, which caused problems when the
- overlay planes were in use.
- - Fixed Fl::event_button() value when hiding tooltip on
- some systems.
- - Added Fl_BMP_Image class to support loading of Windows
- bitmap (BMP) files.
- - The shiny demo didn't work on some systems (no
- single-buffered OpenGL visual), and the new box types
- were reset when show(argc, argv) was called.
- - Fl::scheme() didn't update windows that were not
- shown.
- - The fractals demo would get far ahead of the UI with
- some Linux OpenGL drivers. Now use glFinish() instead
- of glFlush() so we are at most 1 frame ahead.
- - The fractals demo Y axis controls were backwards for
- the "flying" mode.
- - MacOS: cleaned up src/Fl_mac.cxx
- - MacOS: fixed Fl::wait(0.0), fixed Cmd-Q handling
- - Update CygWin support for Fl::add_fd().
- - Update the plastic scheme to not override the default
- colors - move the color code to the MacOS-specific
- code. Also updates the tile image colormap to match
- the current background color.
- - Add fl_parse_color() to X11 as well, removing a bunch
- of conditional code and providing a common interface
- for looking up color values.
- - Fixed the make problems in the test directory - some
- make programs had trouble handling the recursive
- dependencies on the FLUID files...
- - Now use rint() to round floating-point coordinates.
- - Demo cleanup - made sure they all worked with schemes.
- - Fl_Tabs no longer clears the unused area of the tab
- bar.
- - Added show(argc, argv) method to Fl_Help_Dialog.
- - MacOS: implemented cut/copy/paste.
- - MacOS: improved keyboard handling, fixed keyboard
- focus handling, fixed get_key, modified 'keyboard'
- demo to show second mouse wheel and additional keys
- 'help' and FL_NK+'='
-
-
-CHANGES IN FLTK 1.1.0b8
-
- - OS/2 build fixes.
- - fl_draw() didn't ignore symbol escapes properly for
- the browsers...
- - New Fl::scheme() methods from FLTK 2.0; currently only
- the standard ("") and plastic ("plastic") methods are
- supported. Schemes can be set on the command-line
- ("-scheme plastic") or using the FLTK_SCHEME
- environment variable.
- - MacOS: fixed iBook keyboard handling, moved
- remaining message handling to Carbon, added mouse
- capture support, added timer support, added overlay
- support, fixed double-buffering side effects.
- - The configure script wasn't using the -fpermissive or
- -fno-exceptions options with GCC.
- - Fl_JPEG_Image and friends didn't set the depth if the
- image file couldn't be loaded; since Fl_RGB_Image
- didn't check for this, it could fail when displaying
- or copying these images.
- - filename_absolute() did not always free its temporary
- buffer.
- - filename_relative() did not do a case-insensitive
- comparison under MacOS, OS/2, and Windows.
- - filename_isdir() didn't properly handle "D:L" under
- WIN32.
- - Fl_Shared_Image::get() did not check to see if the
- image could not be loaded.
- - Fl_Help_View didn't clear the line array in the
- Fl_Help_Block structure; this causes erratic
- formatting for some pages.
- - The font and size members of Fl_Help_Block were never
- used.
- - The threading functions (Fl::lock() and friends) were
- not exported under WIN32.
- - The Fl_Text_Display destructor deleted the scrollbars
- twice...
- - Fl_Help_View didn't reset the horizontal scroll
- position when showing a new page.
- - Fl_Pack now allows any child widget to be the
- resizable() widget, not just the last one.
- - MacOS: opaque window resizing, all events except
- Mac menus are now handled using Carbon, window
- activation fixed, GL_SWAP_TYPE default changed to
- make gl_overlay work.
- - Fl_Help_View::resize() didn't resize the horizontal
- scrollbar.
- - MacOS: list all fonts, fixed clipping and mouse
- pointer bugs.
- - The Fl_File_Chooser widget now uses hotspot() to
- position the dialog under the mouse pointer prior to
- showing it.
- - Added a configure check for *BSD - use -pthread option
- instead of -lpthread.
- - Fl_Text_Display could get in an infinite loop when
- redrawing a portion of the screen. Added a check for
- the return value from fl_clip_box() so that the
- correct bounding box is used.
- - Removed the Fl_Mutex and Fl_Signal_Mutex classes from
- the threads example, since they weren't being used
- and apparently are not very portable.
- - Fl_Help_View now ignores links when the link callback
- returns NULL, and displays a sensible error message
- when an unhandled URI scheme is used (e.g. http:,
- ftp:)
- - Fl_File_Icon::load_system_icons() no longer complains
- about missing icon files, just files that exist but
- can't be loaded.
- - FLUID didn't list the plastic box and frame types.
- - Now hide the tooltip window whenever a window is
- hidden. Otherwise a tooltip window could keep an
- application running.
- - Updated FLUID to only append a trailing semicolon to
- code lines in a callback (so "#include" and friends
- will work...)
- - The Fl_Color_Chooser widget now supports keyboard
- navigation.
- - Fixed button and valuator widgets to call Fl::focus()
- instead of take_focus().
- - Tweeked the radio button drawing code for better
- circles with different boxtypes.
- - The Fl_File_Chooser widget did not provide a shown()
- method, and fl_file_chooser() and fl_dir_chooser() did
- not wait on shown(); this would cause them to return
- prematurely if you switched desktops/workspaces.
- - Cosmetic changes to plastic boxtypes. Now look much
- better for large areas and the buttons now have a much
- greater "3D" feeling to them.
- - Added new Fl::draw_box_active() method so that
- boxtypes can find out if the widget they are drawing
- for is active or not.
- - Fl_Button and its subclasses did not redraw the parent
- when the boxtype was FL_NO_BOX and they lost keyboard
- focus (the parent redraw clears the focus box.)
- - Fixed the example program makefile - wasn't building
- the mandelbrot and shiny demos right.
- - Fl::set_font(Fl_Font, Fl_Font) was not implemented.
- - Fixed the documentation Makefile commands; was not
- using the fltk.book file for some reason...
-
-
-CHANGES IN FLTK 1.1.0b7
-
- - More documentation updates...
- - Mac OS X support works 95%
- - The Fl_Window::hotspot() off-screen avoidance code was
- commented out.
- - Mac OS X uses mostly Carbon event handling to support
- Mousewheel, three buttons, all modifier keys, etc.
- - Updated paragraph 4 of the FLTK license exceptions;
- there was some question about the requirement to show
- that a program uses FLTK, which is required by section
- 6 of the LGPL. The new exemption specifies that
- inclusion of the FLTK license is not required, just a
- statement that the program uses FLTK.
- - Fl_Button::handle() was calling take_focus() for both
- FL_PUSH and FL_DRAG.
- - File and memory fixes for Fl_GIF_Image, Fl_PNG_Image,
- Fl_PNM_Image, Fl_Shared_Image, Fl_Tiled_Image, and
- Fl_XBM_Image.
- - filename_match() didn't handle backslashes properly
- under WIN32, and didn't use a case-insensitive
- comparison under MacOS X.
- - The Fl class was missing access methods for the
- FL_MOUSEWHEEL event values - Fl::event_dx() and
- Fl::event_dy().
- - The default help string didn't include the -nokbd
- option.
- - "make uninstall" didn't uninstall the static OpenGL
- widget library.
- - Mac cursor shapes added...
- - Fl_Text_Display would lockup when all text was
- deleted; for example, when running the editor
- demo, you couldn't load a second file.
- - Added Fl::lock() and friends from FLTK 2.0 to
- support multi-threaded applications; see the
- "threads" demo for an example of this.
- - Fl_Check_Button and Fl_Round_Button now use the
- FL_NO_BOX box type to show the background of the
- parent widget.
- - Tweeked the plastic boxtype code to draw with the
- right shading for narrow, but horizontal buttons.
- - Fl_Progress now shades the bounding box instead of
- drawing a polygon inside it.
- - Fl::warning() under WIN32 defaults to no action. This
- avoids warning dialogs when an image file cannot be
- loaded.
- - Some Win32 drivers would draw into wrong buffers
- after OpenGL mode change
- - The file chooser would cause a segfault if you
- clicked in an empty area of the file list.
- - Fl_File_Icon::labeltype() would cause a segfault
- if the value pointer was NULL.
- - Fl_File_Icon::load_image() could cause segfaults
- (NULL data and incrementing the data pointer too
- often.)
- - Fl_File_Icon::load_image() now handles 2-byte
- per color XPM files.
- - Some Win32 drivers would draw into wrong buffers
- after OpenGL mode change.
- - Message handling and Resources for MacOS port.
- - Fl_Help_View could get in an infinitely loop when
- determining the maximum width of the page; this
- was due to a bug in the get_length() method with
- percentages (100% width would cause the bug.)
- - Don't need -lgdi32 for CygWin, since -mwindows
- does this for us.
- - The WIN32 event handler did not properly handle
- WM_SYNCPAINT messages.
- - Fl_Tabs now uses the boxtype exclusively to draw
- both the tabs and surrounding box, so alternate
- box types actually work and the look is a little
- nicer.
- - Fixed the drawing of large areas with the new
- plastic boxtypes.
- - Updated the Visual C++ demo projects to use FLUID
- to generate the GUI files as needed.
- - The demo program didn't load the right menu file
- when compiled for debugging under WIN32.
- - Added plastic box types to forms demo.
- - Added mousewheel to keyboard demo.
- - The Fl_Text_Editor widget caused an infinite loop
- when it received keyboard focus.
- - filename_isdir() didn't properly handle drive letters
- properly; WIN32 needs a trailing slash for drive
- letters by themselves, but cannot have a trailing
- slash for directory names, go figure...
- - The Fl_Text_Buffer and Fl_Text_Display classes did not
- initialize all of their members.
- - fl_normal_label() had a totally redundant set of
- if/else tests, which the new code handles all from
- fl_draw().
- - The Fl_File_Chooser dialog contained two hotspots.
- - The fl_draw_pixmap() function didn't free the 2-byte
- color lookup table properly (delete instead of
- delete[]).
- - fl_draw() reset the text color under WIN32, causing
- bitmaps to draw incorrectly.
- - Fl::get_font_sizes() is now implemented under WIN32.
- - Fl_Text_Display now uses the same default colors for
- selection and text as Fl_Input_ and friends.
- - Changed the default line scrolling in Fl_Text_Display
- to 3 lines for the mouse wheel and scrollbar arrows.
-
-
-CHANGES IN FLTK 1.1.0b6
-
- - Documentation updates...
- - The configure script now works within the CygWin
- environment.
- - Tooltips are now enabled by default, but are not
- re-enabled when calling the Fl_Widget::tooltip()
- method.
- - Added new Fl::version() method to get the current
- FLTK library version (for shared libraries/DLLs)
- - Added new Fl::event() method to get the current
- event that is being processed.
- - Added new fl_beep() function to do audible
- notifications of various types.
- - Added new Fl_GIF_Image, Fl_JPEG_Image, Fl_PNG_Image,
- Fl_PNM_Image, Fl_XBM_Image, and Fl_XPM_Image classes.
- - Added new Fl_Shared_Image class, a la FLTK 2.0.
- - Added new Fl_Tiled_Image class for tiled backgrounds.
- - Added new copy(), desaturate(), inactive(), and
- color_average() methods to the Fl_Image classes.
- - Added a horizontal scrollbar to the Fl_Help_View
- widget.
- - Added new FL_PLASTIC_{UP/DOWN}_{BOX/FRAME} boxtypes
- for a more "modern" look (sort of a cross between KDE
- 2.2 and Aqua.)
- - Fl_Float_Input and Fl_Int_Input no longer accept
- pasted text that is not a floating point or integer
- value. Pasted numbers now replace text in these
- widgets.
- - Implemented the Fl_File_Icon::load_png() method.
- - The Fl_File_Icon::load_system_icons() method now
- supports KDE 2.x icons.
- - Fixed PNG support in Fl_Help_View.
- - Removed the "Microsoft" mode button from the menubar
- demo.
- - The browser demo now makes sure that the input field
- contains a number.
- - The Fl_Browser::make_visible() method now range checks
- the input.
- - Updated the fl_draw() and fl_measure() methods to
- accept an optional draw_symbols argument, which
- controls whether symbols are drawn in the text.
- - Added new Fl::visible_focus() methods to control
- whether the focus box is drawn.
- - The focus box is now drawn using the contrast color.
- - Fl_Repeat_Button didn't accept keyboard focus.
- - Added new Fl::visible_focus() method and standard
- "-kbd" and "-nokbd" options in Fl::args() processing
- to control whether keyboard focus is shown and handled
- by non-text widgets.
- - The wrong tooltip could be shown if the user moved the
- mouse over adjacent widgets with tooltips.
- - The drop-down button on Fl_Choice widgets was not
- limited in width.
- - Tooltips could appear off the screen.
- - Mouse wheel events are now sent to the focus widget
- first, then to any other interested widget.
- - The Fl_RGB_Image class now supports images with an
- alpha channel. Images are currently drawn using
- "screen door" transparency... See the "image" demo
- for an example.
- - Added new fl_create_bitmask() and fl_delete_bitmask()
- functions that create bitmap objects for masking and
- bitmap drawing.
- - Was sending FL_RELEASE events for buttons 4 and 5
- under X11, which are only for FL_MOUSEWHEEL.
- - Fl_Help_View now supports the EM and STRONG elements.
- - Didn't do callbacks when changing tabs via keyboard.
- - FLUID didn't write tooltip strings to the message
- catalog file.
- - Fl_File_Icon now uses Fl_Shared_Image to load icon
- images; the load_png() and load_xpm() methods have
- been replaced by a single load_image() method.
- - Fl_File_Icon::load_system_icons() now does a better
- job of finding KDE icons.
- - Now use Fl::warning() and Fl::error() in place of
- printf's in some of the newer widgets.
- - The default behavior of Fl::error() is now to display
- an error but not to exit; Fl::fatal() still exits.
- - FLUID now uses the Fl_Shared_Image class, so FLUID-
- generated GUIs can embed any of the supported image
- file formats.
- - New filename_relative() function to convert an
- absolute filename to a relative one.
- - Updated the filename_absolute(), filename_expand(),
- and filename_setext() functions to take the
- destination string size, with inline functions for the
- old FL_PATH_MAX size.
- - fl_file_chooser() and fl_dir_chooser() now return a
- relative path.
- - Fl_Help_View now supports all ampersand escapes.
-
-
-CHANGES IN FLTK 1.1.0b5
-
- **** NOTE: DUE TO CHANGES IN THE WIDGET CLASSES, ****
- **** YOU MUST RECOMPILE ALL SOURCE FILES ****
- **** THAT USE FLTK!!! ****
-
- - All FLTK color values are now 32-bits and support
- both the legacy 8-bit color values as well as 24-bit
- RGB values (0xRRGGBB00 for 24-bit RGB, 0x000000II
- for indexed color).
- - Fl::set_boxtype() and fl_internal_boxtype() now keep
- track of when a boxtype is changed; this allows you to
- override the "special" boxtypes without references to
- those boxtypes causing them to be reset.
- - Fl_Help_Func now takes a Fl_Widget pointer as well as
- a pathname.
- - Added code to support FL_KEYUP events.
- - Focus did not return to the Fl_Text_Display and Editor
- widgets when scrolling and then clicking inside the
- editor window.
- - Now set the line size of the vertical scrollbar in the
- text editor to 1.
- - The symbols demo didn't show the strings needed to
- show the corresponding symbol (the label string was
- not quoted...)
- - FLTK should now compile with Cygwin cleanly.
- - Shortcut changes were not being saved by FLUID.
- - FLUID didn't write the deimage() static data.
-
-
-CHANGES IN FLTK 1.1.0b4
-
- **** NOTE: DUE TO CHANGES IN THE FL_WIDGET CLASS, ****
- **** YOU MUST RECOMPILE ALL SOURCE FILES ****
- **** THAT USE FLTK!!! ****
-
- - Updated the flags_ member of Fl_Widget to be an
- integer instead of uchar, to support the new
- FL_OVERRIDE flag for Fl_Window.
-
- - The parent() method of Fl_Widget now uses pointers to
- Fl_Group instead of Fl_Widget.
-
- - Fl_Window now provides the FLTK 2.0 "override()" and
- "set_override()" methods for windows.
-
- - Added a configure check (and warning) for GCC 3.0.x.
-
- - Updated the configure script to check for the
- png_set_tRNS_to_alpha() function.
-
- - Updated the config.h files for all platforms for the
- image and FLTK documentation defines.
-
- - Updated the makeinclude files for all platforms to
- match the current makeinclude.in file.
-
- - FLUID would crash if you cleared an image for a
- widget.
-
- - Fl_Help_View::add_image() did not initialize the image
- member of the base (unscaled) image.
-
- - Fl_Help_View didn't support A elements with both a
- NAME and HREF attribute - the HREF was ignored.
-
- - Miscellaneous compile warning fixes.
-
- - Tooltips were being reset by Fl::belowmouse(), which
- caused problems with the FLUID main window (flashing
- tooltip windows and serious problems with KDE 2.2)
-
- - The editor demo had the save and discard button
- actions reversed.
-
- - The Fl_Help_View widget now uses
- png_destroy_read_struct() if the older
- png_read_destroy() function is not available.
-
- - The WIN32 DLL library now includes the OpenGL widgets.
- This is a simpler solution for the export/import
- dillemma under WIN32, as OpenGL and non-OpenGL symbols
- need to be exported at different times with the
- separate library scheme. Since OpenGL is standard
- under Windows, this is less of a problem than under
- UNIX...
-
-
-CHANGES IN FLTK 1.1.0b3
-
- - The top-level makefile did not include the makeinclude
- file, causing the fltk-config installation commands to
- fail.
-
- - The fl_file_chooser.cxx source file conflicted with
- Fl_File_Chooser.cxx under Windows. Similarly, the
- fl_file_chooser.H header file conflicts with the
- Fl_File_Chooser.H header file.
-
- - Now save and restore the GDI pen object when
- responding to WIN32 paint messages.
-
- - Documentation updates from A. Suatoni.
-
-
-CHANGES IN FLTK 1.1.0b2
-
- - New fltk-config script.
-
- - Fixed image/text label handling; in b1 the label
- needed a non-blank text string to display the image.
- This bug also caused all sorts of crashes and display
- problems.
-
- - Added new filetype() method to Fl_FileBrowser to allow
- for file or directory browsing.
-
- - Fixed the drawing of the focus box around
- Fl_Return_Button.
-
- - Fixed menu item measurement bug (wasn't initializing
- image pointers to 0...)
-
- - Radio and checkbox menu items now draw with the new
- style (round radio buttons with dots and square check
- buttons with check marks.)
-
- - Improved the appearance of Fl_Check_Button.
-
- - Improved the Fl_HelpView table formatting code; now
- dynamically sizes the table columns, and supports
- COLSPAN.
-
- - The FLUID keyboard shortcuts now work as expected
- (CTRL-C copies, SHIFT-CTRL-C writes code, etc.)
-
- - The FLTK_DOCDIR environment variable can now be
- used to tell FLUID where to find the on-line
- documentation files.
-
- - FLUID now supports image labels in addition to text
- labels + text over image alignment.
-
- - FLUID now supports tooltips.
-
- - The widget panel in FLUID is now tabbed, a la FLTK
- 2.0.
-
- - The FLUID pixmap destructor tried to free 1 too many
- lines of image data.
-
- - FLUID now provides on-line help.
-
- - Changed Fl_FileXYZ to Fl_File_XYZ.
-
- - Changed Fl_HelpXYZ to Fl_Help_XYZ.
-
- - Tooltip fixes for Fl_Browser_, Fl_Choice, and Fl_Input_.
-
- - Added tooltips to FLUID, help dialog, and file chooser.
-
- - Now load system icons in FLUID.
-
-
-CHANGES IN FLTK 1.1.0b1
-
- - Added new image() and deimage() methods to support
- image + text labels more easily.
-
- - Added new alignment bit FL_ALIGN_TEXT_OVER_IMAGE.
-
- - Added tooltip support using Jacques Tremblay's tooltip
- patch.
-
- - Added keyboard navigation to all widgets.
-
- - Added support for mouse wheels using the new
- FL_MOUSEWHEEL event type. Get the mouse wheel
- movement values from Fl::e_dx (horizontal) and
- Fl::e_dy (vertical).
-
- - Added the Fl_Check_Browser, Fl_FileBrowser,
- Fl_FileChooser, Fl_FileIcon, Fl_HelpDialog,
- Fl_HelpView, Fl_Progress, and Fl_Wizard widgets from
- the bazaar.
-
- - Added 2.0 Fl_Text_Display and Fl_Text_Editor widgets
- based on NEdit.
-
- - The Fl_Choice widget now looks more line a combo box
- than a Motif option menu.
-
- - Moved the OpenGL widgets into a separate library
- called fltkgl - this eliminates shared library
- dependencies on OpenGL when no OpenGL functionality is
- used/required.
-
- - FLUID now supports the new Fl_CheckBrowser,
- Fl_FileBrowser, Fl_FileIcon, Fl_HelpView,
- Fl_Text_Display, Fl_Text_Editor, and Fl_Wizard
- widgets.
-
- - Updated configure stuff to support shared libraries
- under AIX (link to -lfltk_s)
-
- - Symbol labels can now contain regular text.
-
- - FLUID now supports relative filenames for the source
- and header files you generate.
-
- - Fl_Menu_Item::add() didn't use the flags that were
- passed in.
-
- - Fixed a bug in Fl_Scrollbar - clicking in the "trough"
- of the scrollbar would move the scroller in the wrong
- direction.
-
- - Made the Forms pixmap parameter const to match the
- Fl_Pixmap.H definitions.
-
- - Changed the Fl_Pixmap constructor to use the explicit
- keyword which should work for all C++ compilers.
-
- - Fl_Menu_add of a menu item with the same name as an
- existing submenu title would mess up by replacing that
- menu title, it now adds a new item.
-
- - Fl_Menu::add() of text starting with '/' to a menu is
- assummed to be a filename. So "/foo/bar" creates a
- single menu item. You can also put filenames into
- submenus by doing "submenu//foo/bar", this will create
- a submenu called "submenu" with an item "/foo/bar".
- Menu items starting with "\_" will insert an item
- starting with '_' rather than a divider line. These
- changes make the menus compatable with fltk 2.0.
-
- - Another little fix for the BoXX OpenGL overlays.
-
- - Fl_Gl_Window no longer blanks the mouse pointer on
- WIN32 unless an OpenGL overlay is being used. This
- should make non-overlay displays faster when a cursor
- is set.
-
-
-CHANGES SINCE FLTK 1.0.10
-
- - CHANGED THE DEFAULT RUN-TIME LINKING TO "MULTITHREADED
- DLL". You'll need to change your project settings to
- use this as well or you'll get errors.
-
- - Added new --disable-gl option to configure script.
-
- - Added new const const pointer versions of pixmap
- functions to eliminate an annoying pointer warning
- message that was generated by the Sun and other C++
- compilers.
-
- - Eliminated all "var hides class::var" warnings.
-
- - Eliminated all "string literal converted to char *"
- warnings.
-
- - OS/2 updates from Alexander Mai.
-
- - Tidied up the HTML documentation to be more standards
- compliant.
-
- - Compiling with -DBOXX_BUGS will work around some
- problems with the newest X drivers that BoXX delivers,
- the problems all affect use of Overlays for normal X
- drawing and OpenGL drawing. Normal compilation is
- unchanged.
-
- - The file chooser buttons use user_data() rather than
- the label to decide what to do, allowing the label to
- be somewhat cleaner.
-
- - Selection color on X changed to blue, to match what
- happens on Windows now.
-
- - Added support for AIX (static library only).
-
- - Added support for SunOS 4.x
-
- - Now process WIN32 WM_ACTIVATEAPP message to reset the
- key and button states in Fl::e_state.
-
- - Fl_has_idle only tested N-1 callbacks and missed one.
-
- - Restored WM_SYNCPAINT handling under WIN32; this fixed
- a refresh bug under some versions of Windows.
-
- - Check for OpenGL headers before checking to see if
- OpenGL is supported. This should eliminate compile
- errors due to missing non-FLTK header files...
-
- - Add -D_INCLUDE_POSIX_SOURCE option when compiling with
- the HP compilers.
-
- - Replaced remaining _WIN32 symbols with WIN32
-
- - Removed reference to unused GL/glu.h header file, which is missing on
- some Linux systems.
-
- - Fl_Gl_Window has a new method to allow you to get and set the context:
-
- void Fl_Gl_Window::context(void*, int destroy = 0)
- void* Fl_Gl_Window::context() const;
-
- Return or set a pointer to the GLContext that this window is
- using. This is a system-dependent structure, but it is portable to
- copy the context from one window to another. You can also set it to
- NULL, which will force FLTK to recreate the context the next time
- make_current() is called, this is useful for getting around bugs in
- OpenGL implementations.
-
- If destroy_flag is true the context will be destroyed by fltk when
- the window is destroyed, or when the mode() is changed, or the next
- time context(x) is called.
-
- - Some cleanup of Fl_Gl_Choice to move most of the system dependent
- #ifdefs into Fl_Gl_Choice.cxx.
-
- - Fl_Gl_Window does not set drawbuffer(BACKBUFFER) for
- single-buffered windows.
-
- - Fl_Input::replace(...) correctly updates the display
- if the replaced region does not include the mark,
- point, or selected region.
-
- - Added Fl::add_check(...), Fl::remove_check, and
- Fl::has_check. These are similar to idle callbacks but
- are only called just before it waits for new events.
- They can be used to watch for changes in global state
- and respond to them.
-
- - "accu-timer": some changes to repeat_timeout that seem
- to make it accurate on Unix and WIN32 at speeds up to
- 500000 timeouts/second (and 700000 on Linux), and
- within about .001% as accurate as the system clock.
-
- - Fix to Fl_Valuator::step() by Guillermo Andrade.
-
- - Fixed the FLUID write-menu bug introduced in 1.0.10
-
- - Fl::flush() now calls GdiFlush() under WIN32 to
- ensure that all graphics are drawn.
-
- - fl_curve() now uses a much better algorithim to figure
- out how many pieces to cut the curve into.
-
- - FLUID now uses GetTempPath() under WIN32 to determine
- where to store the clipboard.
-
- - Right-ctrl does not delete selected text in Fl_Input,
- until you type a composed character.
-
- - Added simple FLTK and FLUID manual pages.
-
- - Fl_Gl_Window leaked memory under WIN32.
-
- - The colbrowser demo was missing an include file when
- compiled under OS/2.
-
-
-CHANGES SINCE FLTK 1.0.9
-
- - Added a strcasecmp() function to FLUID; AIX doesn't
- have it.
-
- - Bug #115509: Fl_Scroll not repainting background.
-
- - Updated the configure script and makeinclude.in file
- to work with the Sun PRO compilers.
-
- - Disabled the WIN32 async socket select code by default:
- it doesn't seem to work anymore...
-
- - Fl::below_mouse() was incorrectly clearing e_is_click;
- this prevented any double-clicks from getting
- through...
-
- - No longer clear Fl::keysym on every event, this makes
- better back compatability and fixes Win2000
-
- - FLUID now restores which tab in an Fl_Tabs was
- selected when loads .fl files.
-
- - Hack to fix the annoying "raise another application
- when a modal window is closed" problem on WIN32.
-
- - Fl_Tabs now draws the background behind the tabs.
-
- - Fl::set_fonts() on WIN32 fixed to work before the
- first window is shown.
-
- - CUA function keys, code submitted by George Yohng
- <yohng@drivex.dosware.8m.com>
-
- - Another attempt to get glut.h to work on WIN32.
-
- - Fl_Menu_::add() ignores '&' signs when comparing menu
- items, so you don't have to make the shortcuts the
- same all the time.
-
- - Fixed bit-flipping patterns in WIN32 bitmap code.
-
- - Fixed size of data written by gif images to .C files
-
- - Menu titles and buttons in the menubar can be images
- (allows it to be used as a toolbar)
-
- - Reads selectBackground from the xrdb database to set
- the selection color. Adding this to your .Xdefaults
- will make fltk and Motif programs look much more
- Windoze-like:
-
- *selectForeground: white
- *selectBackground: #000080
-
- - FL_WHEN_RELEASE on Fl_Input will now do the callback
- when the input field is hidden, for instance when it
- is on a tab and the user switches to another tab.
-
- - Fl_Gl_Window with an overlay on X always resized any
- child windows even if you turned resizable() off
- because it turned it back on to resize the overlay
- window. This patch avoids changing resizable().
-
- - Fix so multiple Fl::add_idle() calls works
-
- - The input focus got messed up if you called
- Fl_Tabs::value(x) and there was something that took
- focus on an earlier tab.
-
- - Removed some (not all) of the warnings when compiled
- with -Wwrite-strings, this should also get similar
- warnings Solaris produces.
-
- - Made Fl_Browser not hide the Fl_Widget::show() method
-
- - Changes & additions for OS/2 from Alexander Mai
-
- - Patch from Mike Lindner to make the turning on/off of
- scrollbars on Fl_Scroll smarter.
-
- - Added missing FL_EXPORT for Fl_Valuator::format()
-
- - Shortcuts for "buttons" in a Fl_Menu_Bar work again.
-
- - Fix for cut/paste support and Xdnd.
-
- - Shortcuts for submenu titles in a menubar pop up the
- submenu (rather than calling the callback)
-
- - Added documentation for GL_SWAP_TYPE
-
- - Buttons with box(FL_NO_BOX) did not draw. Apparently
- they did in older versions of fltk, I restored this.
- (bug 108771)
-
- - Removed 8-bit colormap drawing code that was not doing
- anything in fl_draw_image due to the colormap
- allocation changes. I also made fl_color(r,g,b)
- actually allocate the requested color rather than the
- nearest fltk color-cube color (this is only done for
- the first color that maps to a given entry in the fltk
- color cube), the result is that pixmaps with a small
- number of colors are drawn much more accurately. The
- resulting code seems to produce better images and is a
- good deal smaller!
-
- - Fixed makeinclude.in so CFLAGS are used for c source
- code instead of CXXFLAGS. (bug 108694)
-
- - Better fix for gif files suggested by pauly (bug
- 108770)
-
- - Performance of Fl_Gl_Window may be improved on some
- types of OpenGL implementations, in particular MESA
- or other software emulators, by setting the
- GL_SWAP_TYPE environment variable. This variable
- declares what is in the back buffer after you do a
- swapbuffers:
-
- setenv GL_SWAP_TYPE COPY
-
- This indicates that the back buffer is copied to
- the front buffer, and still contains it's old
- data. This is true of many hardware
- implementations. Setting this will speed up
- emulation of overlays, and widgets that can do
- partial update can take advantage of this as
- damage() will not be cleared to -1.
-
- setenv GL_SWAP_TYPE NODAMAGE
-
- This indicates that nothing changes the back
- buffer except drawing into it. This is true of
- MESA and Win32 software emulation and perhaps some
- hardware emulation on systems with lots of memory.
-
- All other values for GL_SWAP_TYPE, and not setting
- the variable, cause fltk to assumme that the back
- buffer must be completely redrawn after a swap.
-
- This is easily tested by running the gl_overlay demo
- program and seeing if the display is correct when
- you drag another window over it or if you drag the
- window off the screen and back on. You have to exit
- and run the program again for it to see any changes
- to the environment variable.
-
- - Optimized colormap usage on 8-bit displays with
- images. New code only allocates colors as they are
- needed (still converts indexed images to full RGB and
- dithers, tho...)
-
- - Fixed .gif files in FLUID, they were broken by the fix
- for large .xpm files in version 1.0.9.
-
- - Fix for OpenGL hardware overlays with the transparent
- index != 0. Tested on the brand new HP Linux
- Workstations, this is the only bug encountered. Both
- X and OpenGL hardware overlay works perfectly on
- these, though configue may not enable it by
- default...)
-
- - Fl_Choice and all other Fl_Menu_ subclasses draw the
- items using textcolor() as the default color of the
- text.
-
- - Fix suggested by Stuart Levy to fix scrolling when
- deleting items from the browser.
-
- - Replaced the -$(MAKEFLAGS) with $(MFLAGS) as per the
- gmake documenation. Apperntly this works with other
- make programs and MAKEFLAGS is passed invisibly by
- gmake, though the documenation is not too clear...
-
-
-CHANGES SINCE FLTK 1.0.8
-
- - More documentation fixes.
- - GLUT_STROKE_*_ROMAN in glut.h are defined as 0,1 on
- WIN32 to match the glut header files there.
- - Added Fl::has_timeout() and Fl::has_idle() functions.
- - Added new Fl::repeat_timeout() method that
- measures time from when the last timeout was called.
- This has slightly less overhead and allows accurate
- spacing of timeouts.
- - More Cygwin changes
- - FLUID could crash with identifiers with trailing
- whitespace.
- - Fixed the XPM loading code in FLUID to handle files
- longer than 2048 lines.
- - Added a bunch of missing FL_EXTERN's to glut.h to
- eliminate GLUT linking errors under WIN32.
- - Fix for sliders so that clicking on one with a small
- (or zero) slider_size will not move the slider.
- - fl_shortcut.cxx didn't export fl_old_shortcut() in the
- WIN32 DLL.
- - Fixed xpaint link in the documentation.
- - Included Fl_Input word-wrap fixes from Alexander Rabi
- Beels. This will not affect things much because
- word-wrap is normally disabled.
- - Patch from Stuart Levy so the *last* widget in an
- Fl_Pack may be resizable. This should be compatable
- because resizable didn't do anything before so there
- was no reason to set it.
- - Cleaned up the timeout and Fl::wait() code. The new
- code calls the clock function less than half as much,
- which results in a noticable performance improvement
- in some apps.
- - Fl::wait(time) with a time greater than the system can
- handle (24.855 days on NT, the same on some Unix
- systems) will now act as though the time is infinity.
- Before it would do unpredictable things.
- - "USE_POLL" now compiles and works, although it is
- disabled by default. poll() is an alternative to the
- UNIX select() call which is available on some version
- of UNIX and may be faster depending on the platform;
- try it by editing config.h.
- - The WIN32 USE_ASYNC_SELECT code now does translation
- and dispatching of the select events; this makes
- Windows a lot happier.
- - Added a check for an open display in Fl::wait() so
- that you don't need an open window under X to call it.
-
- [changes in snapshot 2]
-
- - fl_old_shortcut() wasn't being exported in the WIN32 DLL
- project.
- - Updated Cygwin and Mingw makefiles.
- - Updated the BC++ project file.
- - You can no longer insert control chars into Fl_Int/Float_Input.
- - Fl_Multiline_Input now resets the horizontal position when
- focus is changed; this caused problems when multiple multiline
- widgets were used in an application.
- - All handle() methods are now public, and all draw() methods are
- now protected in FLTK widgets.
- - More fixes to the OpenGL overlay code on win32. This now
- seems to work quite reliably on several different pieces of
- hardware. Apparently doing SetLayerPaletteEntries with a
- palette larger than the overlay size caused the drivers to
- screw up in unpredictable ways. Also SwapBuffers swapped both
- the overlay and main window, which is not what fltk's
- interface wanted, this was easy to fix however.
- - Patch for full scrollbars so that clicking on them does not
- move anything.
- - Documentation fixes.
- - Better horizontal scrolling of Fl_Input when cursor is near
- the end of the line.
- - Fl_Input::value(x) selects all text.
- - Fl_Output and Fl_Multiline_Output would scroll to the end
- of the text.
- - filename_isdir() now drops any trailing slash from the
- filename (needed for Windows)
- - Added return type for main() function in line_style demo.
- - Running FLUID with the "-cs" option writes the I18N message
- file.
- - The WIN32 version of XParseGeometry() didn't initialize some
- variables. This caused a compiler warning but did not affect
- the actual code.
-
- [changes in snapshot 1]
-
- - EMail changes - fltk-bugs@easysw.com now officially
- fltk-bugs@fltk.org.
- - The FLTK DLL project file didn't include fl_compose.cxx
- - Dropped the GCC -fno-rtti option since it caused problems
- with existing programs.
- - Moved the .fl rules back to the test directory.
- - Fixed some makefile and spec file problems.
- - Fixed hardware overlays. The problem was the new
- fl_clipped() code, which tests against the current window
- size. The hardware overlay code did not set the current
- window when drawing the overlay. I needed hardware overlay
- for DD's code, I'm not sure if these fixes are good enough to
- enable this in our general release. Hardware overlay still
- only works on SGI Irix.
- - Some patches to turn off the MSVC++ -Oa (assumme no aliasing)
- optimization flag. Suprisingly this only broke a few parts
- of fltk, or at least these are the only ones I found.
- - Does not unmap child windows when the main window is
- iconized. This reduces flashing when the window is
- deiconized.
- - Fl::key() is set to zero by all events except key down/up.
- This will allow you to reliably test if an event or callback
- was produced by a keystroke. Fixes the bug posted about
- stopping Escape from closing the window.
- - User defined cursors on OpenGL windows slowed down NT a
- *LOT*. Some attempts to fix this by turning off the cursor
- while drawing the window.
- - Filename completion in the file chooser works better on NT.
- Typing TAB fixes the case of everything you typed to match
- the shortest name that can be completed.
-
-
-CHANGES SINCE FLTK 1.0.7
-
- - Many documentation changes/fixes/improvements.
- - FLUID didn't save Fl_Double_Window's as
- double-buffered windows.
- - Fl_Menu_ text color is used if Fl_Menu_Item text color
- is not set.
- - Added Fl::first_window(window) method to change the
- "top" window that is used when showing modal windows.
- By default it is the window the user last
- clicked/typed in.
- - The Fl_Menu::global() handler now uses the current top
- window instead of the menu bar for modal stuff.
- - Added fl_line_style() function to set the line style.
- Note that user-defined line styles ONLY WORK UNDER X11
- and Windows NT/2000. Windows 95/98 do, however,
- support the "standard" line styles.
- - Fl::wait() does not return immediately when no windows
- - XForms keyboard shortcuts using hex keycode constants
- now work.
- - Updated the configure script for *BSD and to turn off
- exceptions and RTTI in the FLTK library itself (does
- not affect applications which use these things)
- - FLUID now supports I18N using the POSIX or GNU
- mechanisms.
- - Fixed definition of glutBitmapWidth to match header
- file.
- - Does not turn visible() on when a window is iconized()
- or if a modal window is shown and it's parent is
- iconized. This allows the code "while (w->visible()
- && w->damage()) Fl::check();" to reliably wait for the
- window to be mapped and drawn the first time.
- - Setting box(FL_NO_BOX) on a button makes it an
- invisible overlay
- - FL_NORMAL_SIZE is now a global variable so you can
- change the default text size prior to creating your
- widgets.
- - Menus now draw properly with a box type of
- FL_FLAT_BOX.
- - Cygwin fixes to compile in POSIX mode.
- - Fl_Value_Input callback can call value() or
- destructor.
- - OpenGL overlays now work under Windows NT!
- - Fl_Slider and Fl_Scrollbar could cause a divide by
- zero.
- - Clicking in an Fl_Input field no longer selects the
- whole field, it just moves the text cursor.
- - Tru64 UNIX fixes for filename_list()
- - Fl_Browser now draws itself properly when deactivated.
- - FLUID GUIs now use Courier font for all code input.
- - The FLUID OK and Cancel buttons are now all shown in
- the same order in all windows.
- - Fixes to compile under GCC 2.95.2
- - Fixed the BC5 project files.
- - FL_LEFT_MOUSE and friends are now in
- <FL/Enumerations.H>
- - Fixes for fake OpenGL overlay code under WIN32.
- - Message windows are now resizeable.
- - On WIN32 non_modal (but not modal) windows have the
- close and size boxes.
- - Fl_Button and friends didn't honor the
- FL_WHEN_NOT_CHANGED condition.
- - Disabled XDBE on all platforms.
- - XGetDefault patch from James Roth
- - New fl_open_display(Display *) function to allow FLTK
- to share a display connection with another toolkit
- (like Xt, GTK, etc.)
- - Shortcut labels for special keys should now display
- properly under WIN32.
- - fl_set_fonts() did not reuse fonts.
- - Fixed shortcut problem under WIN32 when the focus
- window changes.
- - "dead" keys should now work under X11.
- - Fixes to make FLTK compile with GCC 2.95.2
- - FL_SHORTCUT fix for I18N.
- - Fixed cut/paste problems under WIN32
- - FLUID now produces correct code for nested class
- destructors.
- - Nested windows should now redraw properly under WIN32.
- - "table" is now static in fl_cursor.cxx
- - Fl_Chart used the textcolor() and not the color() for
- horizontal bar charts.
- - Now set the input hint for TWM and TWM-derived window
- managers.
- - Now look for TrueColor visual if FLTK is compiled with
- USE_COLORMAP == 0.
- - Fl_Scrollbar could generate a divide-by-0 error if the
- min and max values were the same.
- - Fl_Menu_::remove() now removes whole submenus if
- needed.
- - Scrollbar buttons now draw themselves pushed in as
- needed.
- - Fixed the gl_overlay demo (and gl overlays in general)
- when they are faked with no hardware and the window is
- resized.
- - Selections weren't shown in Fl_Browser widgets when an
- item used the @B (background) format.
- - Windows can now be resized by the program under X11
- for more window managers.
- - OS/2 makeinclude updates.
- - Added Fl.H required by an inline function in
- Fl_Repeat_Button.H
- - Fl_add_idle adds new functions to the end of the queue
- ring, rather than the start, so they are executed in
- the order added, and a callback that adds itself does
- not prevent others from being called.
- - FLUID lets you type in code that starts with '#' for
- cpp directives.
- - XBell() could be called before the X11 display was
- opened, causing a segfault.
- - Fixed Fl_Gl_Window::ortho() - Borland C++ doesn't
- define GLint to "int", but instead to "long"...
- - Fixed Fl_Browser scrollbars within an Fl_Scroll
- widget.
- - Fl_Output (and non-focused Fl_Input) now scroll in
- response to position()
- - Fl_Input now does not scroll horizontally if the
- entire string will fit in the widget.
- - Fl_Scrollbar didn't push the right arrow buttons when
- you clicked outside the scroller.
- - Now use WSAAsyncSelect() for better socket performance
- with Fl::add_fd()
-
-
-CHANGES SINCE FLTK 1.0.6
-
- - Fixed Fl_Input_ bug under WIN32 - no longer stop accepting input
- when one of the "Windows" keys is pressed.
- - Now call TranslateEvent for all events under WIN32.
- - Fixes for OpenBSD and NetBSD
- - The FL_CURSOR_HAND cursor now uses the IDC_HAND cursor instead of
- IDC_UPARROW under Windows 98 and 2000.
- - Fl_Scrollbar now does a page-up/down when you click outside the
- scroller.
- - Fl_Window::show(0, NULL) causes core dump
- - Fixed a compile-time error in fl_call_main.c for Borland C++.
- - "fluid -c filename.fl" would try to open an X display if the
- FLUID file contained an Fl_Browser widget.
- - Fl_Browser now correctly measures items with @C or @B color
- formatting commands.
- - Fixed a bitmap drawing bug for WIN32 (bit reversal table was wrong)
- - fl_xyz() dialogs now set a title in the title bar.
- - fl_alert() sounds the bell under X11.
- - fl_xyz() dialogs now call MessageBeep() under WIN32.
- - Fl_Browser_ didn't draw the selection box with the inactive color
- when the browser wasn't activated.
- - Fl_Browser now responds to FL_KEYBOARD as well as FL_SHORTCUT. If
- you subclass it to accept focus then keyboard navigation will work.
- - Fl_Tile and Fl_Tabs do their callback when the user changes their
- display.
- - Made some of the private methods of Fl_Browser protected.
- - Now set win_gravity correctly, this helps some X
- window managers that use it position the window where
- FLTK wants it to be.
- - 0-width browsers crashed.
- - Minor change: if the X window manager does not do
- anything else with windows that don't have their
- position specified, the windows appear centered in the
- screen, rather than in the top-left corner. This
- happened with modal windows under Irix 4Dwm. This
- also causes windows to be centered when no window
- manager is running, which might be useful for
- installation gui programs?
- - Clicking in an Fl_Input field the first time selects the entire
- field.
- - Clicking the middle mouse button in an Fl_Input field now inserts
- the text at the indicated position instead of the cursor position.
- - Drag-selecting text in an Fl_Input field now copies the text
- automatically.
- - Fl::flush() no longer calls the draw() method for invisible windows.
- - Calling deactivate() on an invisible widget could cause an
- infinite loop in some obscure cases.
- - Added #pragma's for SGI C++ compilers - the 6.{23} X headers had
- errors in them.
- - Fl_Gl_Window::ortho() changed so that text and images
- are not erased if the origin is off the left/bottom of the
- window.
- - Small change to Fl_Input so that a click that gives it
- the focus also selects all the text.
- - Fixed a slider drawing problem.
- - You can now add/delete children of Fl_Tabs widgets whether or
- not they are visible.
- - Now embed woff options for SGI C++ compilers (gets rid of X11
- header warnings)
- - draw_pixmap used a cast that the Digital UNIX C++ compiler didn't
- like.
- - The GLUT function key constants were off by one.
- - The XPM reading code didn't handle RGB colors other than #rrggbb.
-
-
-CHANGES SINCE FLTK 1.0.5
-
- - Fl_win32.cxx defined WM_MOUSE_LEAVE instead of WM_MOUSELEAVE.
- - Fl_get_key_win32.cxx needed to include <ctype.h>
- - gl_draw_pixmap.cxx needed a pointer cast for ANSI C++.
- - Fl_Repeat_Button didn't always delete its timeout.
- - Now keep track of the current OpenGL context; this provides
- significant performance improvements for OpenGL applications
- with a single context.
-
-
-CHANGES SINCE FLTK 1.0.4
-
- - Fl_Roller didn't handle a width and height of 0.
- - filename_list() fix for FreeBSD.
- - Fixed RPM install docos - needed "--install" option...
- - Fl_Browser_ wouldn't draw the vertical scrollbar right away if it
- added a horizontal one which covered the last line.
- - Fl_Tabs problems - single-character labels don't show up (problem in
- measure_tabs() or measure_label() methods?), and doesn't clear top
- tab area before drawing tabs.
- - Fl_Browser needs a destructor.
- - fl_draw_label() quoted characters between 0x80 and 0xa0, which
- caused problems for some programs using the WinANSI character set.
- - FLUID didn't handle declared class destructors.
- - Fixed another WIN32 cut/paste bug.
- - Fl_Tabs didn't work properly when there was only 1 tab.
- - Fl_Menu::add() didn't delete the old array.
- - Fl_Repeat_Button didn't delete its timeout when disabled.
- - fl_draw() would crash if no font was set (now defaults to
- a 14-pixel Helvetica font)
- - Can't forward declare classes; need to check for "class ", "struct ",
- "union ", etc. See Bill's message
- - Added #pragma around xlib.h for IRIX
- - FL_KEYBOARD events have the correct x/y when sent to child X
- windows. Note that if you worked around this bug by adjusting the
- x/y yourself you will have to change your code. In addition all
- events have the correct x/y when sent to the grab() widget. And
- the code to do all this was simplified a lot.
- - The XPM code didn't handle named colors with spaces in the names.
- - Pressing ESCape closed the window with pointer focus, even if there
- was a modal window open (now closes the modal window).
- - FLUID no longer produces trigraphs accidentally in the image data.
- - FLUID uses string constant concatenation to produce shorter image
- data.
- - The Fl_Group deletion code crashed if there was exactly one child
- widget.
- - Simulated overlays in single-buffered Fl_Gl_Windows now draw
- correctly (though very slowly as it requires the entire window to
- be redrawn to erase the overlay). This fix ported our Digital
- Domain programs better to systems with no overlay hardware.
- - Added support for extern "C" declarations in FLUID.
- - Added Fl_Pack support to FLUID.
- - Fixed the order of #include's in FLUID generated header files.
- - Fixed detection of vsnprintf and snprintf under HP-UX 10.20 once
- and for all.
- - The checkers demo did not compile with GCC 2.95
- - FLUID didn't output virtual destructors properly.
- - Added inline "make_visible()" method to Fl_Browser.
- - Fl::wait() now returns immediately if any timeouts are
- called.
- - 16-bit XPM files are now properly handled.
- - Fl_Window::resize() was missing FL_EXPORT (caused problems
- with Windows DLLs)
- - FLUID was writing extern declarations twice.
- - New FLUID arrow key functionality: arrows move by one pixel, shift+arrow
- resizes, ctrl+arrow steps by grid
-
-
-CHANGES SINCE FLTK 1.0.3
-
- - Documentation updates
- - Fl_Browser::bottomline(size) didn't scroll to the bottom
- if the second-to-last line was visible.
- - fl_wait() didn't poll FDs properly for WIN32.
- - Fixed DLL definitions for BC++.
- - FLUID now handles nested classes properly.
- - The "connect" demo now does a wait() for the PPP process
- so that you aren't left with a lot of zombie processes.
- - Fixed the FLTK colormap to use FF instead of F4 for full
- intensity values.
- - Minor change to scrollbar drawing code to match other
- toolkits.
- - New selections would cancel themselves out in WIN32.
- - The header file links were broken in the IRIX
- distributions.
- - fl_elapsed() now always uses GetClockTick() for WIN32.
- - fl_display is now initialized to GetModuleHandle(NULL) -
- this fixes problems people had with Cygwin and MingW32.
- - WinMain() is no longer compiled in with Cygwin and
- MingW32; it wasn't being used for those compilers anyways.
- - Added Solaris compiler options to configure script.
- - Fl_Value_Input wouldn't update properly if you set the
- value from a callback.
- - Fl_Tile wouldn't resize if the resizeable widget was the
- last child.
- - Was missing #include <ctype.h> and #include <stdlib.h> in
- several files, which caused problems on some platforms.
- - Fixed another case where Fl_Browser_ could get in an
- infinite resizing loop.
- - Fl_win32.cxx now includes <FL/filename.H> to export missing
- DLL symbols.
- - FLUID didn't handle member functions that include the
- scope operator.
- - Fl_Chart was dividing by 0 if there were no data samples
- or if they were all the same (min == max).
-
-
-CHANGES SINCE FLTK 1.0.2
-
- - XDBE is now enabled for IRIX 6.[234] as well as 6.5.
- - FLUID didn't write the when() condition properly.
- - Tab/space/backtab/backspace can be used to navigate
- through menus.
- - Changed $(DSONAME) in the src/Makefile to "libfltk.so.1
- libfltk.sl.1".
- - Fl_Browser could read past the end of the string when
- computing the item height.
- - Fl_Browser could get in an infinite loop when checking to
- see if scrollbars needed to be displayed.
- - FLUID now honors the return type of the outermost widget.
- This was a problem when substituting Fl_Group in an
- Fl_Window widget.
- - Fl_Menu_::copy() wasn't allocating a power of 2 for the
- array size.
- - FLWM would crash if fl_xmousewin was deleted.
- - The fast_slow demo now uses output widgets.
- - Timers under WIN32 were unreliable.
-
-CHANGES SINCE FLTK 1.0.1
+CHANGES IN FLTK 1.1
- - Documentation updates
- - The Visual C++ project files didn't include fl_add_idle.cxx.
- - LIBRARY/DSO name inconsistencies in src/Makefile.
- - src/Makefile didn't clean the DSO.
- - The valuator demo now has only a single callback.
- - The code looked for HAVE_SYS_SELECT_H, but the
- config file uses HAVE_SYS_SELECT.
- - Fl_Image redraw not quite right under X11 or WIN32
- - Problems with timeouts & cube demo under WIN32
- - FLUID problems with inline functions.
- - Documentation fixes...
- - Fl_Browser::item_height() didn't handle blank lines or
- non-default fonts properly.
- - FL/math.h didn't have #ifndef...#define...#endif guards
- against multiple inclusion...
- - Fl_Menu_::copy() fix - didn't allocate power of 2...
- - Fl::damage() now remains true until all windows are actually
- redrawn.
- - Fl_Widget destructor, hide(), and deactivate() methods no longer
- send FL_LEAVE, FL_RELEASE, or FL_UNFOCUS events to the widget
- (which could cause applications to crash).
- - FLUID now outputs symbolic names for align() and when().
- - Fixed select() to use maxfd + 1 instead of maxfd.
- - Added "Fl::remove_fd(fd, when)" function so you can remove the
- read and write callbacks separately.
- - The Fl::add_fd() and Fl::add_timeout() arrays are now dynamically
- allocated.
- - FLUID didn't always turn the FL_SUBMENU flag on for submenu titles.
- - The "extra code" in FLUID now is placed before the "o->end()" call
- for Fl_Group and its derived classes.
- - You can now set a FL_Window widget's class in FLUID to Fl_Group to
- generate a function or class that builds part of a GUI (i.e. no window).
- - FLUID now displays "Save file before exiting?" with the standard yes,
- no, and cancel buttons rather than "Discard changes?".
- - Fl_Menu_::add() now works with any type of menu, even one set with
- the menu() method.
- - The keypad keys were not always decoded properly under X11.
- - Some pointers were not being turned off when widgets were deleted,
- which caused some applications (like FLWM) to crash.
+ See CHANGES_1.1
-CHANGES SINCE FLTK 1.0
+CHANGES IN FLTK 1.0
- - Documentation fixes.
- - Fl::check() didn't return the correct value, breaking a number
- of applications.
- - Fixed FLUID bug that caused styles patch to crash when you delete
- a menu item.
- - Updated valuators demo to put the values in the gui box.
- - Fl_Browser_::item_height() didn't always compute the correct
- value.
- - Fixed the alignment of Fl_Choice text.
- - Fixes for OS/2.
- - Fl_Menu_Item::clear() didn't clear value.
- - Added some changes to make FLTK work with Borland C++.
- - ANSI C++ fixes.
- - Plugged a memory leak in the fractal demo.
- - Fl::add_timeout() didn't work under WIN32 with small values.
- - The configure script and makefiles now define DSONAME and
- use the static library for all example programs.
+ See CHANGES_1.0
diff --git a/CHANGES_1.0 b/CHANGES_1.0
new file mode 100644
index 0000000..5da3ac3
--- /dev/null
+++ b/CHANGES_1.0
@@ -0,0 +1,799 @@
+Changes in FLTK 1.0, up to FLTK 1.0.11 (May 7, 2001)
+
+CHANGES IN FLTK 1.0.11
+
+ - CHANGED THE DEFAULT RUN-TIME LINKING TO "MULTITHREADED
+ DLL". You'll need to change your project settings to
+ use this as well or you'll get errors.
+
+ - Added new --disable-gl option to configure script.
+
+ - Added new const const pointer versions of pixmap
+ functions to eliminate an annoying pointer warning
+ message that was generated by the Sun and other C++
+ compilers.
+
+ - Eliminated all "var hides class::var" warnings.
+
+ - Eliminated all "string literal converted to char *"
+ warnings.
+
+ - OS/2 updates from Alexander Mai.
+
+ - Tidied up the HTML documentation to be more standards
+ compliant.
+
+ - Compiling with -DBOXX_BUGS will work around some
+ problems with the newest X drivers that BoXX delivers,
+ the problems all affect use of Overlays for normal X
+ drawing and OpenGL drawing. Normal compilation is
+ unchanged.
+
+ - The file chooser buttons use user_data() rather than
+ the label to decide what to do, allowing the label to
+ be somewhat cleaner.
+
+ - Selection color on X changed to blue, to match what
+ happens on Windows now.
+
+ - Added support for AIX (static library only).
+
+ - Added support for SunOS 4.x
+
+ - Now process WIN32 WM_ACTIVATEAPP message to reset the
+ key and button states in Fl::e_state.
+
+ - Fl_has_idle only tested N-1 callbacks and missed one.
+
+ - Restored WM_SYNCPAINT handling under WIN32; this fixed
+ a refresh bug under some versions of Windows.
+
+ - Check for OpenGL headers before checking to see if
+ OpenGL is supported. This should eliminate compile
+ errors due to missing non-FLTK header files...
+
+ - Add -D_INCLUDE_POSIX_SOURCE option when compiling with
+ the HP compilers.
+
+ - Replaced remaining _WIN32 symbols with WIN32
+
+ - Removed reference to unused GL/glu.h header file, which is missing on
+ some Linux systems.
+
+ - Fl_Gl_Window has a new method to allow you to get and set the context:
+
+ void Fl_Gl_Window::context(void*, int destroy = 0)
+ void* Fl_Gl_Window::context() const;
+
+ Return or set a pointer to the GLContext that this window is
+ using. This is a system-dependent structure, but it is portable to
+ copy the context from one window to another. You can also set it to
+ NULL, which will force FLTK to recreate the context the next time
+ make_current() is called, this is useful for getting around bugs in
+ OpenGL implementations.
+
+ If destroy_flag is true the context will be destroyed by fltk when
+ the window is destroyed, or when the mode() is changed, or the next
+ time context(x) is called.
+
+ - Some cleanup of Fl_Gl_Choice to move most of the system dependent
+ #ifdefs into Fl_Gl_Choice.cxx.
+
+ - Fl_Gl_Window does not set drawbuffer(BACKBUFFER) for
+ single-buffered windows.
+
+ - Fl_Input::replace(...) correctly updates the display
+ if the replaced region does not include the mark,
+ point, or selected region.
+
+ - Added Fl::add_check(...), Fl::remove_check, and
+ Fl::has_check. These are similar to idle callbacks but
+ are only called just before it waits for new events.
+ They can be used to watch for changes in global state
+ and respond to them.
+
+ - "accu-timer": some changes to repeat_timeout that seem
+ to make it accurate on Unix and WIN32 at speeds up to
+ 500000 timeouts/second (and 700000 on Linux), and
+ within about .001% as accurate as the system clock.
+
+ - Fix to Fl_Valuator::step() by Guillermo Andrade.
+
+ - Fixed the FLUID write-menu bug introduced in 1.0.10
+
+ - Fl::flush() now calls GdiFlush() under WIN32 to
+ ensure that all graphics are drawn.
+
+ - fl_curve() now uses a much better algorithim to figure
+ out how many pieces to cut the curve into.
+
+ - FLUID now uses GetTempPath() under WIN32 to determine
+ where to store the clipboard.
+
+ - Right-ctrl does not delete selected text in Fl_Input,
+ until you type a composed character.
+
+ - Added simple FLTK and FLUID manual pages.
+
+ - Fl_Gl_Window leaked memory under WIN32.
+
+ - The colbrowser demo was missing an include file when
+ compiled under OS/2.
+
+
+CHANGES IN FLTK 1.0.10
+
+ - Added a strcasecmp() function to FLUID; AIX doesn't
+ have it.
+
+ - Bug #115509: Fl_Scroll not repainting background.
+
+ - Updated the configure script and makeinclude.in file
+ to work with the Sun PRO compilers.
+
+ - Disabled the WIN32 async socket select code by default:
+ it doesn't seem to work anymore...
+
+ - Fl::below_mouse() was incorrectly clearing e_is_click;
+ this prevented any double-clicks from getting
+ through...
+
+ - No longer clear Fl::keysym on every event, this makes
+ better back compatability and fixes Win2000
+
+ - FLUID now restores which tab in an Fl_Tabs was
+ selected when loads .fl files.
+
+ - Hack to fix the annoying "raise another application
+ when a modal window is closed" problem on WIN32.
+
+ - Fl_Tabs now draws the background behind the tabs.
+
+ - Fl::set_fonts() on WIN32 fixed to work before the
+ first window is shown.
+
+ - CUA function keys, code submitted by George Yohng
+ <yohng@drivex.dosware.8m.com>
+
+ - Another attempt to get glut.h to work on WIN32.
+
+ - Fl_Menu_::add() ignores '&' signs when comparing menu
+ items, so you don't have to make the shortcuts the
+ same all the time.
+
+ - Fixed bit-flipping patterns in WIN32 bitmap code.
+
+ - Fixed size of data written by gif images to .C files
+
+ - Menu titles and buttons in the menubar can be images
+ (allows it to be used as a toolbar)
+
+ - Reads selectBackground from the xrdb database to set
+ the selection color. Adding this to your .Xdefaults
+ will make fltk and Motif programs look much more
+ Windoze-like:
+
+ *selectForeground: white
+ *selectBackground: #000080
+
+ - FL_WHEN_RELEASE on Fl_Input will now do the callback
+ when the input field is hidden, for instance when it
+ is on a tab and the user switches to another tab.
+
+ - Fl_Gl_Window with an overlay on X always resized any
+ child windows even if you turned resizable() off
+ because it turned it back on to resize the overlay
+ window. This patch avoids changing resizable().
+
+ - Fix so multiple Fl::add_idle() calls works
+
+ - The input focus got messed up if you called
+ Fl_Tabs::value(x) and there was something that took
+ focus on an earlier tab.
+
+ - Removed some (not all) of the warnings when compiled
+ with -Wwrite-strings, this should also get similar
+ warnings Solaris produces.
+
+ - Made Fl_Browser not hide the Fl_Widget::show() method
+
+ - Changes & additions for OS/2 from Alexander Mai
+
+ - Patch from Mike Lindner to make the turning on/off of
+ scrollbars on Fl_Scroll smarter.
+
+ - Added missing FL_EXPORT for Fl_Valuator::format()
+
+ - Shortcuts for "buttons" in a Fl_Menu_Bar work again.
+
+ - Fix for cut/paste support and Xdnd.
+
+ - Shortcuts for submenu titles in a menubar pop up the
+ submenu (rather than calling the callback)
+
+ - Added documentation for GL_SWAP_TYPE
+
+ - Buttons with box(FL_NO_BOX) did not draw. Apparently
+ they did in older versions of fltk, I restored this.
+ (bug 108771)
+
+ - Removed 8-bit colormap drawing code that was not doing
+ anything in fl_draw_image due to the colormap
+ allocation changes. I also made fl_color(r,g,b)
+ actually allocate the requested color rather than the
+ nearest fltk color-cube color (this is only done for
+ the first color that maps to a given entry in the fltk
+ color cube), the result is that pixmaps with a small
+ number of colors are drawn much more accurately. The
+ resulting code seems to produce better images and is a
+ good deal smaller!
+
+ - Fixed makeinclude.in so CFLAGS are used for c source
+ code instead of CXXFLAGS. (bug 108694)
+
+ - Better fix for gif files suggested by pauly (bug
+ 108770)
+
+ - Performance of Fl_Gl_Window may be improved on some
+ types of OpenGL implementations, in particular MESA
+ or other software emulators, by setting the
+ GL_SWAP_TYPE environment variable. This variable
+ declares what is in the back buffer after you do a
+ swapbuffers:
+
+ setenv GL_SWAP_TYPE COPY
+
+ This indicates that the back buffer is copied to
+ the front buffer, and still contains it's old
+ data. This is true of many hardware
+ implementations. Setting this will speed up
+ emulation of overlays, and widgets that can do
+ partial update can take advantage of this as
+ damage() will not be cleared to -1.
+
+ setenv GL_SWAP_TYPE NODAMAGE
+
+ This indicates that nothing changes the back
+ buffer except drawing into it. This is true of
+ MESA and Win32 software emulation and perhaps some
+ hardware emulation on systems with lots of memory.
+
+ All other values for GL_SWAP_TYPE, and not setting
+ the variable, cause fltk to assumme that the back
+ buffer must be completely redrawn after a swap.
+
+ This is easily tested by running the gl_overlay demo
+ program and seeing if the display is correct when
+ you drag another window over it or if you drag the
+ window off the screen and back on. You have to exit
+ and run the program again for it to see any changes
+ to the environment variable.
+
+ - Optimized colormap usage on 8-bit displays with
+ images. New code only allocates colors as they are
+ needed (still converts indexed images to full RGB and
+ dithers, tho...)
+
+ - Fixed .gif files in FLUID, they were broken by the fix
+ for large .xpm files in version 1.0.9.
+
+ - Fix for OpenGL hardware overlays with the transparent
+ index != 0. Tested on the brand new HP Linux
+ Workstations, this is the only bug encountered. Both
+ X and OpenGL hardware overlay works perfectly on
+ these, though configue may not enable it by
+ default...)
+
+ - Fl_Choice and all other Fl_Menu_ subclasses draw the
+ items using textcolor() as the default color of the
+ text.
+
+ - Fix suggested by Stuart Levy to fix scrolling when
+ deleting items from the browser.
+
+ - Replaced the -$(MAKEFLAGS) with $(MFLAGS) as per the
+ gmake documenation. Apperntly this works with other
+ make programs and MAKEFLAGS is passed invisibly by
+ gmake, though the documenation is not too clear...
+
+
+CHANGES IN FLTK 1.0.9
+
+ - More documentation fixes.
+ - GLUT_STROKE_*_ROMAN in glut.h are defined as 0,1 on
+ WIN32 to match the glut header files there.
+ - Added Fl::has_timeout() and Fl::has_idle() functions.
+ - Added new Fl::repeat_timeout() method that
+ measures time from when the last timeout was called.
+ This has slightly less overhead and allows accurate
+ spacing of timeouts.
+ - More Cygwin changes
+ - FLUID could crash with identifiers with trailing
+ whitespace.
+ - Fixed the XPM loading code in FLUID to handle files
+ longer than 2048 lines.
+ - Added a bunch of missing FL_EXTERN's to glut.h to
+ eliminate GLUT linking errors under WIN32.
+ - Fix for sliders so that clicking on one with a small
+ (or zero) slider_size will not move the slider.
+ - fl_shortcut.cxx didn't export fl_old_shortcut() in the
+ WIN32 DLL.
+ - Fixed xpaint link in the documentation.
+ - Included Fl_Input word-wrap fixes from Alexander Rabi
+ Beels. This will not affect things much because
+ word-wrap is normally disabled.
+ - Patch from Stuart Levy so the *last* widget in an
+ Fl_Pack may be resizable. This should be compatable
+ because resizable didn't do anything before so there
+ was no reason to set it.
+ - Cleaned up the timeout and Fl::wait() code. The new
+ code calls the clock function less than half as much,
+ which results in a noticable performance improvement
+ in some apps.
+ - Fl::wait(time) with a time greater than the system can
+ handle (24.855 days on NT, the same on some Unix
+ systems) will now act as though the time is infinity.
+ Before it would do unpredictable things.
+ - "USE_POLL" now compiles and works, although it is
+ disabled by default. poll() is an alternative to the
+ UNIX select() call which is available on some version
+ of UNIX and may be faster depending on the platform;
+ try it by editing config.h.
+ - The WIN32 USE_ASYNC_SELECT code now does translation
+ and dispatching of the select events; this makes
+ Windows a lot happier.
+ - Added a check for an open display in Fl::wait() so
+ that you don't need an open window under X to call it.
+
+ [changes in snapshot 2]
+
+ - fl_old_shortcut() wasn't being exported in the WIN32 DLL
+ project.
+ - Updated Cygwin and Mingw makefiles.
+ - Updated the BC++ project file.
+ - You can no longer insert control chars into Fl_Int/Float_Input.
+ - Fl_Multiline_Input now resets the horizontal position when
+ focus is changed; this caused problems when multiple multiline
+ widgets were used in an application.
+ - All handle() methods are now public, and all draw() methods are
+ now protected in FLTK widgets.
+ - More fixes to the OpenGL overlay code on win32. This now
+ seems to work quite reliably on several different pieces of
+ hardware. Apparently doing SetLayerPaletteEntries with a
+ palette larger than the overlay size caused the drivers to
+ screw up in unpredictable ways. Also SwapBuffers swapped both
+ the overlay and main window, which is not what fltk's
+ interface wanted, this was easy to fix however.
+ - Patch for full scrollbars so that clicking on them does not
+ move anything.
+ - Documentation fixes.
+ - Better horizontal scrolling of Fl_Input when cursor is near
+ the end of the line.
+ - Fl_Input::value(x) selects all text.
+ - Fl_Output and Fl_Multiline_Output would scroll to the end
+ of the text.
+ - filename_isdir() now drops any trailing slash from the
+ filename (needed for Windows)
+ - Added return type for main() function in line_style demo.
+ - Running FLUID with the "-cs" option writes the I18N message
+ file.
+ - The WIN32 version of XParseGeometry() didn't initialize some
+ variables. This caused a compiler warning but did not affect
+ the actual code.
+
+ [changes in snapshot 1]
+
+ - EMail changes - fltk-bugs@easysw.com now officially
+ fltk-bugs@fltk.org.
+ - The FLTK DLL project file didn't include fl_compose.cxx
+ - Dropped the GCC -fno-rtti option since it caused problems
+ with existing programs.
+ - Moved the .fl rules back to the test directory.
+ - Fixed some makefile and spec file problems.
+ - Fixed hardware overlays. The problem was the new
+ fl_clipped() code, which tests against the current window
+ size. The hardware overlay code did not set the current
+ window when drawing the overlay. I needed hardware overlay
+ for DD's code, I'm not sure if these fixes are good enough to
+ enable this in our general release. Hardware overlay still
+ only works on SGI Irix.
+ - Some patches to turn off the MSVC++ -Oa (assumme no aliasing)
+ optimization flag. Suprisingly this only broke a few parts
+ of fltk, or at least these are the only ones I found.
+ - Does not unmap child windows when the main window is
+ iconized. This reduces flashing when the window is
+ deiconized.
+ - Fl::key() is set to zero by all events except key down/up.
+ This will allow you to reliably test if an event or callback
+ was produced by a keystroke. Fixes the bug posted about
+ stopping Escape from closing the window.
+ - User defined cursors on OpenGL windows slowed down NT a
+ *LOT*. Some attempts to fix this by turning off the cursor
+ while drawing the window.
+ - Filename completion in the file chooser works better on NT.
+ Typing TAB fixes the case of everything you typed to match
+ the shortest name that can be completed.
+
+
+CHANGES IN FLTK 1.0.8
+
+ - Many documentation changes/fixes/improvements.
+ - FLUID didn't save Fl_Double_Window's as
+ double-buffered windows.
+ - Fl_Menu_ text color is used if Fl_Menu_Item text color
+ is not set.
+ - Added Fl::first_window(window) method to change the
+ "top" window that is used when showing modal windows.
+ By default it is the window the user last
+ clicked/typed in.
+ - The Fl_Menu::global() handler now uses the current top
+ window instead of the menu bar for modal stuff.
+ - Added fl_line_style() function to set the line style.
+ Note that user-defined line styles ONLY WORK UNDER X11
+ and Windows NT/2000. Windows 95/98 do, however,
+ support the "standard" line styles.
+ - Fl::wait() does not return immediately when no windows
+ - XForms keyboard shortcuts using hex keycode constants
+ now work.
+ - Updated the configure script for *BSD and to turn off
+ exceptions and RTTI in the FLTK library itself (does
+ not affect applications which use these things)
+ - FLUID now supports I18N using the POSIX or GNU
+ mechanisms.
+ - Fixed definition of glutBitmapWidth to match header
+ file.
+ - Does not turn visible() on when a window is iconized()
+ or if a modal window is shown and it's parent is
+ iconized. This allows the code "while (w->visible()
+ && w->damage()) Fl::check();" to reliably wait for the
+ window to be mapped and drawn the first time.
+ - Setting box(FL_NO_BOX) on a button makes it an
+ invisible overlay
+ - FL_NORMAL_SIZE is now a global variable so you can
+ change the default text size prior to creating your
+ widgets.
+ - Menus now draw properly with a box type of
+ FL_FLAT_BOX.
+ - Cygwin fixes to compile in POSIX mode.
+ - Fl_Value_Input callback can call value() or
+ destructor.
+ - OpenGL overlays now work under Windows NT!
+ - Fl_Slider and Fl_Scrollbar could cause a divide by
+ zero.
+ - Clicking in an Fl_Input field no longer selects the
+ whole field, it just moves the text cursor.
+ - Tru64 UNIX fixes for filename_list()
+ - Fl_Browser now draws itself properly when deactivated.
+ - FLUID GUIs now use Courier font for all code input.
+ - The FLUID OK and Cancel buttons are now all shown in
+ the same order in all windows.
+ - Fixes to compile under GCC 2.95.2
+ - Fixed the BC5 project files.
+ - FL_LEFT_MOUSE and friends are now in
+ <FL/Enumerations.H>
+ - Fixes for fake OpenGL overlay code under WIN32.
+ - Message windows are now resizeable.
+ - On WIN32 non_modal (but not modal) windows have the
+ close and size boxes.
+ - Fl_Button and friends didn't honor the
+ FL_WHEN_NOT_CHANGED condition.
+ - Disabled XDBE on all platforms.
+ - XGetDefault patch from James Roth
+ - New fl_open_display(Display *) function to allow FLTK
+ to share a display connection with another toolkit
+ (like Xt, GTK, etc.)
+ - Shortcut labels for special keys should now display
+ properly under WIN32.
+ - fl_set_fonts() did not reuse fonts.
+ - Fixed shortcut problem under WIN32 when the focus
+ window changes.
+ - "dead" keys should now work under X11.
+ - Fixes to make FLTK compile with GCC 2.95.2
+ - FL_SHORTCUT fix for I18N.
+ - Fixed cut/paste problems under WIN32
+ - FLUID now produces correct code for nested class
+ destructors.
+ - Nested windows should now redraw properly under WIN32.
+ - "table" is now static in fl_cursor.cxx
+ - Fl_Chart used the textcolor() and not the color() for
+ horizontal bar charts.
+ - Now set the input hint for TWM and TWM-derived window
+ managers.
+ - Now look for TrueColor visual if FLTK is compiled with
+ USE_COLORMAP == 0.
+ - Fl_Scrollbar could generate a divide-by-0 error if the
+ min and max values were the same.
+ - Fl_Menu_::remove() now removes whole submenus if
+ needed.
+ - Scrollbar buttons now draw themselves pushed in as
+ needed.
+ - Fixed the gl_overlay demo (and gl overlays in general)
+ when they are faked with no hardware and the window is
+ resized.
+ - Selections weren't shown in Fl_Browser widgets when an
+ item used the @B (background) format.
+ - Windows can now be resized by the program under X11
+ for more window managers.
+ - OS/2 makeinclude updates.
+ - Added Fl.H required by an inline function in
+ Fl_Repeat_Button.H
+ - Fl_add_idle adds new functions to the end of the queue
+ ring, rather than the start, so they are executed in
+ the order added, and a callback that adds itself does
+ not prevent others from being called.
+ - FLUID lets you type in code that starts with '#' for
+ cpp directives.
+ - XBell() could be called before the X11 display was
+ opened, causing a segfault.
+ - Fixed Fl_Gl_Window::ortho() - Borland C++ doesn't
+ define GLint to "int", but instead to "long"...
+ - Fixed Fl_Browser scrollbars within an Fl_Scroll
+ widget.
+ - Fl_Output (and non-focused Fl_Input) now scroll in
+ response to position()
+ - Fl_Input now does not scroll horizontally if the
+ entire string will fit in the widget.
+ - Fl_Scrollbar didn't push the right arrow buttons when
+ you clicked outside the scroller.
+ - Now use WSAAsyncSelect() for better socket performance
+ with Fl::add_fd()
+
+
+CHANGES IN FLTK 1.0.7
+
+ - Fixed Fl_Input_ bug under WIN32 - no longer stop accepting input
+ when one of the "Windows" keys is pressed.
+ - Now call TranslateEvent for all events under WIN32.
+ - Fixes for OpenBSD and NetBSD
+ - The FL_CURSOR_HAND cursor now uses the IDC_HAND cursor instead of
+ IDC_UPARROW under Windows 98 and 2000.
+ - Fl_Scrollbar now does a page-up/down when you click outside the
+ scroller.
+ - Fl_Window::show(0, NULL) causes core dump
+ - Fixed a compile-time error in fl_call_main.c for Borland C++.
+ - "fluid -c filename.fl" would try to open an X display if the
+ FLUID file contained an Fl_Browser widget.
+ - Fl_Browser now correctly measures items with @C or @B color
+ formatting commands.
+ - Fixed a bitmap drawing bug for WIN32 (bit reversal table was wrong)
+ - fl_xyz() dialogs now set a title in the title bar.
+ - fl_alert() sounds the bell under X11.
+ - fl_xyz() dialogs now call MessageBeep() under WIN32.
+ - Fl_Browser_ didn't draw the selection box with the inactive color
+ when the browser wasn't activated.
+ - Fl_Browser now responds to FL_KEYBOARD as well as FL_SHORTCUT. If
+ you subclass it to accept focus then keyboard navigation will work.
+ - Fl_Tile and Fl_Tabs do their callback when the user changes their
+ display.
+ - Made some of the private methods of Fl_Browser protected.
+ - Now set win_gravity correctly, this helps some X
+ window managers that use it position the window where
+ FLTK wants it to be.
+ - 0-width browsers crashed.
+ - Minor change: if the X window manager does not do
+ anything else with windows that don't have their
+ position specified, the windows appear centered in the
+ screen, rather than in the top-left corner. This
+ happened with modal windows under Irix 4Dwm. This
+ also causes windows to be centered when no window
+ manager is running, which might be useful for
+ installation gui programs?
+ - Clicking in an Fl_Input field the first time selects the entire
+ field.
+ - Clicking the middle mouse button in an Fl_Input field now inserts
+ the text at the indicated position instead of the cursor position.
+ - Drag-selecting text in an Fl_Input field now copies the text
+ automatically.
+ - Fl::flush() no longer calls the draw() method for invisible windows.
+ - Calling deactivate() on an invisible widget could cause an
+ infinite loop in some obscure cases.
+ - Added #pragma's for SGI C++ compilers - the 6.{23} X headers had
+ errors in them.
+ - Fl_Gl_Window::ortho() changed so that text and images
+ are not erased if the origin is off the left/bottom of the
+ window.
+ - Small change to Fl_Input so that a click that gives it
+ the focus also selects all the text.
+ - Fixed a slider drawing problem.
+ - You can now add/delete children of Fl_Tabs widgets whether or
+ not they are visible.
+ - Now embed woff options for SGI C++ compilers (gets rid of X11
+ header warnings)
+ - draw_pixmap used a cast that the Digital UNIX C++ compiler didn't
+ like.
+ - The GLUT function key constants were off by one.
+ - The XPM reading code didn't handle RGB colors other than #rrggbb.
+
+
+CHANGES IN FLTK 1.0.6
+
+ - Fl_win32.cxx defined WM_MOUSE_LEAVE instead of WM_MOUSELEAVE.
+ - Fl_get_key_win32.cxx needed to include <ctype.h>
+ - gl_draw_pixmap.cxx needed a pointer cast for ANSI C++.
+ - Fl_Repeat_Button didn't always delete its timeout.
+ - Now keep track of the current OpenGL context; this provides
+ significant performance improvements for OpenGL applications
+ with a single context.
+
+
+CHANGES IN FLTK 1.0.5
+
+ - Fl_Roller didn't handle a width and height of 0.
+ - filename_list() fix for FreeBSD.
+ - Fixed RPM install docos - needed "--install" option...
+ - Fl_Browser_ wouldn't draw the vertical scrollbar right away if it
+ added a horizontal one which covered the last line.
+ - Fl_Tabs problems - single-character labels don't show up (problem in
+ measure_tabs() or measure_label() methods?), and doesn't clear top
+ tab area before drawing tabs.
+ - Fl_Browser needs a destructor.
+ - fl_draw_label() quoted characters between 0x80 and 0xa0, which
+ caused problems for some programs using the WinANSI character set.
+ - FLUID didn't handle declared class destructors.
+ - Fixed another WIN32 cut/paste bug.
+ - Fl_Tabs didn't work properly when there was only 1 tab.
+ - Fl_Menu::add() didn't delete the old array.
+ - Fl_Repeat_Button didn't delete its timeout when disabled.
+ - fl_draw() would crash if no font was set (now defaults to
+ a 14-pixel Helvetica font)
+ - Can't forward declare classes; need to check for "class ", "struct ",
+ "union ", etc. See Bill's message
+ - Added #pragma around xlib.h for IRIX
+ - FL_KEYBOARD events have the correct x/y when sent to child X
+ windows. Note that if you worked around this bug by adjusting the
+ x/y yourself you will have to change your code. In addition all
+ events have the correct x/y when sent to the grab() widget. And
+ the code to do all this was simplified a lot.
+ - The XPM code didn't handle named colors with spaces in the names.
+ - Pressing ESCape closed the window with pointer focus, even if there
+ was a modal window open (now closes the modal window).
+ - FLUID no longer produces trigraphs accidentally in the image data.
+ - FLUID uses string constant concatenation to produce shorter image
+ data.
+ - The Fl_Group deletion code crashed if there was exactly one child
+ widget.
+ - Simulated overlays in single-buffered Fl_Gl_Windows now draw
+ correctly (though very slowly as it requires the entire window to
+ be redrawn to erase the overlay). This fix ported our Digital
+ Domain programs better to systems with no overlay hardware.
+ - Added support for extern "C" declarations in FLUID.
+ - Added Fl_Pack support to FLUID.
+ - Fixed the order of #include's in FLUID generated header files.
+ - Fixed detection of vsnprintf and snprintf under HP-UX 10.20 once
+ and for all.
+ - The checkers demo did not compile with GCC 2.95
+ - FLUID didn't output virtual destructors properly.
+ - Added inline "make_visible()" method to Fl_Browser.
+ - Fl::wait() now returns immediately if any timeouts are
+ called.
+ - 16-bit XPM files are now properly handled.
+ - Fl_Window::resize() was missing FL_EXPORT (caused problems
+ with Windows DLLs)
+ - FLUID was writing extern declarations twice.
+ - New FLUID arrow key functionality: arrows move by one pixel, shift+arrow
+ resizes, ctrl+arrow steps by grid
+
+
+CHANGES IN FLTK 1.0.4
+
+ - Documentation updates
+ - Fl_Browser::bottomline(size) didn't scroll to the bottom
+ if the second-to-last line was visible.
+ - fl_wait() didn't poll FDs properly for WIN32.
+ - Fixed DLL definitions for BC++.
+ - FLUID now handles nested classes properly.
+ - The "connect" demo now does a wait() for the PPP process
+ so that you aren't left with a lot of zombie processes.
+ - Fixed the FLTK colormap to use FF instead of F4 for full
+ intensity values.
+ - Minor change to scrollbar drawing code to match other
+ toolkits.
+ - New selections would cancel themselves out in WIN32.
+ - The header file links were broken in the IRIX
+ distributions.
+ - fl_elapsed() now always uses GetClockTick() for WIN32.
+ - fl_display is now initialized to GetModuleHandle(NULL) -
+ this fixes problems people had with Cygwin and MingW32.
+ - WinMain() is no longer compiled in with Cygwin and
+ MingW32; it wasn't being used for those compilers anyways.
+ - Added Solaris compiler options to configure script.
+ - Fl_Value_Input wouldn't update properly if you set the
+ value from a callback.
+ - Fl_Tile wouldn't resize if the resizeable widget was the
+ last child.
+ - Was missing #include <ctype.h> and #include <stdlib.h> in
+ several files, which caused problems on some platforms.
+ - Fixed another case where Fl_Browser_ could get in an
+ infinite resizing loop.
+ - Fl_win32.cxx now includes <FL/filename.H> to export missing
+ DLL symbols.
+ - FLUID didn't handle member functions that include the
+ scope operator.
+ - Fl_Chart was dividing by 0 if there were no data samples
+ or if they were all the same (min == max).
+
+
+CHANGES IN FLTK 1.0.3
+
+ - XDBE is now enabled for IRIX 6.[234] as well as 6.5.
+ - FLUID didn't write the when() condition properly.
+ - Tab/space/backtab/backspace can be used to navigate
+ through menus.
+ - Changed $(DSONAME) in the src/Makefile to "libfltk.so.1
+ libfltk.sl.1".
+ - Fl_Browser could read past the end of the string when
+ computing the item height.
+ - Fl_Browser could get in an infinite loop when checking to
+ see if scrollbars needed to be displayed.
+ - FLUID now honors the return type of the outermost widget.
+ This was a problem when substituting Fl_Group in an
+ Fl_Window widget.
+ - Fl_Menu_::copy() wasn't allocating a power of 2 for the
+ array size.
+ - FLWM would crash if fl_xmousewin was deleted.
+ - The fast_slow demo now uses output widgets.
+ - Timers under WIN32 were unreliable.
+
+
+CHANGES IN FLTK 1.0.2
+
+ - Documentation updates
+ - The Visual C++ project files didn't include fl_add_idle.cxx.
+ - LIBRARY/DSO name inconsistencies in src/Makefile.
+ - src/Makefile didn't clean the DSO.
+ - The valuator demo now has only a single callback.
+ - The code looked for HAVE_SYS_SELECT_H, but the
+ config file uses HAVE_SYS_SELECT.
+ - Fl_Image redraw not quite right under X11 or WIN32
+ - Problems with timeouts & cube demo under WIN32
+ - FLUID problems with inline functions.
+ - Documentation fixes...
+ - Fl_Browser::item_height() didn't handle blank lines or
+ non-default fonts properly.
+ - FL/math.h didn't have #ifndef...#define...#endif guards
+ against multiple inclusion...
+ - Fl_Menu_::copy() fix - didn't allocate power of 2...
+ - Fl::damage() now remains true until all windows are actually
+ redrawn.
+ - Fl_Widget destructor, hide(), and deactivate() methods no longer
+ send FL_LEAVE, FL_RELEASE, or FL_UNFOCUS events to the widget
+ (which could cause applications to crash).
+ - FLUID now outputs symbolic names for align() and when().
+ - Fixed select() to use maxfd + 1 instead of maxfd.
+ - Added "Fl::remove_fd(fd, when)" function so you can remove the
+ read and write callbacks separately.
+ - The Fl::add_fd() and Fl::add_timeout() arrays are now dynamically
+ allocated.
+ - FLUID didn't always turn the FL_SUBMENU flag on for submenu titles.
+ - The "extra code" in FLUID now is placed before the "o->end()" call
+ for Fl_Group and its derived classes.
+ - You can now set a FL_Window widget's class in FLUID to Fl_Group to
+ generate a function or class that builds part of a GUI (i.e. no window).
+ - FLUID now displays "Save file before exiting?" with the standard yes,
+ no, and cancel buttons rather than "Discard changes?".
+ - Fl_Menu_::add() now works with any type of menu, even one set with
+ the menu() method.
+ - The keypad keys were not always decoded properly under X11.
+ - Some pointers were not being turned off when widgets were deleted,
+ which caused some applications (like FLWM) to crash.
+
+
+CHANGES IN FLTK 1.0.1
+
+ - Documentation fixes.
+ - Fl::check() didn't return the correct value, breaking a number
+ of applications.
+ - Fixed FLUID bug that caused styles patch to crash when you delete
+ a menu item.
+ - Updated valuators demo to put the values in the gui box.
+ - Fl_Browser_::item_height() didn't always compute the correct
+ value.
+ - Fixed the alignment of Fl_Choice text.
+ - Fixes for OS/2.
+ - Fl_Menu_Item::clear() didn't clear value.
+ - Added some changes to make FLTK work with Borland C++.
+ - ANSI C++ fixes.
+ - Plugged a memory leak in the fractal demo.
+ - Fl::add_timeout() didn't work under WIN32 with small values.
+ - The configure script and makefiles now define DSONAME and
+ use the static library for all example programs.
diff --git a/CHANGES_1.1 b/CHANGES_1.1
new file mode 100644
index 0000000..16b77cf
--- /dev/null
+++ b/CHANGES_1.1
@@ -0,0 +1,2660 @@
+Changes in FLTK 1.1, up to FLTK 1.1.10 (December 27, 2009)
+
+CHANGES IN FLTK 1.1.10 Dec 27, 2009
+
+ - Widgets now remove stale entries from the default callback
+ queue when they are deleted (STR #2302)
+ - Fixed selection bug in Fl_Int_Input (STR #2292)
+ - Fixed character set conversion functions (STR #2268)
+ - Fixed image lib configure and fltk-config issues by backporting
+ the image lib and zlib configure code from FLTK 1.3 (STR #2203)
+ - Updated the bundled libpng to v1.2.40 (released Sep. 10, 2009)
+ - Fixed Fl_Choice contrast with light-on-dark settings (STR #2219)
+ - Added Xft2 font lookup table (STR #2215)
+ - Fixed X server "lock", if a modal dialog window is opened
+ while a menu is active (STR #1986)
+ - Updated mirror sites in documentation (STR #2220)
+ - Setting a default font for Xft (STR #2216)
+ - Temporarily limited builds to 32-bit on OX S to stay
+ compatible to Snow Leopard
+ - Fixed Windows compile bug with "#define USE_COLORMAP 0"
+ (STR #2241)
+ - Fixed glibc 2.10 compiler problems (Fedora 11 and others)
+ with scandir() and strchr() (STR #2222)
+ - Fixed OpenGL shared context handling (STR #2135)
+ - Fixed gray-scale images with alpha channel (STR #2105)
+ - Fixed unexpected shortcut behavior for Win32 (STR #2199)
+ - Added cast to Fl_Color in all Fluid code (STR #2206)
+ - Fixed wrong identifier for special keys combined with
+ modifier (STR #2196)
+ - Fixed documentation for Fl_Progress (STR #2209)
+ - Fix for multiple popups, when dragging and calling fl_alert()
+ and friends from the callback (STR #2159)
+ - Avoiding crashes for recursive common dialogs (this does not
+ fix the issue at hand yet) (STR 2150)
+ - Fluid printing used wrong colors under Windows (STR #2195)
+ - Fixed bad system menu hadling in OS X (STR #2153)
+ - Fixed File Input mouse pointer dragging (STR #2181)
+ - Added Fl_Scroll::bbox() documentation (STR #1893)
+ - Fixed static linking of image libraries (STR #1962)
+ - Fixed callback would not be called when shortcut was used with
+ radio and toggle buttons in default FL_RELEASE mode.
+ - Fixed a problem with TrackMouseEvent() (Windows only) that would
+ generate wrong FL_LEAVE events with subwindows. TrackMouseEvent
+ is now enabled by default (it was disabled for GNU compilers).
+ It can be disabled by defining NO_TRACK_MOUSE.
+ Improved test/subwindow.cxx (STR #2079)
+ - Fixed RGB colors for round box (STR #2097)
+ - Fixed documentation (added missing COMCTRL32.LIB dependency)
+ - Fl_Group::clip_children() is now public (STR #2017)
+ - Fixed first modifier key event (STR #1952)
+ - Fixed wrong default value of Fl_Spinner in Fluid (STR #1991)
+ - Fixed Fluid textcolor output (STR #1992)
+ - Added clarification to Fl_GL_Window mode function (STR #1945)
+ - Fl_Group and Fl_Scroll now resize themselves before
+ resizing their children (STR #2032)
+ - Fixed adding an idle handler during a draw() call (STR #1950)
+ - Improved stability of fl_read_image (STR #2021)
+ - Fixed menu position close to screen border (STR #2057)
+
+
+CHANGES IN FLTK 1.1.9 RELEASED: Apr 27 2008
+
+ - Improved color contrast in secondary selection blocks
+ of Fl_Text_Display (STR #1917)
+ - Fixed regression in callback handling (STR #1918)
+ - Fixed wrong relative path when absolute path has a
+ trailing slash in fl_filename_relative (STR #1920)
+ - Fixed multiple selection of files and directories in
+ Fl_File_Chooser (STR #1913)
+ - Fixed MSWindows crash when selecting umlauts
+ in Fl_Help_View (STR #1912)
+
+
+CHANGES IN FLTK 1.1.8 RELEASED: Mar 27 2008
+
+ - Documentation fixes (STR #1454, STR #1455, STR #1456,
+ STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
+ STR #1639, STR #1645, STR #1644, STR #1792, STR #1793,
+ STR #1742, STR #1777, STR #1794, STR #1827, STR #1843,
+ STR #1796, STR #1815, STR #1726, STR #1753, STR #1855,
+ STR #1862, STR #1867, STR #1874, STR #1888)
+ - Fixed library path in Makefile (STR #1885)
+ - Fixed image read for partial regions on X11
+ (STR #1716)
+ - Fixed KDE/Gnome icon paths (STR #1795)
+ - Fixed Tab key to wrap around menu bars (STR #1877)
+ - Fixed possible timer leak in Scrollbar (STR #1880)
+ - Added documentation about the potential limitations
+ of Fl::grab on newer operating systems (STR #1747)
+ - Fixed lockout when mixing popups and alerts
+ (STR # 1869)
+ - Fixed recursion crash in event handling (STR #1873)
+ - Fixed missing return code in 'fltk-config' (STR #1875)
+ - Fixed inconsistencies with CHANGED flags (STR #1719)
+ - Fixed message sent to hidden widgets (STR #1849)
+ - Fixed width calculation in Fl_Help_View (STR #1868)
+ - Fixed offset bug in OS X pixmap code (STR #1856)
+ - Fixed potential buffer overrun
+ in Fl_Preferences (STR #1853)
+ - Fixed method attributes in consecutive class
+ declarations in FLUID (STR #1741)
+ - FLUID checks for seperately declared callbacks to
+ avoid a bogus "extern" declaration (STR #1776)
+ - Added "protected" class memebrs in FLUID
+ - Double-clicking a widget in a FLUID layout will show
+ the item in the widget browser
+ - Fixed color highlighting in Text_Display
+ - Fixed 16 bit PNM image support (STR #1847)
+ - Fixed exposure event on zero size windows (STR #1824)
+ - Fixed overlay offset for OS X Quartz (STR #1729)
+ - gl_font() support for Xft+X11 (STR #1809)
+ - Fl_Gl_Window::mode() needed to hide and show the window
+ when toggling stereo mode (STR #1846)
+ - Fl_Gl_Window::show() did not work reliably on Mac OS X
+ (STR #1707)
+ - Added Fl_Group::clip_children() methods to support
+ automatic clipping of child widget drawing (STR #1844)
+ - Fl_Browser_ and friends now support FL_WHEN_ENTER_KEY
+ for both Enter/Return and double-clicks (STR #1818)
+ - Fl_Help_View did not release the images it used (STR
+ #1817)
+ - Shared libraries would not build on 64-bit Linux
+ systems with an existing non-PIC FLTK installation
+ (STR #1791)
+ - Fl_Browser::hide() and Fl_Browser::show() did not
+ correctly update the scrollbar (STR #1724)
+ - The configure script now shows a summry of the
+ configuration results (STR #1810)
+ - "fltk-config --use-* --libs" did not list all of the
+ dependent libraries (STR #1799)
+ - Hiding a nested window on WIN32 caused 100% CPU (STR #1748)
+ - Changing the window size in FLUID would not mark the
+ project as modified (STR #1751)
+ - Fixed fl_filename_isdir for "/"-path (STR #1761)
+ - Fixed Fl_Chart drawing (STR #1756)
+ - Fixed mapping of subwindows with unmapped parent
+ windows (STR #1706)
+ - Fixed rendering of grayscale images with alpha
+ channel (STR #1703)
+ - Fixed occasional incomplete refresh (STR #1681)
+ - Improved fl_down, fl_frame, added fl_box (STR #1678)
+ - Fixed selection of submenu items in
+ input_choice (STR #1676)
+ - Fixed calculation of stride for image scaling and
+ color manipulation (STR #1673)
+ - Made -O3 the default optimization on Cygwin/Mingw since
+ -Os currently creates bad code (STR #1656)
+ - OSF/Tru64 now uses 'install-sh' instead of 'install' to
+ accomodate for a missing '-d' option (STR #1632)
+ - New option in Fluid project settings to translate all
+ shortcut modifiers from FL_META or FL_CTRL to FL_COMMAND
+ - Made icon size fixed (50x50) in fl_message etc. (STR #1626)
+ - Fixed selection of first word in Fl_Help_View
+ - Fixed endless loop in Fl_Text_Display (STR #1655)
+ - Allowing shortcuts in Tabs (STR #1652)
+ - Fixed Makefile "make clean" (STR #1642,
+ STR #1643, STR #1641)
+ - The sample RPM spec file now enables large file support
+ and threading support (STR #1603)
+ - Changed minimum contrast between background and text to
+ 99 and added more weight to the blue component to improve
+ readability for certain color combinations (STR #1625)
+ - Fixed VCNet OpenGL project file (STR #1617)
+ - Fixed scrolling of clipped areas in MSWindows (STR
+ #1601)
+ - Fixed clipping in OS X Quartz offscreen buffers (STR
+ #1595)
+ - Now flush file chooser preferences after every change to
+ avoid data loss (STR #1609)
+ - The Fl_File_Chooser constructor now saves and restores the
+ current group (STR #1611)
+ - Added Fl::awake(fn*,void*) to set a handler for thread
+ messages (STR #1536)
+ - Added "mute sound" option to Sudoku game.
+ - Updated the bundled zlib to v1.2.3.
+ - Updated the bundled libpng to v1.2.16.
+ - "make install" now uses the install command (or the
+ included install-sh script) to copy files to the
+ install directories, to ensure that permissions are
+ correct.
+ - Fixed DLL generation via MingW/Cygwin (STR #1546)
+ - FLUID incorrectly opened the display when generating
+ source code for Fl_Help_View widgets (STR #1318)
+ - Fl_Double_Window did not always show the scheme
+ background image.
+ - Fixed first window behavior in OS X (STR #1548)
+ - Fixed calculation of character widths for OS X
+ Quartz rendering (no STR)
+ - Fixed OS X mouse click handling (STR #1504)
+ - Added missing GLUT functions so that FLTK can be used
+ as a fairly complete C++ replacement for the original
+ GLUT library (STR #1522)
+ - Fl::awake() could block on X11 and OSX (STR #1537)
+ - Updated recursive mutex code to run on platforms other
+ than Linux and to do a run-time check to determine
+ whether they are supported by the kernel (STR #1575)
+ - WIN32 did check callbacks after the event processing instead of
+ before as documented (STR #1535)
+ - Fl_File_Chooser now hides the window before doing a callback
+ when the user clicks on the OK button (STR #1565)
+ - Fixed indentation of nested HTML elements (STR #1549)
+ - Made layout of Fl_Help_Dialog consistent with other
+ help windows and web browsers.
+ - Improved GTK+ schemed round box (STR #1531)
+ - Fluid avoids writing unsupported combinations of the
+ "when()" flags (STR #1501)
+ - Fl_Browser_ would allow keyboard callbacks even though
+ "when()" was set to "never" (STR #1501)
+ - Added automated little helpers to Sudoku
+ - Added example code for Wizard with the
+ Tabs demo (STR #1564)
+ - Optimized Fl_Tabs drawing for speed (STR #1520)
+ - OS X resource fork now obsolete (STR #1453)
+ - Added chapter 10 about multithreading (STR #1532,
+ 1533)
+ - OS X system menu bar top level attribute support
+ improved (STR #1505)
+ - Fixed Quartz image drawing bug (STR #1438)
+ - Fixed Quartz fl_read_image
+ - Overlay drawing is now avoiding XOR mode (STR #1438)
+ - Fixed Scroll crash in Fluid Live Mode (STR #1524)
+ - Fixed mousewheel event propagation (STR #1521)
+ - Fixed drawing issues of a tile in a scroll (STR #1507)
+ - Fixed dismissing buttons in menu bars (STR #1494)
+ - Making a child group visible in a Fl_Tabs or Fl_Wizard
+ group now shows that tab or pane.
+ - Added fl_open_uri() function as proposed on
+ fltk.development.
+ - Added Fl::has_check() which previously was prototyped
+ and documented, but not implemented (STR #1542)
+ - Enabled Fl::add_check() on OS X (STR #1534)
+ - Documented tooltip inheritance (STR #1467)
+ - Better event mouse handling fixing detached menus and
+ sticky tooltips (STR #1463, STR #449)
+ - Added Fl::scrollbar_size() methods that are used by all
+ of the scrollbar-using widgets (STR #1500)
+ - fl_read_image() was broken on Intel-based Macs (STR
+ #1490)
+ - Fl_Progress was using the wrong width to calculate
+ progress (STR #1492)
+ - Fl::x(), Fl::y(), Fl::w(), and Fl::h() did not report
+ the desktop work area on X11 (STR #1482)
+ - Shortcut events could be sent to the wrong window (STR
+ #1451)
+ - Fl_Spinner did not handle the arrow keys properly (STR
+ #1476)
+ - Fl_File_Browser did not calculate the width of
+ directory items correctly (STR #1469, STR #1470)
+ - Fl_Pack incorrectly started widgets at an offset of 1/2
+ the spacing value.
+ - FLUID did not generate correct window class code if
+ the class name was not a standard FLTK window class.
+ - FLUID incorrectly included <FL/Fl_classname.H> for
+ widget classes that were not subclassed from a standard
+ FLTK widget class.
+ - The demo master test program now supports scheme
+ selection and all demos use it (STR #1459)
+ - fl_arc() and fl_pie() did not draw properly on WIN32
+ when the start and end points were identical (STR
+ #1461)
+ - Fl_Input and Fl_Text_Editor now hide the mouse pointer
+ when typing into them (STR #1466)
+ - Implemented alpha blending for Quartz, WIN32, and X11
+ - Check buttons did not redraw properly with box() set to
+ FL_NO_BOX (STR #1440)
+ - Added the Bluecurve-inspired scheme "gtk+".
+ - Updated documentation (STR #1420, STR #1421)
+ - Fixed font caching issue (STR #1415)
+ - Fixed crash in fl_file_chooser (STR #1410)
+ - Fixed Fluid hotspot bug (STR #1416)
+ - Fixed image copy code (STR #1412)
+ - Fixed latin-to-roman text conversion (STR #1411)
+ - Fixed Cygwin timeout for "select" calls (STR #1151)
+ - Improved Mac OS X subwindow handling (STR #1402)
+ - Fixed more inconsistencies between fl_draw and
+ fl_measure (STR #1408)
+ - Fixed fl_measure which mistook a trailing '@@' for a
+ symbol (STR #1406)
+ - Fixed GLUT behavior on window creation (STR #1403)
+ - Fixed OS X bug that would hide tooltips before they
+ were shown (STR #1392)
+ - Fixed Fl_Tabs tooltip reappearing (STR #1324)
+ - Added a new demo game called "Block Attack!"
+ - Updated the Sudoku game to show a notice about Hard and
+ Impossible puzzles having multiple solutions which are
+ not a bug or error (STR #1361)
+ - Fixed filechooser to behave as documented when file
+ pattern changes (STR #1359)
+ - Completed the global function index and added an
+ alphabetical list of all methods (STR #1319)
+ - Avoiding problems with some platforms that don't
+ implement hypot() (STR #1366)
+ - Fixed floating point value formatting for Fl_Spinner
+ (STR #1331)
+ - Fixed Fl_Positioner callback when released (STR #1387)
+ - Fixed WIN32 zero size window issue (STR #1387)
+ - Fixed Sudoku window positioning (STR #1398)
+ - Fluid Code Declarations can now handle C++ style
+ comments (STR #1383)
+ - Fixed uninitialized data in OS X and WIN32 timeout
+ functions (STR #1374).
+ - Fixed speed issues when measuring text on OS X with
+ Quartz (STR #1386).
+ - Fixed focus issues on OS X (STR #1377)
+ - Optional precision argument when storing floats or
+ doubles in a Preferences file (STR #1381)
+ - Fixed callback not called when using arrow keys in
+ Fl_Slider (STR #1333)
+ - Changing the shortcut of a widget in fluid now marks the
+ document as dirty (STR #1382)
+ - Fl_Text_Editor now correctly handles middle mouse
+ clicks (STR #1384)
+ - Added some GLUT4 functions (STR #1370)
+ - Added "context_changed()" function for OpenGL windows
+ which allows efficient texture loading (STR #1372)
+ - Added missing "const" to GLUT call (STR #1371)
+ - Fixed stray FL_RELEASE events after clicking system
+ areas on OS X (STR #1376)
+ - FLUID now only writes definitions of "o" and "w"
+ variables as needed, reducing the number of "variable
+ is shadowed" warnings from GCC.
+ - Added access to Xft font pointer (STR #1328)
+ - Fixed endianness in OS X mouse cursor graphics (STR
+ #1348)
+ - Fixed crash on mixed use of keyboard and mouse for
+ Fl_Menu_Button (STR #1356)
+ - Fixed Fl_Window::visible() and shown() for OS X
+ (STR #1341)
+ - Fixed Fl_Window::copy_label() losing copy (STR #1332)
+ - Documentation fixes (STR #1336, STR #1329, STR #1339,
+ STR #1340)
+ - Added support for floating point Fl_Spinner in the
+ API, documentation, and Fluid (STR #1331)
+ - Repeat button now cancels timeout if it should get
+ deactivated during a callback (STR #1330)
+ - Added support for assigning Fl_Menu_Items to array
+ variables in Fluid (STR #1280)
+ - Added --with-archflags configure option to allow
+ passing of specific architecture-selection options to
+ the compiler and linker.
+ - Fixed WIN32 window stacking bug (STR #1296)
+ - Fixed wrong code generated by FLUID for Scrollbars (STR
+ #1287)
+ - Loading a file would not update the Widget Properties
+ dialog in FLUID (STR #1326)
+ - Fixed key compose sequences for shifted keys (STR
+ #1194)
+ - Added text selection and copy to Fl_Help_View.
+ - Fixed position of popup menu titles (STR #1322)
+ - Showing any window will disable the current tooltip
+ so it won't pop over menus (STR #1321)
+ - Updated documentation to reflect limitation of
+ Fl::delete_widget() (STR #1306)
+ - Fixed line wrapping in Fl_Text_Display (STR #1227)
+ - New function Fl::event_original_key() returns key code
+ before NumLock handling.
+ - Many OS X Quartz fixes (STR #1310, etc.)
+ - Fixed shortcut and default focus for message dialogs
+ (STR #1298)
+ - Fixed focus issues (STR #1286, STR #1289, STR #1296)
+ - Fixed window resizing in OS X (STR #1297)
+ - In FLUID, declarations starting with the keyword
+ 'typedef', 'class', or 'struct' are now treated
+ correctly if inside a class (STR #1283)
+ - Tabs now show the correct tooltip (STR #1282)
+ - Included fltk.spec in configure.in (STR #1274)
+ - Fixed insufficiently invalidated cache
+ in Fl_Browser (STR #1265)
+ - Attempt to fix multi monitor issues (STR #1153)
+ - Fixed warnings when compiling w/Cygwin (STR #1152)
+ - Fixed missing reset of flag in FLUID (STR #1187)
+ - Fixed maximizing in OS X (STR #1221)
+ - Fixed 'make distclean' to remove binaries inside
+ MacOS app packages (STR #1169)
+ - FLUID Code Viewer is now truly a viewer, not a text
+ editor because edited text can not be saved.
+ - Fl_Spinner is now fully supported by FLUID (STR #1158)
+ - Fixed usage of deleted object after menu pulldown
+ (STR #1162)
+ - Calling fl_font(0, 0) under Xft would access a NULL
+ pointer (STR #1205)
+ - Setting a new value in Fl_Input_ wil now actually move
+ cursor to the end of the input field as documented
+ (STR #1161)
+ - FLUID crashed on WIN32 with international characters
+ (STR #1176)
+ - Fl_Check_Browser did not allow the user to toggle the
+ check boxes (STR #1232)
+ - Fl_Help_View crashed on WIN32 with international
+ characters (STR #1228)
+ - Fl::run() no longer clears resources on WIN32 (STR
+ #1231)
+ - Fl::add_timeout() leaked resources on OSX (STR #1233)
+ - Accented characters could not be entered on OSX (STR
+ #1195)
+ - The caret key lookup was missing for OS X
+ - FLUID didn't handle loading .fl files with
+ international characters properly with all compilers
+ (STR #1150)
+ - Fl_Spinner's minimum() and maximum() "get" methods were
+ misspelled (STR #1146)
+ - The largefile support changes in 1.1.7 broke binary
+ compability for fl_filename_list(); you must now use
+ "--enable-largefile" when configuring to get large file
+ support, and the large file support definitions are
+ added to the output of "fltk-config --cflags" (STR
+ #1159)
+
+
+CHANGES IN FLTK 1.1.7 RELEASED: Jan 17 2006
+
+ - Documentation fixes (STR #571, STR #648, STR #692, STR
+ #730, STR #744, STR #745, STR #931, STR #942, STR #960,
+ STR #969)
+ - Various menu widget fixes (STR #1140, STR #1143, STR
+ #1144)
+ - The threads demo would display negative prime numbers
+ on MacOS X; this appears to be a MacOS X bug, but we
+ added a workaround to "fix" this (STR #1138)
+ - Fl::dnd() now sets the content type of the drag to
+ "text/uri-list" when it sees the dragged text is
+ composed of URIs.
+ - Fixed keyboard shortcut handling in FLUID and shortcut
+ labeling in FLTK (STR #1129)
+ - Fixed include path for CMake build (STR #1123)
+ - Fixed unnecessary delay in WIN32 event handling
+ (STR #1104)
+ - Fixed handling of Ctrl-C in Fl_Text_Display (STR #1122)
+ - OS X Quartz version now draw a nice resize control (STR
+ #1099)
+ - FLTK now enables large file support when available (STR
+ #1087)
+ - Fl_Clock_Output depended on a time value that was the
+ same as an unsigned long, which is incorrect for WIN64
+ and VC++ 2005 (STR #1079)
+ - Fl_Text_Display::wrap_mode() would crash if no buffer
+ was associated with the widget (STR #1069)
+ - Updated the default label and text colors of all widgets
+ to use FL_FOREGROUND_COLOR instead of FL_BLACK (STR
+ #1052)
+ - Fl::set_fonts() now works with Xft (STR #1012)
+ - Fl_Value_Input now uses the screen-absolute position
+ instead of the window-relative position when dragging
+ the value; this avoids some jumping conditions (STR
+ #1037)
+ - Menus now pop up fully inside the screen if possible
+ (STR #973)
+ - Fixed illegal access in Preferences (STR #1025)
+ - Fixed x-offset problem in Help_Widget (STR #998)
+ - Clipboard will persist if owner window is hidden (STR
+ #1019)
+ - Fixed handling of Win32 Device Contexts (STR #1007)
+ - Fixed C++ style comments in C files (STR #997)
+ - Fixed signedness of scanf() argument (STR #996)
+ - Fixed cross-compiling problem (STR #995).
+ - FLUID now knows if a static callback is already
+ declared in a class and won't declare it 'extern' (STR
+ #776)
+ - Some actions in FLUID would not set the "changed" flag
+ (STR #984, STR #999)
+ - fl_filename_list now always appends a forward slash to
+ directory names (STR #874)
+ - Multiline Input will update right if a space character is
+ inserted in word wrap mode (STR #981)
+ - FLUID group labels redraw correctly (STR #959)
+ - FLUID now updates color of Fl_Tabs children (STR #979)
+ - FLUID now supports 'size_range()' (STR #851)
+ - FLUID selection boxes now synchronised (STR #964)
+ - fl_filename_list() now recognizes pathnames without
+ trailing slash as directions (STR #854)
+ - Fl_Text_Display now auto-scrolls in all
+ directions (STR #915)
+ - Borderless windows will not show in the taskbar anymore
+ on X11 (STR #933)
+ - Fixed event_text() field on FL_DND_* event on
+ OS X and WIN32 (STR #968)
+ - The fltk-config utility now supports "--cc" and "--cxx"
+ options to get the C and C++ compilers that were used
+ to compile FLTK (STR #868)
+ - Fl_Valuator-derived widgets could show more digits than
+ were necessary (STR #971)
+ - Fl_GIF_Image did not handle images with an incorrect
+ number of data bits (STR #914)
+ - Fixed some plastic drawing artifacts (STR #906)
+ - Fl_Help_View now draws the box outside the scrollbars,
+ like the other scrollable widgets (STR #871)
+ - The fltk-config script now handles invocation via a
+ symlink (STR #869)
+ - Updated WIN32 cut/paste code to consistently handle DOS
+ text (STR #961)
+ - Added shared library support for Cygwin and MingW (STR
+ #893)
+ - Fl_File_Chooser did not implement the user_data()
+ methods (STR #970)
+ - Compilation could fail if a previous installation of
+ FLTK was in the same (non-standard) directory as an
+ image library (STR #926)
+ - Fixed OSX compilation problems with non-HFS filesystems
+ (STR #972)
+ - Problems with CMake on MinGW have been solved, thanks
+ to Mr. "fltk.x0", who submitted the patch. (STR #863)
+ - Fixed memory leak in Fl_Check_Browser reported by
+ "miguel2i". (STR #967)
+ - Fl_File_Input could draw in the wrong window (STR #958)
+ - WIN32: Internal WM_PAINT message now ignored (STR #831)
+ - Added Windows support for Fl_Window::xclass() (STR #848)
+ - Floating point input field allows characters from
+ current locale (STR #903)
+ - Fixed integration of Fl_Input_Choice into FLUID (STR
+ #879)
+ - New windows touching the right screen border would be
+ positioned all the way to the left (STR #898)
+ - Made pie drawing size for WIN32 and OS X the same as
+ X11 (STR #905)
+ - Fixed OS X issue with OpenGL windows inside of Tabs
+ (STR #602)
+ - FLUID Code Editor would occasionally not draw the last
+ character in the buffer (STR #798)
+ - FLUID Declaration private flag fixed (STR #799)
+ - FLUID overlay now shows a seperate bounding box of
+ selected items with correct handles and a dotted
+ boundig box for all labels (STR #790)
+ - Fixed left overhang of large chracters in Fl_Input_
+ (STR #941)
+ - Fixed button resizing in File Chooser (STR #884)
+ - Fixed FLUID redraw issue (STR #912)
+ - Added 32bit BMP Image file format support (STR #918)
+ - Value Sliders would not receive focus when clicked on
+ (STR #911)
+ - Added redraw of some widgets to show focus change (STR
+ #910)
+ - Fl::set_font would not clear 'pretty' name (STR #902)
+ - Fixed unescaped '@' in fonts demo (STR #867)
+ - FLUID should not open the Display connection anymore if
+ creating code only (STR #904)
+ - Improved hidden copy / ctor implementation (STR #860)
+ - Increased matrix stack depth and added over/underflow
+ error (STR #924)
+ - Reverted Mac Carbon Clipping simplification that broke
+ subwindow clipping (STR #908, SVN r4386)
+ - Fixed bitmap scaling code
+ - Fixed tiny memory leak (STR #878)
+ - Fixed hang on corrupt jpeg (STR #915)
+ - Fixed static allocation of font buffer in demo (STR #909)
+ - Added symbols 'refresh', 'reload', 'undo', and 'redo'.
+ - Fixed focus loss on Fl_Window:resize()
+ - Fl::delete_widget would hang fl_wait after deleting the
+ window (STR #679)
+ - Fl::paste would sometimes not recoginze external
+ changes of the clipboard (STR #722)
+ - Clipping fixes for OSX
+ - Removed attempt to find items via
+ Fl_Menu_::find_item() in linked submenus
+ - FLUID interactive window resizing fixes (STR #873, 791)
+ - FLUID panel resize and alignment fixes (STR #891)
+ - Fl_Window::show(argc, argv) now sets the scheme before
+ showing the window; this should eliminate any
+ flickering between the standard and plastic schemes on
+ startup (STR #886)
+ - Selected tabs are now drawn slightly larger than
+ unselected tabs so they stand out more (STR #882)
+ - Round Plastic boxes now draw round (STR #841)
+ - FL_PLASTIC_DOWN_BOX drew with artifacts (STR #852)
+ - Changed initializations on WIN32 (STR #862)
+ - Fl_Preferences::getUserdataPath() didn't work for
+ sub-groups (STR #872)
+ - Fixed some redraw issues on Windows XP.
+ - FLUID didn't set the initial size of widgets properly
+ (STR #850)
+ - Fl_Tabs would steal focus away from its children on a
+ window focus change (STR #870)
+ - filename_relative() now converts the current directory
+ to forward slashes as needed on WIN32 (STR #816)
+ - Fl_File_Chooser::value() and ::directory() now handle
+ paths with backslashes on WIN32 (STR #811)
+ - Added the standard rgb.txt file from X11 to the test
+ directory, allowing all platforms to try the colbrowser
+ demo (STR #843)
+ - Resizing of OpenGL subwindows was broken on OSX (STR #804)
+ - The fltk-config script now supports running from a
+ source directory (STR #840)
+ - Fl_Browser_ didn't update the position properly when an
+ item was deleted (STR #839)
+ - fl_contrast() now compares the luminosity of each color
+ (STR #837)
+ - Fl_Input_ crashed on some platforms when wrapping
+ international text characters (STR #836)
+ - Fixed some BMP images loading bugs (STR #825)
+ - Fl_File_Chooser now returns directory names with a
+ trailing slash to avoid problems with relative
+ filenames (STR #819)
+ - Fl_Help_View now supports the FONT and U elements (STR
+ #815)
+ - OpenGL windows that were completely off-screen caused
+ problems with some graphics cards on WIN32 (STR #831)
+ - Multiple screen support didn't work on Windows NT and
+ 95 (STR #821)
+ - Fl_Scrollbar didn't compute the correct knob size when
+ using the "nice" types (STR #845)
+ - fl_draw() would segfault on WIN32 if no font was set;
+ it now uses the default font (STR #828)
+ - Fl_Browser_ was calling the callback multiple times for
+ a single selection change with FL_WHEN_CHANGED (STR
+ #834)
+ - Added "filenew", "fileopen", "filesave", "filesaveas",
+ and "fileprint" symbols with standard toolbar
+ symbology.
+ - Updated Fl_Tabs to check the contrast of the label
+ color against the tab background, and to highlight the
+ top 5 lines of the tab pane with the selection color so
+ that selected tabs stand out more.
+ - The example programs can now compile separate from the
+ FLTK source distribution (STR #809)
+ - The example programs are now installed with the
+ documentation (STR #809)
+ - Fixed the drawing of the Fl_Browser_ selection box (STR
+ #786)
+ - Dropped Codewarrier project files and support.
+ - The FLTK string functions are now compiled in on all
+ systems (STR #774)
+ - Fixed symbol demo label bug (STR #777)
+ - Fixed position of menu titles (STR #795)
+ - Added missing Fl_Window::copy_label() method.
+ - Fixed wrong tooltip in FLUID (STR #784)
+ - Added zlib path to FLUID (STR #783)
+ - Menus and other pop-up windows now obey screen
+ boundaries on multi-screen displays (STR #781)
+ - Fl_Chart would draw outside its bounding box (STR #780)
+ - Added Fl::screen_count() and Fl::screen_xywh() APIs to
+ support multi-screen displays.
+ - FLUID now supports direct creation of widget classes.
+ - Fl_File_Chooser now correctly handles multiple
+ selections that are a mix of files and directories.
+ - Fl_File_Chooser no longer resets the type() when
+ choosing a single file, and it now works when selecting
+ multiple directories (STR #747)
+ - Fl_File_Icon::load_system_icons() now only loads 16x16
+ and 32x32 icon images to improve startup performance.
+ - Pressing Enter in the file chooser when selecting a
+ directory will choose that directory if it is currently
+ shown (STR #746)
+ - Added a fl_file_chooser_ok_label() function to set the
+ "OK" button label for the fl_file_chooser() and
+ fl_dir_chooser() functions.
+ - Added Fl_File_Chooser::ok_label() methods to set the
+ "OK" button label.
+ - The fl_ask() function is now deprecated since it does
+ not conform to the FLTK Human Interface Guidelines.
+ - The Fl_File_Chooser window now properly resizes its
+ controls (STR #766)
+ - The Fl_Help_Dialog window now properly resizes its
+ controls (STR #768)
+ - The Fl_File_Chooser favorites window is now resizable
+ (STR #770)
+ - Now provide FL_PLASTIC_ROUND_UP/DOWN_BOX box types
+ which are used by the plastic scheme.
+ - FLUID windows that are resized through the widget panel
+ now remain resizable by the window manager.
+ - Increased the size of the background image used by
+ the plastic scheme to reduce the CPU load of redraws
+ (STR #769)
+ - Fixed a syntax highlighting bug in the editor demo.
+ - Fl_Progress now contrasts the label color with the bar
+ color, so labels will be readable at all times.
+ - fl_read_image() didn't use the right red, green, and
+ blue masks on XFree86.
+ - Fixed Quickdraw drawing of 3 and 4 sided polygons (STR
+ #765)
+ - Fixed fl_message() code so that it does not get
+ accidentaly addded to the current group (STR #253)
+ - FLUID now highlights code in the widget callback and
+ code editors.
+ - FLUID now supports printing of windows.
+ - Fixed inactive drawing of border, embossed, and
+ engraved box types.
+ - Added Fl_Spinner widget (another combination of
+ existing widgets in a header file)
+ - FLUID now provides support for UI templates.
+ - fl_not_clipped() incorrectly used the current window
+ dimensions for gross clipping, which interfered with
+ off-screen rendering.
+ - Fl_Window::draw() and Fl_Window::iconlabel() could leak
+ memory if copy_label() was used on the window.
+ - fl_shortcut_label() now shows letter shortcuts in
+ uppercase, e.g. "Ctrl+N" instead of "Ctrl+n" to be
+ consistent with other toolkits.
+ - FLUID now provides unlimited undo/redo support.
+ - FLUID now provides an option to choose which scheme
+ (default, none, plastic) to display.
+ - Fixed scheme background issue with windows in FLUID.
+ - In FLUID, new widgets are now created with the ideal
+ size by default, and menu bars are positioned to use
+ the entire width of the window.
+ - Added Layout/Widget Size submenu to select default
+ label and text size (Tiny, Small, and Normal).
+ - Added Edit/Duplicate command to FLUID to duplicate the
+ current selection.
+ - FLUID now tracks the current state of the widget bin
+ and overlays.
+ - Now fill the widget image paths with relative
+ filenames.
+ - Fixed frame drawing of Fl_Text_Display (STR #762)
+ - Fl_Clock_Output::value() did not return the previously
+ set value (STR #748)
+ - Added comment type to FLUID. This is useful for
+ generating copyright notices in the source and header
+ files.
+ - Fl_Valuator would not format text output with decimal
+ point when the step value was fractional, but above 1.
+ - fl_filename_relative() didn't compare drive letters in
+ a case-insensitive way (STR #741)
+ - Fixed menu item width calculations with symbols (STR
+ #740)
+ - The keyboard shortcut handling code did not handle
+ 8-bit characters properly (STR #731)
+ - Fl_JPEG_Image could still crash an app with a corrupt
+ JPEG file (STR #739)
+ - Using the layout alignment controls on a menu widget
+ would cause FLUID to crash (STR #742)
+ - Added QNX bug workaround for menu handling (STR #704)
+ - Added Greg Ercolano's simple Fl_Input_Choice widget
+ which is a combination of the Fl_Input and
+ Fl_Menu_Button widgets (STR #650)
+ - Fl_Multiline_Input now scrolls the full height of the
+ widget instead of 5 lines when the user presses PageUp
+ or PageDown (STR #727)
+ - CMake build fixes (STR #724)
+ - Fl_Browser::swap() didn't handle redraws properly when
+ the swapped lines had different heights (STR #729)
+ - FL_MOUSEWHEEL events are now sent first to the widget
+ under the mouse pointer and then to the first widget
+ which accepts them. This is similar to the way
+ shortcut events are handled and is consistent with the
+ way the mouse wheel is handled by other toolkits.
+ - Fl::wait() could block on WIN32 if the window was
+ deleted via Fl::delete_widget() (STR #679)
+ - Fl_Preferences::RootNode did not find the user's home
+ directory on some non-US versions of Windows (STR
+ #720)
+ - Fl_Window::hide() didn't delete the current clipping
+ region on WIN32, causing a GDI resource leak in some
+ situations (STR #723)
+ - Removed a few warnings when compiling on OS X
+ - Fl_Menu now draws the arrow more like other toolkits
+ and 2.0 (STR #651)
+ - Fixed a VC++ compiler error in Fl_JPEG_Image.cxx (STR
+ #676)
+ - FL_SHADOW_BOX/FRAME drew outside of the bounding box
+ (STR #694)
+ - Fl_Widget::copy_label(NULL) didn't work (STR #707)
+ - Fl_Choice now allows click selection like
+ Fl_Menu_Button and Fl_Menubar (STR #706)
+ - Updated cmake support (STR #645)
+ - Fl_Check_Browser didn't draw properly when inactive
+ (STR #681)
+ - Removed some redundant code in Fl_Group::handle() (STR
+ #669)
+ - The file chooser didn't always deactivate the OK
+ button when necessary (STR #653)
+ - Image drawing on OSX changed the current drawing
+ colors (STR #662)
+ - Fixed some compiler errors on WIN32 (STR #647, STR
+ #726)
+ - FLUID didn't update the widget panel X/Y/W/H values
+ when moving the selected window (STR #701)
+ - FLUID didn't use the label type constant names for
+ menu items, causing them to be drawn using the normal
+ label type (STR #668)
+ - Fl_File_Chooser was slow with large directories (STR
+ #654)
+ - FLUID didn't add xclass() calls to windows (STR #718)
+ - The X11 DND code did not correctly select a text
+ format for incoming data (STR #711)
+ - Fixes to Fl_JPEG_Image error handler.
+ - Fl_Menu::popup() and ::pulldown() would crash an
+ application if a callback created widgets before they
+ returned (STR #685)
+ - Fl_Double_Window would cause a full redraw, even if
+ only small parts of the UI were changed on Mac OS X.
+ - Fl_JPEG_Image did not correctly handle errors reported
+ by the JPEG library (STR #652)
+ - Fl_Menu now draws sub-menu arrows like other toolkits
+ and FLTK 2.0 (STR #651)
+ - Fixed a compiler warning in Fl_Window.H (STR #641)
+ - Tooltips disabled shortcut processing (STR #643)
+ - Fl::event_number() didn't always match the value sent
+ to the handle() method (STR #634)
+ - Fl_Shared_Image::reload() didn't set the image_
+ pointer properly in all cases (STR #632)
+ - Fl_Help_View::topline() incorrectly set the changed()
+ flag (STR #631)
+ - Fl_Choice::value() now supports NULL or -1 to deselect
+ the current item (STR #637)
+ - More VC++ 6 project file fixes (STR #638)
+ - Added missing Watcom makefile in the test directory
+ (STR #636)
+ - Fl_Text_Display::word_left would hang if the cursor
+ was at position 0 (STR #635)
+
+
+CHANGES IN FLTK 1.1.6 RELEASED: Nov 23 2004
+
+ - Documentation updates (STR #552, STR #608)
+ - Added the 2.0 Fl_Widget::copy_label() method to
+ allow FLTK 1.x applications to have their label
+ strings managed by FLTK (STR #630)
+ - Added Fl::delete_widget() method to safely delete
+ widgets in callback methods (STR #629)
+ - Fl_Widget::damage(uchar,int,int,int,int) didn't clip
+ the bounding box properly (STR #626)
+ - Windows could appear on the wrong screen on OSX (STR
+ #628)
+ - Fl_Double_Window produced an error on resize with X11
+ - FLUID didn't display menu items using images properly
+ (STR #564)
+ - Fl_Sys_Menu_Bar didn't compile on case-sensitive
+ file-systems (STR #622)
+ - FLUID didn't handle default function parameters
+ properly (STR #579)
+ - Moving or resizing widgets in FLUID didn't always
+ update the widget panel (STR #600)
+ - FLTK windows could appear off-screen on X11 (STR #586)
+ - The configure script did not support
+ --disable-localfoo to completely disable image file
+ support (STR #582)
+ - The Visual C++ 6.0 project files still listed the old
+ JPEG, PNG, and ZLIB library names (STR #577)
+ - Fixed the scandir() conditional code for HP-UX 11i
+ (STR #585)
+ - Fl_Text_Display didn't support CTRL/CMD-A/C (STR #601)
+ - Watcom fixes (STR #581, STR #584, STR #594, STR #595,
+ STR #623, STR #627)
+ - Fixed library include order when building DSOs on
+ MacOS X (STR #596)
+ - fl_xid() could cause a WIN32 application to crash (STR
+ #560, STR #576, STR #618)
+ - Fl_Browser::remove_() removed the item from the list
+ before computing the item height, which caused
+ problems with some programs (STR #613)
+
+
+CHANGES IN FLTK 1.1.5 RELEASED: Oct 19 2004
+
+ - Documentation updates (STR #568, STR #570)
+ - Shortcuts were incorrectly underlined in multi-line
+ labels (STR #566)
+ - More CMake updates (STR #499)
+ - The Watcom C++ compiler needed a small change (STR
+ #567)
+ - Added DESTDIR support and now remove all man pages for
+ the "uninstall" target (STR #545)
+ - Fix PNG drawing on buggy WIN32 graphics cards (STR
+ #548)
+ - The configure script didn't propagate the CPPFLAGS
+ environment variable (STR #549)
+ - The numpad keys didn't work properly on WIN32 (STR
+ #502)
+ - fl_input() and friends now set the input focus to the
+ text field when the dialog is shown (STR #553)
+ - Fixed background color mixup when drawing Fl_Choice
+ menus (STR #544)
+ - Fixed MingW makefiles (STR #550)
+ - More VC++ project file tweaking (STR #559)
+ - Fl_PNG_Image didn't use the png_set_trns_to_alpha
+ function when available (STR #547)
+ - The FL_UNFOCUS event wasn't always sent when switching
+ tabs (STR #558)
+
+
+CHANGES IN FLTK 1.1.5rc3
+
+ - Documentation updates (STR #505, STR #513)
+ - Updated PNG library source to 1.2.7.
+ - Updated ZLIB library source to 1.2.1.
+ - Fixed VC++ project file problems (STR #476, STR #478,
+ STR #520, STR #527, STR #537)
+ - Now look for 8 bits of alpha when the developer has
+ requested FL_RGB8 (STR #541)
+ - The last line in an Fl_Help_View widget was not
+ aligned properly (STR #536)
+ - The "search" symbol looked like a Q (STR #536)
+ - Changed Fl_Help_View::get_color() to use a lookup
+ table to avoid serious Borland C++ 5.5 compiler bugs
+ (STR #533)
+ - Fixed Watcom compiler warnings with FL/Fl_Widget.H
+ (STR #540)
+ - The image class copy() methods did not always make a
+ separate copy of the image data (STR #539)
+ - Fixed an edge case in fl_old_shortcut() that could
+ cause it to read beyond then end of the shortcut
+ string (used for XForms named shortcuts)
+ - Added (unsupported) CMake files (STR #499)
+ - Tooltips would not reappear on the same widget, and
+ the initial tooltip delay was not used after a tooltip
+ was shown (STR #465)
+ - Fixed a compile problem with the Linux 2.6 threading
+ support (STR #483)
+ - Fixed problems with 2-byte Xpm files on 64-bit
+ platforms (STR #525)
+ - FLTK didn't handle the ReparentNotify event on X11
+ (STR #524)
+ - The old source file "fl_set_gray.cxx" is not needed
+ (STR #516)
+ - Fl_Text_Display still called delete[] instead of
+ free() in one place (STR #503)
+ - The symbol test program did not handle the @+ symbol
+ properly (STR #490)
+ - Fl_File_Chooser didn't correctly call isprint() and
+ isspace() when checking to see if the current file was
+ text that can be previewed (STR #517)
+ - FLUID didn't compile with Borland C++ due to a
+ compiler bug (STR #496)
+ - Fl_Positioner did not handle reversed min and max
+ values (STR #510)
+ - fl_descent(), fl_height(), and fl_width() would crash
+ a program if you didn't call fl_font() first; they now
+ return -1 if no font is set (STR #500)
+ - Added test/unittests to verify pixel drawing and
+ alignment across platforms
+ - Fl_Menu_::find_item() didn't determine the menu path
+ properly (STR #481)
+ - The build system now installs image library header
+ files in FL/images/filename.h so that FLTK programs
+ will use the same header files as the FLTK image
+ libraries.
+ - The build system now creates image libraries named
+ "libfltk_name.a" instead of "libname.a" to avoid
+ clobbering an existing installed library (STR #480)
+
+
+CHANGES IN FLTK 1.1.5rc2
+
+ - Documentation updates (STR #365, STR #399, STR #407,
+ STR #412, STR #414, STR #452, STR #462)
+ - Fl_Text_Display did not handle drawing of overlapping
+ text (italic next to plain, etc.) properly (STR #381)
+ - All of the core widgets now consistently set changed()
+ before calling the callback function for a change in
+ value; this allows programs to check the changed()
+ state in a callback to see why they are being called
+ (STR #475)
+ - Fl_File_Chooser did not handle some cases for filename
+ completion (STR #376)
+ - Fl_Help_View didn't properly compute the default
+ maximum width of the page properly, resulting in
+ non-wrapped text in table cells (STR #464)
+ - Fl_Text_Editor no longer tries to emulate the Emacs
+ CTRL-A shortcut to move to the first column, since
+ there is a key for that and the widget does not
+ emulate any other Emacs keys (STR #421)
+ - Fl_File_Chooser always disabled the OK button when the
+ user pressed DELETE or BACKSPACE (STR #397)
+ - Added Fl_Browser::swap() methods (STR #459)
+ - Fl_Counter didn't use a thin down box for the text
+ field if the box type was set to FL_THIN_UP_BOX (STR
+ #467)
+ - Fl_Help_View now resets the scrollbars if they go
+ outside the current view (STR #464)
+ - fl_dir_chooser() did not show the previous selection
+ as documented (STR #443)
+ - Fl_Text_Display used delete[] instead of free() in
+ some places (STR #466)
+ - FLTK now includes copies of the PNG, JPEG, and ZLIB
+ libraries for platforms that do not have them (STR
+ #441)
+ - The fltk-config script did not include the
+ "-mno-cygwin" option under CygWin (STR #434)
+ - Fl_Help_View::find() did not check for a NULL value
+ (STR #442)
+ - Added search symbol to the search field of
+ Fl_Help_Dialog (STR #417)
+ - Added two new symbols, @search and @FLTK, which can be
+ used in labels.
+ - MacOS X: fixed NumLock mixup, added support for
+ FL_Menu and FL_Delete keys on external (PC) keyboards
+ (STR #445)
+ - Fl_File_Icon::draw() did not support drawing of complex
+ polygons in icon descriptions (STR #474)
+ - The configure script now offers options for JPEG, PNG,
+ and ZLIB libraries (STR #416)
+ - The first menu item in a list would not go invisible
+ (STR #406)
+ - Fl_Text_Buffer::replace() now range checks its input
+ (STR #385)
+ - FLTK now builds with the current release of MinGW (STR
+ #325, STR #401, STR #402)
+ - FLTK now honors the numlock key state (STR #369)
+ - The Fl_Text_Display widget did not redraw selections
+ when focus changed (STR #390)
+ - The plastic background image is now less contrasty
+ (STR #394)
+ - Fl_Scroll now uses a full redraw when the scheme is
+ set to plastic and the box type is a frame (STR #205)
+ - Fl_Window::resize() did not work properly with KDE 3.2
+ (STR #356)
+ - FLTK didn't delete font bitmaps when the last OpenGL
+ window was deleted, preventing future text from
+ displaying (STR #310)
+ - FLUID didn't include a full initialization record for
+ the trailing NULL menu items (STR #375)
+ - Fl_Browser::item_width() did not properly handle
+ format modifiers (STR #372)
+ - Fl_Browser::item_height() did not handle columns
+ properly (STR #371)
+ - Fl_Gl_Window's on WIN32 now prefer accelerated pixel
+ formats over generic formats (STR #382)
+ - Fl_Window::resize() did not work on some systems if
+ the window was not shown (STR #373)
+ - FLUID did not write the user_data type if the
+ user_data field was empty (STR #374)
+ - The value(const Fl_Menu_Item*) method was not
+ implemented for Fl_Choice (STR #366)
+ - Fl_Pack didn't draw child widget labels the same way
+ as Fl_Group, causing display problems (STR #360)
+ - fl_read_image() didn't work when reading from an
+ offscreen buffer with some X11 servers (STR #364)
+
+
+CHANGES IN FLTK 1.1.5rc1
+
+ - Documentation updates (STR #186, STR #245, STR #250,
+ STR #277, STR #281, STR #328, STR #338)
+ - fl_scroll() did not handle scrolling from off-screen on
+ WIN32 (STR #315)
+ - Fl_File_Chooser did not allow manual entry of a drive
+ letter (STR #339)
+ - Fl_Menu now uses the boxtype to redraw the menu
+ background (STR #204)
+ - Fl_Scroll now shows the background image when a framed
+ box type is used and the Fl_Scroll is a direct
+ decendent of a window (STR #205)
+ - Added a new_directory_tooltip string pointer to allow
+ localization of the file chooser's new directory
+ button (STR #340)
+ - Added Fl_Menu_::find_item() method (STR #316)
+ - The Fl_Widget copy operator definitions were not
+ conditionally compiled properly (STR #329)
+ - FLUID's Layout functionality did not move child
+ widgets when laying out group widgets (STR #319)
+ - FLUID's Layout->Center In Group functionality did not
+ properly handle widgets that were children of a
+ Fl_Window widget (STR #318)
+ - The Fl_Text_Display destructor did not remove the
+ predelete callback associated with the current buffer
+ (STR #332)
+ - Fixed several bugs in the MacOS X Fl::add_fd()
+ handling (STR #333, STR #337)
+ - The Fl_Text_Display widget did not display selections
+ set by the application (STR #322)
+ - FLUID crashed if you did layout with a window widget
+ (STR #317)
+ - Fl_Scroll::clear() didn't remove the child widget from
+ the Fl_Scroll widget (STR #327)
+ - Fl_Value_Slider::draw_bg() didn't always apply the
+ clipping rectangle (STR #235)
+ - fl_filename_relative() returned the wrong string if
+ the absolute pathname was equal to the current working
+ directory (STR #224)
+ - Fl_Help_Dialog didn't correctly restore the scroll
+ position when going forward/back in the link history
+ if the file changed (STR #218)
+ - glutGetModifiers() did not mask off extra state bits,
+ confusing some GLUT-based applications (STR #213)
+ - Fixed mouse capture problems on MacOS X (STR #209, STR
+ #229)
+ - Fl_Sys_Menu_Bar is now built into the library for
+ MacOS X (STR #229)
+ - Fl_Menu_ now provides item_pathname() methods to get
+ the "pathname" of a menu item, e.g. "File/Quit" (STR
+ #283)
+ - Fl_Text_Display now provides cursor_color() methods to
+ get and set the cursor color (STR #271)
+ - Fl_Scroll didn't honor FL_NO_BOX (STR #305)
+ - FLUID declaration blocks didn't support public/private
+ definitions (STR #301)
+ - Fl_Preferences incorrectly created the preferences
+ directory before necessary (STR #247)
+ - The WIN32 project files still defined the (obsolete)
+ FL_STATIC constant (STR #279)
+ - Fl_Text_Display::buffer() did not support NULL values,
+ making it impossible to clean up text buffers from a
+ subclass (STR #295)
+ - Fl_Text_Display did not support a NULL
+ unfinishedStyleCB function (STR #241)
+ - Fl::background2() incorrectly marked the foreground
+ color as initialized (STR #255)
+ - Fixed the X11 CTRL + "-" detection code to properly
+ track the state of the CTRL key (STR #264)
+ - Fl_File_Icon::load_system_icons() didn't support KDE
+ 3.x (STR #299)
+ - WIN32's scandir() emulation did not allocate enough
+ memory for directory names (STR #263)
+ - Fl::compose() did not handle special keys like
+ backspace properly (STR #293)
+ - Fl_Choice did not clip its text when drawing using the
+ plastic scheme (STR #287)
+ - Fl_Group incorrectly mapped the emacs CTRL keys to
+ keyboard navigation (STR #228)
+ - Fl_File_Browser::load() didn't handle a NULL directory
+ name (STR #266)
+ - 64-bit library fixes (STR #261)
+ - The Fl_Valuator::format() function did not limit the
+ size of the number buffer (STR #268)
+ - The keypad Enter key works as the normal Enter/Return
+ key in common widgets (STR #191)
+ - Fixed some OS/2-specific build problems (STR #185, STR
+ #197)
+ - Calling Fl_Text_Display::buffer() with the same buffer
+ would cause an application to lockup (STR #196)
+ - Some of the widgets could crash an application if the
+ cursor was changed after a window was deleted (STR
+ #181)
+ - The Fl_Gl_Window WIN32 pixel format code did not
+ choose the pixel format with the largest depth buffer
+ (STR #175)
+ - The configure script didn't leave space between the
+ CFLAGS/CXXFLAGS and X_CFLAGS variables (STR #174)
+ - The Fl_JPEG_Image and Fl_PNG_Image classes did not
+ trap errors from the corresponding image libraries
+ (STR #168)
+ - Added "--with-links" configure option to control
+ whether symlinks are created for the FLTK header files
+ (STR #164)
+ - Added new hoverdelay() to Fl_Tooltip to control how
+ quickly recent tooltips appear (STR #126)
+ - FLUID now sets the size range when a window is shown.
+ This seems to be necessary with some window managers
+ (STR #166)
+
+
+CHANGES IN FLTK 1.1.4 RELEASED: Sep 08 2003
+
+ - The fl_read_image() function was not implemented on
+ OSX (STR #161)
+ - VC++ 7.1 didn't like how the copy operators were
+ disabled for the Fl_Widget class; now include inline
+ code which will never be used but makes VC++ happy
+ (STR #156)
+ - Fixed an IRIX compile problem caused by a missing
+ #include (STR #157)
+ - FLUID didn't write color/selection_color() calls using
+ the symbolic names when possible, nor did it cast
+ integer colors to Fl_Color (STR #146)
+ - Fl_File_Chooser was very close for multiple file
+ selection in large directories (STR #140)
+ - Fl_Text_Display/Editor did not disable the current
+ selection when focus was shifted to another widget
+ (STR #131)
+ - Fl_Choice didn't use the normal focus box when the
+ plastic scheme was in use (STR #129)
+ - Fl_Text_Editor didn't use selection_color()
+ consistently (STR #130)
+ - The fltk_forms, fltk_gl, and fltk_images DSO's and
+ HP-UX shared libraries are now linked against the fltk
+ shared library to provide complete dependency
+ resolution (STR #118)
+ - The configure.in file did not work with autoconf 2.57.
+ - FLUID didn't redraw widgets when changing the X, Y, W,
+ or H values in the widget panel (STR #120)
+ - Fl_Window::show(argc, argv) wasn't calling
+ Fl::get_system_colors() as documented (STR #119)
+ - DSO (shared library) building wasn't quite right for
+ some platforms (STR #118)
+ - OSX: some changes to make ProjectBuilder compiles
+ possible.
+ - OSX: FLTK would not know where a window was positioned
+ by the OS. As a result, popup menus could open at
+ wrong positions.
+
+
+CHANGES IN FLTK 1.1.4rc2
+
+ - Fl_Window::show(argc,argv) incorrectly opened the
+ display prior to parsing the arguments; this prevented
+ the "-display foo" option from working (STR #111)
+ - Images were not clipped properly on MacOS X (STR #114)
+ - Fl::reload_scheme() and Fl::scheme("foo") incorrectly
+ called Fl::get_system_colors(). This prevented an
+ application from setting its own color preferences
+ (STR #115)
+ - The 'Enter' key event on OS X would not set
+ Fl::e_text.
+ - Changed behaviour of FLUID to always paste into
+ a selected group (STR #88)
+ - Menuitem now changes font, even if fontsize
+ is not set (STR #110)
+ - Swapped shortcut labels in OS X (STR #86)
+ - Non-square Fl_Dial would calculate angle from user
+ input wrong (STR #101)
+ - Updated documentatiopn of fl_draw (STR #94)
+ and Fl_Menu_::add() (STR #99)
+ - FLUID collapse triangle events were not offset by
+ horizontal scroll (STR #106)
+ - QuitAppleEvent now correctly returns from Fl::run()
+ instead of just exiting (STR #87)
+ - Hiding the first created OpenGL context was not
+ possible. FLTK now manages a list of contexts (STR #77)
+ - FLUID didn't keep the double/single buffer type for
+ windows.
+ - FLTK didn't work with Xft2.
+ - OSX window resizing didn't work (STR #64)
+ - Fixed MacOS X shared library generation (STR #51)
+ - Several widgets defined their own size() method but
+ didn't provide an inline method that mapped to the
+ Fl_Widget::size() method (STR #62)
+ - Fl_Scroll didn't provide its own clear() method, so
+ calling clear() on a Fl_Scroll widget would also
+ destroy the scrollbars (STR #75)
+ - Fl::event_text() was sometimes initialized to NULL
+ instead of an empty string (STR #70)
+ - fl_draw() didn't properly handle a trailing escaped
+ "@" character (STR #84)
+ - Added documentation for all forms of
+ Fl_Widget::damage() (STR #61)
+ - Fl_Double_Window now has a type() value of
+ FL_DOUBLE_WINDOW, to allow double-buffered windows to
+ process redraws properly on WIN32 (STR #46)
+ - Added FL_DAMAGE_USER1 and FL_DAMAGE_USER2 damage bits
+ for use by widget developers (STR #57)
+ - Fl_Help_View didn't support numeric character entities
+ (STR #66)
+ - Menu shortcuts didn't use the Mac key names under
+ MacOS X (STR #71)
+ - CodeWarrior Mac OS X updated to work with current
+ CW8.3 (STR #34)
+ - Apple-C/X/V/Z didn't work in the Fl_Input widget due
+ to a bad mapping to control keys (STR #79)
+ - Added the OSX-specific fl_open_callback() function to
+ handle Open Documents messages from the Finder (STR
+ #80)
+ - The configure script contained erroneous whitespace in
+ various tests which caused errors on some platforms
+ (STR #60)
+ - The fltk-config script still supported the deprecated
+ --prefix and --exec-prefix options; dropped them since
+ they serve no useful purpose and would never have
+ worked for the intended purpose anyways... (STR #56)
+ - fl_filename_list returned 0 on Win32 if no directory
+ existed (STR #54)
+ - Pressing 'home' after the last letter in a Text_Editor
+ would move the cursor to pos 0 (STR #39)
+ - Fl::get_key(x) would mix up Ctrl and Meta on OS X (STR
+ #55)
+ - The configure script used the wrong dynamic library
+ linking command for OSX (STR #51)
+ - The Fl_Text_Editor widget did not set changed() nor
+ did it call the widget's callback function for
+ FL_WHEN_CHANGED when processing characters that
+ Fl::compose() handles (STR #52)
+
+
+CHANGES IN FLTK 1.1.4rc1
+
+ - The file chooser did not reset the click count when
+ changing directories; if you clicked on a file in the
+ same position after changing directories with a
+ double-click, the chooser treated it as a triple
+ click (STR #27)
+ - Symbols with outlines did not get drawn inactive.
+ - The Fl_Help_View widget now provides a find() method
+ to search for text within the page.
+ - The Fl_Help_Dialog widget now provides a search box
+ for entering text to search for.
+ - The default font encoding on OSX did not match the
+ default on WIN32 or X11.
+ - Menu items were not drawn using the font specified in
+ the Fl_Menu_Item structure (STR #30)
+ - Long menus that were aligned such that the top of an
+ item was exactly at the top of the screen would not
+ scroll (STR #33)
+ - The OS issues appendix incorrectly stated that MacOS
+ 8.6 and 9 were supported; they are not (STR #28)
+ - Fixed handling of nested double-buffered windows (STR
+ #1)
+ - Showing a subwindow inside a hidden window would crash
+ the application (STR #23)
+ - OSX users couldn't enter some special chars when using
+ some foreign key layouts (STR #32)
+ - Hiding subwindows on OSX would hide the parent window
+ (STR #22)
+ - Added thin plastic box types.
+ - Fl_Pack ignored the box() setting and cleared any
+ unused areas to the widget color; it now only does so
+ if the box() is set to something other than FL_NO_BOX.
+ - Updated the Fl_Tabs widget to offset the first tab by
+ the box dx value to avoid visual errors.
+ - Updated the plastic up box to draw only a single
+ border frame instead of the old double one for
+ improved appearance.
+ - Updated the default background color on OSX to provide
+ better contrast.
+ - Fl_Text_Display and friends now look for the next
+ non-punctuation/space character for word boundaries
+ (STR #26)
+ - gl_font() didn't work properly for X11 when Xft was
+ used (STR #12)
+ - Fl_File_Browser incorrectly included "." on WIN32 (STR
+ #9)
+ - Include shellapi.h instead of ShellAPI.h in the WIN32
+ drag-n-drop code in order to work with the MingW cross
+ compiler (STR #6)
+ - The cursor was not properly restored when doing
+ drag-n-drop on X11 (STR #4)
+ - Fl::remove_fd() didn't recalculate the highest file
+ descriptor properly (STR #20)
+ - Fl_Preferences::deleteGroup() didn't work properly
+ (STR #13)
+ - Fixed the fl_show_file_selector() function - it was
+ copying using the wrong string size (STR #14)
+ - fl_font() and fl_size() were not implemented on MacOS
+ X.
+ - Sorted the icon menu bar in FLUID.
+ - Fixed minor memory access complaints from Valgrind
+ - Compiling src/flstring.h on OS X with BSD header would
+ fail.
+ - Fl_Text_Editor didn't scroll the buffer when the user
+ pressed Ctrl+End or Ctrl+Home.
+ - Fl_Text_Editor didn't show its cursor when the mouse
+ was moved inside the window.
+ - FLUID now uses an Fl_Text_Display widget for command
+ output, which allows you to copy and paste text from
+ command output into other windows.
+ - Fl_Gl_Window could cause a bus error on MacOS X if the
+ parent window was not yet shown.
+ - FLUID could crash after displaying a syntax error
+ dialog for the callback code.
+ - FLUID would reset the callback code if you opened the
+ widget panel for multiple widgets.
+ - Added a NULL check to Fl_Text_Display (SF Bug #706921).
+ - The fltk-config script placed the LDFLAGS at the wrong
+ place in the linker options.
+ - Fl_Text_Display didn't draw the outer box in the right
+ dimensions, so it was invisible.
+ - Fl_Help_Dialog used the same color for links as for
+ the background, causing links to be invisible on pages
+ without a background color set.
+
+
+CHANGES IN FLTK 1.1.3 RELEASED: Feb 13 2003
+
+ - Documentation updates.
+ - FLTK now ignores KeyRelease events when X11 sends them
+ for repeating keys.
+ - FLUID now supports up to two additional qualifiers
+ before a class name (FL_EXPORT, etc.) to aide in
+ developing DLL interfaces for WIN32.
+ - Additional NULL checks in Fl_Button,
+ fl_draw_boxtype(), Fl_File_Chooser, and
+ Fl_Window::hotspot().
+ - The Fl_Preferences header file needed to FL_EXPORT all
+ of the nested classes for WIN32.
+ - Fl_Double_Window couldn't be nested on WIN32. [SF Bug
+ #658219]
+ - Fl_Slider didn't call the callback function when the
+ user changed the value using the keyboard and the
+ "when" condition was FL_WHEN_RELEASE. [SF Bug #647072]
+ - Lines with less than 2 unique vertices and polygons
+ with less the 3 unique vertices were not drawn
+ properly. [SF Bug #647067]
+ - The size_range() values were not honored under MacOS
+ X. [SF Bug #647074]
+ - OpenGL windows didn't resize correctly on MacOS X.
+ [SF Bug #667855]
+ - The menus incorrectly used the overlay visual when one
+ or more menu items contained an image. [SF Bug #653846]
+ - Changed some error messages to use Fl::error() instead
+ of fprintf()...
+ - Fl_Text_Buffer and Fl_Text_Display used free to free
+ memory that was allocated using the new operator.
+ - Tweeked the plastic scheme under MacOSX to better
+ match the colors.
+ - The Fl_Image.H always included the x.H header file,
+ which included many system headers that could
+ interfere with normal GUI applications. It now uses
+ the corresponding based types for the image id and
+ mask to avoid this.
+ - The FLUID widget panel wasn't sorted, so keyboard
+ navigation was strange. [SF Bug #647069]
+ - Fl_Scroll didn't compute the location of labels to the
+ right or below when determining the area to erase.
+ - Added backward-compatibility macro for
+ filename_setext().
+ - Fl_Bitmap::copy(), Fl_Pixmap::copy(), and
+ Fl_RGB_Image::copy() all could overflow the source
+ image when scaling the image.
+ - Double/triple clicks in Fl_Input fields didn't copy
+ the expanded selection to the clipboard.
+ - Fl_Glut_Window and Fl_Gl_Window didn't always initialize
+ the OpenGL context on MacOS.
+
+
+CHANGES IN FLTK 1.1.2 RELEASED: Nov 25 2002
+
+ - Fl_Menu_Bar now supports drawing vertical dividers
+ between menu items and submenus in the menu bar.
+ - Fl_File_Chooser::value() didn't return NULL when the
+ user clicked Cancel while selecting a directory. This
+ bug also affected fl_dir_chooser().
+ - Fl_Menu_::add(const char *) used too small a menu item
+ label buffer and didn't do bounds checking.
+ - Eliminate some compiler warnings with CodeWarrier
+ under WIN32 (Paul Chambers)
+ - Fl_Gl_Window widgets did not resize properly under
+ MacOS X.
+ - The cursor could be set for the wrong window in the
+ text widgets.
+ - Fl_Check_Browser didn't provide const char * add
+ methods as documented.
+ - Fl_Check_Browser didn't draw the same style of check
+ marks at the other widgets.
+ - Fl_Button, Fl_Choice, and Fl_Menu_Button incorrectly
+ activated the button/menu when the spacebar was
+ pressed in conjunction with shift, control, alt, or
+ meta.
+ - FLTK should now compile with Xft 2.0.
+ - Some versions of Tru64 4.0 have snprintf and
+ vnsprintf, but don't have the prototypes for those
+ functions.
+ - FLTK had trouble doing character composition with some
+ keyboard layouts under X11 (in particular, Belgian).
+ - Fl_Text_Editor would cause a segfault if the user
+ pressed CTRL-V (paste) without having any data in the
+ clipboard...
+ - The tab key moved backwards in menus instead of
+ forwards. Shift-tab still moves backwards.
+ - The redraw_label() method didn't damage the parent
+ window when the label was outside the widget's
+ bounding box.
+ - Added a "draw_children()" method to Fl_Group to make
+ subclassing Fl_Group with a custom draw() function
+ easier.
+ - Fl_Text_Editor now supports basic undo functionality.
+ - FLUID now uses Fl_Text_Editor widgets for all
+ multi-line code fields.
+ - Added new widget bin and icons to FLUID.
+ - FLUID would try running multiple commands in parallel,
+ even though it wasn't capable of handling it.
+ - FLUID didn't generate code for some attributes when
+ using custom/named widget classes.
+ - Added a new FL_COMMAND state bit which maps to FL_CTRL
+ on X11 and WIN32 and FL_META on MacOS.
+ - MacOS keyboard modifiers mapping corrections. Cmd and
+ Control are no longer swapped, event_key and event_text
+ return (mostly) the same values as on other platforms.
+ - The Fl_Tabs widget should no longer be a focus hog;
+ previously it would take focus from child widgets.
+ - The file chooser now activates the OK button when
+ opening a directory in directory selection mode.
+ - Fixed a bug in the file chooser when entering an
+ absolute path.
+ - Back-ported some FLTK 2.0 tooltip changes to eliminate
+ erroneous tooltip display.
+ - MacOS windows were resizable, even when size_range
+ would not allow for resizing.
+ - Fl_Text_Editor now supports Shift+Delete, Ctrl+Insert,
+ and Shift+Insert for cut, copy, and paste,
+ respectively.
+ - Fl_Text_Display didn't restore the mouse pointer when
+ hidden.
+ - Fl::arg() now ignores the MacOS X -psn_N_NNNNN option.
+ - Added another change to the WIN32 redraw handling for
+ the MingW compilers.
+ - Fl_File_Chooser didn't handle WIN32 home directories
+ that used backslashes instead of forward slashes.
+ - Fl_Text_Display didn't limit the resize height to 1
+ line.
+ - Fl_Scrollbar widgets incorrectly took keyboard focus
+ when clicked on. This caused widgets such as
+ Fl_Text_Display to hide the cursor when you scrolled
+ the text.
+
+
+CHANGES IN FLTK 1.1.1 RELEASED: ??? ?? 2002
+
+ - Fl_Text_Display didn't always show the cursor.
+ - Fl_Tabs now only redraws the tabs themselves when
+ making focus changes. This reduces flicker in tabbed
+ interfaces.
+ - The WIN32 redraw handler now correctly merges the FLTK
+ and Windows redraw regions.
+ - The Fl_Text_* widgets use the C++ bool type, which is
+ not supported by older C++ compilers. Added a
+ configure check and workaround code for this.
+ - Fl_X::set_xid() didn't initialize the backbuffer_bad
+ element that was used with XDBE.
+ - Fl_Shared_Image::uncache() was not implemented.
+ - Fl::set_font() didn't 0-initialize all font descriptor
+ data.
+ - Some OpenGL implementations don't support single-
+ buffered visuals. The Fl_Gl_Window class now emulates
+ single-buffered windows using double-buffered
+ windows.
+ - Added a workaround for a compiler bug in Borland C++
+ that prevented Fl_Help_View.cxx from compiling.
+ - Checkmarks didn't scale properly; copied the 2.0 check
+ mark code over.
+ - Replaced several memcpy's with memmove's for
+ portability (memmove allows for overlapping copies,
+ memcpy does not)
+ - Bug #621737: Fl_Bitmap::copy(), Fl_Pixmap::copy(), and
+ Fl_RGB_Image::copy() now range-check the new width and
+ height to make sure they are positive integers.
+ - Bug #621740: the WIN32 port needed to handle WM_MOUSELEAVE events
+ in order to avoid problems with tooltips.
+ - Fl_PNM_Image didn't set the "alloc" flag for the data,
+ which could lead to a memory leak.
+ - fl_filename_match() was inconsistently doing case-
+ insensitive matching.
+ - Fl_Button redraw fix for bug #620979 (focus boxes and
+ check buttons).
+ - Fl_Text_Display fix for bug #620633 (crash on
+ redisplay).
+ - Fl_Output now calls its callback when the user clicks
+ or drags in the widget.
+ - Shortcuts now cause buttons to take focus when visible
+ focus is enabled.
+ - fl_filename_relative() didn't check that the path was
+ absolute under WIN32.
+ - fl_filename_relative() didn't check that the path was
+ on the current drive under WIN32.
+ - The Fl_BMP_Image class now handles 16-bit BMP files
+ and BMP files with a transparency mask.
+ - The fltk-config script didn't add the required include
+ path, if any, when compiling a program.
+ - Added a license clarification that the FLTK manual is
+ covered by the same license as FLTK itself.
+ - Fl_Check_Browser wasn't documented.
+ - Fl_Preferences::Node::addChild(), deleteEntry(), and
+ remove() didn't set the "dirty" flag.
+ - The "no change" button didn't work in the FLUID widget
+ panel.
+ - Vertical scrollbars did not draw the arrows inactive
+ when the scrollbar was inactive.
+
+
+CHANGES IN FLTK 1.1.0 RELEASED: ??? ?? 2002
+
+ - Documentation updates.
+ - Added a Fl_Widget::redraw_label() method which flags a
+ redraw of the appropriate area. This helps to
+ eliminate flicker when updating the value of a widget.
+ - Fl_Wizard::value() now resets the mouse cursor to the
+ window's default cursor.
+ - Fl_File_Chooser::type() didn't enable/disable the new
+ directory button correctly.
+ - Fl_Preferences::entryExists() did not work properly.
+ - FLUID's image file chooser pattern was incorrect.
+ - Fl_File_Icon::load_system_icons() now detects KDE
+ icons in /opt/kde, /usr/local, and /usr automatically,
+ and supports the KDEDIR environment variable as well.
+ - Submenus now display to the left of the parent menu if
+ they won't fit to the right. Previously they would
+ display right on top of the parent menu...
+ - Fl_Menu_:add() didn't handle a trailing "\" character
+ gracefully.
+ - Clicking/dragging the middle mouse button in a
+ scrollbar now moves directly to that scroll position,
+ matching the behavior of other toolkits.
+ - Added some more range checking to the Fl_Text_Display
+ widget.
+ - The editor demo did not correctly update the style
+ (syntax highlighting) information.
+
+
+CHANGES IN FLTK 1.1.0rc7 CANDIDATE: ??? ?? 2002
+
+ - Updated the Fl_Text_Buffer and Fl_Text_Display classes
+ to be based on NEdit 5.3 (patch from George Garvey).
+ - Fixed a problem with Fl::wait(0.0) on MacOS X 10.2;
+ this affected the fractals demo and other OpenGL
+ applications.
+ - Fl_Glut_Window now takes keyboard focus and handles
+ shortcut events.
+ - The MacOS X implementation of fl_ready() now checks
+ the event queue for events.
+ - Fl_PNM_Image now supports the XV/GIMP thumbnail format
+ (P7).
+ - Fl_Preferences would not find groups inside the root
+ group.
+ - Small bug fixes for Fl_Chart, Fl_Scrollbar, Fl_Tabs,
+ and FLUID from Matthew Morrise.
+ - Fl_Chart didn't have its own destructor, so data in
+ the chart wasn't freed.
+ - Fl_Menu_Button no longer responds to focus or keyboard
+ events when box() is FL_NO_BOX.
+ - FLTK convenience dialogs put the buttons in the wrong
+ order.
+ - Fl_BMP_Image didn't load 4-bit BMP files properly.
+ - Minor tweeks to the WIN32 DLL support.
+ - Fl_Text_Display::resize() could go into an infinite
+ loop if the buffer is emptied.
+ - Fl::handle() didn't pass FL_RELEASE events to the
+ grab() widget if pushed() was set (for proper menu
+ handling...)
+ - DND events were being sent to the target window
+ instead of the target widget under WIN32.
+ - The newest Cygwin needs the same scandir() handling as
+ HP-UX.
+ - FLUID didn't register the image formats in the
+ fltk_images library, and had some other image
+ management problems.
+ - Fixed one more redraw bug in Fl_Browser_ where we
+ weren't using the box function to erase empty space in
+ the list.
+ - Fl_Text_Display::buffer() now calls resize() to show
+ the buffer.
+ - Fl_Help_View didn't support HTML comments.
+ - Fl_Help_View didn't include the extra cellpadding when
+ handling colspan attributes in cells.
+ - Fl_Help_View didn't support table alignment.
+
+
+CHANGES IN FLTK 1.1.0rc6 CANDIDATE: ??? ?? 2002
+
+ - Documentation updates.
+ - Fl::handle() didn't apply the modal tests for
+ FL_RELEASE events, which caused Fl_Tabs to allow users
+ to change tabs even when a modal window was open.
+ - Fl_Browser_, Fl_Input_, Fl_Slider now use the box
+ function to erase the background. This fixes some
+ long-standing redraw problems.
+ - More snprintf/strlcpy/strlcat changes where needed.
+ - Fl::get_font_name() would leak 128 bytes.
+ - Eliminated most of the "shadowed" variables to avoid
+ potential problems with using the wrong copy of "foo"
+ in a class method.
+ - Moved Fl_BMP_Image, Fl_GIF_Image, and Fl_PNM_Image to
+ the fltk_images library, so the only image formats
+ that are supported by the core library are XBM and XPM
+ files. This reduces the size of the FLTK core library
+ by about 16k...
+ - The Fl_Text_Display::resize() method was incorrectly
+ flagged as protected.
+ - Fixed some memory/initialization bugs in
+ Fl_File_Chooser that valgrind caught.
+ - The PNG library png_read_destroy() is deprecated and
+ does not free all of the memory allocated by
+ png_create_read_struct(). This caused a memory leak in
+ FLTK apps that loaded PNG images.
+ - Added uncache() method to Fl_Image and friends.
+ - Added image() methods to Fl_Menu_Item.
+ - Added default_cursor() method and data to Fl_Window.
+ - Fl_Group would send FL_ENTER events before FL_LEAVE
+ events, causing problems with adjacent widgets.
+ - Fixed filename problems with Fl_File_Chooser -
+ changing the filename field directly or choosing files
+ from the root directory could yield interesting
+ filenames.
+ - Fl_Input_ could crash if it received an empty paste
+ event.
+ - The mouse pointer now changes to the I beam
+ (FL_CURSOR_INSERT) when moved over an input field or
+ text widget.
+ - "make install" didn't automatically (re)compile the
+ FLUID executable.
+ - Added an Fl::get_boxtype() method to get the current
+ drawing function for a specific box type.
+ - Fl_Output and Fl_Multiline_Output didn't prevent
+ middle-mouse pastes.
+ - Fl_JPEG_Image didn't compile out-of-the-box with Cygwin
+ due to a bug in the Cygwin JPEG library headers.
+ - Fl_BMP_Image still didn't work with some old BMP files.
+ - "make distclean" didn't really clean out everything.
+ - Tweeked the look of the check button with a patch from
+ Albrecht Schlosser.
+
+
+CHANGES IN FLTK 1.1.0rc5 CANDIDATE: ??? ?? 2002
+
+ - Added "wrap" type bit to Fl_Input_, so you can now
+ have a multiline text field that wraps text.
+ - Setting the value() of an output text field no longer
+ selects the text in it.
+ - Output text fields now show a caret for the cursor
+ instead of the vertical bar.
+ - The newButton and previewButton widgets are now public
+ members of the Fl_File_Chooser class. This allows
+ developers to disable or hide the "new directory" and
+ "preview" buttons as desired.
+ - Added new visible focus flag bit and methods to
+ Fl_Widget, so it is now possible to do both global and
+ per-widget keyboard focus control.
+ - Removed extra 3 pixel border around input fields.
+ - No longer quote characters from 0x80 to 0x9f in input
+ fields.
+ - Improved speed of Fl_Browser_::display() method with
+ large lists (patch from Stephen Davies.)
+ - Fl_Help_View didn't properly handle NULL from the link
+ callback (the original filename/directory name were
+ not preserved...)
+ - Fl_Help_View didn't use the boxtype border values when
+ clipping the page that was displayed.
+ - Added first steps to CodeWarrior/OS_X support (see
+ fltk-1.1.x/CodeWarrior/OS_X.sit)
+ - Cleaned up the WIN32 export definitions for some of
+ the widget classes.
+ - Fixed a filename completion bug when changing
+ directories.
+ - Fl_File_Chooser::value() would return directories with
+ a trailing slash, but would not accept a directory
+ without a trailing slash.
+ - When installing shared libraries, FLUID is now linked
+ against the shared libraries.
+ - MacOS: missing compile rule for .dylib files.
+ - Fl_Group::current(), Fl_Group::begin(), and
+ Fl_Group::end() are no longer inlined so that they are
+ properly exported in DLLs under WIN32. Similar
+ changes for all static inline methods in other
+ classes.
+ - MacOS: support for Mac system menu (Fl_Sys_Menu_Bar)
+ - MacOS: wait(0) would not handle all pending events
+ - Added new makeinclude file for MingW using GCC 3.1.x.
+ - Fl_Choice::value(n) didn't range check "n".
+ - The MingW and OS/2 makeinclude files didn't have the
+ new fltk_images library definitions.
+ - Fl_Text_Editor didn't scroll the text in the widget
+ when dragging text.
+ - Config header file changes for Borland C++.
+ - FLTK didn't provide a Fl::remove_handler() method.
+
+
+CHANGES IN FLTK 1.1.0rc4 CANDIDATE: Jul 02 2002
+
+ - Added new filter_value() methods to Fl_File_Chooser to
+ get and set the current file filters.
+ - Added support for custom filters to Fl_File_Chooser.
+ - Added Borland C++ Builder IDE project files from
+ Alexey Parshin.
+ - Resource leak fixes under WIN32 from Ori Berger.
+ - Now register a WIN32 message for thread messages.
+ - Fl_Window didn't initialize the min and max window
+ size fields.
+ - The JPEG and PNG image classes have been moved to the
+ fltk_images library, a la FLTK 2.0. You can register
+ all image file formats provided in fltk_images using
+ the new fl_register_images() function.
+ - Fl_XBM_Image didn't correctly load XBM files.
+ - MacOS: Added Greg Ercolano's file descriptor support.
+ - MacOS: Fixed text width bug.
+ - A change in fl_fix_focus() broken click-focus in FLWM.
+ - Cygwin with -mnocygwin didn't like the FL/math.h
+ header file.
+ - Fl_Browser_ cleared the click count unnecessarily.
+ - MacOS: Pixmap draw fix, gl_font implemented
+ FL_FOCUS fix, window type fix for modal and nonmodal
+ windows, glut uninitialised 'display' proc fix
+ - Now support FLTK_1_0_COMPAT symbol to define
+ compatibility macros for the old FLTK 1.0.x function
+ names to the 1.1.x names.
+ - Now translate the window coordinates when a window is
+ shown, moved, or resized. This should fix the "menus
+ showing up at the wrong position" bug under XFree86.
+ - Fixed some more problems with the Fl_BMP_Image file
+ loader.
+ - BC++ fixes.
+ - The pixmap_browser demo didn't check for a NULL image
+ pointer.
+ - Fl_File_Icon::find() now uses fl_filename_isdir()
+ under WIN32 to check for directories.
+ - Fl_File_Chooser's preview code called refcount()
+ on the deleted image's object.
+ - Fixed another problem with the Fl_BMP_Image loader.
+ - The fl_file_chooser() callback was being called with a
+ NULL filename.
+ - Documented that fl_push_clip() is preferred over
+ fl_clip(), with a corresponding source change.
+ - Minor changes to the MacOS X event handling code.
+ - Added syntax highlighting example code to the editor
+ test program.
+ - Fl_Text_Display didn't range check style buffer
+ values.
+ - Added "dark" color constants (FL_DARK_RED, etc.)
+ - The MacOS font code was missing definitions for
+ fl_font_ and fl_size_.
+
+
+CHANGES IN FLTK 1.1.0rc3 CANDIDATE: ??? ?? ????
+
+ - Documentation updates.
+ - New file chooser from design contest.
+ - Did some testing with Valgrind and fixed some memory
+ problems in Fl_Help_View::Fl_HelpView,
+ Fl_Menu_::remove(), Fl_Text_Display::draw_vline(), and
+ resizeform() (convenience dialogs).
+ - Fixed some redraw() bugs, and now redraw portions of
+ the parent widget when the label appears outside the
+ widget.
+ - The boolean (char) value methods in Fl_Preferences
+ have been removed since some C++ compilers can't
+ handle char and int value methods with the same name.
+ - Added fl_read_image() function.
+ - Fixed Fl_Valuator::format() so that the correct format
+ type is used when step == 1.0.
+ - Fl_Help_View didn't support the TT markup.
+ - Fl_Shared_Image used a double-pointer to the image
+ handler functions, which was unnecessary and
+ unintuitive.
+ - Fl_PNM_Image didn't load the height of the image
+ properly.
+ - Fl_BMP_Image, Fl_JPEG_Image, Fl_PNG_Image, and
+ Fl_Shared_Image didn't delete image data that was
+ allocated.
+ - Enabled the OpenGL and threads demos when compiling
+ for MingW.
+ - Fl_File_Input didn't update the directory buttons if a
+ callback was registered with the widget.
+ - The file chooser would return the last selected
+ file(s) when cancel was pressed.
+ - The file chooser limited the resizing of the chooser
+ window unnecessarily.
+ - Fixed WM_PAINT handling under WIN32.
+ - Minor tweeks to MingW and OS/2 config headers.
+ - Fl_Value_Input now correctly determines if step()
+ specifies an integer value.
+ - Fl_Help_View didn't add links inside PRE elements.
+ - OS/2 build fixes from Alexander Mai.
+ - Now use strlcat() instead of strncat() which could
+ cause buffer overflows.
+ - Now use of strlcpy() instead of strncpy() to simplify
+ the code.
+ - Drag-n-drop under WIN32 now shows a [+] cursor instead
+ of the link cursor.
+ - Fixed widget width tooltip and default argument
+ handling code in FLUID.
+ - Fixed colors used when drawing antialiased text using
+ Xft.
+ - Fl_Preferences::makePath() now uses access() instead
+ of stat() when checking to see if the destination
+ directory already exists.
+ - Fl_BMP_Image now supports older BMP files with the 12
+ byte header.
+ - Optimized the redrawing of tabs and radio/check
+ buttons when the keyboard focus changes.
+ - More tooltip fixes.
+ - DND text operations would loop under X11.
+
+
+CHANGES IN FLTK 1.1.0rc2 CANDIDATE: ??? ?? ????
+
+ - Portability fixes.
+ - Backported 2.0 tooltip changes.
+ - Several of the valuators did not support tooltips.
+ - The last menu item in a menu didn't pick up on font
+ changes.
+ - FLUID now properly handles default argument parameters
+ properly.
+ - Fixed WM_PAINT handling under WIN32 - didn't validate
+ the correct region that was drawn.
+ - Fl_Multiline_Output would insert the enter key.
+ - Fl_File_Browser didn't clip items to the column width.
+ - Fl_Window::draw() cleared the window label but didn't
+ restore it, so windows could lose their titles.
+ - Eliminated multiple definitions of dirent structure
+ when compiling under WIN32.
+ - Adjusted the size of the circle that is drawn inside
+ radio buttons to scale better for larger labels.
+ - FLUID was opening the display when it shouldn't have.
+ - Fl_File_Chooser.cxx defined the file chooser functions
+ again; they should only be defined in the header file.
+ - Wide arcs would draw with "teeth".
+ - The preferences demo included Fl/Fl_Preferences.H
+ instead of FL/Fl_Preferences.H.
+
+
+CHANGES IN FLTK 1.1.0rc1 CANDIDATE: ??? ?? ????
+
+ - The fl_file_chooser() and fl_dir_chooser() functions
+ now support an optional "relative" argument to get
+ relative pathnames; the default is to return absolute
+ pathnames.
+ - The backspace and delete keys now work as expected in
+ the file chooser when doing filename completion.
+ - FLUID now supports running shell commands.
+ - New Fl_File_Input widget that shows directory
+ separators with filename in input field.
+ - The Fl_File_Chooser dialog now shows the absolute path
+ in the filename field using the Fl_File_Input widget.
+ - FLUID now keeps track of grid, tooltip, and other
+ GUI options, along with the last 10 files opened.
+ - Tooltip windows would show up in the task bar under
+ WIN32.
+ - Now append trailing slash to directory names in names
+ in WIN32 version of scandir(). This takes care of a
+ file chooser performance problem with large
+ directories.
+ - Added Fl_Preferences class from Matthias Melcher,
+ including binary data support.
+ - FLUID now recognizes the "using" keyword in
+ declarations.
+ - fl_file_chooser() didn't highlight the requested file
+ the second time the file chooser dialog was shown.
+ - Fixed rendering of Fl_Light_Button with the plastic
+ scheme.
+ - Fixed a bug in the MacOS font enumeration code.
+ - Now show a "locked" icon next to static/private
+ elements in FLUID, and "unlocked" icon next to
+ global/public elements.
+ - Implemented Fl_Menu_Item image labels using older
+ 1.0.x labeltype method.
+ - Updated the PNG library check to support both png.h
+ and libpng/png.h.
+ - Fixed a recursion bug in tooltips that was causing
+ random crashes.
+ - fl_file_chooser() could cause a segfault when passed a
+ NULL filename parameter in some situations.
+ - Added a "-g" option to fltk-config to support quick
+ compiling with debugging enabled.
+ - Fixed redraw problem with Fl_Input and anti-aliased
+ text.
+ - Added threading support for MacOS X and Darwin.
+ - The filesystem list in the file chooser now works under
+ MacOS X and Darwin.
+ - The fl_msg structure now contains all data passed to
+ the WndProc function under WIN32.
+ - Fixed some window focus/positioning problems under
+ MacOS X.
+ - Added fl_create_alphamask() function to create an alpha
+ mask from 8-bit data; currently this always generates a
+ 1-bit screen-door bitmask, however in the future it will
+ allow us to generate N-bit masks as needed by various
+ OS's.
+ - Fl_File_Browser::load() didn't properly show drives
+ when compiled in Cygwin mode.
+ - Now pass correctly pass keyboard and mouse events to
+ widget under tooltip as needed...
+ - Added new Fl::dnd_text_ops() methods to enable/disable
+ drag-and-drop text operations.
+ - Fl_Input now supports clicking inside a selection to
+ set the new text position when drag-and-drop is
+ enabled.
+ - Added support of X resources for scheme, dnd_text_ops,
+ tooltips, and visible_focus...
+ - Fixed some case problems in includes for the MacOS X
+ code.
+ - Fl_Widget::handle() returned 1 for FL_ENTER and
+ FL_LEAVE events, which caused some compatibility
+ problems with 1.0 code.
+ - Fl_Box::handle() now returns 1 for FL_ENTER and
+ FL_LEAVE events so that tooltips will work with Fl_Box
+ widgets.
+ - Some source files still defined strcasecmp and
+ strncasecmp under WIN32.
+ - Some source files still used the "false" and "true"
+ C++ keywords, even though several of our "supported"
+ C++ compilers don't support them. Using 0 and 1 until
+ FLTK 2.0 (which uses the bool type instead of int for
+ any boolean values...)
+ - Minor Fl_Color revamping, so that color constants map
+ to the color cube and FL_FOREGROUND_COLOR,
+ FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR,
+ FL_INACTIVE_COLOR, and FL_SELECTION_COLOR map to the
+ user-defined colors.
+
+
+CHANGES IN FLTK 1.1.0b13 BETA: ??? ?? ????
+
+ - Fixed a bug in the Xft support in Fl_Window::hide()
+ (the config header wasn't included, so the Xft code
+ wasn't getting called)
+ - Xdbe support must now be enabled explicitly using
+ --enable-xdbe due to inconsistent bugs in XFree86 and
+ others.
+ - Windows resized by a program would revert to their
+ original size when moved under WIN32.
+ - Cygwin can only compile the new WIN32 drag-n-drop code
+ using GCC 3.x.
+ - Tooltips now appear for inactive and output widgets.
+ - Tooltips no longer steal keyboard events other than
+ ESCape.
+ - Tooltips are no longer delayed when moving between
+ adjacent widgets.
+ - fl_beep(FL_BEEP_DEFAULT) now uses the PC speaker under
+ Windows (0xFFFFFFFF) rather than an event sound.
+ - The configure script didn't include the -mwindows or
+ -DWIN32 compiler options in the output of fltk-config
+ when using the Cygwin tools.
+ - Fl_Output didn't take input focus when needed, so it
+ was unable to support CTRL-C for copying text in the
+ field and did not unhighlight selections when the
+ widget lost focus.
+ - The fl_filename_name() function didn't handle a NULL
+ input string.
+ - The input field used by the fl_input() and
+ fl_password() functions was resized too small in
+ 1.1.0b12.
+ - Added casts in fl_set_fonts_win32.cxx for VC++ 5.0.
+ - Fl_File_Icon::find() did not check the basename of a
+ filename for a match; this caused matches for a
+ specific filename (e.g. "fluid") to fail.
+ - The Fl_Shared_Image class now supports additional
+ image handling functions - this allows you to support
+ additional image file formats transparently.
+
+
+CHANGES IN FLTK 1.1.0b12 BETA: ??? ?? ????
+
+ - Documentation updates.
+ - Fl_Choice didn't clip the current value properly - it
+ wasn't accounting for the box border width.
+ - The forms compatibility functions are now placed in a
+ "fltk_forms" library to match FLTK 2.0.
+ - Renamed down() and frame() to fl_down() and
+ fl_frame(), filename_xyz() to fl_filename_xyz(), and
+ all of the define_FL_FOO() functions for the custom
+ boxtypes to fl_define_FL_FOO() to avoid namespace
+ clashes.
+ - Stereo OpenGL support (patch from Stuart Levy)
+ - All of the convenience functions defined in fl_ask.H
+ now resize the widgets and dialog window as needed for
+ the labels and prompt.
+ - Backported FLTK 2.0 dual cut/paste buffer code.
+ - Added support for Xft library to provide anti-aliased
+ text on X11.
+ - Fl_Help_View didn't keep track of the background color
+ of cells properly.
+ - Fl_Browser::item_width() didn't compute the width of
+ the item properly when column_widths() was set.
+ - Fl_Button didn't check to see if the widget could
+ accept focus before taking input focus.
+ - Fl_Help_View didn't preserve target names (e.g.
+ "filename.html#target") when following links.
+ - Drag-and-drop support for MacOS.
+ - Updated MacOS issues documentation.
+
+
+CHANGES IN FLTK 1.1.0b11 BETA: ??? ?? ????
+
+ - Now conditionally use the WIN32 TrackMouseEvent API
+ (default is no...)
+ - Fixed a table rendering bug in the Fl_Help_View
+ widget.
+ - The fltk-config script now recognizes all common C++
+ extensions.
+ - The menu code was using overlay visuals when the
+ scheme was set to "plastic".
+ - Fixed some drawing problems with Fl_Light_Button and
+ its subclasses.
+ - Fixed a minor event propagation bug in Fl_Group that
+ caused mousewheel events to be passed to scrollbars
+ that were not visible.
+ - The fl_file_chooser() function did not preserve the
+ old file/directory like the old file chooser did.
+ - The prototypes for fl_input() and fl_password() did
+ not default the "default value" to NULL.
+ - Fl_Tabs now draws tabs using the selection_color() of
+ the child groups; this allows the tabs to be colored
+ separately from the body. Selected tabs are a mix of
+ the Fl_Tabs selection_color() and the child group's
+ selection_color().
+ - Fl_Tabs didn't include images in the measurement of
+ the tabs if no label text was defined.
+ - The WIN32 code didn't return 0 from the window
+ procedure after handling WM_PAINT messages.
+ - fl_draw() would incorrectly test the clipping of
+ labels the lay outside the bounding box.
+ - filename_relative() didn't always return the correct
+ relative path.
+ - Updated the test makefile to work with more versions
+ of "make".
+ - Added new "--with-optim" configure option to set the
+ optimization flags to use when compiling FLTK.
+ - The fltk-config script no longer reports the
+ optimization flags that were used to compile FLTK.
+ - Initial port of FLTK 2.0 drag-and-drop support.
+
+
+CHANGES IN FLTK 1.1.0b10 BETA: ??? ?? ????
+
+ - Fixed the new WIN32 TrackMouseEvent code.
+ - Fixed the VC++ project files to link against
+ comctl32.lib.
+
+
+CHANGES IN FLTK 1.1.0b9 BETA: ??? ?? ????
+
+ - Better FL_LEAVE event handling for WIN32.
+ - The alpha mask was bit-reversed.
+ - Fl::scheme() applied the scheme tile image to overlay
+ and menu windows, which caused problems when the
+ overlay planes were in use.
+ - Fixed Fl::event_button() value when hiding tooltip on
+ some systems.
+ - Added Fl_BMP_Image class to support loading of Windows
+ bitmap (BMP) files.
+ - The shiny demo didn't work on some systems (no
+ single-buffered OpenGL visual), and the new box types
+ were reset when show(argc, argv) was called.
+ - Fl::scheme() didn't update windows that were not
+ shown.
+ - The fractals demo would get far ahead of the UI with
+ some Linux OpenGL drivers. Now use glFinish() instead
+ of glFlush() so we are at most 1 frame ahead.
+ - The fractals demo Y axis controls were backwards for
+ the "flying" mode.
+ - MacOS: cleaned up src/Fl_mac.cxx
+ - MacOS: fixed Fl::wait(0.0), fixed Cmd-Q handling
+ - Update CygWin support for Fl::add_fd().
+ - Update the plastic scheme to not override the default
+ colors - move the color code to the MacOS-specific
+ code. Also updates the tile image colormap to match
+ the current background color.
+ - Add fl_parse_color() to X11 as well, removing a bunch
+ of conditional code and providing a common interface
+ for looking up color values.
+ - Fixed the make problems in the test directory - some
+ make programs had trouble handling the recursive
+ dependencies on the FLUID files...
+ - Now use rint() to round floating-point coordinates.
+ - Demo cleanup - made sure they all worked with schemes.
+ - Fl_Tabs no longer clears the unused area of the tab
+ bar.
+ - Added show(argc, argv) method to Fl_Help_Dialog.
+ - MacOS: implemented cut/copy/paste.
+ - MacOS: improved keyboard handling, fixed keyboard
+ focus handling, fixed get_key, modified 'keyboard'
+ demo to show second mouse wheel and additional keys
+ 'help' and FL_NK+'='
+
+
+CHANGES IN FLTK 1.1.0b8 BETA: ??? ?? ????
+
+ - OS/2 build fixes.
+ - fl_draw() didn't ignore symbol escapes properly for
+ the browsers...
+ - New Fl::scheme() methods from FLTK 2.0; currently only
+ the standard ("") and plastic ("plastic") methods are
+ supported. Schemes can be set on the command-line
+ ("-scheme plastic") or using the FLTK_SCHEME
+ environment variable.
+ - MacOS: fixed iBook keyboard handling, moved
+ remaining message handling to Carbon, added mouse
+ capture support, added timer support, added overlay
+ support, fixed double-buffering side effects.
+ - The configure script wasn't using the -fpermissive or
+ -fno-exceptions options with GCC.
+ - Fl_JPEG_Image and friends didn't set the depth if the
+ image file couldn't be loaded; since Fl_RGB_Image
+ didn't check for this, it could fail when displaying
+ or copying these images.
+ - filename_absolute() did not always free its temporary
+ buffer.
+ - filename_relative() did not do a case-insensitive
+ comparison under MacOS, OS/2, and Windows.
+ - filename_isdir() didn't properly handle "D:L" under
+ WIN32.
+ - Fl_Shared_Image::get() did not check to see if the
+ image could not be loaded.
+ - Fl_Help_View didn't clear the line array in the
+ Fl_Help_Block structure; this causes erratic
+ formatting for some pages.
+ - The font and size members of Fl_Help_Block were never
+ used.
+ - The threading functions (Fl::lock() and friends) were
+ not exported under WIN32.
+ - The Fl_Text_Display destructor deleted the scrollbars
+ twice...
+ - Fl_Help_View didn't reset the horizontal scroll
+ position when showing a new page.
+ - Fl_Pack now allows any child widget to be the
+ resizable() widget, not just the last one.
+ - MacOS: opaque window resizing, all events except
+ Mac menus are now handled using Carbon, window
+ activation fixed, GL_SWAP_TYPE default changed to
+ make gl_overlay work.
+ - Fl_Help_View::resize() didn't resize the horizontal
+ scrollbar.
+ - MacOS: list all fonts, fixed clipping and mouse
+ pointer bugs.
+ - The Fl_File_Chooser widget now uses hotspot() to
+ position the dialog under the mouse pointer prior to
+ showing it.
+ - Added a configure check for *BSD - use -pthread option
+ instead of -lpthread.
+ - Fl_Text_Display could get in an infinite loop when
+ redrawing a portion of the screen. Added a check for
+ the return value from fl_clip_box() so that the
+ correct bounding box is used.
+ - Removed the Fl_Mutex and Fl_Signal_Mutex classes from
+ the threads example, since they weren't being used
+ and apparently are not very portable.
+ - Fl_Help_View now ignores links when the link callback
+ returns NULL, and displays a sensible error message
+ when an unhandled URI scheme is used (e.g. http:,
+ ftp:)
+ - Fl_File_Icon::load_system_icons() no longer complains
+ about missing icon files, just files that exist but
+ can't be loaded.
+ - FLUID didn't list the plastic box and frame types.
+ - Now hide the tooltip window whenever a window is
+ hidden. Otherwise a tooltip window could keep an
+ application running.
+ - Updated FLUID to only append a trailing semicolon to
+ code lines in a callback (so "#include" and friends
+ will work...)
+ - The Fl_Color_Chooser widget now supports keyboard
+ navigation.
+ - Fixed button and valuator widgets to call Fl::focus()
+ instead of take_focus().
+ - Tweeked the radio button drawing code for better
+ circles with different boxtypes.
+ - The Fl_File_Chooser widget did not provide a shown()
+ method, and fl_file_chooser() and fl_dir_chooser() did
+ not wait on shown(); this would cause them to return
+ prematurely if you switched desktops/workspaces.
+ - Cosmetic changes to plastic boxtypes. Now look much
+ better for large areas and the buttons now have a much
+ greater "3D" feeling to them.
+ - Added new Fl::draw_box_active() method so that
+ boxtypes can find out if the widget they are drawing
+ for is active or not.
+ - Fl_Button and its subclasses did not redraw the parent
+ when the boxtype was FL_NO_BOX and they lost keyboard
+ focus (the parent redraw clears the focus box.)
+ - Fixed the example program makefile - wasn't building
+ the mandelbrot and shiny demos right.
+ - Fl::set_font(Fl_Font, Fl_Font) was not implemented.
+ - Fixed the documentation Makefile commands; was not
+ using the fltk.book file for some reason...
+
+
+CHANGES IN FLTK 1.1.0b7 BETA: ??? ?? ????
+
+ - More documentation updates...
+ - Mac OS X support works 95%
+ - The Fl_Window::hotspot() off-screen avoidance code was
+ commented out.
+ - Mac OS X uses mostly Carbon event handling to support
+ Mousewheel, three buttons, all modifier keys, etc.
+ - Updated paragraph 4 of the FLTK license exceptions;
+ there was some question about the requirement to show
+ that a program uses FLTK, which is required by section
+ 6 of the LGPL. The new exemption specifies that
+ inclusion of the FLTK license is not required, just a
+ statement that the program uses FLTK.
+ - Fl_Button::handle() was calling take_focus() for both
+ FL_PUSH and FL_DRAG.
+ - File and memory fixes for Fl_GIF_Image, Fl_PNG_Image,
+ Fl_PNM_Image, Fl_Shared_Image, Fl_Tiled_Image, and
+ Fl_XBM_Image.
+ - filename_match() didn't handle backslashes properly
+ under WIN32, and didn't use a case-insensitive
+ comparison under MacOS X.
+ - The Fl class was missing access methods for the
+ FL_MOUSEWHEEL event values - Fl::event_dx() and
+ Fl::event_dy().
+ - The default help string didn't include the -nokbd
+ option.
+ - "make uninstall" didn't uninstall the static OpenGL
+ widget library.
+ - Mac cursor shapes added...
+ - Fl_Text_Display would lockup when all text was
+ deleted; for example, when running the editor
+ demo, you couldn't load a second file.
+ - Added Fl::lock() and friends from FLTK 2.0 to
+ support multi-threaded applications; see the
+ "threads" demo for an example of this.
+ - Fl_Check_Button and Fl_Round_Button now use the
+ FL_NO_BOX box type to show the background of the
+ parent widget.
+ - Tweeked the plastic boxtype code to draw with the
+ right shading for narrow, but horizontal buttons.
+ - Fl_Progress now shades the bounding box instead of
+ drawing a polygon inside it.
+ - Fl::warning() under WIN32 defaults to no action. This
+ avoids warning dialogs when an image file cannot be
+ loaded.
+ - Some Win32 drivers would draw into wrong buffers
+ after OpenGL mode change
+ - The file chooser would cause a segfault if you
+ clicked in an empty area of the file list.
+ - Fl_File_Icon::labeltype() would cause a segfault
+ if the value pointer was NULL.
+ - Fl_File_Icon::load_image() could cause segfaults
+ (NULL data and incrementing the data pointer too
+ often.)
+ - Fl_File_Icon::load_image() now handles 2-byte
+ per color XPM files.
+ - Some Win32 drivers would draw into wrong buffers
+ after OpenGL mode change.
+ - Message handling and Resources for MacOS port.
+ - Fl_Help_View could get in an infinitely loop when
+ determining the maximum width of the page; this
+ was due to a bug in the get_length() method with
+ percentages (100% width would cause the bug.)
+ - Don't need -lgdi32 for CygWin, since -mwindows
+ does this for us.
+ - The WIN32 event handler did not properly handle
+ WM_SYNCPAINT messages.
+ - Fl_Tabs now uses the boxtype exclusively to draw
+ both the tabs and surrounding box, so alternate
+ box types actually work and the look is a little
+ nicer.
+ - Fixed the drawing of large areas with the new
+ plastic boxtypes.
+ - Updated the Visual C++ demo projects to use FLUID
+ to generate the GUI files as needed.
+ - The demo program didn't load the right menu file
+ when compiled for debugging under WIN32.
+ - Added plastic box types to forms demo.
+ - Added mousewheel to keyboard demo.
+ - The Fl_Text_Editor widget caused an infinite loop
+ when it received keyboard focus.
+ - filename_isdir() didn't properly handle drive letters
+ properly; WIN32 needs a trailing slash for drive
+ letters by themselves, but cannot have a trailing
+ slash for directory names, go figure...
+ - The Fl_Text_Buffer and Fl_Text_Display classes did not
+ initialize all of their members.
+ - fl_normal_label() had a totally redundant set of
+ if/else tests, which the new code handles all from
+ fl_draw().
+ - The Fl_File_Chooser dialog contained two hotspots.
+ - The fl_draw_pixmap() function didn't free the 2-byte
+ color lookup table properly (delete instead of
+ delete[]).
+ - fl_draw() reset the text color under WIN32, causing
+ bitmaps to draw incorrectly.
+ - Fl::get_font_sizes() is now implemented under WIN32.
+ - Fl_Text_Display now uses the same default colors for
+ selection and text as Fl_Input_ and friends.
+ - Changed the default line scrolling in Fl_Text_Display
+ to 3 lines for the mouse wheel and scrollbar arrows.
+
+
+CHANGES IN FLTK 1.1.0b6 BETA: ??? ?? ????
+
+ - Documentation updates...
+ - The configure script now works within the CygWin
+ environment.
+ - Tooltips are now enabled by default, but are not
+ re-enabled when calling the Fl_Widget::tooltip()
+ method.
+ - Added new Fl::version() method to get the current
+ FLTK library version (for shared libraries/DLLs)
+ - Added new Fl::event() method to get the current
+ event that is being processed.
+ - Added new fl_beep() function to do audible
+ notifications of various types.
+ - Added new Fl_GIF_Image, Fl_JPEG_Image, Fl_PNG_Image,
+ Fl_PNM_Image, Fl_XBM_Image, and Fl_XPM_Image classes.
+ - Added new Fl_Shared_Image class, a la FLTK 2.0.
+ - Added new Fl_Tiled_Image class for tiled backgrounds.
+ - Added new copy(), desaturate(), inactive(), and
+ color_average() methods to the Fl_Image classes.
+ - Added a horizontal scrollbar to the Fl_Help_View
+ widget.
+ - Added new FL_PLASTIC_{UP/DOWN}_{BOX/FRAME} boxtypes
+ for a more "modern" look (sort of a cross between KDE
+ 2.2 and Aqua.)
+ - Fl_Float_Input and Fl_Int_Input no longer accept
+ pasted text that is not a floating point or integer
+ value. Pasted numbers now replace text in these
+ widgets.
+ - Implemented the Fl_File_Icon::load_png() method.
+ - The Fl_File_Icon::load_system_icons() method now
+ supports KDE 2.x icons.
+ - Fixed PNG support in Fl_Help_View.
+ - Removed the "Microsoft" mode button from the menubar
+ demo.
+ - The browser demo now makes sure that the input field
+ contains a number.
+ - The Fl_Browser::make_visible() method now range checks
+ the input.
+ - Updated the fl_draw() and fl_measure() methods to
+ accept an optional draw_symbols argument, which
+ controls whether symbols are drawn in the text.
+ - Added new Fl::visible_focus() methods to control
+ whether the focus box is drawn.
+ - The focus box is now drawn using the contrast color.
+ - Fl_Repeat_Button didn't accept keyboard focus.
+ - Added new Fl::visible_focus() method and standard
+ "-kbd" and "-nokbd" options in Fl::args() processing
+ to control whether keyboard focus is shown and handled
+ by non-text widgets.
+ - The wrong tooltip could be shown if the user moved the
+ mouse over adjacent widgets with tooltips.
+ - The drop-down button on Fl_Choice widgets was not
+ limited in width.
+ - Tooltips could appear off the screen.
+ - Mouse wheel events are now sent to the focus widget
+ first, then to any other interested widget.
+ - The Fl_RGB_Image class now supports images with an
+ alpha channel. Images are currently drawn using
+ "screen door" transparency... See the "image" demo
+ for an example.
+ - Added new fl_create_bitmask() and fl_delete_bitmask()
+ functions that create bitmap objects for masking and
+ bitmap drawing.
+ - Was sending FL_RELEASE events for buttons 4 and 5
+ under X11, which are only for FL_MOUSEWHEEL.
+ - Fl_Help_View now supports the EM and STRONG elements.
+ - Didn't do callbacks when changing tabs via keyboard.
+ - FLUID didn't write tooltip strings to the message
+ catalog file.
+ - Fl_File_Icon now uses Fl_Shared_Image to load icon
+ images; the load_png() and load_xpm() methods have
+ been replaced by a single load_image() method.
+ - Fl_File_Icon::load_system_icons() now does a better
+ job of finding KDE icons.
+ - Now use Fl::warning() and Fl::error() in place of
+ printf's in some of the newer widgets.
+ - The default behavior of Fl::error() is now to display
+ an error but not to exit; Fl::fatal() still exits.
+ - FLUID now uses the Fl_Shared_Image class, so FLUID-
+ generated GUIs can embed any of the supported image
+ file formats.
+ - New filename_relative() function to convert an
+ absolute filename to a relative one.
+ - Updated the filename_absolute(), filename_expand(),
+ and filename_setext() functions to take the
+ destination string size, with inline functions for the
+ old FL_PATH_MAX size.
+ - fl_file_chooser() and fl_dir_chooser() now return a
+ relative path.
+ - Fl_Help_View now supports all ampersand escapes.
+
+
+CHANGES IN FLTK 1.1.0b5 BETA: ??? ?? ????
+
+ **** NOTE: DUE TO CHANGES IN THE WIDGET CLASSES, ****
+ **** YOU MUST RECOMPILE ALL SOURCE FILES ****
+ **** THAT USE FLTK!!! ****
+
+ - All FLTK color values are now 32-bits and support
+ both the legacy 8-bit color values as well as 24-bit
+ RGB values (0xRRGGBB00 for 24-bit RGB, 0x000000II
+ for indexed color).
+ - Fl::set_boxtype() and fl_internal_boxtype() now keep
+ track of when a boxtype is changed; this allows you to
+ override the "special" boxtypes without references to
+ those boxtypes causing them to be reset.
+ - Fl_Help_Func now takes a Fl_Widget pointer as well as
+ a pathname.
+ - Added code to support FL_KEYUP events.
+ - Focus did not return to the Fl_Text_Display and Editor
+ widgets when scrolling and then clicking inside the
+ editor window.
+ - Now set the line size of the vertical scrollbar in the
+ text editor to 1.
+ - The symbols demo didn't show the strings needed to
+ show the corresponding symbol (the label string was
+ not quoted...)
+ - FLTK should now compile with Cygwin cleanly.
+ - Shortcut changes were not being saved by FLUID.
+ - FLUID didn't write the deimage() static data.
+
+
+CHANGES IN FLTK 1.1.0b4 BETA: ??? ?? ????
+
+ **** NOTE: DUE TO CHANGES IN THE FL_WIDGET CLASS, ****
+ **** YOU MUST RECOMPILE ALL SOURCE FILES ****
+ **** THAT USE FLTK!!! ****
+
+ - Updated the flags_ member of Fl_Widget to be an
+ integer instead of uchar, to support the new
+ FL_OVERRIDE flag for Fl_Window.
+
+ - The parent() method of Fl_Widget now uses pointers to
+ Fl_Group instead of Fl_Widget.
+
+ - Fl_Window now provides the FLTK 2.0 "override()" and
+ "set_override()" methods for windows.
+
+ - Added a configure check (and warning) for GCC 3.0.x.
+
+ - Updated the configure script to check for the
+ png_set_tRNS_to_alpha() function.
+
+ - Updated the config.h files for all platforms for the
+ image and FLTK documentation defines.
+
+ - Updated the makeinclude files for all platforms to
+ match the current makeinclude.in file.
+
+ - FLUID would crash if you cleared an image for a
+ widget.
+
+ - Fl_Help_View::add_image() did not initialize the image
+ member of the base (unscaled) image.
+
+ - Fl_Help_View didn't support A elements with both a
+ NAME and HREF attribute - the HREF was ignored.
+
+ - Miscellaneous compile warning fixes.
+
+ - Tooltips were being reset by Fl::belowmouse(), which
+ caused problems with the FLUID main window (flashing
+ tooltip windows and serious problems with KDE 2.2)
+
+ - The editor demo had the save and discard button
+ actions reversed.
+
+ - The Fl_Help_View widget now uses
+ png_destroy_read_struct() if the older
+ png_read_destroy() function is not available.
+
+ - The WIN32 DLL library now includes the OpenGL widgets.
+ This is a simpler solution for the export/import
+ dillemma under WIN32, as OpenGL and non-OpenGL symbols
+ need to be exported at different times with the
+ separate library scheme. Since OpenGL is standard
+ under Windows, this is less of a problem than under
+ UNIX...
+
+
+CHANGES IN FLTK 1.1.0b3 BETA: ??? ?? ????
+
+ - The top-level makefile did not include the makeinclude
+ file, causing the fltk-config installation commands to
+ fail.
+
+ - The fl_file_chooser.cxx source file conflicted with
+ Fl_File_Chooser.cxx under Windows. Similarly, the
+ fl_file_chooser.H header file conflicts with the
+ Fl_File_Chooser.H header file.
+
+ - Now save and restore the GDI pen object when
+ responding to WIN32 paint messages.
+
+ - Documentation updates from A. Suatoni.
+
+
+CHANGES IN FLTK 1.1.0b2 BETA: ??? ?? ????
+
+ - New fltk-config script.
+
+ - Fixed image/text label handling; in b1 the label
+ needed a non-blank text string to display the image.
+ This bug also caused all sorts of crashes and display
+ problems.
+
+ - Added new filetype() method to Fl_FileBrowser to allow
+ for file or directory browsing.
+
+ - Fixed the drawing of the focus box around
+ Fl_Return_Button.
+
+ - Fixed menu item measurement bug (wasn't initializing
+ image pointers to 0...)
+
+ - Radio and checkbox menu items now draw with the new
+ style (round radio buttons with dots and square check
+ buttons with check marks.)
+
+ - Improved the appearance of Fl_Check_Button.
+
+ - Improved the Fl_HelpView table formatting code; now
+ dynamically sizes the table columns, and supports
+ COLSPAN.
+
+ - The FLUID keyboard shortcuts now work as expected
+ (CTRL-C copies, SHIFT-CTRL-C writes code, etc.)
+
+ - The FLTK_DOCDIR environment variable can now be
+ used to tell FLUID where to find the on-line
+ documentation files.
+
+ - FLUID now supports image labels in addition to text
+ labels + text over image alignment.
+
+ - FLUID now supports tooltips.
+
+ - The widget panel in FLUID is now tabbed, a la FLTK
+ 2.0.
+
+ - The FLUID pixmap destructor tried to free 1 too many
+ lines of image data.
+
+ - FLUID now provides on-line help.
+
+ - Changed Fl_FileXYZ to Fl_File_XYZ.
+
+ - Changed Fl_HelpXYZ to Fl_Help_XYZ.
+
+ - Tooltip fixes for Fl_Browser_, Fl_Choice, and Fl_Input_.
+
+ - Added tooltips to FLUID, help dialog, and file chooser.
+
+ - Now load system icons in FLUID.
+
+
+CHANGES IN FLTK 1.1.0b1
+
+ - Added new image() and deimage() methods to support
+ image + text labels more easily.
+
+ - Added new alignment bit FL_ALIGN_TEXT_OVER_IMAGE.
+
+ - Added tooltip support using Jacques Tremblay's tooltip
+ patch.
+
+ - Added keyboard navigation to all widgets.
+
+ - Added support for mouse wheels using the new
+ FL_MOUSEWHEEL event type. Get the mouse wheel
+ movement values from Fl::e_dx (horizontal) and
+ Fl::e_dy (vertical).
+
+ - Added the Fl_Check_Browser, Fl_FileBrowser,
+ Fl_FileChooser, Fl_FileIcon, Fl_HelpDialog,
+ Fl_HelpView, Fl_Progress, and Fl_Wizard widgets from
+ the bazaar.
+
+ - Added 2.0 Fl_Text_Display and Fl_Text_Editor widgets
+ based on NEdit.
+
+ - The Fl_Choice widget now looks more line a combo box
+ than a Motif option menu.
+
+ - Moved the OpenGL widgets into a separate library
+ called fltkgl - this eliminates shared library
+ dependencies on OpenGL when no OpenGL functionality is
+ used/required.
+
+ - FLUID now supports the new Fl_CheckBrowser,
+ Fl_FileBrowser, Fl_FileIcon, Fl_HelpView,
+ Fl_Text_Display, Fl_Text_Editor, and Fl_Wizard
+ widgets.
+
+ - Updated configure stuff to support shared libraries
+ under AIX (link to -lfltk_s)
+
+ - Symbol labels can now contain regular text.
+
+ - FLUID now supports relative filenames for the source
+ and header files you generate.
+
+ - Fl_Menu_Item::add() didn't use the flags that were
+ passed in.
+
+ - Fixed a bug in Fl_Scrollbar - clicking in the "trough"
+ of the scrollbar would move the scroller in the wrong
+ direction.
+
+ - Made the Forms pixmap parameter const to match the
+ Fl_Pixmap.H definitions.
+
+ - Changed the Fl_Pixmap constructor to use the explicit
+ keyword which should work for all C++ compilers.
+
+ - Fl_Menu_add of a menu item with the same name as an
+ existing submenu title would mess up by replacing that
+ menu title, it now adds a new item.
+
+ - Fl_Menu::add() of text starting with '/' to a menu is
+ assummed to be a filename. So "/foo/bar" creates a
+ single menu item. You can also put filenames into
+ submenus by doing "submenu//foo/bar", this will create
+ a submenu called "submenu" with an item "/foo/bar".
+ Menu items starting with "\_" will insert an item
+ starting with '_' rather than a divider line. These
+ changes make the menus compatable with fltk 2.0.
+
+ - Another little fix for the BoXX OpenGL overlays.
+
+ - Fl_Gl_Window no longer blanks the mouse pointer on
+ WIN32 unless an OpenGL overlay is being used. This
+ should make non-overlay displays faster when a cursor
+ is set.
+
diff --git a/CMake/FLTKConfig.cmake.in b/CMake/FLTKConfig.cmake.in
index fb4f425..baa25a6 100644
--- a/CMake/FLTKConfig.cmake.in
+++ b/CMake/FLTKConfig.cmake.in
@@ -1,49 +1,16 @@
#
# FLTKConfig.cmake - FLTK CMake configuration file for external projects.
#
-# This file is configured by FLTK and used by the UseFLTK.cmake module
-# to load FLTK's settings for an external project.
+# This file is generated by CMake and used to load FLTK's settings for an external project.
+# It defines the following variables
+# FLTK_INCLUDE_DIRS - FLTK include directories
+# FLTK_LIBRARIES - list of FLTK libraries built
+# FLTK_FLUID_EXECUTABLE needed by fltk_wrap_ui()
+# FLTK_USE_FILE - sets things up to use FLTK
-set(FLTK_FOUND TRUE)
set(FLTK_VERSION @FLTK_VERSION_FULL@)
-set(FLTK_FLUID_EXECUTABLE "@FLTK_FLUID_PATH@")
+include(${CMAKE_CURRENT_LIST_DIR}/FLTK-Targets.cmake)
-if(NOT "@EXE_LINKER_FLAGS@" STREQUAL "")
- set(FLTK_EXE_LINKER_FLAGS "@EXE_LINKER_FLAGS@")
-endif(NOT "@EXE_LINKER_FLAGS@" STREQUAL "")
-
-set(FLTK_USE_FILE "@PREFIX_CONFIG@/UseFLTK.cmake")
-
-set(FLTK_DIR "@PREFIX_CONFIG@")
-
-set(FLTK_BIN_DIR "@PREFIX_BIN@")
-set(FLTK_LIB_DIR "@PREFIX_LIB@")
-set(FLTK_INCLUDE_DIR "@PREFIX_INCLUDE@")
-set(FLTK_DATA_DIR "@PREFIX_DATA@")
-set(FLTK_DOC_DIR "@PREFIX_DOC@")
-
-set(FLTK_SHARED_LIBS_FOUND @OPTION_BUILD_SHARED_LIBS@)
-set(FLTK_CAIRO_FOUND @FLTK_CAIRO_FOUND@)
-set(FLTK_GL_FOUND @FLTK_GL_FOUND@)
-set(FLTK_THREADS_FOUND @FLTK_THREADS_FOUND@)
-set(FLTK_PTHREADS_FOUND @FLTK_PTHREADS_FOUND@)
-set(FLTK_BUILTIN_JPEG_FOUND @FLTK_BUILTIN_JPEG_FOUND@)
-set(FLTK_BUILTIN_ZLIB_FOUND @FLTK_BUILTIN_ZLIB_FOUND@)
-set(FLTK_BUILTIN_PNG_FOUND @FLTK_BUILTIN_PNG_FOUND@)
-set(FLTK_XINERAMA_FOUND @FLTK_XINERAMA_FOUND@)
-set(FLTK_XFT_FOUND @FLTK_XFT_FOUND@)
-set(FLTK_XDBE_FOUND @FLTK_XDBE_FOUND@)
-
-set(FLTK_CAIRO_FOUND @FLTK_CAIRO_FOUND@)
-set(FLTK_GL_FOUND @FLTK_GL_FOUND@)
-set(FLTK_THREADS_FOUND @FLTK_THREADS_FOUND@)
-set(FLTK_PTHREADS_FOUND @FLTK_PTHREADS_FOUND@)
-set(FLTK_BUILTIN_JPEG_FOUND @FLTK_BUILTIN_JPEG_FOUND@)
-set(FLTK_BUILTIN_ZLIB_FOUND @FLTK_BUILTIN_ZLIB_FOUND@)
-set(FLTK_BUILTIN_PNG_FOUND @FLTK_BUILTIN_PNG_FOUND@)
-set(FLTK_XINERAMA_FOUND @FLTK_XINERAMA_FOUND@)
-set(FLTK_XFT_FOUND @FLTK_XFT_FOUND@)
-set(FLTK_XDBE_FOUND @FLTK_XDBE_FOUND@)
-
-include("@PREFIX_CONFIG@/FLTKLibraries.cmake")
+set(FLTK_INCLUDE_DIRS "@INCLUDE_DIRS@")
+set(FLTK_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseFLTK.cmake)
diff --git a/CMake/UseFLTK.cmake.in b/CMake/UseFLTK.cmake.in
index 9518d26..ed26f88 100644
--- a/CMake/UseFLTK.cmake.in
+++ b/CMake/UseFLTK.cmake.in
@@ -1,8 +1,25 @@
#
+# UseFLTK.CMake - FLTK CMake environment configuration file for external projects.
+#
+# This file is generated by CMake and used to set FLTK's environment for an external project.
+#
# automatically generated - do not edit
-include_directories("@PREFIX_INCLUDE@")
+include_directories("@INCLUDE_DIRS@")
+
+if(CMAKE_CROSSCOMPILING)
+ find_file(FLUID_PATH
+ NAMES fluid fluid.exe
+ PATHS ENV PATH
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+ add_executable(fluid IMPORTED)
+ set_target_properties(fluid
+ PROPERTIES IMPORTED_LOCATION ${FLUID_PATH}
+ )
+ set(FLTK_FLUID_EXECUTABLE ${FLUID_PATH})
+else()
+ set(FLTK_FLUID_EXECUTABLE fluid)
+endif(CMAKE_CROSSCOMPILING)
-if(FLTK_EXE_LINKER_FLAGS)
- list(APPEND CMAKE_EXE_LINKER_FLAGS "${FLTK_EXE_LINKER_FLAGS}")
-endif(FLTK_EXE_LINKER_FLAGS)
+set(FLTK_WRAP_UI TRUE)
diff --git a/CMake/export.cmake b/CMake/export.cmake
new file mode 100644
index 0000000..f022002
--- /dev/null
+++ b/CMake/export.cmake
@@ -0,0 +1,99 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
+# Written by Michael Surette
+#
+# Copyright 1998-2010 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# final config and export
+#######################################################################
+# Set the fluid executable path
+if(CMAKE_CROSSCOMPILING)
+ find_file(FLUID_PATH
+ NAMES fluid fluid.exe
+ PATHS ENV PATH
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+ add_executable(fluid IMPORTED)
+ set(FLTK_FLUID_EXECUTABLE ${FLUID_PATH})
+ set(FLUID) # no export
+ set_target_properties(fluid
+ PROPERTIES IMPORTED_LOCATION ${FLUID_PATH}
+ )
+else()
+ add_subdirectory(fluid)
+ set(FLTK_FLUID_EXECUTABLE fluid)
+ set(FLUID fluid) # export
+endif(CMAKE_CROSSCOMPILING)
+
+add_subdirectory(src)
+
+# generate FLTK-Targets.cmake for build directory use
+export(TARGETS ${FLUID} ${FLTK_LIBRARIES} FILE ${CMAKE_BINARY_DIR}/FLTK-Targets.cmake)
+
+# generate FLTKConfig.cmake for build directory use
+set(INCLUDE_DIRS "@FLTK_INCLUDE_DIRS@")
+set(CONFIG_PATH @FLTK_BINARY_DIR@)
+
+configure_file(
+ ${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in
+ ${FLTK_BINARY_DIR}/FLTKConfig.cmake
+ @ONLY
+)
+
+# generate UseFLTK.cmake for build directory use
+configure_file(
+ ${FLTK_SOURCE_DIR}/CMake/UseFLTK.cmake.in
+ ${FLTK_BINARY_DIR}/UseFLTK.cmake
+ @ONLY
+)
+
+# generate config.h
+configure_file(
+ "${FLTK_SOURCE_DIR}/configh.cmake.in"
+ "${FLTK_BINARY_DIR}/config.h"
+ @ONLY
+)
+
+# generate fltk-config
+get_filename_component(CC ${CMAKE_C_COMPILER} NAME)
+get_filename_component(CXX ${CMAKE_CXX_COMPILER} NAME)
+
+string(REPLACE ";" " " C_FLAGS "${FLTK_CFLAGS}")
+
+if(X11_Xext_FOUND)
+ list(APPEND FLTK_LDLIBS -lXext)
+endif(X11_Xext_FOUND)
+string(REPLACE ";" " " LD_LIBS "${FLTK_LDLIBS}")
+
+configure_file(
+ "${FLTK_SOURCE_DIR}/fltk-config.cmake.in"
+ "${FLTK_BINARY_DIR}/fltk-config"
+ @ONLY
+)
+if(UNIX)
+ execute_process(COMMAND chmod 755 fltk-config
+ WORKING_DIRECTORY "${FLTK_BINARY_DIR}"
+ )
+endif(UNIX)
+
+if(OPTION_CREATE_LINKS)
+ configure_file(
+ "${FLTK_SOURCE_DIR}/CMake/install-symlinks.cmake.in"
+ "${FLTK_BINARY_DIR}/install-symlinks.cmake"
+ @ONLY
+ )
+endif(OPTION_CREATE_LINKS)
diff --git a/CMake/install.cmake b/CMake/install.cmake
new file mode 100644
index 0000000..4df0982
--- /dev/null
+++ b/CMake/install.cmake
@@ -0,0 +1,89 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
+# Written by Michael Surette
+#
+# Copyright 1998-2010 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# installation
+#######################################################################
+
+# generate uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ @ONLY
+)
+add_custom_target(uninstall
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+)
+
+install(DIRECTORY ${FLTK_SOURCE_DIR}/FL
+ DESTINATION include USE_SOURCE_PERMISSIONS
+ PATTERN ".svn" EXCLUDE
+)
+
+if(OPTION_CREATE_LINKS)
+ install(SCRIPT ${FLTK_BINARY_DIR}/install-symlinks.cmake)
+endif(OPTION_CREATE_LINKS)
+
+# generate FLTKConfig.cmake for installed directory use
+set(INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
+
+set(CONFIG_PATH ${CMAKE_INSTALL_PREFIX}/@FLTK_CONFIG_PATH@)
+
+install(EXPORT FLTK-Targets
+ DESTINATION ${FLTK_CONFIG_PATH}
+ FILE FLTK-Targets.cmake
+)
+
+configure_file(
+ ${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in
+ ${FLTK_BINARY_DIR}/etc/FLTKConfig.cmake
+ @ONLY
+)
+
+install(FILES ${FLTK_BINARY_DIR}/etc/FLTKConfig.cmake
+ DESTINATION ${FLTK_CONFIG_PATH}
+)
+
+configure_file(
+ ${FLTK_SOURCE_DIR}/CMake/UseFLTK.cmake.in
+ ${FLTK_BINARY_DIR}/etc/UseFLTK.cmake
+ @ONLY
+)
+
+install(FILES ${FLTK_BINARY_DIR}/etc/UseFLTK.cmake
+ DESTINATION ${FLTK_CONFIG_PATH}
+)
+
+if(UNIX)
+ macro(INSTALL_MAN FILE LEVEL)
+ install(FILES
+ ${FLTK_SOURCE_DIR}/documentation/src/${FILE}.man
+ DESTINATION man/man${LEVEL}
+ RENAME ${FILE}.${LEVEL}
+ )
+ endmacro(INSTALL_MAN FILE LEVEL)
+
+ INSTALL_MAN(fluid 1)
+ INSTALL_MAN(fltk-config 1)
+ INSTALL_MAN(fltk 3)
+ INSTALL_MAN(blocks 6)
+ INSTALL_MAN(checkers 6)
+ INSTALL_MAN(sudoku 6)
+
+endif(UNIX)
diff --git a/CMake/macros.cmake b/CMake/macros.cmake
new file mode 100644
index 0000000..ee332b8
--- /dev/null
+++ b/CMake/macros.cmake
@@ -0,0 +1,128 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# macros.cmake defines macros used by the build system
+# Written by Michael Surette
+#
+# Copyright 1998-2014 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# macros used by the build system
+#######################################################################
+macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
+
+ if(${LIBTYPE} STREQUAL "SHARED")
+ set(LIBRARY_NAME ${LIBNAME}_SHARED)
+ else()
+ set(LIBRARY_NAME ${LIBNAME})
+ endif(${LIBTYPE} STREQUAL "SHARED")
+
+ add_library(${LIBRARY_NAME} ${LIBTYPE} ${LIBFILES})
+
+ set_target_properties(${LIBRARY_NAME}
+ PROPERTIES
+ OUTPUT_NAME ${LIBNAME}
+ DEBUG_OUTPUT_NAME "${LIBNAME}d"
+ CLEAN_DIRECT_OUTPUT TRUE
+ COMPILE_DEFINITIONS "FL_LIBRARY"
+ )
+
+ if(${LIBTYPE} STREQUAL "SHARED")
+ set_target_properties(${LIBRARY_NAME}
+ PROPERTIES
+ VERSION ${FLTK_VERSION_FULL}
+ SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
+ PREFIX "lib" # for MSVC static/shared coexistence
+ )
+ endif(${LIBTYPE} STREQUAL "SHARED")
+
+ if(MSVC)
+ if(OPTION_LARGE_FILE)
+ set_target_properties(${LIBNAME}
+ PROPERTIES
+ LINK_FLAGS /LARGEADDRESSAWARE
+ )
+ endif(OPTION_LARGE_FILE)
+
+ if(${LIBTYPE} STREQUAL "SHARED")
+ set_target_properties(${LIBRARY_NAME}
+ PROPERTIES
+ COMPILE_DEFINITIONS "FL_DLL"
+ )
+ endif(${LIBTYPE} STREQUAL "SHARED")
+ endif(MSVC)
+
+ install(TARGETS ${LIBRARY_NAME}
+ EXPORT FLTK-Targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+
+ list(APPEND FLTK_LIBRARIES "${LIBRARY_NAME}")
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} PARENT_SCOPE)
+
+endmacro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
+
+#######################################################################
+macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
+
+ set(srcs) # source files
+ set(flsrcs) # fluid source files
+
+ set(tname ${NAME}) # target name
+ set(oname ${NAME}) # output (executable) name
+
+ # rename reserved target name "help" (CMake 2.8.12 and later)
+ if(${tname} MATCHES "^help$")
+ set(tname "test_help")
+ endif(${tname} MATCHES "^help$")
+
+ foreach(src ${SOURCES})
+ if("${src}" MATCHES "\\.fl$")
+ list(APPEND flsrcs ${src})
+ else()
+ list(APPEND srcs ${src})
+ endif("${src}" MATCHES "\\.fl$")
+ endforeach(src)
+
+ if(flsrcs)
+ set(FLTK_WRAP_UI TRUE)
+ fltk_wrap_ui(${tname} ${flsrcs})
+ endif(flsrcs)
+
+ add_executable(${tname} WIN32 ${srcs} ${${tname}_FLTK_UI_SRCS})
+ set_target_properties(${tname}
+ PROPERTIES OUTPUT_NAME ${oname}
+ )
+
+ target_link_libraries(${tname} ${LIBRARIES})
+
+ # link in optional libraries
+ if(USE_XFT)
+ target_link_libraries(${tname} ${X11_Xft_LIB})
+ endif(USE_XFT)
+
+ if(HAVE_XINERAMA)
+ target_link_libraries(${tname} ${X11_Xinerama_LIB})
+ endif(HAVE_XINERAMA)
+
+ # install the example
+ install(TARGETS ${tname}
+ DESTINATION ${FLTK_EXAMPLES_PATH}
+ )
+
+endmacro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
+
+#######################################################################
diff --git a/CMake/options.cmake b/CMake/options.cmake
new file mode 100644
index 0000000..13931d1
--- /dev/null
+++ b/CMake/options.cmake
@@ -0,0 +1,298 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
+# Written by Michael Surette
+#
+# Copyright 1998-2010 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# options
+#######################################################################
+set(OPTION_OPTIM ""
+ CACHE STRING
+ "custom optimization flags"
+ )
+add_definitions(${OPTION_OPTIM})
+
+#######################################################################
+set(OPTION_ARCHFLAGS ""
+ CACHE STRING
+ "custom architecture flags"
+ )
+add_definitions(${OPTION_ARCHFLAGS})
+
+#######################################################################
+#######################################################################
+if(UNIX)
+ option(OPTION_CREATE_LINKS "create backwards compatibility links" OFF)
+endif(UNIX)
+
+#######################################################################
+if(APPLE)
+ option(OPTION_APPLE_X11 "use X11" OFF)
+endif(APPLE)
+
+if((NOT APPLE OR OPTION_APPLE_X11) AND NOT WIN32)
+ include(FindX11)
+ if(X11_FOUND)
+ set(USE_X11 1)
+ list(APPEND FLTK_CFLAGS -DUSE_X11)
+ list(APPEND FLTK_LDLIBS -lX11)
+ endif(X11_FOUND)
+endif((NOT APPLE OR OPTION_APPLE_X11) AND NOT WIN32)
+
+#######################################################################
+option(OPTION_USE_POLL "use poll if available" OFF)
+
+if(OPTION_USE_POLL)
+ CHECK_FUNCTION_EXISTS(poll USE_POLL)
+endif(OPTION_USE_POLL)
+
+#######################################################################
+option(OPTION_BUILD_SHARED_LIBS
+ "Build shared libraries(in addition to static libraries)"
+ OFF
+ )
+
+#######################################################################
+option(OPTION_BUILD_EXAMPLES "build example programs" ON)
+
+#######################################################################
+include(FindPkgConfig)
+
+option(OPTION_CAIRO "use lib Cairo" OFF)
+option(OPTION_CAIROEXT
+ "use fltk code instrumentation for cairo extended use" OFF
+ )
+
+if(OPTION_CAIRO OR OPTION_CAIROEXT AND LIB_CAIRO)
+ pkg_search_module(PKG_CAIRO cairo)
+endif(OPTION_CAIRO OR OPTION_CAIROEXT AND LIB_CAIRO)
+
+if(PKG_CAIRO_FOUND)
+ set(FLTK_HAVE_CAIRO 1)
+ add_subdirectory(cairo)
+ list(APPEND FLTK_LDLIBS -lcairo -lpixman-1)
+ include_directories(${PKG_CAIRO_INCLUDE_DIRS})
+ string(REPLACE ";" " " CAIROFLAGS "${PKG_CAIRO_CFLAGS}")
+endif(PKG_CAIRO_FOUND)
+
+if(LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND)
+ set(FLTK_USE_CAIRO 1)
+ set(FLTK_CAIRO_FOUND TRUE)
+else()
+ set(FLTK_CAIRO_FOUND FALSE)
+endif(LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND)
+
+#######################################################################
+set(HAVE_GL LIB_GL OR LIB_MesaGL)
+
+if(HAVE_GL)
+ option(OPTION_USE_GL "use OpenGL" ON)
+endif(HAVE_GL)
+
+if(OPTION_USE_GL)
+ include(FindOpenGL)
+endif(OPTION_USE_GL)
+
+if(OPENGL_FOUND)
+ set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL)
+ set(CMAKE_REQUIRED_LIBRARIES -lGLU -lGL)
+ CHECK_FUNCTION_EXISTS(glXGetProcAddressARB HAVE_GLXGETPROCADDRESSARB)
+ set(FLTK_GL_FOUND TRUE)
+else()
+ set(FLTK_GL_FOUND FALSE)
+endif(OPENGL_FOUND)
+
+#######################################################################
+option(OPTION_USE_THREADS "use multi-threading" ON)
+
+if(OPTION_USE_THREADS)
+ include(FindThreads)
+endif(OPTION_USE_THREADS)
+
+if(OPTION_USE_THREADS AND CMAKE_HAVE_THREADS_LIBRARY)
+ add_definitions("-D_THREAD_SAFE -D_REENTRANT")
+ set(USE_THREADS 1)
+ set(FLTK_THREADS_FOUND TRUE)
+else()
+ set(FLTK_THREADS_FOUND FALSE)
+endif(OPTION_USE_THREADS AND CMAKE_HAVE_THREADS_LIBRARY)
+
+if(OPTION_USE_THREADS AND CMAKE_USE_PTHREADS_INIT)
+ set(HAVE_PTHREAD 1)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+ list(APPEND FLTK_LDLIBS -lpthread)
+ list(APPEND FLTK_CFLAGS -D_THREAD_SAFE -D_REENTRANT)
+ set(FLTK_PTHREADS_FOUND TRUE)
+else()
+ set(HAVE_PTHREAD 0)
+ set(HAVE_PTHREAD_H 0)
+ set(FLTK_PTHREADS_FOUND FALSE)
+endif(OPTION_USE_THREADS AND CMAKE_USE_PTHREADS_INIT)
+
+#######################################################################
+option(OPTION_LARGE_FILE "enable large file support" ON)
+
+if(OPTION_LARGE_FILE)
+ if(NOT MSVC)
+ add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
+ list(APPEND FLTK_CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
+ endif(NOT MSVC)
+endif(OPTION_LARGE_FILE)
+
+#######################################################################
+option(OPTION_USE_SYSTEM_ZLIB "Use's system zlib" ON)
+
+if(OPTION_USE_SYSTEM_ZLIB AND LIB_zlib)
+ include(FindZLIB)
+endif(OPTION_USE_SYSTEM_ZLIB AND LIB_zlib)
+
+if(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
+ set(FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
+ include_directories(${ZLIB_INCLUDE_DIRS})
+ set(FLTK_BUILTIN_ZLIB_FOUND FALSE)
+else()
+ add_subdirectory(zlib)
+ set(FLTK_ZLIB_LIBRARIES fltk_z)
+ set(ZLIB_INCLUDE_DIR ${FLTK_SOURCE_DIR}/zlib)
+ include_directories(${FLTK_SOURCE_DIR}/zlib)
+ set(FLTK_BUILTIN_ZLIB_FOUND TRUE)
+endif(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
+
+if(OPTION_USE_SYSTEM_ZLIB AND NOT ZLIB_FOUND)
+ message(STATUS "\ncannot find system zlib library - using built-in\n")
+endif(OPTION_USE_SYSTEM_ZLIB AND NOT ZLIB_FOUND)
+
+set(HAVE_LIBZ 1)
+
+#######################################################################
+option(OPTION_USE_SYSTEM_LIBJPEG "Use's system libjpeg" ON)
+
+if(OPTION_USE_SYSTEM_LIBJPEG AND LIB_jpeg)
+ include(FindJPEG)
+endif(OPTION_USE_SYSTEM_LIBJPEG AND LIB_jpeg)
+
+if(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
+ set(FLTK_JPEG_LIBRARIES ${JPEG_LIBRARIES})
+ include_directories(${JPEG_INCLUDE_DIR})
+ set(FLTK_BUILTIN_JPEG_FOUND FALSE)
+else()
+ add_subdirectory(jpeg)
+ set(FLTK_JPEG_LIBRARIES fltk_jpeg)
+ include_directories(${FLTK_SOURCE_DIR}/jpeg)
+ set(FLTK_BUILTIN_JPEG_FOUND TRUE)
+endif(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
+
+if(OPTION_USE_SYSTEM_LIBJPEG AND NOT JPEG_FOUND)
+ message(STATUS "\ncannot find system jpeg library - using built-in\n")
+endif(OPTION_USE_SYSTEM_LIBJPEG AND NOT JPEG_FOUND)
+
+set(HAVE_LIBJPEG 1)
+
+#######################################################################
+option(OPTION_USE_SYSTEM_LIBPNG "Use's system libpng" ON)
+
+if(OPTION_USE_SYSTEM_LIBPNG AND LIB_png)
+ include(FindPNG)
+endif(OPTION_USE_SYSTEM_LIBPNG AND LIB_png)
+
+if(OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)
+ set(FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
+ include_directories(${PNG_INCLUDE_DIR})
+ add_definitions(${PNG_DEFINITIONS})
+ set(FLTK_BUILTIN_PNG_FOUND FALSE)
+else()
+ add_subdirectory(png)
+ set(FLTK_PNG_LIBRARIES fltk_png)
+ set(HAVE_PNG_H 1)
+ set(HAVE_PNG_GET_VALID 1)
+ set(HAVE_PNG_SET_TRNS_TO_ALPHA 1)
+ include_directories(${FLTK_SOURCE_DIR}/png)
+ set(FLTK_BUILTIN_PNG_FOUND TRUE)
+endif(OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)
+
+if(OPTION_USE_SYSTEM_LIBPNG AND NOT PNG_FOUND)
+ message(STATUS "\ncannot find system png library - using built-in\n")
+endif(OPTION_USE_SYSTEM_LIBPNG AND NOT PNG_FOUND)
+
+set(HAVE_LIBPNG 1)
+
+#######################################################################
+if(X11_Xinerama_FOUND)
+ option(OPTION_USE_XINERAMA "use lib Xinerama" ON)
+endif(X11_Xinerama_FOUND)
+
+if(OPTION_USE_XINERAMA)
+ set(HAVE_XINERAMA ${X11_Xinerama_FOUND})
+ include_directories(${X11_Xinerama_INCLUDE_PATH})
+ list(APPEND FLTK_LDLIBS -lXinerama)
+ set(FLTK_XINERAMA_FOUND TRUE)
+else()
+ set(FLTK_XINERAMA_FOUND FALSE)
+endif(OPTION_USE_XINERAMA)
+
+#######################################################################
+if(X11_Xfixes_FOUND)
+ option(OPTION_USE_XFIXES "use lib XFIXES" ON)
+endif(X11_Xfixes_FOUND)
+
+if(OPTION_USE_XFIXES)
+ set(HAVE_XFIXES ${X11_Xfixes_FOUND})
+ include_directories(${X11_Xfixes_INCLUDE_PATH})
+ list(APPEND FLTK_LDLIBS -lXfixes)
+ set(FLTK_XFIXES_FOUND TRUE)
+else()
+ set(FLTK_XFIXES_FOUND FALSE)
+endif(OPTION_USE_XFIXES)
+
+#######################################################################
+if(X11_Xcursor_FOUND)
+ option(OPTION_USE_XCURSOR "use lib XCURSOR" ON)
+endif(X11_Xcursor_FOUND)
+
+if(OPTION_USE_XCURSOR)
+ set(HAVE_XCURSOR ${X11_Xcursor_FOUND})
+ include_directories(${X11_Xcursor_INCLUDE_PATH})
+ list(APPEND FLTK_LDLIBS -lXcursor)
+ set(FLTK_XCURSOR_FOUND TRUE)
+else()
+ set(FLTK_XCURSOR_FOUND FALSE)
+endif(OPTION_USE_XCURSOR)
+
+#######################################################################
+if(X11_Xft_FOUND)
+ option(OPTION_USE_XFT "use lib Xft" ON)
+endif(X11_Xft_FOUND)
+
+if(OPTION_USE_XFT)
+ set(USE_XFT X11_Xft_FOUND)
+ list(APPEND FLTK_LDLIBS -lXft)
+ set(FLTK_XFT_FOUND TRUE)
+else()
+ set(FLTK_XFT_FOUND FALSE)
+endif(OPTION_USE_XFT)
+
+#######################################################################
+if(X11_FOUND)
+ option(OPTION_USE_XDBE "use lib Xdbe" ON)
+endif(X11_FOUND)
+
+if(OPTION_USE_XDBE AND HAVE_XDBE_H)
+ set(HAVE_XDBE 1)
+ set(FLTK_XDBE_FOUND TRUE)
+else()
+ set(FLTK_XDBE_FOUND FALSE)
+endif(OPTION_USE_XDBE AND HAVE_XDBE_H)
diff --git a/CMake/resources.cmake b/CMake/resources.cmake
new file mode 100644
index 0000000..5fe4063
--- /dev/null
+++ b/CMake/resources.cmake
@@ -0,0 +1,125 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
+# Written by Michael Surette
+#
+# Copyright 1998-2010 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# check for headers, libraries and functions
+#######################################################################
+# headers
+find_file(HAVE_ALSA_ASOUNDLIB_H alsa/asoundlib.h)
+find_file(HAVE_DIRENT_H dirent.h)
+find_file(HAVE_DLFCN_H dlfcn.h)
+find_file(HAVE_FREETYPE_H freetype.h PATH_SUFFIXES freetype2 freetype2/freetype)
+find_file(HAVE_GL_GL_H GL/gl.h)
+find_file(HAVE_GL_GLU_H GL/glu.h)
+find_file(HAVE_LIBPNG_PNG_H libpng/png.h)
+find_file(HAVE_LOCALE_H locale.h)
+find_file(HAVE_NDIR_H ndir.h)
+find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h)
+find_file(HAVE_PNG_H png.h)
+find_file(HAVE_PTHREAD_H pthread.h)
+find_file(HAVE_STDIO_H stdio.h)
+find_file(HAVE_STRINGS_H strings.h)
+find_file(HAVE_SYS_DIR_H sys/dir.h)
+find_file(HAVE_SYS_NDIR_H sys/ndir.h)
+find_file(HAVE_SYS_SELECT_H sys/select.h)
+find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h)
+find_path(HAVE_XDBE_H Xdbe.h PATH_SUFFIXES X11/extensions extensions)
+
+mark_as_advanced(HAVE_ALSA_ASOUNDLIB_H HAVE_DIRENT_H HAVE_DLFCN_H)
+mark_as_advanced(HAVE_FREETYPE_H HAVE_GL_GL_H HAVE_GL_GLU_H)
+mark_as_advanced(HAVE_LIBPNG_PNG_H HAVE_LOCALE_H HAVE_NDIR_H)
+mark_as_advanced(HAVE_OPENGL_GLU_H HAVE_PNG_H HAVE_PTHREAD_H)
+mark_as_advanced(HAVE_STDIO_H HAVE_STRINGS_H HAVE_SYS_DIR_H)
+mark_as_advanced(HAVE_SYS_NDIR_H HAVE_SYS_SELECT_H)
+mark_as_advanced(HAVE_SYS_STDTYPES_H HAVE_XDBE_H)
+
+# where to find freetype headers
+find_path(FREETYPE_PATH freetype.h PATH_SUFFIXES freetype2)
+find_path(FREETYPE_PATH freetype/freetype.h PATH_SUFFIXES freetype2)
+if(FREETYPE_PATH)
+ include_directories(${FREETYPE_PATH})
+endif(FREETYPE_PATH)
+mark_as_advanced(FREETYPE_PATH)
+
+#######################################################################
+# libraries
+find_library(LIB_CAIRO cairo)
+find_library(LIB_dl dl)
+find_library(LIB_fontconfig fontconfig)
+find_library(LIB_freetype freetype)
+find_library(LIB_GL GL)
+find_library(LIB_MesaGL MesaGL)
+find_library(LIB_jpeg jpeg)
+find_library(LIB_png png)
+find_library(LIB_zlib z)
+
+mark_as_advanced(LIB_CAIRO LIB_dl LIB_fontconfig LIB_freetype)
+mark_as_advanced(LIB_GL LIB_MesaGL)
+mark_as_advanced(LIB_jpeg LIB_png LIB_zlib)
+
+#######################################################################
+# functions
+include(CheckFunctionExists)
+
+if(HAVE_DLFCN_H)
+ set(CMAKE_REQUIRED_LIBRARIES dl)
+ set(HAVE_DLFCN_H 1)
+endif(HAVE_DLFCN_H)
+CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
+
+CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
+
+if(LIB_png)
+ set(CMAKE_REQUIRED_LIBRARIES png)
+endif(LIB_png)
+CHECK_FUNCTION_EXISTS(png_get_valid HAVE_PNG_GET_VALID)
+CHECK_FUNCTION_EXISTS(png_set_tRNS_to_alpha HAVE_PNG_SET_TRNS_TO_ALPHA)
+
+CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
+CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
+
+# not really true but we convert strcasecmp calls to _stricmp calls in flstring.h
+if(MSVC)
+ set(HAVE_STRCASECMP 1)
+endif(MSVC)
+
+CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
+
+CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
+CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
+CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
+
+set(CMAKE_REQUIRED_LIBRARIES)
+
+if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX)
+ set(MSG "POSIX compatible scandir")
+ message(STATUS "Looking for ${MSG}")
+ try_compile(V
+ ${FLTK_BINARY_DIR}
+ ${FLTK_SOURCE_DIR}/CMake/posixScandir.cxx
+ )
+ if(V)
+ message(STATUS "${MSG} - found")
+ set(HAVE_SCANDIR_POSIX 1 CACHE INTERNAL "")
+ else()
+ message(STATUS "${MSG} - not found")
+ set(HAVE_SCANDIR_POSIX HAVE_SCANDIR_POSIX-NOTFOUND)
+ endif(V)
+endif(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX)
+mark_as_advanced(HAVE_SCANDIR_POSIX)
diff --git a/CMake/setup.cmake b/CMake/setup.cmake
new file mode 100644
index 0000000..60c8e59
--- /dev/null
+++ b/CMake/setup.cmake
@@ -0,0 +1,123 @@
+#
+# "$Id: CMakeLists.txt 10092 2014-02-02 00:49:50Z AlbrechtS $"
+#
+# CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
+# Written by Michael Surette
+#
+# Copyright 1998-2014 by Bill Spitzak and others.
+#
+# This library is free software. Distribution and use rights are outlined in
+# the file "COPYING" which should have been included with this file. If this
+# file is missing or damaged, see the license at:
+#
+# http://www.fltk.org/COPYING.php
+#
+# Please report all bugs and problems on the following page:
+#
+# http://www.fltk.org/str.php
+#
+
+#######################################################################
+# basic setup
+#######################################################################
+# The FLTK version
+set(FLTK_VERSION_MAJOR "1")
+set(FLTK_VERSION_MINOR "3")
+set(FLTK_VERSION_PATCH "3")
+set(FLTK_VERSION "${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}")
+set(FLTK_VERSION_FULL "${FLTK_VERSION}.${FLTK_VERSION_PATCH}")
+
+set(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${FLTK_BINARY_DIR}/lib)
+set(ARCHIVE_OUTPUT_PATH ${FLTK_BINARY_DIR}/lib)
+
+# Search for modules in the FLTK source dir first
+set(CMAKE_MODULE_PATH "${FLTK_SOURCE_DIR}/CMake")
+
+set(FLTK_INCLUDE_DIRS ${FLTK_BINARY_DIR} ${FLTK_SOURCE_DIR})
+include_directories(${FLTK_INCLUDE_DIRS})
+
+#######################################################################
+# platform dependent information
+#######################################################################
+
+# fix no WIN32 defined issue
+if(NOT WIN32)
+ if(_WIN32)
+ set(WIN32 _WIN32)
+ elseif(__WIN32__)
+ set(WIN32 __WIN32__)
+ endif(_WIN32)
+endif(NOT WIN32)
+
+# set where config and example files go
+if(WIN32 AND NOT CYGWIN)
+ set(FLTK_CONFIG_PATH CMake)
+ set(FLTK_EXAMPLES_PATH bin/fltk-examples)
+elseif(APPLE)
+ set(FLTK_CONFIG_PATH FLTK/.framework/Resources/CMake)
+ set(FLTK_EXAMPLES_PATH share/fltk-examples)
+else()
+ set(FLTK_CONFIG_PATH lib/fltk)
+ set(FLTK_EXAMPLES_PATH share/fltk-examples)
+endif(WIN32 AND NOT CYGWIN)
+
+include(TestBigEndian)
+TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
+
+if(APPLE)
+ set(__APPLE_QUARTZ__ 1)
+ set(HAVE_STRCASECMP 1)
+ set(HAVE_DIRENT_H 1)
+ set(HAVE_SNPRINTF 1)
+ set(HAVE_VSNPRINTF 1)
+ set(HAVE_SCANDIR 1)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa")
+endif(APPLE)
+
+if(WIN32)
+ if(MSVC)
+ add_definitions(-DWIN32_LEAN_AND_MEAN)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+######## from ide/VisualC2010/config.h
+ set(BORDER_WIDTH 2)
+########
+ endif(MSVC)
+ if(CMAKE_C_COMPILER_ID STREQUAL GNU)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows")
+ endif(CMAKE_C_COMPILER_ID STREQUAL GNU)
+ if(MINGW AND EXISTS /mingw)
+ list(APPEND CMAKE_PREFIX_PATH /mingw)
+ endif(MINGW AND EXISTS /mingw)
+endif(WIN32)
+
+#######################################################################
+# size of ints
+include(CheckTypeSize)
+
+CHECK_TYPE_SIZE(short SIZEOF_SHORT)
+CHECK_TYPE_SIZE(int SIZEOF_INT)
+CHECK_TYPE_SIZE(long SIZEOF_LONG)
+CHECK_TYPE_SIZE("long long" HAVE_LONG_LONG)
+
+if(${SIZEOF_SHORT} MATCHES "^2$")
+ set(U16 "unsigned short")
+endif(${SIZEOF_SHORT} MATCHES "^2$")
+
+if(${SIZEOF_INT} MATCHES "^4$")
+ set(U32 "unsigned")
+else()
+ if(${SIZEOF_LONG} MATCHES "^4$")
+ set(U32 "unsigned long")
+ endif(${SIZEOF_LONG} MATCHES "^4$")
+endif(${SIZEOF_INT} MATCHES "^4$")
+
+if(${SIZEOF_INT} MATCHES "^8$")
+ set(U64 "unsigned")
+else()
+ if(${SIZEOF_LONG} MATCHES "^8$")
+ set(U64 "unsigned long")
+ endif(${SIZEOF_LONG} MATCHES "^8$")
+endif(${SIZEOF_INT} MATCHES "^8$")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c9912d..4946e27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,10 @@
#
-# "$Id: CMakeLists.txt 9679 2012-09-13 14:19:01Z manolo $"
+# "$Id: CMakeLists.txt 10368 2014-10-09 16:03:56Z AlbrechtS $"
#
# Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org)
-# Written by Andy Cedilnik and Julien Jomier
+# Written by Michael Surette
#
-# Copyright 1998-2010 by Bill Spitzak and others.
+# Copyright 1998-2014 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -17,613 +17,37 @@
# http://www.fltk.org/str.php
#
-#######################################################################
-# basic setup
-#######################################################################
+# Prevent annoying warning under Cygwin; this must be before project().
+# Remove when CMake >= 2.8.4 is required
+set(CMAKE_LEGACY_CYGWIN_WIN32 0)
+
project(FLTK)
cmake_minimum_required(VERSION 2.6)
-# The FLTK version
-set(FLTK_VERSION_MAJOR "1")
-set(FLTK_VERSION_MINOR "3")
-set(FLTK_VERSION_PATCH "0")
-set(FLTK_VERSION "${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}")
-set(FLTK_VERSION_FULL "${FLTK_VERSION}.${FLTK_VERSION_PATCH}")
-
-set(EXECUTABLE_OUTPUT_PATH ${FLTK_BINARY_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${FLTK_BINARY_DIR}/lib)
-set(ARCHIVE_OUTPUT_PATH ${FLTK_BINARY_DIR}/lib)
-
-# Search for modules in the FLTK source dir first
-set(CMAKE_MODULE_PATH "${FLTK_SOURCE_DIR}/CMake")
-
-include_directories(${FLTK_BINARY_DIR} ${FLTK_SOURCE_DIR})
-
#######################################################################
-# platform dependent information
+# define some macros
#######################################################################
-
-include(TestBigEndian)
-TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
-
-if(APPLE)
- set(__APPLE_QUARTZ__ 1)
- set(HAVE_STRTOLL 1)
- set(HAVE_STRCASECMP 1)
- set(HAVE_DIRENT_H 1)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Cocoa")
-endif(APPLE)
-
-if(WIN32)
- if(MSVC)
- add_definitions(-DWIN32_LEAN_AND_MEAN)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
- endif(MSVC)
- if(CMAKE_C_COMPILER_ID STREQUAL GNU)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows")
- endif(CMAKE_C_COMPILER_ID STREQUAL GNU)
- if(MINGW AND EXISTS /mingw)
- list(APPEND CMAKE_PREFIX_PATH /mingw)
- endif(MINGW AND EXISTS /mingw)
-endif(WIN32)
-
-#######################################################################
-# size of ints
-include(CheckTypeSize)
-
-CHECK_TYPE_SIZE(short SIZEOF_SHORT)
-CHECK_TYPE_SIZE(int SIZEOF_INT)
-CHECK_TYPE_SIZE(long SIZEOF_LONG)
-CHECK_TYPE_SIZE("long long" HAVE_LONG_LONG)
-
-if(${SIZEOF_SHORT} MATCHES "^2$")
- set(U16 "unsigned short")
-endif(${SIZEOF_SHORT} MATCHES "^2$")
-
-if(${SIZEOF_INT} MATCHES "^4$")
- set(U32 "unsigned")
-else()
- if(${SIZEOF_LONG} MATCHES "^4$")
- set(U32 "unsigned long")
- endif(${SIZEOF_LONG} MATCHES "^4$")
-endif(${SIZEOF_INT} MATCHES "^4$")
-
-if(${SIZEOF_INT} MATCHES "^8$")
- set(U64 "unsigned")
-else()
- if(${SIZEOF_LONG} MATCHES "^8$")
- set(U64 "unsigned long")
- endif(${SIZEOF_LONG} MATCHES "^8$")
-endif(${SIZEOF_INT} MATCHES "^8$")
+include(CMake/macros.cmake)
#######################################################################
-# check for headers, libraries and functions
+# basic setup
#######################################################################
-# headers
-find_file(HAVE_ALSA_ASOUNDLIB_H alsa/asoundlib.h)
-find_file(HAVE_DIRENT_H dirent.h)
-find_file(HAVE_DLFCN_H dlfcn.h)
-find_file(HAVE_FREETYPE_H freetype.h PATH_SUFFIXES freetype2)
-find_file(HAVE_GL_GL_H GL/gl.h)
-find_file(HAVE_GL_GLU_H GL/glu.h)
-find_file(HAVE_LIBPNG_PNG_H libpng/png.h)
-find_file(HAVE_LOCALE_H locale.h)
-find_file(HAVE_NDIR_H ndir.h)
-find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h)
-find_file(HAVE_PNG_H png.h)
-find_file(HAVE_PTHREAD_H pthread.h)
-find_file(HAVE_STDIO_H stdio.h)
-find_file(HAVE_STRINGS_H strings.h)
-find_file(HAVE_SYS_DIR_H sys/dir.h)
-find_file(HAVE_SYS_NDIR_H sys/ndir.h)
-find_file(HAVE_SYS_SELECT_H sys/select.h)
-find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h)
-find_path(HAVE_XDBE_H Xdbe.h PATH_SUFFIXES X11/extensions extensions)
-
-mark_as_advanced(HAVE_ALSA_ASOUNDLIB_H HAVE_DIRENT_H HAVE_DLFCN_H)
-mark_as_advanced(HAVE_FREETYPE_H HAVE_GL_GL_H HAVE_GL_GLU_H)
-mark_as_advanced(HAVE_LIBPNG_PNG_H HAVE_LOCALE_H HAVE_NDIR_H)
-mark_as_advanced(HAVE_OPENGL_GLU_H HAVE_PNG_H HAVE_PTHREAD_H)
-mark_as_advanced(HAVE_STDIO_H HAVE_STRINGS_H HAVE_SYS_DIR_H)
-mark_as_advanced(HAVE_SYS_NDIR_H HAVE_SYS_SELECT_H)
-mark_as_advanced(HAVE_SYS_STDTYPES_H HAVE_XDBE_H)
-
-# where to find freetype headers
-find_path(FREETYPE_PATH freetype/config/ftheader.h PATH_SUFFIXES freetype2)
-if(FREETYPE_PATH)
- include_directories(${FREETYPE_PATH})
-endif(FREETYPE_PATH)
-mark_as_advanced(FREETYPE_PATH)
+include(CMake/setup.cmake)
#######################################################################
-# libraries
-find_library(LIB_CAIRO cairo)
-find_library(LIB_fontconfig fontconfig)
-find_library(LIB_freetype freetype)
-find_library(LIB_GL GL)
-find_library(LIB_MesaGL MesaGL)
-find_library(LIB_jpeg jpeg)
-find_library(LIB_png png)
-find_library(LIB_zlib z)
-
-mark_as_advanced(LIB_CAIRO LIB_fontconfig LIB_freetype)
-mark_as_advanced(LIB_GL LIB_MesaGL)
-mark_as_advanced(LIB_jpeg LIB_png LIB_zlib)
-
+# check for headers, libraries and functions
#######################################################################
-# functions
-include(CheckFunctionExists)
-
-if(HAVE_DLFCN_H)
- set(CMAKE_REQUIRED_LIBRARIES dl)
- set(HAVE_DLFCN_H 1)
-endif(HAVE_DLFCN_H)
-CHECK_FUNCTION_EXISTS(dlsym HAVE_DLSYM)
-
-CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
-
-if(LIB_png)
- set(CMAKE_REQUIRED_LIBRARIES png)
-endif(LIB_png)
-CHECK_FUNCTION_EXISTS(png_get_valid HAVE_PNG_GET_VALID)
-CHECK_FUNCTION_EXISTS(png_set_tRNS_to_alpha HAVE_PNG_SET_TRNS_TO_ALPHA)
-
-CHECK_FUNCTION_EXISTS(scandir HAVE_SCANDIR)
-CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
-
-# not really true but we convert strcasecmp calls to _stricmp calls in flstring.h
-if(MSVC)
- set(HAVE_STRCASECMP 1)
-endif(MSVC)
-CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
-
-CHECK_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
-CHECK_FUNCTION_EXISTS(strlcpy HAVE_STRLCPY)
-CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
-CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
-
-set(CMAKE_REQUIRED_LIBRARIES)
-
-if(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX AND NOT APPLE)
- set(MSG "POSIX compatible scandir")
- message(STATUS "Looking for ${MSG}")
- try_compile(V
- ${FLTK_BINARY_DIR}
- ${FLTK_SOURCE_DIR}/CMake/posixScandir.cxx
- )
- if(V)
- message(STATUS "${MSG} - found")
- set(HAVE_SCANDIR_POSIX 1 CACHE INTERNAL "")
- else()
- message(STATUS "${MSG} - not found")
- set(HAVE_SCANDIR_POSIX HAVE_SCANDIR_POSIX-NOTFOUND)
- endif(V)
-endif(HAVE_SCANDIR AND NOT HAVE_SCANDIR_POSIX AND NOT APPLE)
-mark_as_advanced(HAVE_SCANDIR_POSIX)
+include(CMake/resources.cmake)
#######################################################################
# options
#######################################################################
-set(OPTION_OPTIM ""
- CACHE STRING
- "custom optimization flags"
- )
-add_definitions(${OPTION_OPTIM})
+include(CMake/options.cmake)
#######################################################################
-set(OPTION_ARCHFLAGS ""
- CACHE STRING
- "custom architecture flags"
- )
-add_definitions(${OPTION_ARCHFLAGS})
-
+# final config and export
#######################################################################
-set(OPTION_PREFIX_BIN ""
- CACHE STRING
- "where to install executables - leave empty to use {CMAKE_INSTALL_PREFIX}/bin"
- )
-
-if(OPTION_PREFIX_BIN)
- set(PREFIX_BIN ${OPTION_PREFIX_BIN} CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_BIN ${CMAKE_INSTALL_PREFIX}/bin CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_BIN)
-
-#######################################################################
-set(OPTION_PREFIX_LIB ""
- CACHE STRING
- "where to install libraries - leave empty to use {CMAKE_INSTALL_PREFIX}/lib"
- )
-
-if(OPTION_PREFIX_LIB)
- set(PREFIX_LIB ${OPTION_PREFIX_LIB} CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_LIB ${CMAKE_INSTALL_PREFIX}/lib CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_LIB)
-
-#######################################################################
-set(OPTION_PREFIX_INCLUDE ""
- CACHE STRING
- "where to install include files - leave empty to use {CMAKE_INSTALL_PREFIX}/include"
- )
-
-if(OPTION_PREFIX_INCLUDE)
- set(PREFIX_INCLUDE ${OPTION_PREFIX_INCLUDE} CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_INCLUDE ${CMAKE_INSTALL_PREFIX}/include CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_INCLUDE)
-
-#######################################################################
-set(OPTION_PREFIX_DATA ""
- CACHE STRING
- "where to install data files - leave empty to use {CMAKE_INSTALL_PREFIX}/share/FLTK"
- )
-
-if(OPTION_PREFIX_DATA)
- set(PREFIX_DATA ${OPTION_PREFIX_DATA} CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_DATA ${CMAKE_INSTALL_PREFIX}/share/FLTK CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_DATA)
-
-#######################################################################
-set(OPTION_PREFIX_DOC ""
- CACHE STRING
- "where to install doc files - leave empty to use {CMAKE_INSTALL_PREFIX}/share/doc/FLTK"
- )
-
-if(OPTION_PREFIX_DOC)
- set(PREFIX_DOC ${OPTION_PREFIX_DOC} CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_DOC ${CMAKE_INSTALL_PREFIX}/share/doc/FLTK CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_DOC)
-
-#######################################################################
-if(WIN32)
- set(DEFAULT_CONFIG "${CMAKE_INSTALL_PREFIX}/CMake")
-elseif(APPLE)
- set(DEFAULT_CONFIG "${CMAKE_INSTALL_PREFIX}/FLTK/.framework/Resources/CMake")
-else()
- set(DEFAULT_CONFIG "${CMAKE_INSTALL_PREFIX}/lib/FLTK-${FLTK_VERSION}")
-endif(WIN32)
-
-set(OPTION_PREFIX_CONFIG ""
- CACHE STRING
- "where to install CMake config files - leave empty to use ${DEFAULT_CONFIG}"
- )
-
-if(OPTION_PREFIX_CONFIG)
- set(PREFIX_CONFIG "${OPTION_PREFIX_CONFIG}" CACHE INTERNAL "" FORCE)
-else()
- set(PREFIX_CONFIG "${DEFAULT_CONFIG}" CACHE INTERNAL "" FORCE)
-endif(OPTION_PREFIX_CONFIG)
-
-#######################################################################
-if(CMAKE_HOST_UNIX)
- set(OPTION_PREFIX_MAN ""
- CACHE STRING
- "where to install man files - leave empty to use {CMAKE_INSTALL_PREFIX}/man"
- )
-
- if(OPTION_PREFIX_MAN)
- set(PREFIX_MAN ${OPTION_PREFIX_MAN} CACHE INTERNAL "" FORCE)
- else()
- set(PREFIX_MAN ${CMAKE_INSTALL_PREFIX}/man CACHE INTERNAL "" FORCE)
- endif(OPTION_PREFIX_MAN)
-
- option(OPTION_CREATE_LINKS "create backwards compatibility links" OFF)
-endif(CMAKE_HOST_UNIX)
-
-#######################################################################
-if(APPLE)
- option(OPTION_APPLE_X11 "use X11" OFF)
-endif(APPLE)
-
-if(NOT APPLE OR OPTION_APPLE_X11)
- include(FindX11)
- if(X11_FOUND)
- set(USE_X11 1)
- list(APPEND FLTK_CFLAGS -DUSE_X11)
- list(APPEND FLTK_LDLIBS -lX11)
- endif(X11_FOUND)
-endif(NOT APPLE OR OPTION_APPLE_X11)
-
-#######################################################################
-option(OPTION_USE_POLL "use poll if available" OFF)
-
-if(OPTION_USE_POLL)
- CHECK_FUNCTION_EXISTS(poll USE_POLL)
-endif(OPTION_USE_POLL)
-
-#######################################################################
-option(OPTION_BUILD_SHARED_LIBS "Build shared libraries" OFF)
-
-#######################################################################
-option(OPTION_BUILD_EXAMPLES "build example programs" ON)
-
-#######################################################################
-include(FindPkgConfig)
-
-option(OPTION_CAIRO "use lib Cairo" OFF)
-option(OPTION_CAIROEXT
- "use fltk code instrumentation for cairo extended use" OFF
- )
-
-if(OPTION_CAIRO OR OPTION_CAIROEXT AND LIB_CAIRO)
- pkg_search_module(PKG_CAIRO cairo)
-endif(OPTION_CAIRO OR OPTION_CAIROEXT AND LIB_CAIRO)
-
-if(PKG_CAIRO_FOUND)
- set(FLTK_HAVE_CAIRO 1)
- add_subdirectory(cairo)
- list(APPEND FLTK_LDLIBS -lcairo -lpixman-1)
- include_directories(${PKG_CAIRO_INCLUDE_DIRS})
- string(REPLACE ";" " " CAIROFLAGS "${PKG_CAIRO_CFLAGS}")
-endif(PKG_CAIRO_FOUND)
-
-if(LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND)
- set(FLTK_USE_CAIRO 1)
- set(FLTK_CAIRO_FOUND TRUE)
-else()
- set(FLTK_CAIRO_FOUND FALSE)
-endif(LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND)
-
-#######################################################################
-set(HAVE_GL LIB_GL OR LIB_MesaGL)
-
-if(HAVE_GL)
- option(OPTION_USE_GL "use OpenGL" ON)
-endif(HAVE_GL)
-
-if(OPTION_USE_GL)
- include(FindOpenGL)
-endif(OPTION_USE_GL)
-
-if(OPENGL_FOUND)
- set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR}/GL)
- set(CMAKE_REQUIRED_LIBRARIES -lGLU -lGL)
- CHECK_FUNCTION_EXISTS(glXGetProcAddressARB HAVE_GLXGETPROCADDRESSARB)
- set(FLTK_GL_FOUND TRUE)
-else()
- set(FLTK_GL_FOUND FALSE)
-endif(OPENGL_FOUND)
-
-#######################################################################
-option(OPTION_USE_THREADS "use multi-threading" ON)
-
-if(OPTION_USE_THREADS)
- include(FindThreads)
-endif(OPTION_USE_THREADS)
-
-if(OPTION_USE_THREADS AND CMAKE_HAVE_THREADS_LIBRARY)
- add_definitions("-D_THREAD_SAFE -D_REENTRANT")
- set(USE_THREADS 1)
- set(FLTK_THREADS_FOUND TRUE)
-else()
- set(FLTK_THREADS_FOUND FALSE)
-endif(OPTION_USE_THREADS AND CMAKE_HAVE_THREADS_LIBRARY)
-
-if(OPTION_USE_THREADS AND CMAKE_USE_PTHREADS_INIT)
- set(HAVE_PTHREAD 1)
- list(APPEND FLTK_LDLIBS -lpthread)
- list(APPEND FLTK_CFLAGS -D_THREAD_SAFE -D_REENTRANT)
- set(FLTK_PTHREADS_FOUND TRUE)
-else()
- set(HAVE_PTHREAD 0)
- set(HAVE_PTHREAD_H 0)
- set(FLTK_PTHREADS_FOUND FALSE)
-endif(OPTION_USE_THREADS AND CMAKE_USE_PTHREADS_INIT)
-
-#######################################################################
-option(OPTION_LARGE_FILE "enable large file support" ON)
-
-if(OPTION_LARGE_FILE)
- if(NOT MSVC)
- add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
- list(APPEND FLTK_CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE)
- endif(NOT MSVC)
-endif(OPTION_LARGE_FILE)
-
-#######################################################################
-option(OPTION_USE_SYSTEM_LIBJPEG "Use's system libjpeg" ON)
-
-if(OPTION_USE_SYSTEM_LIBJPEG AND LIB_jpeg)
- include(FindJPEG)
-endif(OPTION_USE_SYSTEM_LIBJPEG AND LIB_jpeg)
-
-if(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
- set(FLTK_JPEG_LIBRARIES ${JPEG_LIBRARIES})
- include_directories(${JPEG_INCLUDE_DIR})
- set(FLTK_BUILTIN_JPEG_FOUND FALSE)
-else()
- add_subdirectory(jpeg)
- set(FLTK_JPEG_LIBRARIES fltk_jpeg)
- include_directories(${FLTK_SOURCE_DIR}/jpeg)
- set(FLTK_BUILTIN_JPEG_FOUND TRUE)
-endif(OPTION_USE_SYSTEM_LIBJPEG AND JPEG_FOUND)
-
-if(OPTION_USE_SYSTEM_LIBJPEG AND NOT JPEG_FOUND)
- message(STATUS "\ncannot find system jpeg library - using built-in\n")
-endif(OPTION_USE_SYSTEM_LIBJPEG AND NOT JPEG_FOUND)
-
-set(HAVE_LIBJPEG 1)
-
-#######################################################################
-option(OPTION_USE_SYSTEM_ZLIB "Use's system zlib" ON)
-
-if(OPTION_USE_SYSTEM_ZLIB AND LIB_zlib)
- include(FindZLIB)
-endif(OPTION_USE_SYSTEM_ZLIB AND LIB_zlib)
-
-if(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
- set(FLTK_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
- include_directories(${ZLIB_INCLUDE_DIRS})
- set(FLTK_BUILTIN_ZLIB_FOUND FALSE)
-else()
- add_subdirectory(zlib)
- set(FLTK_ZLIB_LIBRARIES fltk_z)
- set(ZLIB_INCLUDE_DIR ${FLTK_SOURCE_DIR}/zlib)
- include_directories(${FLTK_SOURCE_DIR}/zlib)
- set(FLTK_BUILTIN_ZLIB_FOUND TRUE)
-endif(OPTION_USE_SYSTEM_ZLIB AND ZLIB_FOUND)
-
-if(OPTION_USE_SYSTEM_ZLIB AND NOT ZLIB_FOUND)
- message(STATUS "\ncannot find system zlib library - using built-in\n")
-endif(OPTION_USE_SYSTEM_ZLIB AND NOT ZLIB_FOUND)
-
-set(HAVE_LIBZ 1)
-
-#######################################################################
-option(OPTION_USE_SYSTEM_LIBPNG "Use's system libpng" ON)
-
-if(OPTION_USE_SYSTEM_LIBPNG AND LIB_png)
- include(FindPNG)
-endif(OPTION_USE_SYSTEM_LIBPNG AND LIB_png)
-
-if(OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)
- set(FLTK_PNG_LIBRARIES ${PNG_LIBRARIES})
- include_directories(${PNG_INCLUDE_DIR})
- add_definitions(${PNG_DEFINITIONS})
- set(FLTK_BUILTIN_PNG_FOUND FALSE)
-else()
- add_subdirectory(png)
- set(FLTK_PNG_LIBRARIES fltk_png)
- set(HAVE_PNG_H 1)
- set(HAVE_PNG_GET_VALID 1)
- set(HAVE_PNG_SET_TRNS_TO_ALPHA 1)
- include_directories(${FLTK_SOURCE_DIR}/png)
- set(FLTK_BUILTIN_PNG_FOUND TRUE)
-endif(OPTION_USE_SYSTEM_LIBPNG AND PNG_FOUND)
-
-if(OPTION_USE_SYSTEM_LIBPNG AND NOT PNG_FOUND)
- message(STATUS "\ncannot find system png library - using built-in\n")
-endif(OPTION_USE_SYSTEM_LIBPNG AND NOT PNG_FOUND)
-
-set(HAVE_LIBPNG 1)
-
-#######################################################################
-if(X11_Xinerama_FOUND)
- option(OPTION_USE_XINERAMA "use lib Xinerama" ON)
-endif(X11_Xinerama_FOUND)
-
-if(OPTION_USE_XINERAMA)
- set(HAVE_XINERAMA ${X11_Xinerama_FOUND})
- include_directories(${X11_Xinerama_INCLUDE_PATH})
- list(APPEND FLTK_LDLIBS -lXinerama)
- set(FLTK_XINERAMA_FOUND TRUE)
-else()
- set(FLTK_XINERAMA_FOUND FALSE)
-endif(OPTION_USE_XINERAMA)
-
-#######################################################################
-if(X11_Xft_FOUND)
- option(OPTION_USE_XFT "use lib Xft" ON)
-endif(X11_Xft_FOUND)
-
-if(OPTION_USE_XFT)
- set(USE_XFT X11_Xft_FOUND)
- list(APPEND FLTK_LDLIBS -lXft)
- set(FLTK_XFT_FOUND TRUE)
-else()
- set(FLTK_XFT_FOUND FALSE)
-endif(OPTION_USE_XFT)
-
-#######################################################################
-if(X11_FOUND)
- option(OPTION_USE_XDBE "use lib Xdbe" ON)
-endif(X11_FOUND)
-
-if(OPTION_USE_XDBE AND HAVE_XDBE_H)
- set(HAVE_XDBE 1)
- set(FLTK_XDBE_FOUND TRUE)
-else()
- set(FLTK_XDBE_FOUND FALSE)
-endif(OPTION_USE_XDBE AND HAVE_XDBE_H)
-
-#######################################################################
-# final setup and config
-#######################################################################
-# Set the fluid executable path
-if(CMAKE_CROSSCOMPILING)
- find_file(FLUID_PATH
- NAMES fluid fluid.exe
- PATHS ENV PATH
- NO_CMAKE_FIND_ROOT_PATH
- )
- add_executable(fluid IMPORTED)
- set(FLTK_FLUID_EXECUTABLE ${FLUID_PATH})
- set(FLTK_FLUID_PATH ${FLUID_PATH})
- set_target_properties(fluid
- PROPERTIES IMPORTED_LOCATION ${FLUID_PATH}
- )
-else()
- add_subdirectory(fluid)
- set(FLTK_FLUID_EXECUTABLE fluid)
- set(FLTK_FLUID_PATH ${PREFIX_BIN}/fluid)
-endif(CMAKE_CROSSCOMPILING)
-
-add_subdirectory(src)
-
-# generate FLTKConfig.cmake
-string(REPLACE ";" " " EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
-configure_file(
- ${FLTK_SOURCE_DIR}/CMake/FLTKConfig.cmake.in
- ${EXECUTABLE_OUTPUT_PATH}/FLTKConfig.cmake
- @ONLY
-)
-
-# generate UseFLTK.cmake
-configure_file(
- ${FLTK_SOURCE_DIR}/CMake/UseFLTK.cmake.in
- ${EXECUTABLE_OUTPUT_PATH}/UseFLTK.cmake
- @ONLY
-)
-
-# generate config.h
-configure_file(
- "${FLTK_SOURCE_DIR}/configh.cmake.in"
- "${FLTK_BINARY_DIR}/config.h"
- @ONLY
-)
-
-# generate fltk-config
-get_filename_component(CC ${CMAKE_C_COMPILER} NAME)
-get_filename_component(CXX ${CMAKE_CXX_COMPILER} NAME)
-
-string(REPLACE ";" " " C_FLAGS "${FLTK_CFLAGS}")
-
-if(X11_Xext_FOUND)
- list(APPEND FLTK_LDLIBS -lXext)
-endif(X11_Xext_FOUND)
-string(REPLACE ";" " " LD_LIBS "${FLTK_LDLIBS}")
-
-configure_file(
- "${FLTK_SOURCE_DIR}/fltk-config.cmake.in"
- "${FLTK_BINARY_DIR}/fltk-config"
- @ONLY
-)
-if(UNIX)
- execute_process(COMMAND chmod 755 fltk-config
- WORKING_DIRECTORY "${FLTK_BINARY_DIR}"
- )
-endif(UNIX)
-
-if(OPTION_CREATE_LINKS)
- configure_file(
- "${FLTK_SOURCE_DIR}/CMake/install-symlinks.cmake.in"
- "${FLTK_BINARY_DIR}/install-symlinks.cmake"
- @ONLY
- )
-endif(OPTION_CREATE_LINKS)
-
-# generate uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- @ONLY
-)
-add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
-)
+include(CMake/export.cmake)
#######################################################################
# build examples - these have to be after fluid is built/imported
@@ -635,49 +59,4 @@ endif(OPTION_BUILD_EXAMPLES)
#######################################################################
# installation
#######################################################################
-
-install(DIRECTORY ${FLTK_SOURCE_DIR}/FL
- DESTINATION ${PREFIX_INCLUDE} USE_SOURCE_PERMISSIONS
- PATTERN ".svn" EXCLUDE
-)
-
-if(OPTION_CREATE_LINKS)
- install(SCRIPT ${FLTK_BINARY_DIR}/install-symlinks.cmake)
-endif(OPTION_CREATE_LINKS)
-
-install(PROGRAMS ${FLTK_BINARY_DIR}/fltk-config
- DESTINATION ${PREFIX_BIN}
- OPTIONAL
-)
-
-install(EXPORT fltk-install
- DESTINATION ${PREFIX_CONFIG}
- FILE FLTKLibraries.cmake
-)
-
-install(FILES ${EXECUTABLE_OUTPUT_PATH}/FLTKConfig.cmake
- DESTINATION ${PREFIX_CONFIG}
-)
-
-install(FILES ${EXECUTABLE_OUTPUT_PATH}/UseFLTK.cmake
- DESTINATION ${PREFIX_CONFIG}
-)
-
-if(CMAKE_HOST_UNIX)
- macro(INSTALL_MAN FILE LEVEL)
- install(FILES
- ${FLTK_SOURCE_DIR}/documentation/src/${FILE}.man
- DESTINATION ${PREFIX_MAN}/man${LEVEL}
- RENAME ${FILE}.${LEVEL}
- )
- endmacro(INSTALL_MAN FILE LEVEL)
-
- INSTALL_MAN(fluid 1)
- INSTALL_MAN(fltk-config 1)
- INSTALL_MAN(fltk 3)
- INSTALL_MAN(blocks 6)
- INSTALL_MAN(checkers 6)
- INSTALL_MAN(sudoku 6)
-
-endif(CMAKE_HOST_UNIX)
-
+include(CMake/install.cmake)
diff --git a/CREDITS b/CREDITS
index 60f26c1..bc640e2 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,8 +1,8 @@
-CREDITS - Fast Light Tool Kit (FLTK) Version 1.3.0
+CREDITS - Fast Light Tool Kit (FLTK) Version 1.3.3
--------------------------------------------------
- This file lists the people responsible for the toolkit you
- are now using. If you've looking for your name in lights
+ This file lists the people responsible for the toolkit you are
+ now using. If you've been looking for your name in lights
but we've forgotten you here, please use the report on the
following page, and we'll update this file accordingly:
@@ -14,12 +14,20 @@ CORE DEVELOPERS
The following people do the day-to-day development of FLTK:
Fabien Costantini (fabien67@users.sf.net)
+ Greg Ercolano
+ Manolo Gouy
+ Ian MacArthur
+ Matthias Melcher (mm@robowerk.com)
+ Pierre Ossman
+ Albrecht Schlosser
+
+ These people have previously been active developers of FLTK:
+
Craig P. Earls
Curtis Edwards (trilec@users.sourceforge.net)
Gustavo Hime (hime@users.sourceforge.net)
Talbot Hughes
Robert Kesterson (robertk@users.sourceforge.net)
- Matthias Melcher (mm@robowerk.com)
James Dean Palmer (jamespalmer@users.sourceforge.net)
Vincent Penne (vincentp@users.sourceforge.net)
Bill Spitzak (spitzak@users.sourceforge.net)
@@ -33,25 +41,25 @@ OTHER CONTRIBUTORS
The following people have contributed fixes or enhancements
for FLTK:
+ Laszlo Z. Antal (LZA)
Teun Burgers
Paul Chambers
Stephen Davies
Yuri D'Elia
Domingo Alvarez Duarte
- Greg Ercolano
Yuri Fedorchenko
George Garvey
Duncan Gibson
- Manolo Gouy
Mikael Hultgren
Stuart Levy
+ Jean-Marc Lienher (OksiD)
Howard Lightstone
Mike Lindner
Alexander Mai
- Pierre Ossman
Alexander Rabi
James Roth
- Albrecht Schlosser
+ Ivan Nieto (Mr.Satan)
+ Jamie Snape
Andrea Suatoni
Michael Surette
Paul Sydney
diff --git a/FL/Enumerations.H b/FL/Enumerations.H
index e029d57..2c183c4 100644
--- a/FL/Enumerations.H
+++ b/FL/Enumerations.H
@@ -1,9 +1,9 @@
//
-// "$Id: Enumerations.H 9742 2012-12-09 18:45:57Z manolo $"
+// "$Id: Enumerations.H 10382 2014-10-15 21:00:20Z ianmacarthur $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2012 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -59,7 +59,7 @@
FLTK remains binary compatible between patches.
*/
-#define FL_PATCH_VERSION 2
+#define FL_PATCH_VERSION 3
/**
The FLTK version number as a \em double.
@@ -342,6 +342,10 @@ enum Fl_When { // Fl_Widget::when():
#define FL_Pause 0xff13 ///< The pause key.
#define FL_Scroll_Lock 0xff14 ///< The scroll lock key.
#define FL_Escape 0xff1b ///< The escape key.
+#define FL_Kana 0xff2e ///< The Kana key of JIS keyboards.
+#define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards.
+#define FL_Yen 0xff30 ///< The Yen key of JIS keyboards.
+#define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards.
#define FL_Home 0xff50 ///< The home key.
#define FL_Left 0xff51 ///< The left arrow key.
#define FL_Up 0xff52 ///< The up arrow key.
@@ -355,7 +359,7 @@ enum Fl_When { // Fl_Widget::when():
#define FL_Menu 0xff67 ///< The menu key.
#define FL_Help 0xff68 ///< The 'help' key on Mac keyboards
#define FL_Num_Lock 0xff7f ///< The num lock key.
-#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + n for number n.
+#define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n.
#define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'.
#define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad.
#define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n.
@@ -516,6 +520,14 @@ enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
_FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME
_FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX
_FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX
+ _FL_GLEAM_UP_BOX, ///< gleam version of FL_GLEAM_UP_BOX
+ _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_GLEAM_DOWN_BOX
+ _FL_GLEAM_UP_FRAME, ///< gleam version of FL_GLEAM_UP_FRAME
+ _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_GLEAM_DOWN_FRAME
+ _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_GLEAM_THIN_UP_BOX
+ _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_GLEAM_THIN_DOWN_BOX
+ _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_GLEAM_ROUND_UP_BOX
+ _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_GLEAM_ROUND_DOWN_BOX
FL_FREE_BOXTYPE ///< the first free box type for creation of new box types
};
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
@@ -562,6 +574,16 @@ extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
#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)
+extern FL_EXPORT Fl_Boxtype fl_define_FL_GLEAM_UP_BOX();
+#define FL_GLEAM_UP_BOX fl_define_FL_GLEAM_UP_BOX()
+#define FL_GLEAM_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+1)
+#define FL_GLEAM_UP_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+2)
+#define FL_GLEAM_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+3)
+#define FL_GLEAM_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+4)
+#define FL_GLEAM_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+5)
+#define FL_GLEAM_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+6)
+#define FL_GLEAM_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+7)
+
// conversions of box types to other boxtypes:
/**
Get the filled version of a frame.
@@ -751,7 +773,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
The Fl_Color type holds an FLTK color value.
Colors are either 8-bit indexes into a virtual colormap
- or 24-bit RGB color values.
+ or 24-bit RGB color values. (See \ref drawing_colors for the default FLTK colormap)
Color indices occupy the lower 8 bits of the value, while
RGB colors occupy the upper 24 bits, for a byte organization of RGBI.
@@ -759,7 +781,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
<pre>
Fl_Color => 0xrrggbbii
| | | |
- | | | +--- index between 0 and 255
+ | | | +--- \ref drawing_colors "index" between 0 and 255
| | +----- blue color component (8 bit)
| +------- green component (8 bit)
+--------- red component (8 bit)
@@ -770,7 +792,7 @@ extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; ///< normal font size
*/
/*@{*/
-/** an FLTK color value */
+/** An FLTK color value; see also \ref drawing_colors */
typedef unsigned int Fl_Color;
// Standard colors. These are used as default colors in widgets and altered as necessary
@@ -879,35 +901,37 @@ inline Fl_Color fl_color_cube(int r, int g, int b) {
/** The following constants define the mouse cursors that are available in FLTK.
- The double-headed arrows are bitmaps provided by FLTK on X, the others
- are provided by system-defined cursors.
+ Cursors are provided by the system when available, or bitmaps built into
+ FLTK as a fallback.
\todo enum Fl_Cursor needs maybe an image.
*/
+/* FIXME: We should renumber these, but that will break the ABI */
enum Fl_Cursor {
- FL_CURSOR_DEFAULT = 0, /**< the default cursor, usually an arrow. */
- FL_CURSOR_ARROW = 35, /**< an arrow pointer. */
- FL_CURSOR_CROSS = 66, /**< crosshair. */
- FL_CURSOR_WAIT = 76, /**< watch or hourglass. */
- FL_CURSOR_INSERT = 77, /**< I-beam. */
- FL_CURSOR_HAND = 31, /**< hand (uparrow on MSWindows). */
- FL_CURSOR_HELP = 47, /**< question mark. */
- FL_CURSOR_MOVE = 27, /**< 4-pointed arrow. */
- // fltk provides bitmaps for these:
- FL_CURSOR_NS = 78, /**< up/down arrow. */
- FL_CURSOR_WE = 79, /**< left/right arrow. */
- FL_CURSOR_NWSE = 80, /**< diagonal arrow. */
- FL_CURSOR_NESW = 81, /**< diagonal arrow. */
- FL_CURSOR_NONE =255, /**< invisible. */
- // for back compatibility (non MSWindows ones):
- FL_CURSOR_N = 70, /**< for back compatibility. */
- FL_CURSOR_NE = 69, /**< for back compatibility. */
- FL_CURSOR_E = 49, /**< for back compatibility. */
- FL_CURSOR_SE = 8, /**< for back compatibility. */
- FL_CURSOR_S = 9, /**< for back compatibility. */
- FL_CURSOR_SW = 7, /**< for back compatibility. */
- FL_CURSOR_W = 36, /**< for back compatibility. */
- FL_CURSOR_NW = 68 /**< for back compatibility. */
+ FL_CURSOR_DEFAULT = 0, /**< the default cursor, usually an arrow. */
+ FL_CURSOR_ARROW = 35, /**< an arrow pointer. */
+ FL_CURSOR_CROSS = 66, /**< crosshair. */
+ FL_CURSOR_WAIT = 76, /**< busy indicator (e.g. hourglass). */
+ FL_CURSOR_INSERT = 77, /**< I-beam. */
+ FL_CURSOR_HAND = 31, /**< pointing hand. */
+ FL_CURSOR_HELP = 47, /**< question mark pointer. */
+ FL_CURSOR_MOVE = 27, /**< 4-pointed arrow or hand. */
+
+ /* Resize indicators */
+ FL_CURSOR_NS = 78, /**< up/down resize. */
+ FL_CURSOR_WE = 79, /**< left/right resize. */
+ FL_CURSOR_NWSE = 80, /**< diagonal resize. */
+ FL_CURSOR_NESW = 81, /**< diagonal resize. */
+ FL_CURSOR_N = 70, /**< upwards resize. */
+ FL_CURSOR_NE = 69, /**< upwards, right resize. */
+ FL_CURSOR_E = 49, /**< rightwards resize. */
+ FL_CURSOR_SE = 8, /**< downwards, right resize. */
+ FL_CURSOR_S = 9, /**< downwards resize. */
+ FL_CURSOR_SW = 7, /**< downwards, left resize. */
+ FL_CURSOR_W = 36, /**< leftwards resize. */
+ FL_CURSOR_NW = 68, /**< upwards, left resize. */
+
+ FL_CURSOR_NONE =255 /**< invisible. */
};
/*@}*/ // group: Cursors
@@ -960,5 +984,5 @@ enum Fl_Damage {
#endif
//
-// End of "$Id: Enumerations.H 9742 2012-12-09 18:45:57Z manolo $".
+// End of "$Id: Enumerations.H 10382 2014-10-15 21:00:20Z ianmacarthur $".
//
diff --git a/FL/Fl.H b/FL/Fl.H
index 98e72b0..a0e9f33 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.H 9701 2012-10-18 12:56:31Z manolo $"
+// "$Id: Fl.H 10419 2014-10-30 16:05:22Z AlbrechtS $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
@@ -96,6 +96,9 @@ typedef void (*Fl_FD_Handler)(FL_SOCKET fd, void *data);
/** Signature of add_handler functions passed as parameters */
typedef int (*Fl_Event_Handler)(int event);
+/** Signature of add_system_handler functions passed as parameters */
+typedef int (*Fl_System_Handler)(void *event, void *data);
+
/** Signature of set_abort functions passed as parameters */
typedef void (*Fl_Abort_Handler)(const char *format,...);
@@ -109,6 +112,9 @@ typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
\see Fl::event_dispatch(Fl_Event_Dispatch) */
typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w);
+/** Signature of add_clipboard_notify functions passed as parameters */
+typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data);
+
/** @} */ /* group callback_functions */
@@ -134,6 +140,8 @@ public: // should be private!
static int e_keysym;
static char* e_text;
static int e_length;
+ static void *e_clipboard_data;
+ static const char *e_clipboard_type;
static Fl_Event_Dispatch e_dispatch;
static Fl_Widget* belowmouse_;
static Fl_Widget* pushed_;
@@ -142,9 +150,15 @@ public: // should be private!
static Fl_Widget* selection_owner_;
static Fl_Window* modal_;
static Fl_Window* grab_;
- static int compose_state;
+ static int compose_state; // used for dead keys (WIN32) or marked text (MacOS)
static void call_screen_init(); // recompute screen number and dimensions
+#ifdef __APPLE__
+ static void reset_marked_text(); // resets marked text
+ static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point
#endif
+#endif // FL_DOXYGEN
+
+
/**
If true then flush() will do something.
*/
@@ -160,8 +174,13 @@ public:
typedef enum {
/// When switched on, moving the text cursor beyond the start or end of
/// a text in a text widget will change focus to the next text widget.
- /// When switched off, the cursor will stop at the end of the text.
+ /// (This is considered 'old' behavior)
+ ///
+ /// When switched off (default), the cursor will stop at the end of the text.
/// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
+ ///
+ /// See also: Fl_Input_::tab_nav()
+ ///
OPTION_ARROW_FOCUS = 0,
// When switched on, FLTK will use the file chooser dialog that comes
// with your operating system whenever possible. When switched off, FLTK
@@ -173,19 +192,23 @@ public:
// decides to choose the file.
// \todo implement me
//OPTION_FILECHOOSER_PREVIEW,
- /// If visible focus is switched on, FLTK will draw a dotted rectangle
+ /// If visible focus is switched on (default), FLTK will draw a dotted rectangle
/// inside the widget that will receive the next keystroke. If switched
/// off, no such indicator will be drawn and keyboard navigation
/// is disabled.
OPTION_VISIBLE_FOCUS,
- /// If text drag-and-drop is enabled, the user can select and drag text
+ /// If text drag-and-drop is enabled (default), the user can select and drag text
/// from any text widget. If disabled, no dragging is possible, however
/// dropping text from other applications still works.
OPTION_DND_TEXT,
- /// If tooltips are enabled, hovering the mouse over a widget with a
+ /// If tooltips are enabled (default), hovering the mouse over a widget with a
/// tooltip text will open a little tooltip window until the mouse leaves
/// the widget. If disabled, no tooltip is shown.
OPTION_SHOW_TOOLTIPS,
+ /// When switched on (default), Fl_Native_File_Chooser runs GTK file dialogs
+ /// if the GTK library is available on the platform (linux/unix only).
+ /// When switched off, GTK file dialogs aren't used even if the GTK library is available.
+ OPTION_FNFC_USES_GTK,
// don't change this, leave it always as the last element
/// For internal use only.
OPTION_LAST
@@ -268,10 +291,41 @@ public:
static void background2(uchar, uchar, uchar);
// schemes:
- static int scheme(const char*);
+ static int scheme(const char *name);
/** See void scheme(const char *name) */
static const char* scheme() {return scheme_;}
- /**
+
+ /** Returns whether the current scheme is the given name.
+
+ This is a fast inline convenience function to support scheme-specific
+ code in widgets, e.g. in their draw() methods, if required.
+
+ Use a valid scheme name, not \p NULL (although \p NULL is allowed,
+ this is not a useful argument - see below).
+
+ If Fl::scheme() has not been set or has been set to the default
+ scheme ("none" or "base"), then this will always return 0 regardless
+ of the argument, because Fl::scheme() is \p NULL in this case.
+
+ \note The stored scheme name is always lowercase, and this method will
+ do a case-sensitive compare, so you \b must provide a lowercase string to
+ return the correct value. This is intentional for performance reasons.
+
+ Example:
+ \code
+ if (Fl::is_scheme("gtk+")) { your_code_here(); }
+ \endcode
+
+ \param[in] name \b lowercase string of requested scheme name.
+
+ \return 1 if the given scheme is active, 0 otherwise.
+
+ \see Fl::scheme(const char *name)
+ */
+ static int is_scheme(const char *name) {
+ return (scheme_ && name && !strcmp(name,scheme_));
+ }
+ /**
Called by scheme according to scheme name.
Loads or reloads the current scheme selection.
See void scheme(const char *name)
@@ -686,6 +740,16 @@ public:
you paste a nul character.
*/
static int event_length() {return e_length;}
+
+ /** During an FL_PASTE event of non-textual data, returns a pointer to the pasted data.
+ The returned data is an Fl_Image * when the result of Fl::event_clipboard_type() is Fl::clipboard_image.
+ */
+ static void *event_clipboard() { return e_clipboard_data; }
+ /** Returns the type of the pasted data during an FL_PASTE event.
+ This type can be Fl::clipboard_plain_text or Fl::clipboard_image.
+ */
+ static const char *event_clipboard_type() {return e_clipboard_type; }
+
static int compose(int &del);
static void compose_reset();
@@ -693,6 +757,17 @@ public:
static int event_inside(const Fl_Widget*);
static int test_shortcut(Fl_Shortcut);
+ /**
+ Enables the system input methods facilities. This is the default.
+ \see disable_im()
+ */
+ static void enable_im();
+ /**
+ Disables the system input methods facilities.
+ \see enable_im()
+ */
+ static void disable_im();
+
// event destinations:
static int handle(int, Fl_Window*);
static int handle_(int, Fl_Window*);
@@ -709,6 +784,8 @@ public:
static void focus(Fl_Widget*);
static void add_handler(Fl_Event_Handler h);
static void remove_handler(Fl_Event_Handler h);
+ static void add_system_handler(Fl_System_Handler h, void *data);
+ static void remove_system_handler(Fl_System_Handler h);
static void event_dispatch(Fl_Event_Dispatch d);
static Fl_Event_Dispatch event_dispatch();
/** @} */
@@ -720,19 +797,39 @@ public:
/**
Copies the data pointed to by \p stuff to the selection buffer
(\p destination is 0) or
- the clipboard (\p destination is 1); \p len is the number of relevant
- bytes in \p stuff.
+ the clipboard (\p destination is 1).
+ \p len is the number of relevant bytes in \p stuff.
+ \p type is always Fl::clipboard_plain_text.
The selection buffer is used for
middle-mouse pastes and for drag-and-drop selections. The
clipboard is used for traditional copy/cut/paste operations.
+
+ \note This function is, at present, intended only to copy UTF-8 encoded textual data.
+ To copy graphical data, use the Fl_Copy_Surface class. The \p type argument may allow
+ in the future to copy other kinds of data.
*/
- static void copy(const char* stuff, int len, int destination = 0); // platform dependent
+#if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN)
+ static void copy(const char* stuff, int len, int destination = 0, const char *type = Fl::clipboard_plain_text); // platform dependent
+#else
+ static void copy(const char* stuff, int len, int destination, const char *type);
+ static void copy(const char* stuff, int len, int destination = 0);
+#endif
+
+#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN))
+ static void copy_image(const unsigned char* data, int W, int H, int destination = 0); // platform dependent
+#endif
/**
Pastes the data from the selection buffer (\p source is 0) or the clipboard
- (\p source is 1) into \p receiver.
- Set things up so the receiver widget will be called with an FL_PASTE event some
- time in the future with the data from the specified \p source in Fl::event_text()
- and the number of characters in Fl::event_length().
+ (\p source is 1) into \p receiver. If \p source is 1,
+ the optional \p type argument indicates what type of data is requested from the clipboard
+ (at present, Fl::clipboard_plain_text - requesting text data - and
+ Fl::clipboard_image - requesting image data - are possible).
+ Set things up so the handle function of the \p receiver widget will be called with an FL_PASTE event some
+ time in the future if the clipboard does contain data of the requested type. During processing of this event,
+ and if \p type is Fl::clipboard_plain_text, the text data from the specified \p source are in Fl::event_text()
+ with UTF-8 encoding, and the number of characters in Fl::event_length();
+ if \p type is Fl::clipboard_image, Fl::event_clipboard() returns a pointer to the
+ image data, as an Fl_Image *.
The receiver
should be prepared to be called \e directly by this, or for
it to happen \e later, or possibly <i>not at all</i>. This
@@ -743,8 +840,59 @@ public:
The selection buffer is used for middle-mouse pastes and for
drag-and-drop selections. The clipboard is used for traditional
copy/cut/paste operations.
+
+ \par Platform details for image data:
+ \li Unix/Linux platform: Image data in PNG or BMP formats are recognized. Requires linking with the fltk_images library.
+ \li MSWindows platform: Both bitmap and vectorial (Enhanced metafile) data from clipboard
+ can be pasted as image data.
+ \li Mac OS X platform: Both bitmap (TIFF) and vectorial (PDF) data from clipboard
+ can be pasted as image data.
+
+ */
+#if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN)
+ static void paste(Fl_Widget &receiver, int source, const char *type = Fl::clipboard_plain_text); // platform dependent
+#else
+ static void paste(Fl_Widget &receiver, int source, const char *type);
+ static void paste(Fl_Widget &receiver, int source /*=0*/);
+#endif
+ /**
+ FLTK will call the registered callback whenever there is a change to the
+ selection buffer or the clipboard. The source argument indicates which
+ of the two has changed. Only changes by other applications are reported.
+
+ Example:
+ \code
+ void clip_callback(int source, void *data) {
+ if ( source == 0 ) printf("CLIP CALLBACK: selection buffer changed\n");
+ if ( source == 1 ) printf("CLIP CALLBACK: clipboard changed\n");
+ }
+ [..]
+ int main() {
+ [..]
+ Fl::add_clipboard_notify(clip_callback);
+ [..]
+ }
+ \endcode
+ \note Some systems require polling to monitor the clipboard and may
+ therefore have some delay in detecting changes.
*/
- static void paste(Fl_Widget &receiver, int source /*=0*/); // platform dependent
+ static void add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data = 0);
+ /**
+ Stop calling the specified callback when there are changes to the selection
+ buffer or the clipboard.
+ */
+ static void remove_clipboard_notify(Fl_Clipboard_Notify_Handler h);
+ /** Returns non 0 if the clipboard contains data matching \p type.
+ \p type can be Fl::clipboard_plain_text or Fl::clipboard_image.
+ */
+ static int clipboard_contains(const char *type);
+ /** Denotes plain textual data
+ */
+ static char const * const clipboard_plain_text;
+ /** Denotes image data
+ */
+ static char const * const clipboard_image;
+
/**
Initiate a Drag And Drop operation. The selection buffer should be
filled with relevant data before calling this method. FLTK will
@@ -792,6 +940,8 @@ public:
static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
static void screen_xywh(int &X, int &Y, int &W, int &H, int n);
static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
+ static int screen_num(int x, int y);
+ static int screen_num(int x, int y, int w, int h);
static void screen_dpi(float &h, float &v, int n=0);
static void screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my);
static void screen_work_area(int &X, int &Y, int &W, int &H, int n);
@@ -1186,5 +1336,5 @@ public:
#endif // !Fl_H
//
-// End of "$Id: Fl.H 9701 2012-10-18 12:56:31Z manolo $".
+// End of "$Id: Fl.H 10419 2014-10-30 16:05:22Z AlbrechtS $".
//
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H
index 3182910..59ef384 100644
--- a/FL/Fl_Bitmap.H
+++ b/FL/Fl_Bitmap.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Bitmap.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Bitmap.H 10110 2014-02-22 14:51:50Z manolo $"
//
// Bitmap header file for the Fast Light Tool Kit (FLTK).
//
@@ -33,6 +33,7 @@ struct Fl_Menu_Item;
class FL_EXPORT Fl_Bitmap : public Fl_Image {
friend class Fl_Quartz_Graphics_Driver;
friend class Fl_GDI_Graphics_Driver;
+ friend class Fl_GDI_Printer_Graphics_Driver;
friend class Fl_Xlib_Graphics_Driver;
public:
@@ -42,7 +43,8 @@ public:
int alloc_array;
private:
-
+ int start(int XP, int YP, int WP, int HP, int &cx, int &cy,
+ int &X, int &Y, int &W, int &H);
#if defined(__APPLE__) || defined(WIN32)
/** for internal use */
void *id_;
@@ -72,5 +74,5 @@ public:
#endif
//
-// End of "$Id: Fl_Bitmap.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Bitmap.H 10110 2014-02-22 14:51:50Z manolo $".
//
diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H
index 0e7ac49..62fae70 100644
--- a/FL/Fl_Browser_.H
+++ b/FL/Fl_Browser_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Browser_.H 9126 2011-10-04 13:10:55Z manolo $"
+// "$Id: Fl_Browser_.H 9846 2013-03-23 21:24:18Z greg.ercolano $"
//
// Common browser header file for the Fast Light Tool Kit (FLTK).
//
@@ -54,6 +54,25 @@
useful if actually figuring out the size of an object requires
accessing image data or doing stat() on a file or doing some
other slow operation.
+
+ Keyboard navigation of browser items
+ ------------------------------------
+ The keyboard navigation of browser items is only possible if
+ visible_focus() is enabled. If disabled, the widget rejects keyboard focus;
+ Tab and Shift-Tab focus navigation will skip the widget.
+
+ In 'Select' and 'Normal' mode, the widget rejects keyboard focus;
+ no navigation keys are supported (other than scrollbar positioning).
+
+ In 'Hold' mode, the widget accepts keyboard focus, and Up/Down arrow
+ keys can navigate the selected item.
+
+ In 'Multi' mode, the widget accepts keyboard focus, and Up/Down arrow
+ keys navigate the focus box; Space toggles the current item's selection,
+ Enter selects only the current item (deselects all others). If Shift
+ (or Ctrl) is combined with Up/Down arrow keys, the current item's
+ selection state is extended to the next item. In this way one can
+ extend a selection or de-selection.
*/
class FL_EXPORT Fl_Browser_ : public Fl_Group {
int position_; // where user wants it scrolled to
@@ -365,5 +384,5 @@ public:
#endif
//
-// End of "$Id: Fl_Browser_.H 9126 2011-10-04 13:10:55Z manolo $".
+// End of "$Id: Fl_Browser_.H 9846 2013-03-23 21:24:18Z greg.ercolano $".
//
diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H
index d923f98..d0d0795 100644
--- a/FL/Fl_Button.H
+++ b/FL/Fl_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Button.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -27,7 +27,7 @@
#endif
// values for type()
-#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
+#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
reverts back to 0 when the button is released */
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
@@ -42,7 +42,7 @@ class Fl_Widget_Tracker;
/**
\class Fl_Button
\brief Buttons generate callbacks when they are clicked by the user.
-
+
You control exactly when and how by changing the values for type() and
when(). Buttons can also generate callbacks in response to \c FL_SHORTCUT
events. The button can either have an explicit shortcut(int s) value or a
@@ -72,6 +72,7 @@ class Fl_Widget_Tracker;
(when the user pushes and releases the button, and as the mouse is
dragged around in and out of the button).
*/
+
class FL_EXPORT Fl_Button : public Fl_Widget {
int shortcut_;
@@ -84,7 +85,7 @@ protected:
static Fl_Widget_Tracker *key_release_tracker;
static void key_release_timeout(void*);
void simulate_key_action();
-
+
virtual void draw();
public:
@@ -150,6 +151,10 @@ public:
/**
Sets the down box type. The default value of 0 causes FLTK to figure out
the correct matching down version of box().
+
+ Some derived classes (e.g. Fl_Round_Button and Fl_Light_Button use
+ down_box() for special purposes. See docs of these classes.
+
\param[in] b down box type
*/
void down_box(Fl_Boxtype b) {down_box_ = b;}
@@ -167,5 +172,5 @@ public:
#endif
//
-// End of "$Id: Fl_Button.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Check_Button.H b/FL/Fl_Check_Button.H
index 9b8733a..9b082f2 100644
--- a/FL/Fl_Check_Button.H
+++ b/FL/Fl_Check_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Check_Button.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Check_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Check button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -16,29 +16,17 @@
// http://www.fltk.org/str.php
//
-/* \file
- Fl_Check_Button widget . */
-
#ifndef Fl_Check_Button_H
#define Fl_Check_Button_H
#include "Fl_Light_Button.H"
-/**
- \class Fl_Check_Button
- \brief A button with an "checkmark" to show its status.
+/*
+ class: Fl_Check_Button.
- \image html Fl_Check_Button.png
- \image latex Fl_Check_Button.png "Fl_Check_Button" width=4cm
- Buttons generate callbacks when they are clicked by the user. You control
- exactly when and how by changing the values for type() and when().
+ A button with a "checkmark" to show its status.
+*/
- The Fl_Check_Button subclass displays its "ON" state by showing a "checkmark"
- rather than drawing itself pushed in.
-
- \todo Refactor Fl_Check_Button doxygen comments (add color() info etc?)
- \todo Generate Fl_Check_Button.gif with visible checkmark.
- */
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);
@@ -47,5 +35,5 @@ public:
#endif
//
-// End of "$Id: Fl_Check_Button.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Check_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Copy_Surface.H b/FL/Fl_Copy_Surface.H
new file mode 100644
index 0000000..dd55e89
--- /dev/null
+++ b/FL/Fl_Copy_Surface.H
@@ -0,0 +1,135 @@
+//
+// "$Id: Fl_Copy_Surface.H 10406 2014-10-29 19:57:42Z cand $"
+//
+// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#ifndef Fl_Copy_Surface_H
+#define Fl_Copy_Surface_H
+
+#include <FL/Fl_Paged_Device.H>
+#include <FL/Fl_Printer.H>
+
+#if defined(__APPLE__)
+#include <ApplicationServices/ApplicationServices.h>
+#endif
+
+/** Supports copying of graphical data to the clipboard.
+
+ <br> After creation of an Fl_Copy_Surface object, call set_current() on it, and all subsequent graphics requests
+ will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw()
+ ) or to use any of the \ref fl_drawings or the \ref fl_attributes.
+ Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data.
+ <br> Fl_GL_Window 's can be copied to the clipboard as well.
+ <br> Usage example:
+ \code
+ Fl_Widget *g = ...; // a widget you want to copy to the clipboard
+ Fl_Copy_Surface *copy_surf = new Fl_Copy_Surface(g->w(), g->h()); // create an Fl_Copy_Surface object
+ copy_surf->set_current(); // direct graphics requests to the clipboard
+ fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background
+ copy_surf->draw(g); // draw the g widget in the clipboard
+ delete copy_surf; // after this, the clipboard is loaded
+ Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display
+ \endcode
+ Platform details:
+ \li MSWindows: Transparent RGB images copy without transparency.
+ The graphical data is copied to the clipboard as an 'enhanced metafile'.
+ \li Mac OS: The graphical data is copied to the clipboard (a.k.a. pasteboard) in 2 'flavors':
+ 1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image (or PICT for Mac OS 10.3).
+ Applications to which the clipboard content is pasted can use the flavor that suits them best.
+ \li X11: the graphical data is copied to the clipboard as an image in BMP format.
+*/
+class FL_EXPORT Fl_Copy_Surface : public Fl_Surface_Device {
+private:
+ int width;
+ int height;
+ Fl_Paged_Device *helper;
+#ifdef __APPLE__
+ CFMutableDataRef pdfdata;
+ CGContextRef oldgc;
+ CGContextRef gc;
+ void prepare_copy_pdf_and_tiff(int w, int h);
+ void complete_copy_pdf_and_tiff();
+ void init_PDF_context(int w, int h);
+ static size_t MyPutBytes(void* info, const void* buffer, size_t count);
+#elif defined(WIN32)
+ HDC oldgc;
+ HDC gc;
+#else // Xlib
+ Fl_Offscreen xid;
+ Window oldwindow;
+ Fl_Surface_Device *_ss;
+#endif
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_Copy_Surface(int w, int h);
+ ~Fl_Copy_Surface();
+ void set_current();
+ void draw(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
+};
+
+#if defined(__APPLE__)
+
+/* Mac class to reimplement Fl_Paged_Device::printable_rect() */
+class FL_EXPORT Fl_Quartz_Surface_ : public Fl_System_Printer {
+protected:
+ int width;
+ int height;
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_Quartz_Surface_(int w, int h);
+ virtual int printable_rect(int *w, int *h);
+ virtual ~Fl_Quartz_Surface_() {};
+};
+
+#elif defined(WIN32)
+
+/* Win class to implement translate()/untranslate() */
+class FL_EXPORT Fl_GDI_Surface_ : public Fl_Paged_Device {
+ int width;
+ int height;
+ unsigned depth;
+ POINT origins[10];
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_GDI_Surface_();
+ virtual void translate(int x, int y);
+ virtual void untranslate();
+ virtual ~Fl_GDI_Surface_();
+};
+
+#elif !defined(FL_DOXYGEN)
+
+/* Xlib class to implement translate()/untranslate() */
+class FL_EXPORT Fl_Xlib_Surface_ : public Fl_Paged_Device {
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_Xlib_Surface_();
+ virtual void translate(int x, int y);
+ virtual void untranslate();
+ virtual ~Fl_Xlib_Surface_();
+};
+
+#endif
+
+#endif // Fl_Copy_Surface_H
+
+//
+// End of "$Id: Fl_Copy_Surface.H 10406 2014-10-29 19:57:42Z cand $".
+//
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 40a90f9..a047a3c 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Device.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Device.H 10409 2014-10-29 20:11:02Z cand $"
//
// Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device
// for the Fast Light Tool Kit (FLTK).
@@ -482,6 +482,7 @@ public:
static const char *class_id;
const char *class_name() {return class_id;};
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy);
+ void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy);
};
#endif
#if !(defined(__APPLE__) || defined(WIN32))
@@ -490,7 +491,7 @@ public:
*
This class is implemented only on the Xlib platform.
*/
-class Fl_Xlib_Graphics_Driver : public Fl_Graphics_Driver {
+class FL_EXPORT Fl_Xlib_Graphics_Driver : public Fl_Graphics_Driver {
public:
static const char *class_id;
const char *class_name() {return class_id;};
@@ -579,5 +580,5 @@ public:
#endif // Fl_Device_H
//
-// End of "$Id: Fl_Device.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Device.H 10409 2014-10-29 20:11:02Z cand $".
//
diff --git a/FL/Fl_Export.H b/FL/Fl_Export.H
index 662ed42..6428249 100644
--- a/FL/Fl_Export.H
+++ b/FL/Fl_Export.H
@@ -1,5 +1,5 @@
/*
- * "$Id: Fl_Export.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+ * "$Id: Fl_Export.H 10236 2014-08-21 12:29:48Z cand $"
*
* WIN32 DLL export .
*
@@ -29,6 +29,8 @@
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
+# elif __GNUC__ >= 4
+# define FL_EXPORT __attribute__ ((visibility ("default")))
# else
# define FL_EXPORT
# endif /* FL_DLL */
@@ -36,5 +38,5 @@
#endif /* !Fl_Export_H */
/*
- * End of "$Id: Fl_Export.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+ * End of "$Id: Fl_Export.H 10236 2014-08-21 12:29:48Z cand $".
*/
diff --git a/FL/Fl_File_Chooser.H b/FL/Fl_File_Chooser.H
index 277e10b..2716d3e 100644
--- a/FL/Fl_File_Chooser.H
+++ b/FL/Fl_File_Chooser.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_File_Chooser.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_File_Chooser.H 10357 2014-10-05 11:28:29Z AlbrechtS $"
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2011 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -15,8 +15,15 @@
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_File_Chooser.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef Fl_File_Chooser_H
#define Fl_File_Chooser_H
@@ -62,62 +69,62 @@ 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*);
+ inline 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*);
+ inline 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*);
+ inline 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*);
+ inline void cb_newButton_i(Fl_Button*, void*);
static void cb_newButton(Fl_Button*, void*);
- void cb__i(Fl_Tile*, void*);
+ inline void cb__i(Fl_Tile*, void*);
static void cb_(Fl_Tile*, void*);
Fl_File_Browser *fileList;
- void cb_fileList_i(Fl_File_Browser*, void*);
+ inline 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*);
+ inline void cb_previewButton_i(Fl_Check_Button*, void*);
static void cb_previewButton(Fl_Check_Button*, void*);
public:
Fl_Check_Button *showHiddenButton;
private:
- void cb_showHiddenButton_i(Fl_Check_Button*, void*);
+ inline void cb_showHiddenButton_i(Fl_Check_Button*, void*);
static void cb_showHiddenButton(Fl_Check_Button*, void*);
Fl_File_Input *fileName;
- void cb_fileName_i(Fl_File_Input*, void*);
+ inline 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*);
+ inline 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*);
+ inline 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*);
+ inline 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*);
+ inline void cb_favUpButton_i(Fl_Button*, void*);
static void cb_favUpButton(Fl_Button*, void*);
Fl_Button *favDeleteButton;
- void cb_favDeleteButton_i(Fl_Button*, void*);
+ inline void cb_favDeleteButton_i(Fl_Button*, void*);
static void cb_favDeleteButton(Fl_Button*, void*);
Fl_Button *favDownButton;
- void cb_favDownButton_i(Fl_Button*, void*);
+ inline void cb_favDownButton_i(Fl_Button*, void*);
static void cb_favDownButton(Fl_Button*, void*);
Fl_Button *favCancelButton;
- void cb_favCancelButton_i(Fl_Button*, void*);
+ inline 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*);
+ inline void cb_favOkButton_i(Fl_Return_Button*, void*);
static void cb_favOkButton(Fl_Return_Button*, void*);
public:
~Fl_File_Chooser();
@@ -234,5 +241,5 @@ FL_EXPORT void fl_file_chooser_ok_label(const char*l);
#endif
//
-// End of "$Id: Fl_File_Chooser.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_File_Chooser.H 10357 2014-10-05 11:28:29Z AlbrechtS $".
//
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H
index df044cc..56967fd 100644
--- a/FL/Fl_Gl_Window.H
+++ b/FL/Fl_Gl_Window.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Gl_Window.H 10063 2014-01-16 15:38:06Z manolo $"
//
// OpenGL header file for the Fast Light Tool Kit (FLTK).
//
@@ -70,6 +70,7 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window {
static int can_do(int, const int *);
int mode(int, const int *);
+ static int gl_plugin_linkage();
public:
@@ -227,5 +228,5 @@ protected:
#endif
//
-// End of "$Id: Fl_Gl_Window.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Gl_Window.H 10063 2014-01-16 15:38:06Z manolo $".
//
diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H
index 8c7239b..4aa11eb 100644
--- a/FL/Fl_Group.H
+++ b/FL/Fl_Group.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Group.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Group.H 10261 2014-08-29 12:10:11Z cand $"
//
// Group header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,8 +30,13 @@
The Fl_Group class is the FLTK container widget. It maintains
an array of child widgets. These children can themselves be any widget
including Fl_Group. The most important subclass of Fl_Group
- is Fl_Window, however groups can also be used to control radio buttons
+ is Fl_Window, however groups can also be used to control radio buttons
or to enforce resize behavior.
+
+ The tab and arrow keys are used to move the focus between widgets of
+ this group, and to other groups. The only modifier grabbed is shift
+ (for shift-tab), so that ctrl-tab, alt-up, and such are free
+ for the app to use as shortcuts.
*/
class FL_EXPORT Fl_Group : public Fl_Widget {
@@ -217,5 +222,5 @@ public:
#endif
//
-// End of "$Id: Fl_Group.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Group.H 10261 2014-08-29 12:10:11Z cand $".
//
diff --git a/FL/Fl_Help_Dialog.H b/FL/Fl_Help_Dialog.H
index 7c97a58..fd3aed8 100644
--- a/FL/Fl_Help_Dialog.H
+++ b/FL/Fl_Help_Dialog.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Help_Dialog.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Help_Dialog.H 10357 2014-10-05 11:28:29Z AlbrechtS $"
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -15,11 +15,15 @@
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_Help_Dialog.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
-/* \file
- Fl_Help_Dialog widget . */
-
-// generated by Fast Light User Interface Designer (fluid) version 1.0108
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef Fl_Help_Dialog_H
#define Fl_Help_Dialog_H
@@ -34,30 +38,30 @@
class FL_EXPORT Fl_Help_Dialog {
int index_;
int max_;
- int line_[100]; // FIXME: we must remove those static numbers
- char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers
+ int line_[100]; // FIXME: we must remove those static numbers
+ char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers
int find_pos_;
public:
Fl_Help_Dialog();
private:
Fl_Double_Window *window_;
Fl_Button *back_;
- void cb_back__i(Fl_Button*, void*);
+ inline void cb_back__i(Fl_Button*, void*);
static void cb_back_(Fl_Button*, void*);
Fl_Button *forward_;
- void cb_forward__i(Fl_Button*, void*);
+ inline void cb_forward__i(Fl_Button*, void*);
static void cb_forward_(Fl_Button*, void*);
Fl_Button *smaller_;
- void cb_smaller__i(Fl_Button*, void*);
+ inline void cb_smaller__i(Fl_Button*, void*);
static void cb_smaller_(Fl_Button*, void*);
Fl_Button *larger_;
- void cb_larger__i(Fl_Button*, void*);
+ inline void cb_larger__i(Fl_Button*, void*);
static void cb_larger_(Fl_Button*, void*);
Fl_Input *find_;
- void cb_find__i(Fl_Input*, void*);
+ inline 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*);
+ inline void cb_view__i(Fl_Help_View*, void*);
static void cb_view_(Fl_Help_View*, void*);
public:
~Fl_Help_Dialog();
@@ -82,5 +86,5 @@ public:
#endif
//
-// End of "$Id: Fl_Help_Dialog.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Help_Dialog.H 10357 2014-10-05 11:28:29Z AlbrechtS $".
//
diff --git a/FL/Fl_Help_View.H b/FL/Fl_Help_View.H
index 0228a61..ccb7e16 100644
--- a/FL/Fl_Help_View.H
+++ b/FL/Fl_Help_View.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Help_View.H 9126 2011-10-04 13:10:55Z manolo $"
+// "$Id: Fl_Help_View.H 10039 2013-12-30 14:18:18Z AlbrechtS $"
//
// Help Viewer widget definitions.
//
@@ -260,7 +260,13 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
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);
+#if FLTK_ABI_VERSION >= 10303
+protected:
+#endif
void draw();
+#if FLTK_ABI_VERSION >= 10303
+private:
+#endif
void format();
void format_table(int *table_width, int *columns, const char *table);
void free_data();
@@ -269,7 +275,13 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
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);
+#if FLTK_ABI_VERSION >= 10303
+public:
+#endif
int handle(int);
+#if FLTK_ABI_VERSION >= 10303
+private:
+#endif
void hv_draw(const char *t, int x, int y);
char begin_selection();
@@ -383,5 +395,5 @@ public:
#endif // !Fl_Help_View_H
//
-// End of "$Id: Fl_Help_View.H 9126 2011-10-04 13:10:55Z manolo $".
+// End of "$Id: Fl_Help_View.H 10039 2013-12-30 14:18:18Z AlbrechtS $".
//
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 6f0a88b..2544d08 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Image.H 9709 2012-11-09 16:02:08Z manolo $"
+// "$Id: Fl_Image.H 10379 2014-10-14 13:32:59Z AlbrechtS $"
//
// Image header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2011 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,8 +16,8 @@
// http://www.fltk.org/str.php
//
-/* \file
- Fl_Image, Fl_RGB_Image classes . */
+/** \file
+ Fl_Image, Fl_RGB_Image classes. */
#ifndef Fl_Image_H
# define Fl_Image_H
@@ -26,25 +26,35 @@
#include <stdlib.h>
class Fl_Widget;
+class Fl_Pixmap;
struct Fl_Menu_Item;
struct Fl_Label;
+/** \enum Fl_RGB_Scaling
+ The scaling algorithm to use for RGB images.
+*/
+enum Fl_RGB_Scaling {
+ FL_RGB_SCALING_NEAREST = 0, ///< default RGB image scaling algorithm
+ FL_RGB_SCALING_BILINEAR ///< more accurate, but slower RGB image scaling algorithm
+};
+
/**
Fl_Image is the base class used for caching and
drawing all kinds of images in FLTK. This class keeps track of
common image data such as the pixels, colormap, width, height,
and depth. Virtual methods are used to provide type-specific
- image handling.</P>
+ image handling.
- <P>Since the Fl_Image class does not support image
+ Since the Fl_Image class does not support image
drawing by itself, calling the draw() method results in
a box with an X in it being drawn instead.
*/
class FL_EXPORT Fl_Image {
int w_, h_, d_, ld_, count_;
const char * const *data_;
+ static Fl_RGB_Scaling RGB_scaling_;
- // Forbid use of copy contructor and assign operator
+ // Forbid use of copy constructor and assign operator
Fl_Image & operator=(const Fl_Image &);
Fl_Image(const Fl_Image &);
@@ -151,6 +161,12 @@ class FL_EXPORT Fl_Image {
*/
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);} // platform dependent
virtual void uncache();
+
+ // set RGB image scaling method
+ static void RGB_scaling(Fl_RGB_Scaling);
+
+ // get RGB image scaling method
+ static Fl_RGB_Scaling RGB_scaling();
};
/**
@@ -158,9 +174,9 @@ class FL_EXPORT Fl_Image {
of full-color images with 1 to 4 channels of color information.
Images with an even number of channels are assumed to contain
alpha information, which is used to blend the image with the
- contents of the screen.</P>
-
- <P>Fl_RGB_Image is defined in
+ contents of the screen.
+
+ Fl_RGB_Image is defined in
&lt;FL/Fl_Image.H&gt;, however for compatibility reasons
&lt;FL/Fl_RGB_Image.H&gt; should be included.
*/
@@ -203,6 +219,7 @@ public:
*/
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);}
+ Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY);
virtual ~Fl_RGB_Image();
virtual Fl_Image *copy(int W, int H);
Fl_Image *copy() { return copy(w(), h()); }
@@ -233,5 +250,5 @@ public:
#endif // !Fl_Image_H
//
-// End of "$Id: Fl_Image.H 9709 2012-11-09 16:02:08Z manolo $".
+// End of "$Id: Fl_Image.H 10379 2014-10-14 13:32:59Z AlbrechtS $".
//
diff --git a/FL/Fl_Image_Surface.H b/FL/Fl_Image_Surface.H
new file mode 100644
index 0000000..be505b5
--- /dev/null
+++ b/FL/Fl_Image_Surface.H
@@ -0,0 +1,90 @@
+//
+// "$Id: Fl_Image_Surface.H 10407 2014-10-29 20:01:44Z cand $"
+//
+// Draw-to-image code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#ifndef Fl_Image_Surface_H
+#define Fl_Image_Surface_H
+
+#include <FL/Fl_Copy_Surface.H>
+#include <FL/Fl_Image.H>
+
+
+/** Directs all graphics requests to an Fl_Image.
+
+ After creation of an Fl_Image_Surface object, call set_current() on it, and all subsequent graphics requests
+ will be recorded in the image. It's possible to draw widgets (using Fl_Image_Surface::draw())
+ or to use any of the \ref fl_drawings or the \ref fl_attributes.
+ Finally, call image() on the object to obtain a newly allocated Fl_RGB_Image object.
+ <br> Fl_GL_Window objects can be drawn in the image as well.
+
+ <br> Usage example:
+ \code
+ Fl_Widget *g = ...; // a widget you want to draw in an image
+ Fl_Image_Surface *img_surf = new Fl_Image_Surface(g->w(), g->h()); // create an Fl_Image_Surface object
+ img_surf->set_current(); // direct graphics requests to the image
+ fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background
+ img_surf->draw(g); // draw the g widget in the image
+ Fl_RGB_Image* image = img_surf->image(); // get the resulting image
+ delete img_surf; // delete the img_surf object
+ Fl_Display_Device::display_device()->set_current(); // direct graphics requests back to the display
+ \endcode
+*/
+class FL_EXPORT Fl_Image_Surface : public Fl_Surface_Device {
+private:
+ Fl_Offscreen offscreen;
+ int width;
+ int height;
+ Fl_Paged_Device *helper;
+#ifdef __APPLE__
+#elif defined(WIN32)
+ HDC _sgc;
+ Window _sw;
+ Fl_Surface_Device *_ss;
+ int _savedc;
+#else
+ Fl_Surface_Device *previous;
+ Window pre_window;
+ GC gc;
+#endif
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_Image_Surface(int w, int h);
+ ~Fl_Image_Surface();
+ void set_current();
+ void draw(Fl_Widget*, int delta_x = 0, int delta_y = 0);
+ Fl_RGB_Image *image();
+};
+
+#ifdef __APPLE__
+/* Mac class to implement translate()/untranslate() for a flipped bitmap graphics context */
+class FL_EXPORT Fl_Quartz_Flipped_Surface_ : public Fl_Quartz_Surface_ {
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_Quartz_Flipped_Surface_(int w, int h);
+ void translate(int x, int y);
+ void untranslate();
+ virtual ~Fl_Quartz_Flipped_Surface_() {};
+};
+#endif
+
+#endif // Fl_Image_Surface_H
+
+//
+// End of "$Id: Fl_Image_Surface.H 10407 2014-10-29 20:01:44Z cand $".
+//
diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H
index 8179cc7..8234881 100644
--- a/FL/Fl_Input_.H
+++ b/FL/Fl_Input_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.H 9196 2011-12-06 16:55:51Z AlbrechtS $"
+// "$Id: Fl_Input_.H 10134 2014-04-29 02:56:34Z greg.ercolano $"
//
// Input base class header file for the Fast Light Tool Kit (FLTK).
//
@@ -468,6 +468,8 @@ public:
\param [in] val If \p val is 1, Tab advances focus (default).<BR>
If \p val is 0, Tab inserts a tab character (old FLTK behavior).
+
+ \see tab_nav(), Fl::OPTION_ARROW_FOCUS.
*/
void tab_nav(int val) {
tab_nav_ = val;
@@ -480,7 +482,8 @@ public:
If disabled, hitting Tab inserts a tab character into the text field.
\returns 1 if Tab advances focus (default), 0 if Tab inserts tab characters.
- \see tab_nav(int)
+
+ \see tab_nav(int), Fl::OPTION_ARROW_FOCUS.
*/
int tab_nav() const {
return tab_nav_;
@@ -490,5 +493,5 @@ public:
#endif
//
-// End of "$Id: Fl_Input_.H 9196 2011-12-06 16:55:51Z AlbrechtS $".
+// End of "$Id: Fl_Input_.H 10134 2014-04-29 02:56:34Z greg.ercolano $".
//
diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H
index 10d4111..5e5cd65 100644
--- a/FL/Fl_Menu_Item.H
+++ b/FL/Fl_Menu_Item.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_Item.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Menu_Item.H 10282 2014-09-06 19:03:43Z AlbrechtS $"
//
// Menu item header file for the Fast Light Tool Kit (FLTK).
//
@@ -305,7 +305,13 @@ struct FL_EXPORT Fl_Menu_Item {
radio() false, or by an item with FL_MENU_DIVIDER turned on.
*/
int radio() const {return flags&FL_MENU_RADIO;}
- /** Returns the current value of the check or radio item. */
+ /** Returns the current value of the check or radio item.
+ This is zero (0) if the menu item is not checked and
+ non-zero otherwise. You should not rely on a particular value,
+ only zero or non-zero.
+ \note The returned value for a checked menu item as of FLTK 1.3.2
+ is FL_MENU_VALUE (4), but may be 1 in a future version.
+ */
int value() const {return flags&FL_MENU_VALUE;}
/**
Turns the check or radio item "on" for the menu item. Note that this
@@ -430,5 +436,5 @@ enum { // back-compatibility enum:
#endif
//
-// End of "$Id: Fl_Menu_Item.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Menu_Item.H 10282 2014-09-06 19:03:43Z AlbrechtS $".
//
diff --git a/FL/Fl_Multiline_Input.H b/FL/Fl_Multiline_Input.H
index fe6cac7..293d274 100644
--- a/FL/Fl_Multiline_Input.H
+++ b/FL/Fl_Multiline_Input.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Multiline_Input.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Multiline_Input.H 10365 2014-10-09 11:45:02Z AlbrechtS $"
//
// Multiline input header file for the Fast Light Tool Kit (FLTK).
//
@@ -25,7 +25,7 @@
#include "Fl_Input.H"
/**
- This input field displays '\n' characters as new lines rather than ^J,
+ This input field displays '\\n' characters as new lines rather than ^J,
and accepts the Return, Tab, and up and down arrow keys. This is for
editing multiline text.
@@ -56,5 +56,5 @@ public:
#endif
//
-// End of "$Id: Fl_Multiline_Input.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Multiline_Input.H 10365 2014-10-09 11:45:02Z AlbrechtS $".
//
diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H
index f4d120e..6d65efd 100644
--- a/FL/Fl_Native_File_Chooser.H
+++ b/FL/Fl_Native_File_Chooser.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Native_File_Chooser.H 9704 2012-10-19 11:23:51Z manolo $"
+// "$Id: Fl_Native_File_Chooser.H 10408 2014-10-29 20:05:05Z cand $"
//
// FLTK native OS file chooser widget
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
// Copyright 2004 Greg Ercolano.
//
// This library is free software. Distribution and use rights are outlined in
@@ -23,32 +23,31 @@
#ifndef FL_NATIVE_FILE_CHOOSER_H
#define FL_NATIVE_FILE_CHOOSER_H
-/* \file
- Fl_Native_File_Chooser widget. */
-
// Use Windows' chooser
#ifdef WIN32
// #define _WIN32_WINNT 0x0501 // needed for OPENFILENAME's 'FlagsEx'
-#include <stdio.h>
-#include <stdlib.h> // malloc
-#include <windows.h>
-#include <commdlg.h> // OPENFILENAME, GetOpenFileName()
-#include <shlobj.h> // BROWSEINFO, SHBrowseForFolder()
+# include <stdio.h>
+# include <stdlib.h> // malloc
+# include <windows.h>
+# include <commdlg.h> // OPENFILENAME, GetOpenFileName()
+# include <shlobj.h> // BROWSEINFO, SHBrowseForFolder()
#endif
// Use Apple's chooser
#ifdef __APPLE__
-#define MAXFILTERS 80
+# define MAXFILTERS 80
#endif
// All else falls back to FLTK's own chooser
#if ! defined(__APPLE__) && !defined(WIN32)
-#include <FL/Fl_File_Chooser.H>
-#include <unistd.h> // _POSIX_NAME_MAX
+# include <FL/Fl_File_Chooser.H>
+# include <unistd.h> // _POSIX_NAME_MAX
#else
-#include <FL/filename.H> // FL_EXPORT
+# include <FL/filename.H> // FL_EXPORT
#endif
+class Fl_FLTK_File_Chooser;
+class Fl_GTK_File_Chooser;
/**
This class lets an FLTK application easily and consistently access
@@ -91,7 +90,10 @@
<B>Platform Specific Caveats</B>
- - Under X windows, it's best if you call Fl_File_Icon::load_system_icons()
+ - Under X windows, and if Fl::OPTION_FNFC_USES_GTK has not been switched off,
+ the widget attempts to use standard GTK file chooser dialogs if they are
+ available at run-time on the platform, and falls back to use FLTK's Fl_File_Chooser if they are not.
+ In the latter case, it's best if you call Fl_File_Icon::load_system_icons()
at the start of main(), to enable the nicer looking file browser widgets.
Use the static public attributes of class Fl_File_Chooser to localize
the browser.
@@ -114,9 +116,10 @@ public:
};
enum Option {
NO_OPTIONS = 0x0000, ///< no options enabled
- SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog (if supported)
+ SAVEAS_CONFIRM = 0x0001, ///< Show native 'Save As' overwrite confirm dialog
NEW_FOLDER = 0x0002, ///< Show 'New Folder' icon (if supported)
- PREVIEW = 0x0004 ///< enable preview mode
+ PREVIEW = 0x0004, ///< enable preview mode (if supported)
+ USE_FILTER_EXT = 0x0008 ///< Chooser filter pilots the output file extension (if supported)
};
/** Localizable message */
static const char *file_exists_message;
@@ -126,33 +129,33 @@ public:
~Fl_Native_File_Chooser();
// Public methods
- void type(int);
- int type() const;
- void options(int);
+ void type(int t);
+ int type() const ;
+ void options(int o);
int options() const;
int count() const;
- const char *filename() const;
- const char *filename(int i) const;
- void directory(const char *val);
+ const char *filename() const ;
+ const char *filename(int i) const ;
+ void directory(const char *val) ;
const char *directory() const;
- void title(const char *);
+ void title(const char *t);
const char* title() const;
- const char *filter() const;
- void filter(const char *);
- int filters() const;
- void filter_value(int i);
- int filter_value() const;
- void preset_file(const char*);
+ const char *filter() const ;
+ void filter(const char *f);
+ int filters() const ;
+ void filter_value(int i) ;
+ int filter_value() const ;
+ void preset_file(const char*f) ;
const char* preset_file() const;
- const char *errmsg() const;
- int show();
+ const char *errmsg() const ;
+ int show() ;
#ifdef WIN32
private:
int _btype; // kind-of browser to show()
int _options; // general options
OPENFILENAMEW _ofn; // GetOpenFileName() & GetSaveFileName() struct
- BROWSEINFO _binf; // SHBrowseForFolder() struct
+ BROWSEINFOW _binf; // SHBrowseForFolder() struct
char **_pathnames; // array of pathnames
int _tpathnames; // total pathnames
char *_directory; // default pathname to use
@@ -196,10 +199,10 @@ private:
char *_preset_file; // the 'save as' filename
char *_filter; // user-side search filter, eg:
- // C Files\t*.[ch]\nText Files\t*.txt"
+ // C Files\t*.[ch]\nText Files\t*.txt"
char *_filt_names; // filter names (tab delimited)
- // eg. "C Files\tText Files"
+ // eg. "C Files\tText Files"
char *_filt_patt[MAXFILTERS];
// array of filter patterns, eg:
@@ -224,6 +227,7 @@ private:
#if ! defined(__APPLE__) && !defined(WIN32)
private:
+#if FLTK_ABI_VERSION <= 10302
int _btype; // kind-of browser to show()
int _options; // general options
int _nfilters;
@@ -234,20 +238,103 @@ private:
char *_prevvalue; // Returned filename
char *_directory;
char *_errmsg; // error message
- Fl_File_Chooser *_file_chooser;
-
- // Private methods
+#endif
+ static int have_looked_for_GTK_libs;
+ union {
+ Fl_FLTK_File_Chooser *_x11_file_chooser;
+ Fl_GTK_File_Chooser *_gtk_file_chooser;
+ };
+#endif
+};
+
+#if !defined(__APPLE__) && !defined(WIN32)
+class FL_EXPORT Fl_FLTK_File_Chooser {
+ friend class Fl_Native_File_Chooser;
+protected:
+ int _btype; // kind-of browser to show()
+ int _options; // general options
+ int _nfilters;
+ char *_filter; // user supplied filter
+ char *_parsedfilt; // parsed filter
+ int _filtvalue; // selected filter
+ char *_preset_file;
+ char *_prevvalue; // Returned filename
+ char *_directory;
+ char *_errmsg; // error message
+ Fl_FLTK_File_Chooser(int val);
+ virtual ~Fl_FLTK_File_Chooser();
void errmsg(const char *msg);
int type_fl_file(int);
void parse_filter();
- void keeplocation();
int exist_dialog();
-#endif
+ Fl_File_Chooser *_file_chooser;
+ virtual void type(int);
+ int type() const;
+ void options(int);
+ int options() const;
+ virtual int count() const;
+ virtual const char *filename() const;
+ virtual const char *filename(int i) const;
+ void directory(const char *val);
+ const char *directory() const;
+ virtual void title(const char *);
+ virtual const char* title() const;
+ const char *filter() const;
+ void filter(const char *);
+ int filters() const;
+ void filter_value(int i);
+ int filter_value() const;
+ void preset_file(const char*);
+ const char* preset_file() const;
+ const char *errmsg() const;
+ virtual int show();
};
+class FL_EXPORT Fl_GTK_File_Chooser : public Fl_FLTK_File_Chooser {
+ friend class Fl_Native_File_Chooser;
+private:
+ typedef struct _GtkWidget GtkWidget;
+ typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
+ struct pair {
+ Fl_GTK_File_Chooser* running; // the running Fl_GTK_File_Chooser
+ const char *filter; // a filter string of the chooser
+ pair(Fl_GTK_File_Chooser* c, const char *f) {
+ running = c;
+ filter = strdup(f);
+ };
+ ~pair() {
+ free((char*)filter);
+ };
+ };
+ GtkWidget *gtkw_ptr; // used to hold a GtkWidget* without pulling GTK into everything...
+ void *gtkw_slist; // used to hold a GLib GSList...
+ unsigned gtkw_count; // number of files read back - if any
+ mutable char *gtkw_filename; // last name we read back
+ char *gtkw_title; // the title to be applied to the dialog
+ const char *previous_filter;
+
+ int fl_gtk_chooser_wrapper(); // method that wraps the GTK widget
+ Fl_GTK_File_Chooser(int val);
+ virtual ~Fl_GTK_File_Chooser();
+ static int did_find_GTK_libs;
+ static void probe_for_GTK_libs(void);
+ virtual void type(int);
+ virtual int count() const;
+ virtual const char *filename() const;
+ virtual const char *filename(int i) const;
+ virtual void title(const char *);
+ virtual const char* title() const;
+ virtual int show();
+ void changed_output_type(const char *filter);
+
+ static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_GTK_File_Chooser::pair*);
+ static void free_pair(pair *p);
+};
+#endif // !defined(__APPLE__) && !defined(WIN32)
+
#endif /*FL_NATIVE_FILE_CHOOSER_H*/
//
-// End of "$Id: Fl_Native_File_Chooser.H 9704 2012-10-19 11:23:51Z manolo $".
+// End of "$Id: Fl_Native_File_Chooser.H 10408 2014-10-29 20:05:05Z cand $".
//
diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H
index 8762bf3..f2d2807 100644
--- a/FL/Fl_PostScript.H
+++ b/FL/Fl_PostScript.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_PostScript.H 9683 2012-09-20 11:23:38Z manolo $"
+// "$Id: Fl_PostScript.H 10308 2014-09-13 17:51:20Z manolo $"
//
// Support for graphics output to PostScript file for the Fast Light Tool Kit (FLTK).
//
@@ -25,6 +25,7 @@
#include <FL/Fl_Paged_Device.H>
#include <FL/fl_draw.H>
+#include <stdarg.h>
/**
\brief PostScript graphical backend.
@@ -52,8 +53,14 @@
<br> All other unicode characters or all other fonts (FL_FREE_FONT and above) are output as a bitmap.
<br> FLTK standard fonts are output using the corresponding PostScript standard fonts.
*/
+
+/** Signature of Fl_PostScript::close_command() functions passed as parameters. */
+extern "C" {
+ typedef int (Fl_PostScript_Close_Command)(FILE *);
+}
+
class FL_EXPORT Fl_PostScript_Graphics_Driver : public Fl_Graphics_Driver {
-public:
+public:
static const char *class_id;
const char *class_name() {return class_id;};
Fl_PostScript_Graphics_Driver();
@@ -89,7 +96,7 @@ class Clip {
int mx; // width of mask;
int my; // mask lines
//Fl_Color bg_;
- int (*close_cmd_)(FILE *);
+ Fl_PostScript_Close_Command* close_cmd_;
int page_policy_;
int nPages;
int orientation_;
@@ -116,7 +123,7 @@ class Clip {
void page_policy(int p);
int page_policy(){return page_policy_;};
- void close_command( int (*cmd)(FILE *)){close_cmd_=cmd;};
+ void close_command(Fl_PostScript_Close_Command* cmd){close_cmd_=cmd;};
FILE * file() {return output;};
//void orientation (int o);
//Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor
@@ -192,12 +199,14 @@ class Clip {
void rtl_draw(const char* s, int n, int x, int y);
void font(int face, int size);
double width(const char *, int);
+ double width(unsigned int u);
void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h);
int height();
int descent();
void draw(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_Bitmap * bitmap,int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_RGB_Image * rgb,int XP, int YP, int WP, int HP, int cx, int cy);
+ int clocale_printf(const char *format, ...);
~Fl_PostScript_Graphics_Driver();
};
@@ -215,7 +224,8 @@ public:
const char *class_name() {return class_id;};
Fl_PostScript_File_Device();
~Fl_PostScript_File_Device();
- int start_job(int pagecount, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4,
+ int start_job(int pagecount, int* from, int* to);
+ int start_job(int pagecount, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4,
enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT);
int start_job(FILE *ps_output, int pagecount, enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4,
enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT);
@@ -240,5 +250,5 @@ public:
#endif // Fl_PostScript_H
//
-// End of "$Id: Fl_PostScript.H 9683 2012-09-20 11:23:38Z manolo $"
+// End of "$Id: Fl_PostScript.H 10308 2014-09-13 17:51:20Z manolo $"
//
diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H
index 86e3545..4ea9880 100644
--- a/FL/Fl_Preferences.H
+++ b/FL/Fl_Preferences.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Preferences.H 9228 2012-01-18 11:39:57Z AlbrechtS $"
+// "$Id: Fl_Preferences.H 9978 2013-09-16 20:25:14Z greg.ercolano $"
//
// Preferences .
//
@@ -185,6 +185,7 @@ private:
static char uuidBuffer[40];
static Fl_Preferences *runtimePrefs;
+public: // older Sun compilers need this (public definition of the following classes)
class RootNode;
class FL_EXPORT Node { // a node contains a list to all its entries
@@ -264,5 +265,5 @@ protected:
#endif // !Fl_Preferences_H
//
-// End of "$Id: Fl_Preferences.H 9228 2012-01-18 11:39:57Z AlbrechtS $".
+// End of "$Id: Fl_Preferences.H 9978 2013-09-16 20:25:14Z greg.ercolano $".
//
diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H
index 3905549..905f2cf 100644
--- a/FL/Fl_Printer.H
+++ b/FL/Fl_Printer.H
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Printer.H 9035 2011-09-14 15:17:32Z manolo $"
+// "$Id: Fl_Printer.H 10393 2014-10-26 15:23:03Z manolo $"
//
// Printing support for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2011 by Bill Spitzak and others.
+// Copyright 2010-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -84,6 +84,9 @@ public:
void untranslate(void);
int end_page (void);
void end_job (void);
+#ifdef __APPLE__
+ void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y);
+#endif
/** \brief The destructor */
~Fl_System_Printer(void);
}; // class Fl_System_Printer
@@ -202,5 +205,5 @@ private:
#endif // Fl_Printer_H
//
-// End of "$Id: Fl_Printer.H 9035 2011-09-14 15:17:32Z manolo $"
+// End of "$Id: Fl_Printer.H 10393 2014-10-26 15:23:03Z manolo $"
//
diff --git a/FL/Fl_Radio_Button.H b/FL/Fl_Radio_Button.H
index 61d666e..50c5955 100644
--- a/FL/Fl_Radio_Button.H
+++ b/FL/Fl_Radio_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Radio_Button.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Radio_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Radio button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -32,5 +32,5 @@ public:
#endif
//
-// End of "$Id: Fl_Radio_Button.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Radio_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Radio_Light_Button.H b/FL/Fl_Radio_Light_Button.H
index 1171212..050a32b 100644
--- a/FL/Fl_Radio_Light_Button.H
+++ b/FL/Fl_Radio_Light_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Radio_Light_Button.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Radio_Light_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Radio light button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -32,5 +32,5 @@ public:
#endif
//
-// End of "$Id: Fl_Radio_Light_Button.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Radio_Light_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Radio_Round_Button.H b/FL/Fl_Radio_Round_Button.H
index c9450c3..8bdc832 100644
--- a/FL/Fl_Radio_Round_Button.H
+++ b/FL/Fl_Radio_Round_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Radio_Round_Button.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Radio_Round_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Radio round button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -32,5 +32,5 @@ public:
#endif
//
-// End of "$Id: Fl_Radio_Round_Button.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Radio_Round_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Round_Button.H b/FL/Fl_Round_Button.H
index bfb044d..9f6f77d 100644
--- a/FL/Fl_Round_Button.H
+++ b/FL/Fl_Round_Button.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Round_Button.H 9031 2011-09-07 12:18:14Z ianmacarthur $"
+// "$Id: Fl_Round_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Round button header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -16,9 +16,6 @@
// http://www.fltk.org/str.php
//
-/* \file
- Fl_Round_Button widget . */
-
#ifndef Fl_Round_Button_H
#define Fl_Round_Button_H
@@ -44,5 +41,5 @@ public:
#endif
//
-// End of "$Id: Fl_Round_Button.H 9031 2011-09-07 12:18:14Z ianmacarthur $".
+// End of "$Id: Fl_Round_Button.H 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/FL/Fl_Scroll.H b/FL/Fl_Scroll.H
index 926a8b2..8c7fe34 100644
--- a/FL/Fl_Scroll.H
+++ b/FL/Fl_Scroll.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Scroll.H 9126 2011-10-04 13:10:55Z manolo $"
+// "$Id: Fl_Scroll.H 10221 2014-07-16 18:51:56Z greg.ercolano $"
//
// Scroll header file for the Fast Light Tool Kit (FLTK).
//
@@ -94,24 +94,43 @@ class FL_EXPORT Fl_Scroll : public Fl_Group {
void fix_scrollbar_order();
static void draw_clip(void*,int,int,int,int);
-private:
-
- //
- // Structure to manage scrollbar and widget interior sizes.
- //
- // Private for now -- we'd like to expose some of this at
- // some point to solve STR#1895.)
- //
+#if FLTK_ABI_VERSION >= 10303
+protected: // NEW (STR#1895)
+#else
+private: // OLD
+#endif
+ /**
+ Structure to manage scrollbar and widget interior sizes.
+ This is filled out by recalc_scrollbars() for use in calculations
+ that need to know the visible scroll area size, etc.
+ \note Availability in FLTK_ABI_VERSION 10303 or higher.
+ */
typedef struct {
- int scrollsize; // the scrollsize (global|local)
- int innerbox_x, innerbox_y, innerbox_w, innerbox_h; // widget's inner box (excludes scrollbars)
- int innerchild_x, innerchild_y, innerchild_w, innerchild_h; // widget's inner box including scrollbars
- int child_l, child_r, child_b, child_t; // child bounding box: left/right/bottom/top
- int hneeded, vneeded; // hor + ver scrollbar visibility
- int hscroll_x, hscroll_y, hscroll_w, hscroll_h; // hor scrollbar size/position
- int vscroll_x, vscroll_y, vscroll_w, vscroll_h; // ver scrollbar size/position
- int hpos, hsize, hfirst, htotal; // hor scrollbar values (pos/size/first/total)
- int vpos, vsize, vfirst, vtotal; // ver scrollbar values (pos/size/first/total)
+ /// A local struct to manage a region defined by xywh
+ typedef struct { int x,y,w,h; } Fl_Region_XYWH;
+ /// A local struct to manage a region defined by left/right/top/bottom
+ typedef struct {
+ int l; ///< (l)eft "x" position, aka x1
+ int r; ///< (r)ight "x" position, aka x2
+ int t; ///< (t)op "y" position, aka y1
+ int b; ///< (b)ottom "y" position, aka y2
+ } Fl_Region_LRTB;
+ /// A local struct to manage a scrollbar's xywh region and tab values
+ typedef struct {
+ int x,y,w,h;
+ int pos; ///< scrollbar tab's "position of first line displayed"
+ int size; ///< scrollbar tab's "size of window in lines"
+ int first; ///< scrollbar tab's "number of first line"
+ int total; ///< scrollbar tab's "total number of lines"
+ } Fl_Scrollbar_Data;
+ int scrollsize; ///< the effective scrollbar thickness (local or global)
+ Fl_Region_XYWH innerbox; ///< widget's inner box, excluding scrollbars
+ Fl_Region_XYWH innerchild; ///< widget's inner box, including scrollbars
+ Fl_Region_LRTB child; ///< child bounding box: left/right/top/bottom
+ int hneeded; ///< horizontal scrollbar visibility
+ int vneeded; ///< vertical scrollbar visibility
+ Fl_Scrollbar_Data hscroll; ///< horizontal scrollbar region + values
+ Fl_Scrollbar_Data vscroll; ///< vertical scrollbar region + values
} ScrollInfo;
void recalc_scrollbars(ScrollInfo &si);
@@ -186,5 +205,5 @@ public:
#endif
//
-// End of "$Id: Fl_Scroll.H 9126 2011-10-04 13:10:55Z manolo $".
+// End of "$Id: Fl_Scroll.H 10221 2014-07-16 18:51:56Z greg.ercolano $".
//
diff --git a/FL/Fl_Secret_Input.H b/FL/Fl_Secret_Input.H
index e981b80..a8b8205 100644
--- a/FL/Fl_Secret_Input.H
+++ b/FL/Fl_Secret_Input.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Secret_Input.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Secret_Input.H 9774 2012-12-24 11:45:07Z manolo $"
//
// Secret input header file for the Fast Light Tool Kit (FLTK).
//
@@ -41,10 +41,11 @@ public:
Inherited destructor destroys the widget and any value associated with it.
*/
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0);
+ int handle(int);
};
#endif
//
-// End of "$Id: Fl_Secret_Input.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Secret_Input.H 9774 2012-12-24 11:45:07Z manolo $".
//
diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H
index 9edd163..01d2f26 100644
--- a/FL/Fl_Spinner.H
+++ b/FL/Fl_Spinner.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Spinner.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Spinner.H 10300 2014-09-12 09:08:41Z AlbrechtS $"
//
// Spinner widget for the Fast Light Tool Kit (FLTK).
//
@@ -43,7 +43,7 @@
\image latex Fl_Spinner.png "Fl_Spinner widget" width=6cm
*/
class FL_EXPORT Fl_Spinner : public Fl_Group {
-
+
double value_; // Current value
double minimum_; // Minimum value
double maximum_; // Maximum value
@@ -92,25 +92,26 @@ private:
sb->update();
}
+ sb->set_changed();
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++; }
+ 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 {
+ } else {
sprintf(s, format_, value_);
- }
+ }
input_.value(s);
}
@@ -171,9 +172,9 @@ private:
H / 2 + 2, H / 2);
}
/**
- Sets or returns the amount to change the value when the user clicks a button.
- Before setting step to a non-integer value, the spinner
- type() should be changed to floating point.
+ Sets or returns the amount to change the value when the user clicks a button.
+ Before setting step to a non-integer value, the spinner
+ type() should be changed to floating point.
*/
double step() const { return (step_); }
/** See double Fl_Spinner::step() const */
@@ -208,29 +209,29 @@ private:
input_.textsize(s);
}
/** Gets the numeric representation in the input field.
- \see Fl_Spinner::type(uchar)
+ \see Fl_Spinner::type(uchar)
*/
uchar type() const { return (input_.type()); }
/** Sets the numeric representation in the input field.
Valid values are FL_INT_INPUT and FL_FLOAT_INPUT.
Also changes the format() template.
Setting a new spinner type via a superclass pointer will not work.
- \note type is not a virtual function.
+ \note type is not a virtual function.
*/
- void type(uchar v) {
- if (v==FL_FLOAT_INPUT) {
- format("%.*f");
- } else {
- format("%.0f");
- }
- input_.type(v);
- }
+ void type(uchar v) {
+ if (v==FL_FLOAT_INPUT) {
+ format("%.*f");
+ } else {
+ format("%.0f");
+ }
+ input_.type(v);
+ }
/** Gets the current value of the widget. */
double value() const { return (value_); }
/**
Sets the current value of the widget.
- Before setting value to a non-integer value, the spinner
- type() should be changed to floating point.
+ Before setting value to a non-integer value, the spinner
+ type() should be changed to floating point.
*/
void value(double v) { value_ = v; update(); }
/**
@@ -241,10 +242,18 @@ private:
Return the background color of the spinner widget's input field.
*/
Fl_Color color() const { return(input_.color()); }
+ /**
+ Change the selection color of the spinner widget's input field.
+ */
+ void selection_color(Fl_Color val) { input_.selection_color(val); }
+ /**
+ Return the selection color of the spinner widget's input field.
+ */
+ Fl_Color selection_color() const { return input_.selection_color(); }
};
#endif // !Fl_Spinner_H
//
-// End of "$Id: Fl_Spinner.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Spinner.H 10300 2014-09-12 09:08:41Z AlbrechtS $".
//
diff --git a/FL/Fl_Sys_Menu_Bar.H b/FL/Fl_Sys_Menu_Bar.H
index 2510923..f9eb9d4 100644
--- a/FL/Fl_Sys_Menu_Bar.H
+++ b/FL/Fl_Sys_Menu_Bar.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Sys_Menu_Bar.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Sys_Menu_Bar.H 10102 2014-02-11 17:59:20Z manolo $"
//
// MacOS system menu bar header file for the Fast Light Tool Kit (FLTK).
//
@@ -25,37 +25,70 @@
#if defined(__APPLE__) || defined(FL_DOXYGEN)
/**
- @brief A class to create, modify and delete menus that appear on Mac OS X in the menu bar at the top of the screen.
- *
- * On other than Mac OS X platforms, Fl_Sys_Menu_Bar is a synonym of class Fl_Menu_Bar.
- *
- * You can configure a callback for the 'About' menu item to invoke your own code with fl_mac_set_about().
- *
+ A class to create, modify and delete menus that appear on Mac OS X in the menu bar at the top of the screen.
+
+ On other than Mac OS X platforms, Fl_Sys_Menu_Bar is a synonym of class Fl_Menu_Bar.
+ \n To use this class, just replace Fl_Menu_Bar by Fl_Sys_Menu_Bar, and, on the Mac platform,
+ a system menu at the top of the screen will be available. This menu will match an array
+ of Fl_Menu_Item's exactly as with standard FLTK menus.
+ \n A few FLTK features are not supported by the Mac System menu:
+ \li no symbolic labels
+ \li no embossed labels
+ \li no font sizes
+
+ You can configure a callback for the 'About' menu item to invoke your own code with fl_mac_set_about().
*/
class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar {
protected:
+ void update();
void draw();
public:
- /**
- @brief The constructor.
- *
- * On Mac OS X, all arguments are unused. On other platforms they are used as by Fl_Menu_Bar::Fl_Menu_Bar().
- */
Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l=0);
+ ~Fl_Sys_Menu_Bar();
+ /** Return the system menu's array of Fl_Menu_Item's
+ */
const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();}
void menu(const Fl_Menu_Item *m);
int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0);
+ /** Adds a new menu item.
+ \see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0)
+ */
+ int add(const char* label, const char* shortcut, Fl_Callback* cb, void *user_data=0, int flags=0) {
+ return add(label, fl_old_shortcut(shortcut), cb, user_data, flags);
+ }
+ int add(const char* str);
int insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data=0, int flags=0);
+ /** Insert a new menu item.
+ \see Fl_Menu_::insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0)
+ */
+ int insert(int index, const char* label, const char* shortcut, Fl_Callback *cb, void *user_data=0, int flags=0) {
+ return insert(index, label, fl_old_shortcut(shortcut), cb, user_data, flags);
+ }
void remove(int n);
void replace(int rank, const char *name);
+ /** Set the Fl_Menu_Item array pointer to null, indicating a zero-length menu.
+ \see Fl_Menu_::clear()
+ */
void clear();
+ /** Clears the specified submenu pointed to by index of all menu items.
+ \see Fl_Menu_::clear_submenu(int index)
+ */
int clear_submenu(int index);
-#if ! defined(FL_DOXYGEN)
- enum menuOrItemOperation { itemAtIndex, setKeyEquivalent, setKeyEquivalentModifierMask, setState, initWithTitle,
- numberOfItems, setSubmenu, setEnabled, addSeparatorItem, setTitle, removeItem, addNewItem };
- // function doMenuOrItemOperation is in file Fl_cocoa.mm because it contains objective-c code
- static void *doMenuOrItemOperation( menuOrItemOperation operation, ...);
-#endif
+ /** Make the shortcuts for this menu work no matter what window has the focus when you type it.
+ */
+ void global() {};
+ /** Sets the flags of item i
+ \see Fl_Menu_::mode(int i, int fl) */
+ void mode (int i, int fl) {
+ Fl_Menu_::mode(i, fl);
+ update();
+ }
+ /** Gets the flags of item i.
+ */
+ int mode(int i) const { return Fl_Menu_::mode(i); }
+ /** Changes the shortcut of item i to n.
+ */
+ void shortcut (int i, int s) { Fl_Menu_::shortcut(i, s); update(); };
};
#else
@@ -67,5 +100,5 @@ typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
#endif // Fl_Sys_Menu_Bar_H
//
-// End of "$Id: Fl_Sys_Menu_Bar.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Sys_Menu_Bar.H 10102 2014-02-11 17:59:20Z manolo $".
//
diff --git a/FL/Fl_Table.H b/FL/Fl_Table.H
index 6eb40c9..15accb2 100644
--- a/FL/Fl_Table.H
+++ b/FL/Fl_Table.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Table.H 9731 2012-11-23 20:07:22Z greg.ercolano $"
+// "$Id: Fl_Table.H 9843 2013-03-23 08:14:08Z greg.ercolano $"
//
// Fl_Table -- A table widget
//
@@ -210,6 +210,12 @@ private:
#if FLTK_ABI_VERSION >= 10301
int _scrollbar_size;
#endif
+#if FLTK_ABI_VERSION >= 10303
+ enum {
+ TABCELLNAV = 1<<0, ///> tab cell navigation flag
+ };
+ unsigned int flags_;
+#endif
// An STL-ish vector without templates
class FL_EXPORT IntVector {
@@ -823,6 +829,7 @@ public:
int is_selected(int r, int c); // selected cell
void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right);
void set_selection(int row_top, int col_left, int row_bot, int col_right);
+ int move_cursor(int R, int C, int shiftselect);
int move_cursor(int R, int C);
/**
@@ -1107,10 +1114,40 @@ public:
_scrollbar_size = newSize;
}
#endif
+#if FLTK_ABI_VERSION >= 10303
+ /**
+ Flag to control if Tab navigates table cells or not.
+
+ If on, Tab key navigates table cells.
+ If off, Tab key navigates fltk widget focus. (default)
+
+ As of fltk 1.3, the default behavior of the Tab key is to navigate focus off
+ of the current widget, and on to the next one. But in some applications,
+ it's useful for Tab to be used to navigate cells in the Fl_Table.
+
+ \param [in] val If \p val is 1, Tab key navigates cells in table, not fltk widgets.<BR>
+ If \p val is 0, Tab key will advance focus to the next fltk widget (default), and does not navigate cells in table.
+ */
+ void tab_cell_nav(int val) {
+ if ( val ) flags_ |= TABCELLNAV;
+ else flags_ &= ~TABCELLNAV;
+ }
+
+ /**
+ Get state of table's 'Tab' key cell navigation flag.
+
+ \returns 1 if Tab configured to navigate cells in table<br>0 to navigate widget focus (default)
+
+ \see tab_cell_nav(int)
+ */
+ int tab_cell_nav() const {
+ return(flags_ & TABCELLNAV ? 1 : 0);
+ }
+#endif
};
#endif /*_FL_TABLE_H*/
//
-// End of "$Id: Fl_Table.H 9731 2012-11-23 20:07:22Z greg.ercolano $".
+// End of "$Id: Fl_Table.H 9843 2013-03-23 08:14:08Z greg.ercolano $".
//
diff --git a/FL/Fl_Tabs.H b/FL/Fl_Tabs.H
index 2d91790..f45317b 100644
--- a/FL/Fl_Tabs.H
+++ b/FL/Fl_Tabs.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tabs.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Tabs.H 10120 2014-03-23 17:36:59Z greg.ercolano $"
//
// Tab header file for the Fast Light Tool Kit (FLTK).
//
@@ -49,6 +49,154 @@
gap is larger. It is easiest to lay this out in fluid, using the
fluid browser to select each child group and resize them until
the tabs look the way you want them to.
+
+ The background area behind and to the right of the tabs is
+ "transparent", exposing the background detail of the parent. The
+ value of Fl_Tabs::box() does not affect this area. So if Fl_Tabs is
+ resized by itself without the parent, force the appropriate parent
+ (visible behind the tabs) to redraw() to prevent artifacts.
+
+ See "Resizing Caveats" below on how to keep tab heights constant.
+ See "Callback's Use Of when()" on how to control the details
+ of how clicks invoke the callback().
+
+ A typical use of the Fl_Tabs widget:
+
+ \par
+ \code
+ // Typical use of Fl_Tabs
+ Fl_Tabs *tabs = new Fl_Tabs(10,10,300,200);
+ {
+ Fl_Group *grp1 = new Fl_Group(20,30,280,170,"Tab1");
+ {
+ ..widgets that go in tab#1..
+ }
+ grp1->end();
+ Fl_Group *grp2 = new Fl_Group(20,30,280,170,"Tab2");
+ {
+ ..widgets that go in tab#2..
+ }
+ grp2->end();
+ }
+ tabs->end();
+ \endcode
+
+ \b Default \b Appearance
+
+ The appearance of each "tab" is taken from the label() and color() of the
+ child group corresponding to that "tab" and panel. Where the "tabs" appear
+ depends on the position and size of the child groups that make up the
+ panels within the Fl_Tab, i.e. whether there is more space above or
+ below them. The height of the "tabs" depends on how much free space
+ is available.
+
+ \image html tabs_default.png "Fl_Tabs Default Appearance"
+ \image latex tabs_default.png "Fl_Tabs Default Appearance" width=8cm
+
+ \b Highlighting \b The \b Selected \b Tab
+
+ The selected "tab" can be highlighted further by setting the
+ selection_color() of the Fl_Tab itself, e.g.
+
+ \par
+ \code
+ ..
+ tabs = new Fl_Tabs(..);
+ tabs->selection_color(FL_DARK3);
+ ..
+ \endcode
+
+ The result of the above looks like:
+ \image html tabs_selection.png "Highlighting the selected tab"
+ \image latex tabs_selection.png "Highlighting the selected tab" width=8cm
+
+ \b Uniform \b Tab \b and \b Panel \b Appearance
+
+ In order to have uniform tab and panel appearance, not only must the color()
+ and selection_color() for each child group be set, but also the
+ selection_color() of the Fl_Tab itself any time a new "tab" is selected.
+ This can be achieved within the Fl_Tab callback, e.g.
+
+ \par
+ \code
+ void MyTabCallback(Fl_Widget *w, void*) {
+ Fl_Tabs *tabs = (Fl_Tabs*)w;
+ // When tab changed, make sure it has same color as its group
+ tabs->selection_color( (tab->value())->color() );
+ }
+ ..
+ int main(..) {
+ // Define tabs widget
+ tabs = new Fl_Tabs(..);
+ tabs->callback(MyTabCallback);
+
+ // Create three tabs each colored differently
+ grp1 = new Fl_Group(.. "One");
+ grp1->color(9);
+ grp1->selection_color(9);
+ grp1->end();
+
+ grp2 = new Fl_Group(.. "Two");
+ grp2->color(10);
+ grp2->selection_color(10);
+ grp2->end();
+
+ grp3 = new Fl_Group(.. "Three");
+ grp3->color(14);
+ grp3->selection_color(14);
+ grp3->end();
+ ..
+ // Make sure default tab has same color as its group
+ tabs->selection_color( (tab->value())->color() );
+ ..
+ return Fl::run();
+ }
+ \endcode
+
+ The result of the above looks like:
+ \image html tabs_uniform.png "Fl_Tabs with uniform colors"
+ \image latex tabs_uniform.png "Fl_Tabs with uniform colors" width=8cm
+
+ \b Resizing \b Caveats
+
+ When Fl_Tabs is resized vertically, the default behavior scales the
+ tab's height as well as its children. To keep the tab height constant
+ during resizing, set the tab widget's resizable() to one of the tab's
+ child groups, i.e.
+
+ \par
+ \code
+ tabs = new Fl_Tabs(..);
+ grp1 = new Fl_Group(..);
+ ..
+ grp2 = new Fl_Group(..);
+ ..
+ tabs->end();
+ tabs->resizable(grp1); // keeps tab height constant
+ \endcode
+
+ \par Callback's Use Of when()
+
+ As of FLTK 1.3.3, Fl_Tabs() supports the following flags for when():
+
+ - \ref FL_WHEN_NEVER -- callback never invoked (all flags off)
+ - \ref FL_WHEN_CHANGED -- if flag set, invokes callback when a tab has been changed (on click or keyboard navigation)
+ - \ref FL_WHEN_NOT_CHANGED -- if flag set, invokes callback when the tabs remain unchanged (on click or keyboard navigation)
+ - \ref FL_WHEN_RELEASE -- if flag set, invokes callback on RELEASE of mouse button or keyboard navigation
+
+ Notes:
+
+ -# The above flags can be logically OR-ed (|) or added (+) to combine behaviors.
+ -# The default value for when() is \ref FL_WHEN_RELEASE (inherited from Fl_Widget).
+ -# If \ref FL_WHEN_RELEASE is the \em only flag specified,
+ the behavior will be as if (\ref FL_WHEN_RELEASE|\ref FL_WHEN_CHANGED) was specified.
+ -# The value of changed() will be valid during the callback.
+ -# If both \ref FL_WHEN_CHANGED and \ref FL_WHEN_NOT_CHANGED are specified,
+ the callback is invoked whether the tab has been changed or not.
+ The changed() method can be used to determine the cause.
+ -# \ref FL_WHEN_NOT_CHANGED can happen if someone clicks on an already selected tab,
+ or if a keyboard navigation attempt results in no change to the tabs,
+ such as using the arrow keys while at the left or right end of the tabs.
*/
class FL_EXPORT Fl_Tabs : public Fl_Group {
Fl_Widget *value_;
@@ -68,6 +216,16 @@ public:
int handle(int);
Fl_Widget *value();
int value(Fl_Widget *);
+ /**
+ Returns the tab group for the tab the user has currently down-clicked on
+ and remains over until FL_RELEASE. Otherwise, returns NULL.
+
+ While the user is down-clicked on a tab, the return value is the tab group
+ for that tab. But as soon as the user releases, or drags off the tab with
+ the button still down, the return value will be NULL.
+
+ \see push(Fl_Widget*).
+ */
Fl_Widget *push() const {return push_;}
int push(Fl_Widget *);
Fl_Tabs(int,int,int,int,const char * = 0);
@@ -79,5 +237,5 @@ public:
#endif
//
-// End of "$Id: Fl_Tabs.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Tabs.H 10120 2014-03-23 17:36:59Z greg.ercolano $".
//
diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H
index be8ce88..a22b82e 100644
--- a/FL/Fl_Text_Buffer.H
+++ b/FL/Fl_Text_Buffer.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Buffer.H 9366 2012-04-21 15:05:00Z fabien $"
+// "$Id: Fl_Text_Buffer.H 9956 2013-08-12 15:46:57Z greg.ercolano $"
//
// Header file for Fl_Text_Buffer class.
//
@@ -207,7 +207,7 @@ public:
/**
Returns the character at the specified position pos in the buffer.
Positions start at 0
- \param pos byte offset into buffer, pos must be at acharacter boundary
+ \param pos byte offset into buffer, pos must be at a character boundary
\return Unicode UCS-4 encoded character
*/
unsigned int char_at(int pos) const;
@@ -766,5 +766,5 @@ protected:
#endif
//
-// End of "$Id: Fl_Text_Buffer.H 9366 2012-04-21 15:05:00Z fabien $".
+// End of "$Id: Fl_Text_Buffer.H 9956 2013-08-12 15:46:57Z greg.ercolano $".
//
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H
index 58baa33..55d874e 100644
--- a/FL/Fl_Text_Display.H
+++ b/FL/Fl_Text_Display.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Display.H 9078 2011-09-28 20:08:48Z matt $"
+// "$Id: Fl_Text_Display.H 10152 2014-05-21 06:56:59Z greg.ercolano $"
//
// Header file for Fl_Text_Display class.
//
@@ -33,10 +33,51 @@
/**
\brief Rich text display widget.
- This is the FLTK text display widget. It allows the user to view multiple lines
- of text and supports highlighting and scrolling. The buffer that is displayed
- in the widget is managed by the Fl_Text_Buffer class. A single Text Buffer
- can be displayed by multiple Text Displays.
+ This is the FLTK text display widget. It allows the user to view
+ multiple lines of text and supports highlighting, word wrap, mixes
+ of font faces and colors, line numbers and scrolling. The buffer
+ that is displayed in the widget is managed by the Fl_Text_Buffer
+ class. A single Text Buffer can be displayed by multiple Text
+ Displays.
+
+ \image html editor.png "Fl_Text_Display widget"
+ \image latex editor.png "Fl_Text_Display widget" width=6cm
+ <BR><BR>
+ \image html editor-linenumbers.png "Fl_Text_Display widget with line numbers enabled"
+ \image latex editor-linenumbers.png "Fl_Text_Display widget with line numbers enabled" width=6cm
+
+ \b Example \b Use
+ \code
+ #include <FL/FL_Text_Display.H>
+ ..
+ int main() {
+ ..
+ Fl_Text_Buffer *buff = new Fl_Text_Buffer();
+ Fl_Text_Display *disp = new Fl_Text_Display(10, 10, 640, 480);
+ disp->buffer(buff); // attach text buffer to display widget
+ buff->text("line one\nline two"); // add some text to buffer
+ ..
+ }
+ \endcode
+
+ \b Features
+
+ - Word wrap: wrap_mode(), wrapped_column(), wrapped_row()
+ - Font control: textfont(), textsize(), textcolor()
+ - Font styling: highlight_data()
+ - Cursor: cursor_style(), show_cursor(), hide_cursor(), cursor_color()
+ - Line numbers: linenumber_width(), linenumber_font(),
+ linenumber_size(), linenumber_fgcolor(), linenumber_bgcolor(),
+ linenumber_align(), linenumber_format()
+
+ Note that other features may be available via Fl_Text_Editor
+ and Fl_Text_Buffer classes.
+
+ \note Line numbers were added in 1.3.3. To avoid breaking ABI,
+ many of its options are read only. To adjust these features
+ in 1.3.x, you must build FLTK with FLTK_ABI_VERSION set to 10303
+ or higher.
+
*/
class FL_EXPORT Fl_Text_Display: public Fl_Group {
@@ -290,6 +331,21 @@ public:
*/
double col_to_x(double col) const;
+ void linenumber_width(int width);
+ int linenumber_width() const;
+ void linenumber_font(Fl_Font val);
+ Fl_Font linenumber_font() const;
+ void linenumber_size(Fl_Fontsize val);
+ Fl_Fontsize linenumber_size() const;
+ void linenumber_fgcolor(Fl_Color val);
+ Fl_Color linenumber_fgcolor() const;
+ void linenumber_bgcolor(Fl_Color val);
+ Fl_Color linenumber_bgcolor() const;
+ void linenumber_align(Fl_Align val);
+ Fl_Align linenumber_align() const;
+ void linenumber_format(const char* val);
+ const char* linenumber_format() const;
+
protected:
// Most (all?) of this stuff should only be called from resize() or
// draw().
@@ -457,16 +513,22 @@ protected:
Fl_Fontsize textsize_;
Fl_Color 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.
-
- /* Line number margin and width */
+ // Line number margin and width
int mLineNumLeft, mLineNumWidth;
+
+ // Line number font/colors
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Font linenumber_font_;
+ Fl_Fontsize linenumber_size_;
+ Fl_Color linenumber_fgcolor_;
+ Fl_Color linenumber_bgcolor_;
+ Fl_Align linenumber_align_;
+ const char* linenumber_format_;
+#endif
};
#endif
//
-// End of "$Id: Fl_Text_Display.H 9078 2011-09-28 20:08:48Z matt $".
+// End of "$Id: Fl_Text_Display.H 10152 2014-05-21 06:56:59Z greg.ercolano $".
//
diff --git a/FL/Fl_Tile.H b/FL/Fl_Tile.H
index 79ad72e..e94189c 100644
--- a/FL/Fl_Tile.H
+++ b/FL/Fl_Tile.H
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Tile.H 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Tile.H 10385 2014-10-19 14:17:47Z AlbrechtS $"
//
// Tile header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -16,71 +16,19 @@
// http://www.fltk.org/str.php
//
-/* \file
- Fl_Tile widget . */
-
#ifndef Fl_Tile_H
#define Fl_Tile_H
#include "Fl_Group.H"
-/**
- The Fl_Tile class lets you resize the children by dragging
- the border between them:
-
- <P ALIGN=CENTER>\image html Fl_Tile.png </P>
- \image latex Fl_Tile.png "Fl_Tile" width=4cm
-
- <P>For the tiling to work correctly, the children of an
- Fl_Tile must cover the entire area of the widget, but not
- overlap. This means that all children must touch each
- other at their edges, and no gaps can't be left inside the
- Fl_Tile.
-
- <P>Fl_Tile does not normailly draw any graphics of its own.
- The "borders" which can be seen in the snapshot above
- are actually part of the children. Their boxtypes have been set
- to FL_DOWN_BOX creating the impression of
- "ridges" where the boxes touch. What you see are
- actually two adjacent FL_DOWN_BOX's drawn next to each
- other. All neighboring widgets share the same edge - the widget's
- thick borders make it appear as though the widgets aren't actually
- touching, but they are. If the edges of adjacent widgets do not
- touch, then it will be impossible to drag the corresponding
- edges.</P>
-
- <P>Fl_Tile allows objects to be resized to zero dimensions.
- To prevent this you can use the resizable() to limit where
- corners can be dragged to.</P>
-
- <P>Even though objects can be resized to zero sizes, they must
- initially have non-zero sizes so the Fl_Tile can figure out
- their layout. If desired, call position() after creating the
- children but before displaying the window to set the borders where you
- want.
-
- <P>Note on resizable(Fl_Widget &w) :
- The "resizable" child widget (which should be invisible) limits where the
- border can be dragged to. If you don't set it, it will be possible to
- drag the borders right to the edge, and thus resize objects on the edge
- to zero width or height. The resizable() widget is not
- resized by dragging any borders. See also void Fl_Group::resizable(Fl_Widget &w)
-
+/*
+ The Fl_Tile class lets you resize its children by dragging
+ the border between them.
*/
+
class FL_EXPORT Fl_Tile : public Fl_Group {
public:
int handle(int);
- /**
- Creates a new Fl_Tile widget using the given position, size,
- and label string. The default boxtype is FL_NO_BOX.
-
- <P>The destructor <I>also deletes all the children</I>. This allows a
- whole tree to be deleted at once, without having to keep a pointer to
- all the children in the user code. A kludge has been done so the
- Fl_Tile and all of it's children can be automatic (local)
- variables, but you must declare the Fl_Tile <I>first</I>, so
- that it is destroyed last.
- */
Fl_Tile(int X,int Y,int W,int H,const char*l=0);
void resize(int, int, int, int);
void position(int, int, int, int);
@@ -89,5 +37,5 @@ public:
#endif
//
-// End of "$Id: Fl_Tile.H 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Tile.H 10385 2014-10-19 14:17:47Z AlbrechtS $".
//
diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H
index c0cc79e..1b71563 100644
--- a/FL/Fl_Tree.H
+++ b/FL/Fl_Tree.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree.H 10275 2014-09-05 12:04:28Z cand $"
//
#ifndef FL_TREE_H
@@ -80,79 +80,80 @@
/// tree.end();
/// \endcode
///
-/// \b FEATURES
-///
-/// Items can be added with add(),
-/// removed with remove(),
-/// completely cleared with clear(),
-/// inserted with insert() and insert_above(),
-/// selected/deselected with select() and deselect(),
-/// open/closed with open() and closed().
-/// Children of an item can be swapped around with Fl_Tree_Item::swap_children(),
-/// sorting can be controlled when items are add()ed via sortorder().
-/// You can walk the entire tree with first() and next().
+/// \par FEATURES
+/// Items can be added with add(),<BR>
+/// removed with remove(),<BR>
+/// completely cleared with clear(),<BR>
+/// inserted with insert() and insert_above(),<BR>
+/// selected/deselected with select() and deselect(),<BR>
+/// open/closed with open() and close(),<BR>
+/// positioned on the screen with show_item_top(), show_item_middle() and
+/// show_item_bottom(),<BR>
+/// item children can be swapped around with Fl_Tree_Item::swap_children(),<BR>
+/// sorting can be controlled when items are add()ed via sortorder().<BR>
+/// You can walk the entire tree with first() and next().<BR>
+/// You can walk visible items with first_visible_item()
+/// and next_visible_item().<BR>
/// You can walk selected items with first_selected_item() and
-/// next_selected_item().
+/// next_selected_item().<BR>
/// Items can be found by their pathname using find_item(const char*),
-/// and an item's pathname can be found with item_pathname().
-/// The selected items' colors are controlled by selection_color() (inherited from Fl_Widget).
-///
-/// \b SELECTION OF ITEMS
+/// and an item's pathname can be found with item_pathname().<BR>
+/// The selected items' colors are controlled by selection_color()
+/// (inherited from Fl_Widget).<BR>
+/// A hook is provided to allow you to redefine how item's labels are drawn
+/// via Fl_Tree::item_draw_callback().<BR>
///
+/// \par SELECTION OF ITEMS
/// The tree can have different selection behaviors controlled by selectmode().
/// The background color used for selected items is the Fl_Tree::selection_color().
/// The foreground color for selected items is controlled internally with fl_contrast().
///
-/// \b CHILD WIDGETS
-///
+/// \par CHILD WIDGETS
/// FLTK widgets (including custom widgets) can be assigned to tree items via
/// Fl_Tree_Item::widget().
-///
-/// When a widget() is defined, the default behavior is for the widget()
-/// to be shown in place of the item's label (if it has one).
+/// \par
+/// When an Fl_Tree_Item::widget() is defined, the default behavior is for the
+/// widget() to be shown in place of the item's label (if it has one).
/// Only the widget()'s width will be used; the widget()'s x() and y() position
/// will be managed by the tree, and the h() will track the item's height.
-/// This default behavior can be altered:
+/// This default behavior can be altered (ABI 1.3.1):
/// Setting Fl_Tree::item_draw_mode()'s FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET flag
/// causes the label + widget to be displayed together in that order, and
/// adding the FL_TREE_ITEM_HEIGHT_FROM_WIDGET flag causes widget's height
/// to define the widget()'s height.
///
-/// \b ICONS
-///
+/// \par ICONS
/// The tree's open/close icons can be redefined with
/// Fl_Tree::openicon(), Fl_Tree::closeicon(). User icons
/// can either be changed globally with Fl_Tree::usericon(),
/// or on a per-item basis with Fl_Tree_Item::usericon().
-///
+/// \par
/// Various default preferences can be globally manipulated via Fl_Tree_Prefs,
/// including colors, margins, icons, connection lines, etc.
///
-/// \b FONTS AND COLORS
-///
+/// \par FONTS AND COLORS
/// When adding new items to the tree, the new items get the
/// defaults for fonts and colors from:
-///
+/// \par
/// - Fl_Tree::item_labelfont() -- The default item label font (default: FL_HELVETICA)
/// - Fl_Tree::item_labelsize() -- The default item label size (default: FL_NORMAL_SIZE)
/// - Fl_Tree::item_labelfgcolor() -- The default item label foreground color (default: FL_FOREGROUND_COLOR)
/// - Fl_Tree::item_labelbgcolor() -- The default item label background color (default: 0xffffffff, which tree uses as 'transparent')
-///
+/// \par
/// Each item (Fl_Tree_Item) inherits a copy of these font/color attributes when created,
/// and each item has its own methods to let the app change these values on a per-item basis
/// using methods of the same name:
+/// \par
+/// - Fl_Tree_Item::labelfont() -- The item's label font (default: FL_HELVETICA)
+/// - Fl_Tree_Item::labelsize() -- The item's label size (default: FL_NORMAL_SIZE)
+/// - Fl_Tree_Item::labelfgcolor() -- The item's label foreground color (default: FL_FOREGROUND_COLOR)
+/// - Fl_Tree_Item::labelbgcolor() -- The item's label background color (default: 0xffffffff, which uses the tree's own bg color)
///
-/// - Fl_Tree_Item::item_labelfont() -- The item's label font (default: FL_HELVETICA)
-/// - Fl_Tree_Item::item_labelsize() -- The item's label size (default: FL_NORMAL_SIZE)
-/// - Fl_Tree_Item::item_labelfgcolor() -- The item's label foreground color (default: FL_FOREGROUND_COLOR)
-/// - Fl_Tree_Item::item_labelbgcolor() -- The item's label background color (default: 0xffffffff, which tree uses as 'transparent')
-///
-/// \b CALLBACKS
-///
+/// \par CALLBACKS
/// The tree's callback() will be invoked when items change state or are open/closed.
/// when() controls when mouse/keyboard events invoke the callback.
-/// callback_item() and callback_reason() can be used to determine the cause of the callback. eg:
-///
+/// callback_item() and callback_reason() can be used to determine the cause of the callback. e.g.
+/// \par
/// \code
/// void MyTreeCallback(Fl_Widget *w, void *data) {
/// Fl_Tree *tree = (Fl_Tree*)w;
@@ -166,13 +167,18 @@
/// }
/// \endcode
///
-/// To get the item's full menu pathname, you can use Fl_Tree::item_pathname(), eg:
-///
+/// \par SIMPLE EXAMPLES
+/// To find all the selected items:
+/// \code
+/// for ( Fl_Tree_Item *i=first_selected_item(); i; i=next_selected_item(i) )
+/// printf("Item %s is selected\n", i->label());
+/// \endcode
+/// To get an item's full menu pathname, use Fl_Tree::item_pathname(), e.g.
/// \code
/// char pathname[256] = "???";
/// tree->item_pathname(pathname, sizeof(pathname), item); // eg. "Parent/Child/Item"
/// \endcode
-///
+/// \par
/// To walk all the items of the tree from top to bottom:
/// \code
/// // Walk all the items in the tree, and print their labels
@@ -180,7 +186,7 @@
/// printf("Item: %s\n", item->label());
/// }
/// \endcode
-///
+/// \par
/// To recursively walk all the children of a particular item,
/// define a function that uses recursion:
/// \code
@@ -192,8 +198,8 @@
/// }
/// }
/// \endcode
-///
-/// To change the default label font and color for creating new items:
+/// \par
+/// To change the default label font and color when creating new items:
/// \code
/// tree = new Fl_Tree(..);
/// tree->item_labelfont(FL_COURIER); // Use Courier font for all new items
@@ -204,8 +210,8 @@
/// tree->add("Bbb");
/// [..]
/// \endcode
-///
-/// To change the font and color of all items in the tree:
+/// \par
+/// To change the font and color of all existing items in the tree:
/// \code
/// // Change the font and color of all items currently in the tree
/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) ) {
@@ -214,12 +220,19 @@
/// }
/// \endcode
///
+/// \par DISPLAY DESCRIPTION
/// The following image shows the tree's various visual elements
/// and the methods that control them:
-///
+/// \par
/// \image html tree-elements.png
-/// \image latex tree-elements.png "Fl_Tree dimensions" width=6cm
-///
+/// \image latex tree-elements.png "Fl_Tree elements" width=6cm
+/// \par
+/// The following shows the protected 'tree inner' (tix..)
+/// and 'tree outer' (tox..) dimension variables:
+/// \image html tree-dimensions.png "Fl_Tree inner/outer dimensions" width=6cm
+/// \image latex tree-dimensions.png "Fl_Tree inner/outer dimensions" width=6cm
+///
+/// \par KEYBOARD BINDINGS
/// The following table lists keyboard bindings for navigating the tree:
///
/// <TABLE BORDER="1" SUMMARY="Fl_Tree keyboard bindings.">
@@ -304,7 +317,8 @@ enum Fl_Tree_Reason {
FL_TREE_REASON_RESELECTED, ///< an item was re-selected (e.g. double-clicked)
#endif /*FLTK_ABI_VERSION*/
FL_TREE_REASON_OPENED, ///< an item was opened
- FL_TREE_REASON_CLOSED ///< an item was closed
+ FL_TREE_REASON_CLOSED, ///< an item was closed
+ FL_TREE_REASON_DRAGGED ///< an item was dragged into a new place
};
class FL_EXPORT Fl_Tree : public Fl_Group {
@@ -315,23 +329,36 @@ class FL_EXPORT Fl_Tree : public Fl_Group {
Fl_Tree_Reason _callback_reason; // reason for the callback
Fl_Tree_Prefs _prefs; // all the tree's settings
int _scrollbar_size; // size of scrollbar trough
-
#if FLTK_ABI_VERSION >= 10301
// NEW:
Fl_Tree_Item *_lastselect;
#else /*FLTK_ABI_VERSION*/
// OLD: static data inside handle() method
#endif /*FLTK_ABI_VERSION*/
-
void fix_scrollbar_order();
protected:
- Fl_Scrollbar *_vscroll; ///< Vertical scrollbar
+ Fl_Scrollbar *_vscroll; ///< Vertical scrollbar
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Scrollbar *_hscroll; ///< Horizontal scrollbar
+ int _tox,_toy,_tow,_toh; ///< Tree widget outer xywh dimension: outside scrollbars, inside widget border
+ int _tix,_tiy,_tiw,_tih; ///< Tree widget inner xywh dimension: inside borders + scrollbars
+
+ /// the calculated width of the entire tree hierarchy. See calc_tree()
+ int _tree_w;
+ /// the calculated height of the entire tree hierarchy. See calc_tree()
+ int _tree_h;
+#endif
void item_clicked(Fl_Tree_Item* val);
void do_callback_for_item(Fl_Tree_Item* item, Fl_Tree_Reason reason);
+#if FLTK_ABI_VERSION >= 10303
+// next_visible_item() and extend_selection() moved to 'public' in ABI 1.3.3
+// undocmented draw_tree() dropped -- draw() does all the work now
+#else
Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir);
void extend_selection(Fl_Tree_Item *from, Fl_Tree_Item *to);
int draw_tree();
+#endif
public:
Fl_Tree(int X, int Y, int W, int H, const char *L=0);
@@ -339,18 +366,26 @@ public:
int handle(int e);
void draw();
void show_self();
-
+ void resize(int,int,int,int);
+
///////////////////////
// root methods
///////////////////////
void root_label(const char *new_label);
Fl_Tree_Item* root();
+ void root(Fl_Tree_Item *newitem);
+ const Fl_Tree_Prefs& prefs() const { return _prefs; }
////////////////////////////////
// Item creation/removal methods
////////////////////////////////
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *add(const char *path, Fl_Tree_Item *newitem=0);
+#else
Fl_Tree_Item *add(const char *path);
- Fl_Tree_Item* add(Fl_Tree_Item *item, const char *name);
+ Fl_Tree_Item *add(const char *path, Fl_Tree_Item *newitem);
+#endif
+ Fl_Tree_Item* add(Fl_Tree_Item *parent_item, const char *name);
Fl_Tree_Item *insert_above(Fl_Tree_Item *above, const char *name);
Fl_Tree_Item* insert(Fl_Tree_Item *item, const char *name, int pos);
int remove(Fl_Tree_Item *item);
@@ -363,16 +398,35 @@ public:
Fl_Tree_Item *find_item(const char *path);
const Fl_Tree_Item *find_item(const char *path) const;
int item_pathname(char *pathname, int pathnamelen, const Fl_Tree_Item *item) const;
+#if FLTK_ABI_VERSION >= 10303
+ const Fl_Tree_Item* find_clicked(int yonly=0) const;
+ Fl_Tree_Item* find_clicked(int yonly=0);
+#else
const Fl_Tree_Item *find_clicked() const;
+ Fl_Tree_Item *find_clicked();
+#endif
Fl_Tree_Item *item_clicked();
Fl_Tree_Item *first();
- Fl_Tree_Item *first_visible();
+ Fl_Tree_Item *first_visible(); // deprecated in ABI 10303
+ Fl_Tree_Item *first_visible_item();
Fl_Tree_Item *next(Fl_Tree_Item *item=0);
Fl_Tree_Item *prev(Fl_Tree_Item *item=0);
Fl_Tree_Item *last();
- Fl_Tree_Item *last_visible();
+ Fl_Tree_Item *last_visible(); // deprecated in ABI 10303
+ Fl_Tree_Item *last_visible_item();
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *next_visible_item(Fl_Tree_Item *start, int dir); // made public in 1.3.3 ABI
+#endif
Fl_Tree_Item *first_selected_item();
+ Fl_Tree_Item *last_selected_item();
+ Fl_Tree_Item *next_item(Fl_Tree_Item *item, int dir=FL_Down, bool visible=false);
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0, int dir=FL_Down);
+ int get_selected_items(Fl_Tree_Item_Array &items);
+#else
Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0);
+ Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item, int dir);
+#endif
//////////////////////////
// Item open/close methods
@@ -398,6 +452,26 @@ public:
int deselect_all(Fl_Tree_Item *item=0, int docallback=1);
int select_only(Fl_Tree_Item *selitem, int docallback=1);
int select_all(Fl_Tree_Item *item=0, int docallback=1);
+ int extend_selection_dir(Fl_Tree_Item *from,
+ Fl_Tree_Item *to,
+ int dir,
+ int val,
+ bool visible);
+#if FLTK_ABI_VERSION >= 10303
+ int extend_selection(Fl_Tree_Item *from,
+ Fl_Tree_Item *to,
+ int val=1,
+ bool visible=false);
+#else
+private:
+ // Adding overload if not at least one overload breaks ABI, so avoid
+ // by keeping private until we can break ABI. ref: http://www.ros.org/reps/rep-0009.html
+ int extend_selection__(Fl_Tree_Item *from,
+ Fl_Tree_Item *to,
+ int val,
+ bool visible);
+public:
+#endif
void set_item_focus(Fl_Tree_Item *item);
Fl_Tree_Item *get_item_focus() const;
int is_selected(Fl_Tree_Item *item) const;
@@ -462,7 +536,12 @@ public:
Fl_Tree_Item_Draw_Mode item_draw_mode() const;
void item_draw_mode(Fl_Tree_Item_Draw_Mode mode);
void item_draw_mode(int mode);
-#endif /*FLTK_ABI_VERSION*/
+#endif
+#if FLTK_ABI_VERSION >= 10303
+ void calc_dimensions();
+ void calc_tree();
+#endif
+ void recalc_tree();
int displayed(Fl_Tree_Item *item);
void show_item(Fl_Tree_Item *item, int yoff);
void show_item(Fl_Tree_Item *item);
@@ -472,11 +551,14 @@ public:
void display(Fl_Tree_Item *item);
int vposition() const;
void vposition(int pos);
+ int hposition() const;
+ void hposition(int pos);
int is_scrollbar(Fl_Widget *w);
int scrollbar_size() const;
void scrollbar_size(int size);
int is_vscroll_visible() const;
+ int is_hscroll_visible() const;
///////////////////////
// callback related
@@ -493,5 +575,5 @@ public:
#endif /*FL_TREE_H*/
//
-// End of "$Id: Fl_Tree.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree.H 10275 2014-09-05 12:04:28Z cand $".
//
diff --git a/FL/Fl_Tree_Item.H b/FL/Fl_Tree_Item.H
index 5d1f206..8bd7a59 100644
--- a/FL/Fl_Tree_Item.H
+++ b/FL/Fl_Tree_Item.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Item.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Item.H 10271 2014-09-04 18:56:52Z greg.ercolano $"
//
#ifndef FL_TREE_ITEM_H
@@ -36,7 +36,8 @@
/// \brief This file contains the definitions for Fl_Tree_Item
///
-/// \brief Tree item
+/// \class Fl_Tree_Item
+/// \brief Tree widget item.
///
/// This class is a single tree item, and manages all of the item's attributes.
/// Fl_Tree_Item is used by Fl_Tree, which is comprised of many instances of Fl_Tree_Item.
@@ -51,17 +52,38 @@
/// When you make changes to items, you'll need to tell the tree to redraw()
/// for the changes to show up.
///
+/// New 1.3.3 ABI feature:
+/// You can define custom items by either adding a custom widget to the item
+/// with Fl_Tree_Item::widget(), or override the draw_item_content() method
+/// if you want to just redefine how the label is drawn.
+///
+/// The following shows the Fl_Tree_Item's dimensions, useful when overriding
+/// the draw_item_content() method:
+///
+/// \image html Fl_Tree_Item-dimensions.png "Fl_Tree_Item's internal dimensions." width=6cm
+/// \image latex Fl_Tree_Item-dimensions.png "Fl_Tree_Item's internal dimensions." width=6cm
+///
+class Fl_Tree;
class FL_EXPORT Fl_Tree_Item {
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree *_tree; // parent tree
+#endif
const char *_label; // label (memory managed)
Fl_Font _labelfont; // label's font face
Fl_Fontsize _labelsize; // label's font size
Fl_Color _labelfgcolor; // label's fg color
Fl_Color _labelbgcolor; // label's bg color (0xffffffff is 'transparent')
+#if FLTK_ABI_VERSION >= 10303
+ /// \enum Fl_Tree_Item_Flags
+ enum Fl_Tree_Item_Flags {
+#else
+ /// \enum
enum {
+#endif
OPEN = 1<<0, ///> item is open
VISIBLE = 1<<1, ///> item is visible
ACTIVE = 1<<2, ///> item is active
- SELECTED = 1<<3, ///> item is selected
+ SELECTED = 1<<3 ///> item is selected
};
#if FLTK_ABI_VERSION >= 10301
// NEW
@@ -85,21 +107,59 @@ class FL_EXPORT Fl_Tree_Item {
Fl_Tree_Item *_prev_sibling; // previous sibling (same level)
Fl_Tree_Item *_next_sibling; // next sibling (same level)
#endif /*FLTK_ABI_VERSION*/
+ // Protected methods
protected:
+ void _Init(const Fl_Tree_Prefs &prefs, Fl_Tree *tree);
void show_widgets();
void hide_widgets();
void draw_vertical_connector(int x, int y1, int y2, const Fl_Tree_Prefs &prefs);
void draw_horizontal_connector(int x1, int x2, int y, const Fl_Tree_Prefs &prefs);
+ void recalc_tree();
+ int calc_item_height(const Fl_Tree_Prefs &prefs) const;
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Color drawfgcolor() const;
+ Fl_Color drawbgcolor() const;
+#endif
+
public:
- Fl_Tree_Item(const Fl_Tree_Prefs &prefs); // CTOR
- ~Fl_Tree_Item(); // DTOR
+ Fl_Tree_Item(const Fl_Tree_Prefs &prefs); // CTOR -- backwards compatible
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item(Fl_Tree *tree); // CTOR -- ABI 1.3.3+
+ virtual ~Fl_Tree_Item(); // DTOR -- ABI 1.3.3+
+#else
+ ~Fl_Tree_Item(); // DTOR -- backwards compatible
+#endif
Fl_Tree_Item(const Fl_Tree_Item *o); // COPY CTOR
+ /// The item's x position relative to the window
int x() const { return(_xywh[0]); }
+ /// The item's y position relative to the window
int y() const { return(_xywh[1]); }
+ /// The entire item's width to right edge of Fl_Tree's inner width
+ /// within scrollbars.
int w() const { return(_xywh[2]); }
+ /// The item's height
int h() const { return(_xywh[3]); }
- int calc_item_height(const Fl_Tree_Prefs &prefs) const;
- void draw(int X, int &Y, int W, Fl_Widget *tree, Fl_Tree_Item *itemfocus, const Fl_Tree_Prefs &prefs, int lastchild=1);
+ /// The item's label x position relative to the window
+ /// \version 1.3.3
+ int label_x() const { return(_label_xywh[0]); }
+ /// The item's label y position relative to the window
+ /// \version 1.3.3
+ int label_y() const { return(_label_xywh[1]); }
+ /// The item's maximum label width to right edge of Fl_Tree's inner width
+ /// within scrollbars.
+ /// \version 1.3.3
+ int label_w() const { return(_label_xywh[2]); }
+ /// The item's label height
+ /// \version 1.3.3
+ int label_h() const { return(_label_xywh[3]); }
+#if FLTK_ABI_VERSION >= 10303
+ virtual int draw_item_content(int render);
+ void draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus,
+ int &tree_item_xmax, int lastchild=1, int render=1);
+#else
+ void draw(int X, int &Y, int W, Fl_Widget *tree,
+ Fl_Tree_Item *itemfocus, const Fl_Tree_Prefs &prefs, int lastchild=1);
+#endif
void show_self(const char *indent = "") const;
void label(const char *val);
const char *label() const;
@@ -113,6 +173,7 @@ public:
/// Set item's label font face.
void labelfont(Fl_Font val) {
_labelfont = val;
+ recalc_tree(); // may change tree geometry
}
/// Get item's label font face.
Fl_Font labelfont() const {
@@ -121,6 +182,7 @@ public:
/// Set item's label font size.
void labelsize(Fl_Fontsize val) {
_labelsize = val;
+ recalc_tree(); // may change tree geometry
}
/// Get item's label font size.
Fl_Fontsize labelsize() const {
@@ -130,31 +192,34 @@ public:
void labelfgcolor(Fl_Color val) {
_labelfgcolor = val;
}
- /// Set item's label text color.
- void labelcolor(Fl_Color val) {
- _labelfgcolor = val;
- }
- /// Return item's label text color.
- Fl_Color labelcolor() const {
- return(_labelfgcolor);
- }
/// Return item's label foreground text color.
Fl_Color labelfgcolor() const {
return(_labelfgcolor);
}
+ /// Set item's label text color. Alias for labelfgcolor(Fl_Color)).
+ void labelcolor(Fl_Color val) {
+ labelfgcolor(val);
+ }
+ /// Return item's label text color. Alias for labelfgcolor() const).
+ Fl_Color labelcolor() const {
+ return labelfgcolor();
+ }
/// Set item's label background color.
- /// A special case is made for color 0xffffffff which is treated as 'transparent'.
+ /// A special case is made for color 0xffffffff which uses the parent tree's bg color.
void labelbgcolor(Fl_Color val) {
_labelbgcolor = val;
}
- /// Return item's background text color.
- /// If the color is 0xffffffff, it is 'transparent'.
+ /// Return item's label background text color.
+ /// If the color is 0xffffffff, the default behavior is the parent tree's
+ /// bg color will be used. (An overloaded draw_item_content() can override
+ /// this behavior.)
Fl_Color labelbgcolor() const {
return(_labelbgcolor);
}
/// Assign an FLTK widget to this item.
void widget(Fl_Widget *val) {
_widget = val;
+ recalc_tree(); // may change tree geometry
}
/// Return FLTK widget assigned to this item.
Fl_Widget *widget() const {
@@ -181,25 +246,48 @@ public:
void clear_children();
void swap_children(int ax, int bx);
int swap_children(Fl_Tree_Item *a, Fl_Tree_Item *b);
- const Fl_Tree_Item *find_child_item(char **arr) const; // const
- Fl_Tree_Item *find_child_item(char **arr); // non-const
- const Fl_Tree_Item *find_item(char **arr) const; // const
- Fl_Tree_Item *find_item(char **arr); // non-const
+ const Fl_Tree_Item *find_child_item(const char *name) const;
+ Fl_Tree_Item *find_child_item(const char *name);
+ const Fl_Tree_Item *find_child_item(char **arr) const;
+ Fl_Tree_Item *find_child_item(char **arr);
+ const Fl_Tree_Item *find_item(char **arr) const;
+ Fl_Tree_Item *find_item(char **arr);
//////////////////
// Adding items
//////////////////
- Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, const char *new_label);
- Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs, char **arr);
+ Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs,
+ const char *new_label,
+ Fl_Tree_Item *newitem);
+ Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs,
+ const char *new_label);
+ Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs,
+ char **arr,
+ Fl_Tree_Item *newitem);
+ Fl_Tree_Item *add(const Fl_Tree_Prefs &prefs,
+ char **arr);
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *replace(Fl_Tree_Item *new_item);
+ Fl_Tree_Item *replace_child(Fl_Tree_Item *olditem, Fl_Tree_Item *newitem);
+#endif
Fl_Tree_Item *insert(const Fl_Tree_Prefs &prefs, const char *new_label, int pos=0);
Fl_Tree_Item *insert_above(const Fl_Tree_Prefs &prefs, const char *new_label);
+ Fl_Tree_Item* deparent(int index);
+ int reparent(Fl_Tree_Item *newchild, int index);
+ int move(int to, int from);
+ int move(Fl_Tree_Item *item, int op=0, int pos=0);
+ int move_above(Fl_Tree_Item *item);
+ int move_below(Fl_Tree_Item *item);
+ int move_into(Fl_Tree_Item *item, int pos=0);
int depth() const;
Fl_Tree_Item *prev();
Fl_Tree_Item *next();
Fl_Tree_Item *next_sibling();
Fl_Tree_Item *prev_sibling();
void update_prev_next(int index);
- Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs);
- Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs);
+ Fl_Tree_Item *next_displayed(Fl_Tree_Prefs &prefs); // deprecated
+ Fl_Tree_Item *prev_displayed(Fl_Tree_Prefs &prefs); // deprecated
+ Fl_Tree_Item *next_visible(Fl_Tree_Prefs &prefs);
+ Fl_Tree_Item *prev_visible(Fl_Tree_Prefs &prefs);
/// Return the parent for this item. Returns NULL if we are the root.
Fl_Tree_Item *parent() {
@@ -215,6 +303,13 @@ public:
void parent(Fl_Tree_Item *val) {
_parent = val;
}
+#if FLTK_ABI_VERSION >= 10303
+ const Fl_Tree_Prefs& prefs() const;
+ /// Return the tree for this item.
+ const Fl_Tree *tree() const {
+ return(_tree);
+ }
+#endif
//////////////////
// State
//////////////////
@@ -230,7 +325,7 @@ public:
}
/// Toggle the item's open/closed state.
void open_toggle() {
- is_open()?close():open();
+ is_open()?close():open(); // handles calling recalc_tree()
}
/// Change the item's selection state to the optionally specified 'val'.
/// If 'val' is not specified, the item will be selected.
@@ -287,9 +382,8 @@ public:
/// Change the item's activation state to the optionally specified 'val'.
///
/// When deactivated, the item will be 'grayed out'; the callback()
- /// won't be invoked if the user clicks on the label. If the item
- /// has a widget() associated with the item, its activation state
- /// will be changed as well.
+ /// won't be invoked if the user clicks on the label. If a widget()
+ /// is associated with the item, its activation state will be changed as well.
///
/// If 'val' is not specified, the item will be activated.
///
@@ -314,7 +408,7 @@ public:
char is_activated() const {
return(is_flag(ACTIVE));
}
- /// See if the item is activated.
+ /// See if the item is activated. Alias for is_activated().
char is_active() const {
return(is_activated());
}
@@ -331,6 +425,7 @@ public:
/// Set the item's user icon to an Fl_Image. '0' will disable.
void usericon(Fl_Image *val) {
_usericon = val;
+ recalc_tree(); // may change tree geometry
}
/// Get the item's user icon as an Fl_Image. Returns '0' if disabled.
Fl_Image *usericon() const {
@@ -339,8 +434,13 @@ public:
//////////////////
// Events
//////////////////
- const Fl_Tree_Item *find_clicked(const Fl_Tree_Prefs &prefs) const;
- Fl_Tree_Item *find_clicked(const Fl_Tree_Prefs &prefs);
+#if FLTK_ABI_VERSION >= 10303
+ const Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0) const;
+ Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs, int yonly=0);
+#else
+ const Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs) const;
+ Fl_Tree_Item* find_clicked(const Fl_Tree_Prefs &prefs);
+#endif
int event_on_collapse_icon(const Fl_Tree_Prefs &prefs) const;
int event_on_label(const Fl_Tree_Prefs &prefs) const;
/// Is this item the root of the tree?
@@ -349,10 +449,14 @@ public:
}
// Protected methods
+ // TODO: move these to top 'protected:' section
protected:
#if FLTK_ABI_VERSION >= 10301
/// Set a flag to an on or off value. val is 0 or 1.
inline void set_flag(unsigned short flag,int val) {
+ if ( flag==OPEN || flag==VISIBLE ) {
+ recalc_tree(); // may change tree geometry
+ }
if ( val ) _flags |= flag; else _flags &= ~flag;
}
/// See if flag set. Returns 0 or 1.
@@ -386,5 +490,5 @@ protected:
#endif /*FL_TREE_ITEM_H*/
//
-// End of "$Id: Fl_Tree_Item.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Item.H 10271 2014-09-04 18:56:52Z greg.ercolano $".
//
diff --git a/FL/Fl_Tree_Item_Array.H b/FL/Fl_Tree_Item_Array.H
index ab3efe2..58d025c 100644
--- a/FL/Fl_Tree_Item_Array.H
+++ b/FL/Fl_Tree_Item_Array.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Item_Array.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Item_Array.H 10271 2014-09-04 18:56:52Z greg.ercolano $"
//
#ifndef _FL_TREE_ITEM_ARRAY_H
@@ -49,6 +49,12 @@ class FL_EXPORT Fl_Tree_Item_Array {
int _total; // #items in array
int _size; // #items *allocated* for array
int _chunksize; // #items to enlarge mem allocation
+#if FLTK_ABI_VERSION >= 10303
+ enum {
+ MANAGE_ITEM = 1, ///> manage the Fl_Tree_Item's internals (internal use only)
+ };
+ char _flags; // flags to control behavior
+#endif
void enlarge(int count);
public:
Fl_Tree_Item_Array(int new_chunksize = 10); // CTOR
@@ -78,15 +84,30 @@ public:
_items[bx] = asave;
}
#endif /*FLTK_ABI_VERSION*/
+ int move(int to, int from);
+ int deparent(int pos);
+ int reparent(Fl_Tree_Item *item, Fl_Tree_Item *newparent, int pos);
void clear();
void add(Fl_Tree_Item *val);
void insert(int pos, Fl_Tree_Item *new_item);
+ void replace(int pos, Fl_Tree_Item *new_item);
void remove(int index);
int remove(Fl_Tree_Item *item);
+#if FLTK_ABI_VERSION >= 10303
+ /// Option to control if Fl_Tree_Item_Array's destructor will also destroy the Fl_Tree_Item's.
+ /// If set: items and item array is destroyed.
+ /// If clear: only the item array is destroyed, not items themselves.
+ void manage_item_destroy(int val) {
+ if ( val ) _flags |= MANAGE_ITEM; else _flags &= ~MANAGE_ITEM;
+ }
+ int manage_item_destroy() const {
+ return _flags & MANAGE_ITEM ? 1 : 0;
+ }
+#endif
};
#endif /*_FL_TREE_ITEM_ARRAY_H*/
//
-// End of "$Id: Fl_Tree_Item_Array.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Item_Array.H 10271 2014-09-04 18:56:52Z greg.ercolano $".
//
diff --git a/FL/Fl_Tree_Prefs.H b/FL/Fl_Tree_Prefs.H
index 2fdb68a..6284614 100644
--- a/FL/Fl_Tree_Prefs.H
+++ b/FL/Fl_Tree_Prefs.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Prefs.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Prefs.H 10280 2014-09-06 09:31:53Z cand $"
//
#ifndef FL_TREE_PREFS_H
@@ -11,7 +11,7 @@
// FL/Fl_Tree_Prefs.H
//////////////////////
//
-// Fl_Tree -- This file is part of the Fl_Tree widget for FLTK
+// Fl_Tree_Prefs -- This file is part of the Fl_Tree widget for FLTK
// Copyright (C) 2009-2010 by Greg Ercolano.
//
// This library is free software. Distribution and use rights are outlined in
@@ -67,8 +67,10 @@ enum Fl_Tree_Connector {
enum Fl_Tree_Select {
FL_TREE_SELECT_NONE=0, ///< Nothing selected when items are clicked
FL_TREE_SELECT_SINGLE=1, ///< Single item selected when item is clicked (default)
- FL_TREE_SELECT_MULTI=2 ///< Multiple items can be selected by clicking
+ FL_TREE_SELECT_MULTI=2, ///< Multiple items can be selected by clicking
///< with SHIFT, CTRL or mouse drags.
+ FL_TREE_SELECT_SINGLE_DRAGGABLE=3 ///< Single items may be selected, and they may be
+ ///< reordered by mouse drag.
};
#if FLTK_ABI_VERSION >= 10301
@@ -93,6 +95,11 @@ enum Fl_Tree_Item_Draw_Mode {
};
#endif /*FLTK_ABI_VERSION*/
+#if FLTK_ABI_VERSION >= 10303
+class Fl_Tree_Item;
+typedef void (Fl_Tree_Item_Draw_Callback)(Fl_Tree_Item*, void*);
+#endif
+
/// \class Fl_Tree_Prefs
///
/// \brief Fl_Tree's Preferences class.
@@ -134,6 +141,10 @@ class FL_EXPORT Fl_Tree_Prefs {
Fl_Tree_Item_Reselect_Mode _itemreselectmode; // controls item selection callback() behavior
Fl_Tree_Item_Draw_Mode _itemdrawmode; // controls how items draw label + widget()
#endif /*FLTK_ABI_VERSION*/
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item_Draw_Callback *_itemdrawcallback; // callback to handle drawing items (0=none)
+ void *_itemdrawuserdata; // data for drawing items (0=none)
+#endif
public:
Fl_Tree_Prefs();
@@ -412,11 +423,26 @@ public:
inline void item_draw_mode(Fl_Tree_Item_Draw_Mode val) {
_itemdrawmode = val;
}
-#endif /*FLTK_ABI_VERSION*/
+#endif
+#if FLTK_ABI_VERSION >= 10303
+ void item_draw_callback(Fl_Tree_Item_Draw_Callback *cb, void *data=0) {
+ _itemdrawcallback = cb;
+ _itemdrawuserdata = data;
+ }
+ Fl_Tree_Item_Draw_Callback* item_draw_callback() const {
+ return(_itemdrawcallback);
+ }
+ void* item_draw_user_data() const {
+ return(_itemdrawuserdata);
+ }
+ void do_item_draw_callback(Fl_Tree_Item *o) const {
+ _itemdrawcallback(o, _itemdrawuserdata);
+ }
+#endif
};
#endif /*FL_TREE_PREFS_H*/
//
-// End of "$Id: Fl_Tree_Prefs.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Prefs.H 10280 2014-09-06 09:31:53Z cand $".
//
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index eb8406d..21230e5 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget.H 9388 2012-04-23 20:12:06Z matt $"
+// "$Id: Fl_Widget.H 10289 2014-09-08 08:55:49Z cand $"
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
@@ -28,7 +28,7 @@
\todo typedef's fl_intptr_t and fl_uintptr_t should be documented.
*/
#ifdef _WIN64
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
#include <stdint.h>
#else
#include <stddef.h> // M$VC
@@ -171,6 +171,7 @@ protected:
GROUP_RELATIVE = 1<<16, ///< position this widget relative to the parent group, not to the window
COPIED_TOOLTIP = 1<<17, ///< the widget tooltip is internally copied, its destruction is handled by the widget
FULLSCREEN = 1<<18, ///< a fullscreen window (Fl_Window)
+ MAC_USE_ACCENTS_MENU = 1<<19, ///< On the Mac OS platform, pressing and holding a key on the keyboard opens an accented-character menu window (Fl_Input_, Fl_Text_Editor)
// (space for more flags)
USERFLAG3 = 1<<29, ///< reserved for 3rd party extensions
USERFLAG2 = 1<<30, ///< reserved for 3rd party extensions
@@ -776,6 +777,18 @@ public:
*/
void clear_changed() {flags_ &= ~CHANGED;}
+ /** Marks the widget as inactive without sending events or changing focus.
+ This is mainly for specialized use, for normal cases you want deactivate().
+ \see deactivate()
+ */
+ void clear_active() {flags_ |= INACTIVE;}
+
+ /** Marks the widget as active without sending events or changing focus.
+ This is mainly for specialized use, for normal cases you want activate().
+ \see activate()
+ */
+ void set_active() {flags_ &= ~INACTIVE;}
+
/** Gives the widget the keyboard focus.
Tries to make this widget be the Fl::focus() widget, by first sending
it an FL_FOCUS event, and if it returns non-zero, setting
@@ -915,15 +928,16 @@ public:
/** Sets width ww and height hh accordingly with the label size.
Labels with images will return w() and h() of the image.
+
+ This calls fl_measure() internally. For more information about
+ the arguments \p ww and \p hh and word wrapping
+ \see fl_measure(const char*, int&, int&, int)
*/
void measure_label(int& ww, int& hh) const {label_.measure(ww, hh);}
- /** Returns a pointer to the primary Fl_Window widget.
- \retval NULL if no window is associated with this widget.
- \note for an Fl_Window widget, this returns its <I>parent</I> window
- (if any), not <I>this</I> window.
- */
Fl_Window* window() const ;
+ Fl_Window* top_window() const;
+ Fl_Window* top_window_offset(int& xoff, int& yoff) const;
/** Returns an Fl_Group pointer if this widget is an Fl_Group.
@@ -976,6 +990,10 @@ public:
*/
virtual class Fl_Gl_Window* as_gl_window() {return 0;}
+ /** Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise.
+ */
+ int use_accents_menu() { return flags() & MAC_USE_ACCENTS_MENU; }
+
/** For back compatibility only.
\deprecated Use selection_color() instead.
*/
@@ -997,5 +1015,5 @@ public:
#endif
//
-// End of "$Id: Fl_Widget.H 9388 2012-04-23 20:12:06Z matt $".
+// End of "$Id: Fl_Widget.H 10289 2014-09-08 08:55:49Z cand $".
//
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index dc66f6b..42e4e72 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window.H 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Window.H 10404 2014-10-29 14:21:08Z ianmacarthur $"
//
// Window header file for the Fast Light Tool Kit (FLTK).
//
@@ -16,18 +16,26 @@
// http://www.fltk.org/str.php
//
-/* \file
+/** \file
Fl_Window widget . */
#ifndef Fl_Window_H
#define Fl_Window_H
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include "Fl_Group.H"
+#include "Fl_Bitmap.H"
+#include <stdlib.h>
#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this
#define FL_DOUBLE_WINDOW 0xF1 ///< double window type id
class Fl_X;
+class Fl_RGB_Image;
+
/**
This widget produces an actual window. This can either be a main
@@ -49,7 +57,7 @@ class Fl_X;
class FL_EXPORT Fl_Window : public Fl_Group {
static char *default_xclass_;
- // Note: we must use separate statements for each of the following 4 variables,
+ // Note: we must use separate statements for each of the following 8 variables,
// with the static attribute, otherwise MS VC++ 2008/2010 complains :-(
// AlbrechtS 04/2012
#if FLTK_ABI_VERSION < 10301
@@ -68,20 +76,83 @@ class FL_EXPORT Fl_Window : public Fl_Group {
static // when these members are static, ABI compatibility with 1.3.0 is respected
#endif
int no_fullscreen_h;
+#if FLTK_ABI_VERSION < 10303
+ static // when these members are static, ABI compatibility with 1.3.0 is respected
+#endif
+ int fullscreen_screen_top;
+#if FLTK_ABI_VERSION < 10303
+ static // when these members are static, ABI compatibility with 1.3.0 is respected
+#endif
+ int fullscreen_screen_bottom;
+#if FLTK_ABI_VERSION < 10303
+ static // when these members are static, ABI compatibility with 1.3.0 is respected
+#endif
+ int fullscreen_screen_left;
+#if FLTK_ABI_VERSION < 10303
+ static // when these members are static, ABI compatibility with 1.3.0 is respected
+#endif
+ int fullscreen_screen_right;
friend class Fl_X;
Fl_X *i; // points at the system-specific stuff
+ struct icon_data {
+ const void *legacy_icon;
+ Fl_RGB_Image **icons;
+ int count;
+#ifdef WIN32
+ HICON big_icon;
+ HICON small_icon;
+#endif
+ };
+
const char* iconlabel_;
char* xclass_;
- const void* icon_;
+ struct icon_data *icon_;
// size_range stuff:
int minw, minh, maxw, maxh;
int dw, dh, aspect;
uchar size_range_set;
// cursor stuff
Fl_Cursor cursor_default;
+#if FLTK_ABI_VERSION < 10303
+ // legacy, not used
Fl_Color cursor_fg, cursor_bg;
+#endif
+
+protected:
+ /** Data supporting a non-rectangular window shape */
+ struct shape_data_type {
+ int lw_; ///< width of shape image
+ int lh_; ///< height of shape image
+ Fl_Image* shape_; ///< shape image
+#if defined(__APPLE__)
+ typedef struct CGImage* CGImageRef;
+ CGImageRef mask;
+#endif
+ Fl_Bitmap *todelete_; ///< auxiliary bitmap image
+ };
+
+#if FLTK_ABI_VERSION < 10303 && !defined(FL_DOXYGEN)
+ static
+#endif
+ shape_data_type *shape_data_; ///< non-null means the window has a non-rectangular shape
+private:
+ void shape_bitmap_(Fl_Bitmap* b);
+ void shape_alpha_(Fl_RGB_Image* img, int offset);
+ void shape_pixmap_(Fl_Pixmap* pixmap);
+public:
+ void shape(const Fl_Image* img);
+ /** Set the window's shape with an Fl_Image.
+ \see void shape(const Fl_Image* img)
+ */
+ inline void shape(const Fl_Image& b) { shape(&b); }
+#if ! (defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN))
+ void combine_mask(void);
+#endif
+private:
+
+
void size_range_();
void _Fl_Window(); // constructor innards
void fullscreen_x(); // platform-specific part of sending a window to full screen
@@ -121,6 +192,8 @@ protected:
*/
int force_position() const { return ((flags() & FORCE_POSITION)?1:0); }
+ void free_icons();
+
public:
/**
@@ -227,6 +300,45 @@ public:
unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);}
/**
+ Clears the "modal" flags and converts a "modal" or "non-modal"
+ window back into a "normal" window.
+
+ Note that there are <I>three</I> states for a window: modal,
+ non-modal, and normal.
+
+ You can not change the "modality" of a window whilst
+ it is shown, so it is necessary to first hide() the window,
+ change its "modality" as required, then re-show the window
+ for the new state to take effect.
+
+ This method can also be used to change a "modal" window into a
+ "non-modal" one. On several supported platforms, the "modal" state
+ over-rides the "non-modal" state, so the "modal" state must be
+ cleared before the window can be set into the "non-modal"
+ state.
+ In general, the following sequence should work:
+
+ \code
+ win->hide();
+ win->clear_modal_states();
+ //Set win to new state as desired, or leave "normal", e.g...
+ win->set_non_modal();
+ win->show();
+ \endcode
+
+ \note Under some window managers, the sequence of hiding the
+ window and changing its modality will often cause it to be
+ re-displayed at a different position when it is subsequently
+ shown. This is an irritating feature but appears to be
+ unavoidable at present.
+ As a result we would advise to use this method only when
+ absolutely necessary.
+
+ \see void set_modal(), void set_non_modal()
+ */
+ void clear_modal_states() {clear_flag(NON_MODAL | MODAL);}
+
+ /**
Marks the window as a menu window.
This is intended for internal use, but it can also be used if you
@@ -243,7 +355,7 @@ public:
/** Returns true if this window is a menu window. */
unsigned int menu_window() const {return flags() & MENU_WINDOW;}
-
+
/**
Marks the window as a tooltip window.
@@ -350,6 +462,18 @@ public:
static const char *default_xclass();
const char* xclass() const;
void xclass(const char* c);
+
+ static void default_icon(const Fl_RGB_Image*);
+ static void default_icons(const Fl_RGB_Image*[], int);
+ void icon(const Fl_RGB_Image*);
+ void icons(const Fl_RGB_Image*[], int);
+
+#ifdef WIN32
+ static void default_icons(HICON big_icon, HICON small_icon);
+ void icons(HICON big_icon, HICON small_icon);
+#endif
+
+ /* for legacy compatibility */
const void* icon() const;
void icon(const void * ic);
@@ -401,14 +525,20 @@ public:
\see virtual void Fl_Window::show()
*/
void show(int argc, char **argv);
+
+ // Enables synchronous show(), docs in Fl_Window.cxx
+ void wait_for_expose();
+
/**
- Makes the window completely fill the screen, without any window
- manager border visible. You must use fullscreen_off() to undo
- this.
+ Makes the window completely fill one or more screens, without any
+ window manager border visible. You must use fullscreen_off() to
+ undo this.
\note On some platforms, this can result in the keyboard being
grabbed. The window may also be recreated, meaning hide() and
show() will be called.
+
+ \see void Fl_Window::fullscreen_screens()
*/
void fullscreen();
/**
@@ -425,6 +555,17 @@ public:
*/
unsigned int fullscreen_active() const { return flags() & FULLSCREEN; }
/**
+ Sets which screens should be used when this window is in fullscreen
+ mode. The window will be resized to the top of the screen with index
+ \p top, the bottom of the screen with index \p bottom, etc.
+
+ If this method is never called, or if any argument is < 0, then the
+ window will be resized to fill the screen it is currently on.
+
+ \see void Fl_Window::fullscreen()
+ */
+ void fullscreen_screens(int top, int bottom, int left, int right);
+ /**
Iconifies the window. If you call this when shown() is false
it will show() it as an icon. If the window is already
iconified this does nothing.
@@ -466,14 +607,17 @@ public:
is different.
The type Fl_Cursor is an enumeration defined in <FL/Enumerations.H>.
- (Under X you can get any XC_cursor value by passing
- Fl_Cursor((XC_foo/2)+1)). The colors only work on X, they are
- not implemented on WIN32.
- For back compatibility only.
+ \see cursor(const Fl_RGB_Image*, int, int), default_cursor()
*/
- void cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE); // platform dependent
- void default_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE);
+ void cursor(Fl_Cursor);
+ void cursor(const Fl_RGB_Image*, int, int);
+ void default_cursor(Fl_Cursor);
+
+ /* for legacy compatibility */
+ void cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE);
+ void default_cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE);
+
static void default_callback(Fl_Window*, void* v);
/** Returns the window width including any frame added by the window manager.
@@ -493,5 +637,5 @@ public:
#endif
//
-// End of "$Id: Fl_Window.H 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Window.H 10404 2014-10-29 14:21:08Z ianmacarthur $".
//
diff --git a/FL/fl_ask.H b/FL/fl_ask.H
index ce36de4..69d5afb 100644
--- a/FL/fl_ask.H
+++ b/FL/fl_ask.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_ask.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_ask.H 9748 2012-12-11 17:06:41Z manolo $"
//
// Standard dialog header file for the Fast Light Tool Kit (FLTK).
//
@@ -16,20 +16,26 @@
// http://www.fltk.org/str.php
//
+/** \file fl_ask.H
+ API for common dialogs.
+ */
+
#ifndef fl_ask_H
# define fl_ask_H
# include "Enumerations.H"
class Fl_Widget;
-/** Different system beeps available. \relatesalso fl_beep(int) */
-enum {
- FL_BEEP_DEFAULT = 0,
- FL_BEEP_MESSAGE,
- FL_BEEP_ERROR,
- FL_BEEP_QUESTION,
- FL_BEEP_PASSWORD,
- FL_BEEP_NOTIFICATION
+
+/** Different system beeps available.
+ \sa fl_beep(int) */
+enum Fl_Beep {
+ FL_BEEP_DEFAULT = 0, ///< Default beep.
+ FL_BEEP_MESSAGE, ///< Message beep.
+ FL_BEEP_ERROR, ///< Error beep.
+ FL_BEEP_QUESTION, ///< Question beep.
+ FL_BEEP_PASSWORD, ///< Password beep.
+ FL_BEEP_NOTIFICATION ///< Notification beep.
};
# ifdef __GNUC__
@@ -70,5 +76,5 @@ extern FL_EXPORT const char* fl_close;
#endif // !fl_ask_H
//
-// End of "$Id: fl_ask.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_ask.H 9748 2012-12-11 17:06:41Z manolo $".
//
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 7ee6c93..0719448 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw.H 9463 2012-05-08 16:15:34Z greg.ercolano $"
+// "$Id: fl_draw.H 10320 2014-09-18 15:25:55Z greg.ercolano $"
//
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
//
@@ -394,6 +394,24 @@ inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, doub
\param[in] start,end angles of start and end of arc measured in degrees
counter-clockwise from 3 o'clock. If \p end is less than \p start
then it draws the arc in a clockwise direction.
+
+ Examples:
+ \code
+ // Draw an arc of points
+ fl_begin_points();
+ fl_arc(100.0, 100.0, 50.0, 0.0, 180.0);
+ fl_end_points();
+
+ // Draw arc with a line
+ fl_begin_line();
+ fl_arc(200.0, 100.0, 50.0, 0.0, 180.0);
+ fl_end_line();
+
+ // Draw filled arc
+ fl_begin_polygon();
+ fl_arc(300.0, 100.0, 50.0, 0.0, 180.0);
+ fl_end_polygon();
+ \endcode
*/
inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); }
/**
@@ -513,11 +531,14 @@ FL_EXPORT int fl_height(int font, int size);
draw the text at so it looks centered vertically in that box.
*/
inline int fl_descent() {return fl_graphics_driver->descent();}
-/** Returns the typographical width of a nul-terminated string */
+/** Returns the typographical width of a nul-terminated string
+ using the current font face and size. */
FL_EXPORT double fl_width(const char* txt);
-/** Returns the typographical width of a sequence of \p n characters */
+/** Returns the typographical width of a sequence of \p n characters
+ using the current font face and size. */
inline double fl_width(const char* txt, int n) {return fl_graphics_driver->width(txt, n);}
-/** Returns the typographical width of a single character.
+/** Returns the typographical width of a single character
+ using the current font face and size.
\note if a valid fl_gc is NOT found then it uses the first window gc,
or the screen gc if no fltk window is available when called. */
inline double fl_width(unsigned int c) {return fl_graphics_driver->width(c);}
@@ -751,7 +772,8 @@ FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut, const char **eom)
FL_EXPORT unsigned int fl_old_shortcut(const char* s);
FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h);
FL_EXPORT void fl_overlay_clear();
-FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg=FL_BLACK, Fl_Color bg=FL_WHITE);
+FL_EXPORT void fl_cursor(Fl_Cursor);
+FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg, Fl_Color bg=FL_WHITE);
FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf,
double maxw, int& n, double &width,
int wrap, int draw_symbols = 0);
@@ -774,5 +796,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
#endif
//
-// End of "$Id: fl_draw.H 9463 2012-05-08 16:15:34Z greg.ercolano $".
+// End of "$Id: fl_draw.H 10320 2014-09-18 15:25:55Z greg.ercolano $".
//
diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h
index 0a051a7..a2fd6c9 100644
--- a/FL/fl_utf8.h
+++ b/FL/fl_utf8.h
@@ -1,4 +1,4 @@
-/* "$Id: fl_utf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+/* "$Id: fl_utf8.h 10259 2014-08-28 09:34:07Z ianmacarthur $"
*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2010 by O'ksi'D.
@@ -49,8 +49,6 @@
# define stricmp _stricmp
# undef strnicmp
# define strnicmp _strnicmp
-# undef hypot
-# define hypot _hypot
# undef chdir
# define chdir _chdir
# endif
@@ -61,7 +59,6 @@
#else /* X11 */
# include <sys/types.h>
# include <sys/stat.h>
-# include "Xutf8.h"
# include <X11/Xlocale.h>
# include <X11/Xlib.h>
# include <locale.h>
@@ -250,5 +247,5 @@ FL_EXPORT char fl_make_path( const char *path );
#endif /* _HAVE_FL_UTF8_HDR_ */
/*
- * End of "$Id: fl_utf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+ * End of "$Id: fl_utf8.h 10259 2014-08-28 09:34:07Z ianmacarthur $".
*/
diff --git a/FL/forms.H b/FL/forms.H
index 726ec7a..9d17990 100644
--- a/FL/forms.H
+++ b/FL/forms.H
@@ -1,5 +1,5 @@
//
-// "$Id: forms.H 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: forms.H 10410 2014-10-29 20:17:38Z cand $"
//
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
//
@@ -819,7 +819,7 @@ 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);
+void FL_EXPORT fl_gettime(long* sec, long* usec);
// Fl_XYPlot nyi
@@ -832,5 +832,5 @@ inline void fl_draw() {Fl::flush();}
#endif /* define __FORMS_H__ */
//
-// End of "$Id: forms.H 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: forms.H 10410 2014-10-29 20:17:38Z cand $".
//
diff --git a/FL/mac.H b/FL/mac.H
index e92a5b5..d0bc53a 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -1,5 +1,5 @@
//
-// "$Id: mac.H 9719 2012-11-13 14:45:42Z manolo $"
+// "$Id: mac.H 10305 2014-09-13 14:29:53Z manolo $"
//
// Mac header file for the Fast Light Tool Kit (FLTK).
//
@@ -49,6 +49,34 @@ typedef CGContextRef Fl_Offscreen;
#include <ApplicationServices/ApplicationServices.h>
#undef check // because of Fl::check()
+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+#ifndef MAC_OS_X_VERSION_10_7
+#define MAC_OS_X_VERSION_10_7 1070
+#endif
+#ifndef MAC_OS_X_VERSION_10_8
+#define MAC_OS_X_VERSION_10_8 1080
+#endif
+#ifndef MAC_OS_X_VERSION_10_9
+#define MAC_OS_X_VERSION_10_9 1090
+#endif
+#ifndef MAC_OS_X_VERSION_10_10
+#define MAC_OS_X_VERSION_10_10 101000
+#endif
+
+#ifdef __OBJC__
+@class NSCursor;
+#else
+class NSCursor;
+#endif // __OBJC__
+
typedef CGContextRef Fl_Offscreen;
typedef struct flCocoaRegion {
@@ -57,6 +85,7 @@ typedef struct flCocoaRegion {
} *Fl_Region; // a region is the union of a series of rectangles
# include "Fl_Window.H"
+# include "../src/Fl_Font.H"
// Some random X equivalents
struct XPoint { int x, y; };
@@ -83,8 +112,7 @@ inline void XDestroyRegion(Fl_Region r) {
free(r);
}
}
-extern void *fl_system_menu;
-extern void *fl_default_cursor;
+extern NSCursor *fl_default_cursor;
// This object contains all mac-specific stuff about a window:
// WARNING: this object is highly subject to change!
@@ -99,7 +127,7 @@ public:
Fl_X *next; // linked tree to support subwindows
Fl_X *xidChildren, *xidNext; // more subwindow tree
int wait_for_expose;
- void *cursor; // is really NSCursor*
+ NSCursor *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&);
@@ -120,9 +148,14 @@ public:
void collapse(void);
WindowRef window_ref(void);
void set_key_window(void);
- void set_cursor(Fl_Cursor);
+ // OS X doesn't have per window icons
+ static void set_default_icons(const Fl_RGB_Image*[], int) {};
+ void set_icons() {};
+ int set_cursor(Fl_Cursor);
+ int set_cursor(const Fl_RGB_Image*, int, int);
static CGImageRef CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, int h);
static unsigned char *bitmap_from_window_rect(Fl_Window *win, int x, int y, int w, int h, int *bytesPerPixel);
+ static CFDataRef CGBitmapContextToTIFF(CGContextRef c);
static Fl_Region intersect_region_and_rect(Fl_Region current, int x,int y,int w, int h);
static CGContextRef watch_cursor_image(void);
static CGContextRef help_cursor_image(void);
@@ -131,6 +164,10 @@ public:
static CGContextRef none_cursor_image(void);
static void *get_carbon_function(const char *name);
static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // compute work area of a given screen
+ static int next_marked_length; // next length of marked text after current marked text will have been replaced
+ static int insertion_point_location(int *px, int *py, int *pheight); // computes window coordinates & height of insertion point
+ static const int CoreText_threshold; // Mac OS version from which the Core Text API is used to display text
+ static Fl_Fontdesc* calc_fl_fonts(void); // computes the fl_fonts global variable
private:
static void relink(Fl_Window*, Fl_Window*);
bool subwindow;
@@ -140,26 +177,9 @@ extern Window fl_window;
#endif // FL_LIBRARY || FL_INTERNALS
-#ifndef MAC_OS_X_VERSION_10_4
-#define MAC_OS_X_VERSION_10_4 1040
-#endif
-#ifndef MAC_OS_X_VERSION_10_5
-#define MAC_OS_X_VERSION_10_5 1050
-#endif
-#ifndef MAC_OS_X_VERSION_10_6
-#define MAC_OS_X_VERSION_10_6 1060
-#endif
-#ifndef MAC_OS_X_VERSION_10_7
-#define MAC_OS_X_VERSION_10_7 1070
-#endif
-#ifndef MAC_OS_X_VERSION_10_8
-#define MAC_OS_X_VERSION_10_8 1080
-#endif
-
typedef CGImageRef Fl_Bitmask;
extern CGContextRef fl_gc;
-extern class Fl_Sys_Menu_Bar *fl_sys_menu_bar;
extern Window fl_xid(const Fl_Window*);
extern Fl_Window* fl_find(Window xid);
@@ -184,6 +204,7 @@ extern void fl_open_display();
/** \defgroup group_macosx Mac OS X-specific symbols
Mac OS X-specific symbols declared in <FL/x.H> or <FL/gl.h>
+ \sa \ref osissues_macos
@{ */
/** @brief Register a function called for each file dropped onto an application icon.
@@ -206,6 +227,11 @@ extern void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 0
*/
extern int fl_mac_os_version;
+/** The system menu bar.
+ */
+extern class Fl_Sys_Menu_Bar *fl_sys_menu_bar;
+
+
class Fl_Mac_App_Menu {
public:
/** Localizable text for the "About xxx" application menu item */
@@ -230,6 +256,6 @@ public:
/** @} */
//
-// End of "$Id: mac.H 9719 2012-11-13 14:45:42Z manolo $".
+// End of "$Id: mac.H 10305 2014-09-13 14:29:53Z manolo $".
//
diff --git a/FL/win32.H b/FL/win32.H
index 65165fd..1f4102b 100644
--- a/FL/win32.H
+++ b/FL/win32.H
@@ -1,5 +1,5 @@
//
-// "$Id: win32.H 9278 2012-03-12 11:55:50Z manolo $"
+// "$Id: win32.H 10312 2014-09-15 09:35:05Z ossman $"
//
// WIN32 header file for the Fast Light Tool Kit (FLTK).
//
@@ -73,19 +73,25 @@ public:
int wait_for_expose;
HDC private_dc; // used for OpenGL
HCURSOR cursor;
+ int custom_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 make_fullscreen(int X, int Y, int W, int H);
void setwindow(Fl_Window* wi) {w=wi; wi->i=this;}
void flush() {w->flush();}
void set_minmax(LPMINMAXINFO minmax);
void mapraise();
+ static void set_default_icons(const Fl_RGB_Image*[], int);
+ static void set_default_icons(HICON, HICON);
+ void set_icons();
+ int set_cursor(Fl_Cursor);
+ int set_cursor(const Fl_RGB_Image*, int, int);
static Fl_X* make(Fl_Window*);
};
-extern FL_EXPORT HCURSOR fl_default_cursor;
extern FL_EXPORT UINT fl_wake_msg;
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()
@@ -95,6 +101,8 @@ extern FL_EXPORT void fl_save_dc( HWND w, HDC dc);
inline Window fl_xid(const Fl_Window* w) { Fl_X *temp = Fl_X::i(w); return temp ? temp->xid : 0; }
+extern FL_EXPORT void fl_open_display();
+
#else
FL_EXPORT Window fl_xid_(const Fl_Window* w);
#define fl_xid(w) fl_xid_(w)
@@ -151,5 +159,5 @@ 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 // FL_DOXYGEN
//
-// End of "$Id: win32.H 9278 2012-03-12 11:55:50Z manolo $".
+// End of "$Id: win32.H 10312 2014-09-15 09:35:05Z ossman $".
//
diff --git a/FL/x.H b/FL/x.H
index 8fbc9fd..85c6f6c 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -1,5 +1,5 @@
//
-// "$Id: x.H 9299 2012-03-23 16:47:53Z manolo $"
+// "$Id: x.H 10412 2014-10-29 20:25:46Z cand $"
//
// X11 header file for the Fast Light Tool Kit (FLTK).
//
@@ -52,7 +52,6 @@
# endif
# include <X11/Xatom.h>
# include "Fl_Window.H"
-# include "Xutf8.h"
// Mirror X definition of Region to Fl_Region, for portability...
typedef Region Fl_Region;
@@ -84,11 +83,7 @@ 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_Surface_Device::surface() == Fl_Display_Device::display_device() ? \
- fl_window : fl_xid(Fl::first_window()) ) , \
- w, h, fl_visual->depth)
+# define fl_create_offscreen(w,h) XCreatePixmap(fl_display, RootWindow(fl_display, fl_screen), 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; \
@@ -97,7 +92,7 @@ typedef ulong Fl_Offscreen;
# define fl_end_offscreen() \
fl_pop_clip(); fl_window = _sw; _ss->set_current()
-extern void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
+extern FL_EXPORT void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy);
# define fl_delete_offscreen(pixmap) XFreePixmap(fl_display, pixmap)
// Bitmap masks
@@ -154,6 +149,10 @@ public:
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 set_default_icons(const Fl_RGB_Image*[], int);
+ void set_icons();
+ int set_cursor(Fl_Cursor);
+ int set_cursor(const Fl_RGB_Image*, int, int);
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:
@@ -161,6 +160,7 @@ public:
static void x(Fl_Window* wi, int X) {wi->x(X);}
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
static int ewmh_supported();
+ static void activate_window(Window w);
};
extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
@@ -170,7 +170,7 @@ inline Window fl_xid(const Fl_Window* w) { Fl_X *xTemp = Fl_X::i(w); return xTem
#else
-extern Window fl_xid_(const Fl_Window* w);
+extern FL_EXPORT Window fl_xid_(const Fl_Window* w);
#define fl_xid(w) fl_xid_(w)
#endif // FL_LIBRARY || FL_INTERNALS
@@ -187,5 +187,5 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b)
#endif
//
-// End of "$Id: x.H 9299 2012-03-23 16:47:53Z manolo $".
+// End of "$Id: x.H 10412 2014-10-29 20:25:46Z cand $".
//
diff --git a/Makefile b/Makefile
index 0e3a832..56cf736 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile 8864 2011-07-19 04:49:30Z greg.ercolano $"
+# "$Id: Makefile 10224 2014-08-01 20:56:09Z greg.ercolano $"
#
# Top-level makefile for the Fast Light Tool Kit (FLTK).
#
@@ -60,13 +60,13 @@ depend: makeinclude
clean:
-$(RM) core *.o
- for dir in $(DIRS); do\
+ for dir in examples $(DIRS); do\
echo "=== cleaning $$dir ===";\
(cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
done
distclean: clean
- $(RM) config.*
+ $(RM) config.h config.log config.status
$(RM) fltk-config fltk.list makeinclude
$(RM) fltk.spec
$(RM) FL/Makefile
@@ -90,7 +90,7 @@ fltk-config: configure configh.in fltk-config.in
touch config.h
chmod +x fltk-config
-makeinclude: configure configh.in makeinclude.in
+makeinclude: configure configh.in makeinclude.in config.guess config.sub
if test -f config.status; then \
./config.status --recheck; \
./config.status; \
@@ -103,6 +103,11 @@ makeinclude: configure configh.in makeinclude.in
# configure: configure.in
# autoconf
+config.guess config.sub:
+ -automake --add-missing 2> /dev/null
+ if [ ! -e config.sub ]; then echo NOTE: Using frozen copy of config.sub; cp misc/config.sub . ; fi
+ if [ ! -e config.guess ]; then echo NOTE: Using frozen copy of config.guess; cp misc/config.guess . ; fi
+
portable-dist:
epm -v -s fltk.xpm fltk
@@ -126,5 +131,5 @@ clang-changes:
#
-# End of "$Id: Makefile 8864 2011-07-19 04:49:30Z greg.ercolano $".
+# End of "$Id: Makefile 10224 2014-08-01 20:56:09Z greg.ercolano $".
#
diff --git a/README b/README
index 80273a8..d853d46 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README - Fast Light Tool Kit (FLTK) Version 1.3.0
+README - Fast Light Tool Kit (FLTK) Version 1.3.3
-------------------------------------------------
WHAT IS FLTK?
@@ -18,7 +18,7 @@ LICENSING
FLTK comes with complete free source code. FLTK is available
under the terms of the GNU Library General Public License.
Contrary to popular belief, it can be used in commercial
- software! (Even Bill Gates could use it.)
+ software! (Even Bill Gates could use it.)
ON-LINE DOCUMENTATION
@@ -79,15 +79,32 @@ BUILDING AND INSTALLING FLTK UNDER UNIX AND Mac OS X
install". This will copy the "fluid" executable to
"bindir", the header files to "includedir", and the library
files to "libdir".
-
+
To install additional files and icons to be used by the main
desktop environments such as KDE, GNOME and XFCE, you will also
need to run "make install-desktop" as root.
+SVN USERS
+
+ If you've just checked out a fresh copy of FLTK from SVN,
+ you'll need to generate an initial version of 'configure'
+ by running 'make makeinclude'. (We don't include a copy
+ of configure in svn)
+
+
+MAKE TARGETS
+
+ make -- builds the library + test programs (does not install)
+ make install -- builds and installs
+ make clean -- clean for a rebuild
+ make distclean -- like 'clean', but also removes docs, configure, fltk-config
+ ( cd src; make ) -- builds just the fltk libraries
+
+
BUILDING FLTK UNDER MICROSOFT WINDOWS
- There are two ways to build FLTK under Microsoft Windows.
+ There are two ways to build FLTK under Microsoft Windows.
The first is to use the Visual C++ project files under the
"ide/" directory. See the file ide/README.IDE for more info.
@@ -98,6 +115,20 @@ BUILDING FLTK UNDER MICROSOFT WINDOWS
sh configure ...options...
+BUILDING HTML DOCUMENTATION
+
+ If you want to build the HTML documentation:
+
+ ( cd documentation && make html )
+
+ If you want to build the PDF documentation:
+
+ ( cd documentation && make pdf )
+
+ FLTK uses doxygen for documentation, so you'll at least need doxygen
+ installed for creating html docs, and LaTeX for creating PDF docs.
+
+
INTERNET RESOURCES
FLTK is available on the 'net in a bunch of locations:
@@ -106,23 +137,16 @@ INTERNET RESOURCES
http://www.fltk.org/str.php [for reporting bugs]
http://www.fltk.org/software.php [source code]
- - FTP: http://ftp.easysw.com/pub/fltk
- ftp://ftp.easysw.com/pub/fltk
- ftp://ftp2.easysw.com/pub/fltk
+ - FTP: (offline Apr 20 '13) http://ftp.easysw.com/pub/fltk
+ (offline Apr 20 '13) ftp://ftp.easysw.com/pub/fltk
+ (offline Apr 20 '13) ftp://ftp2.easysw.com/pub/fltk
ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk
ftp://linux.mathematik.tu-darmstadt.de/pub/linux/mirrors/misc/fltk
ftp://gd.tuwien.ac.at/hci/fltk
- - EMail: fltk@fltk.org [see instructions below]
-
- To send a message to the FLTK mailing list ("fltk@fltk.org")
- you must first join the list. Non-member submissions are
- blocked to avoid problems with SPAM.
-
To join the FLTK mailing list, go the following web page:
- http://lists.easysw.com/listinfo/fltk
-
+ http://www.fltk.org/newsgroups.php
REPORTING BUGS
@@ -145,8 +169,8 @@ TRADEMARKS
COPYRIGHT
- FLTK is copyright 1998-2011 by Bill Spitzak
- (spitzak@users.sourceforge.net) and others,
+ FLTK is copyright 1998-2013 by Bill Spitzak
+ (spitzak@users.sourceforge.net) and others,
see the CREDITS file for more info.
This library is free software. Distribution and use rights are
diff --git a/README.CMake.txt b/README.CMake.txt
index 780ad75..4824e7b 100644
--- a/README.CMake.txt
+++ b/README.CMake.txt
@@ -1,4 +1,4 @@
-README.CMake.txt - 2010-12-20 - Building and using FLTK with CMake
+README.CMake.txt - 2014-09-27 - Building and using FLTK with CMake
------------------------------------------------------------------
@@ -69,50 +69,51 @@ toolchain. Other platforms are just as easy to use.
OPTIONS
---------
+Options can be specified to cmake with the -D flag:
+
+ cmake -D <OPTION_NAME>=<OPTION_VALUE>
+
+Example:
+
+ cmake -D CMAKE_BUILD_TYPE=Debug
All options have sensible defaults so you won't usually need to touch these.
-There are only two CMake options that you may want to specify.
+There are only two CMake options that you may want to specify:
CMAKE_BUILD_TYPE
- This specifies what kind of build this is i.e. Release, Debug...
-Platform specific compile/link flags/options are automatically selected
-by CMake depending on this value.
+ This specifies what kind of build this is i.e. Release, Debug...
+ Platform specific compile/link flags/options are automatically selected
+ by CMake depending on this value.
CMAKE_INSTALL_PREFIX
- Where everything will go on install. Defaults are /usr/local for unix
-and C:\Program Files\FLTK for Windows.
+ Where everything will go on install. Defaults are /usr/local for unix
+ and C:\Program Files\FLTK for Windows.
-These are the FLTK specific options. Platform specific options are ignored
-on other platforms.
+The following are the FLTK specific options. Platform specific options
+are ignored on other platforms.
OPTION_OPTIM
Extra optimization flags.
+
OPTION_ARCHFLAGS
Extra architecture flags.
- The OPTION_PREFIX_* flags are for fine-tuning where everything goes
-on the install.
-OPTION_PREFIX_BIN
-OPTION_PREFIX_LIB
-OPTION_PREFIX_INCLUDE
-OPTION_PREFIX_DATA
-OPTION_PREFIX_DOC
-OPTION_PREFIX_CONFIG
-OPTION_PREFIX_MAN
-
OPTION_APPLE_X11 - default OFF
In case you want to use X11 on OSX. Not currently supported.
+
OPTION_USE_POLL - default OFF
Don't use this one either.
OPTION_BUILD_SHARED_LIBS - default OFF
Normally FLTK is built as static libraries which makes more portable
-binaries. If you want to use shared libraries, this will build them too.
+ binaries. If you want to use shared libraries, this will build them too.
+
OPTION_BUILD_EXAMPLES - default ON
Builds the many fine example programs.
OPTION_CAIRO - default OFF
Enables libcairo support
+
OPTION_CAIROEXT - default OFF
Enables extended libcairo support
@@ -125,17 +126,16 @@ OPTION_USE_THREADS - default ON
OPTION_LARGE_FILE - default ON
Enables large file (>2G) support
- FLTK has built in jpeg zlib and png libraries. These let you use
-system libraries instead, unless CMake can't find them.
OPTION_USE_SYSTEM_LIBJPEG - default ON
OPTION_USE_SYSTEM_ZLIB - default ON
OPTION_USE_SYSTEM_LIBPNG - default ON
+ FLTK has built in jpeg zlib and png libraries. These let you use
+ system libraries instead, unless CMake can't find them.
- X11 extended libraries.
OPTION_USE_XINERAMA - default ON
OPTION_USE_XFT - default ON
OPTION_USE_XDBE - default ON
-
+ These are X11 extended libraries.
BUILDING UNDER LINUX WITH UNIX MAKEFILES
------------------------------------------
@@ -143,24 +143,30 @@ OPTION_USE_XDBE - default ON
After untaring the FLTK source, go to the root of the FLTK tree and type
the following.
-mkdir build
-cd build
-cmake ..
-make
-sudo make install
+ mkdir build
+ cd build
+ cmake ..
+ make
+ sudo make install
This will build and install a default configuration FLTK.
+Some flags can be changed during the 'make' command, such as:
+
+ make VERBOSE=on
+
+..which builds in verbose mode, so you can see all the compile/link commands.
+
CROSSCOMPILING
----------------
-Once you have a crosscompiler going, to use CMAke to build FLTK you need
+Once you have a crosscompiler going, to use CMake to build FLTK you need
two more things. You need a toolchain file which tells CMake where your
build tools are. The CMake website is a good source of information on
this file. Here's mine for MinGW under Linux.
-----
+----
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Windows)
@@ -180,7 +186,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH}/usr CACHE FILEPATH
"install path prefix")
-
----
Not too tough. The other thing you need is a native installation of FLTK
@@ -189,11 +194,11 @@ compile the *.fl into C++ source and header files.
So, again from the FLTK tree root.
-mkdir mingw
-cd mingw
-cmake -DCMAKE_TOOLCHAIN_FILE=~/projects/toolchain/Toolchain-mingw32.cmake ..
-make
-sudo make install
+ mkdir mingw
+ cd mingw
+ cmake -DCMAKE_TOOLCHAIN_FILE=~/projects/toolchain/Toolchain-mingw32.cmake ..
+ make
+ sudo make install
This will create a default configuration FLTK suitable for mingw/msys and
install it in the /usr/i486-mingw32/usr tree.
@@ -203,6 +208,11 @@ install it in the /usr/i486-mingw32/usr tree.
USING CMAKE WITH FLTK
=======================
+The CMake Export/Import facility can be thought of as an automated
+fltk-config. For example, if you link your program to the fltk
+library, it will automatically link in all of its dependencies. This
+includes any special flags. ie on Linux it includes the -lpthread flag.
+
This howto assumes that you have FLTK libraries which were built using
CMake, installed. Building them with CMake generates some CMake helper
files which are installed in standard locations, making FLTK easy to find
@@ -216,6 +226,12 @@ cmake_minimum_required(VERSION 2.6)
project(hello)
+# the following line is required only if you don't install FLTK
+# or if find_package can't find your installation directory
+# it points to the build directory or the base folder,
+# not the library folder.
+set(FLTK_DIR /path/to/fltk)
+
find_package(FLTK REQUIRED NO_MODULE)
include(${FLTK_USE_FILE})
@@ -225,36 +241,35 @@ target_link_libraries(hello fltk)
------
+The set(FLTK_DIR ...) command is a superhint to the find_package command.
+This is very useful if you don't install or have a non-standard install.
The find_package command tells CMake to find the package FLTK, REQUIRED
means that it is an error if it's not found. NO_MODULE tells it to search
only for the FLTKConfig file, not using the FindFLTK.cmake supplied with
CMake, which doesn't work with this version of FLTK.
Once the package is found we include the ${FLTK_USE_FILE} which adds the
-FLTK include directories and library link information to its knowledge
-base. After that your programs will be able to find FLTK headers and
-when you link the fltk library, it automatically links the libraries
-fltk depends on.
+FLTK include directories to its knowledge base. After that your programs
+will be able to find FLTK headers.
The WIN32 in the add_executable tells your Windows compiler that this is
a gui app. It is ignored on other platforms.
-
LIBRARY NAMES
---------------
When you use the target_link_libraries command, CMake uses it's own
internal names for libraries. The fltk library names are:
-fltk fltk_forms fltk_images fltk_gl
+ fltk fltk_forms fltk_images fltk_gl
and for the shared libraries (if built):
-fltk_SHARED fltk_forms_SHARED fltk_images_SHARED fltk_gl_SHARED
+ fltk_SHARED fltk_forms_SHARED fltk_images_SHARED fltk_gl_SHARED
The built-in libraries (if built):
-fltk_jpeg fltk_png fltk_z
+ fltk_jpeg fltk_png fltk_z
USING FLUID FILES
@@ -285,3 +300,5 @@ when find_package(FLTK REQUIRED NO_MODULE) succeeds.
==================
Dec 20 2010 - matt: merged and restructures
+May 15 2013 - erco: small formatting tweaks, added some examples
+Feb 23 2014 - msurette: updated to reflect changes to the CMake files
diff --git a/README.MSWindows.txt b/README.MSWindows.txt
index c9de96d..2d77405 100644
--- a/README.MSWindows.txt
+++ b/README.MSWindows.txt
@@ -214,9 +214,11 @@ in my dev directory:
Configuring FLTK
------------------
-Stay in your FLTK source-code directory. Type:
+If you got FLTK via subversion then you need one extra step. Otherwise skip
+over this part. Stay in your FLTK source-code directory and type the
+following:
- autoconf
+ NOCONFIGURE=1 ./autogen.sh
Now configure your FLTK installation:
@@ -238,6 +240,22 @@ linking:
./configure <config flags> LDFLAGS=-Wl,--enable-auto-import
:END_ADVANCED
+Known Problems:
+
+ There is a known incompatibility with some Windows subversion tools that
+ may not set the correct line endings for autoconf. If you get strange
+ error messages when running ./configure or make, you may need to convert
+ configh.in to "Unix line endings" (LF-only). These error messages are
+ unspecific, e.g. compilation errors like:
+
+ error: 'U32' does not name a type
+ error: 'bmibuffer' was not declared in this scope
+
+ You can fix the line endings with the MinGW/msys tool 'unix2dos' (u2d)
+ or with your favorite editor, if it allows to change the line endings,
+ then run autoconf and ./configure again.
+ For further information see this bug report:
+ http://www.fltk.org/newsgroups.php?gfltk.bugs+v:10197
Building FLTK
---------------
@@ -535,7 +553,7 @@ is changed, the corresponding .cxx file will be recompiled.
Windows has a flag that determines whether an application
runs in the foreground with a console or in the background
-without a console.
+without a console.
If you're using gcc (i.e. MinGW or Cygwin), then use the
linker option "-mwindows" to make your application run in
diff --git a/README.OSX.txt b/README.OSX.txt
index 9d05199..afa35a8 100644
--- a/README.OSX.txt
+++ b/README.OSX.txt
@@ -40,11 +40,14 @@ README.OSX.txt - 2010-10-23 - Building FLTK under Apple OS X
1 INTRODUCTION
=================
+FLTK supports all Mac OS X versions above 10.3 (Panther). See below for how to
+build FLTK applications that can run on all (old or recent) Mac OS X versions.
+
FLTK currently supports the following development environments on the Apple OS X
platform:
- gcc command line tools
- - Xcode 3.x
+ - Xcode 3.x and higher
CAUTION: gcc command line built libraries and Xcode created Frameworks should
not be mixed!
@@ -77,7 +80,7 @@ Download FLTK from here:
If you are familiar with "subversion" and like to stay current with your
version, you will find the subversion access parameters at the bottom of that
-page. Unpack FLTK into a convinient location. I like to have everything in my
+page. Unpack FLTK into a convenient location. I like to have everything in my
dev directory:
cd
@@ -91,9 +94,11 @@ dev directory:
2.3 Configuring FLTK
-----------------------
-Stay in your FLTK source-code directory. Type:
-
- autoconf
+If you got FLTK via subversion then you need one extra step. Otherwise skip
+over this part. Stay in your FLTK source-code directory and type the
+following:
+
+ NOCONFIGURE=1 ./autogen.sh
Now configure your FLTK installation:
@@ -105,6 +110,10 @@ more details can be found in README.
To create Universal Binaries, start "configure" with these flags:
./configure --with-archflags="-arch i386 -arch ppc -arch x86_64"
+
+To create applications that can run under Mac OS X 10.4 and above, use these flags:
+ ./configure CXXFLAGS="-mmacosx-version-min=10.4" LDFLAGS="-mmacosx-version-min=10.4"
+
:END_ADVANCED
The configuration script will check your machine for the required resources
@@ -210,6 +219,11 @@ Use the "Project" pulldown menu to change "Active Build Configuration" to
Use the "Project" pulldown menu to set the "Active Target" to "Demo".
Select "Build" from the "Build" menu to create all libraries and test applications.
+By default, the Xcode3 project builds applications that run under Mac OS X 10.5 and above.
+To build applications that run under older Mac OS versions, select "Edit Project Settings"
+of the Project menu, then select the Build panel, and modify the "Mac OS X Deployment Target"
+item.
+
All frameworks and apps will be located in "./ide/Xcode3/build/Release/".
@@ -327,7 +341,7 @@ follow the instructions.
In order to build FLTK from within Xcode 4, you need to install the Xcode
developer environment via the Apple App Store that comes with Lion and up.
If you also want the command line version of gcc, you can use the
-Downlaod section in the Preferences dialog.
+Download section in the Preferences dialog.
4.2 Downloading and Unpacking
@@ -362,6 +376,10 @@ Use the "Scheme" pulldown menu to change the active target to "Demo" and
"My Mac 32-bit" or "My Mac 64-bit". Select "Build for" -> "Running"Run" from
the "Product" menu to create all libraries and test applications.
+By default, the Xcode4 project builds applications that need the current Mac OS X version.
+To build applications that also run under older Mac OS versions, modify the "OS X Deployment
+Target" item of the FLTK project build settings.
+
All frameworks and apps will be located in a private directory. Use
"Window"->"Organizer" to find the full path.
@@ -443,3 +461,4 @@ Dec 29 2010 - Manolo: removed reference to AudioToolbox.framework that's no long
Feb 24 2011 - Manolo: architecture flags are not propagated to the fltk-config script.
Apr 17 2012 - matt: added Xcode4 documentation
Nov 13 2012 - Manolo: added "MAKE AN APPLICATION LAUNCHABLE BY DROPPING FILES ON ITS ICON"
+Apr 28 2014 - Manolo: how to build programs that run on various Mac OS X versions
diff --git a/README.Unix.txt b/README.Unix.txt
index 95f5236..096d017 100644
--- a/README.Unix.txt
+++ b/README.Unix.txt
@@ -15,9 +15,11 @@ README.Unix.txt - 2010-11-14 - Building FLTK on Unix
2.5 * http://www.opensuse.org/en/
2.6 * http://www.debian.org/
2.7 * Mandrake?
- 2.8 * Sun?
+ 2.8 SunOS / Solaris
2.9 * SGI?
- 2.10 * HPUX?
+ 2.10 HP-UX
+ 2.11 AIX
+ 2.12 NetBSD
3 HOW TO BUILD FLTK USING GCC
3.1 Prerequisites
3.2 Downloading and Unpacking
@@ -81,7 +83,7 @@ If you are planning to use the Code::Blocks IDE, also install this
I like to use subversion to install the latest FLTK-1.3.release:
- svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
+ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
To update to the latest version, just go into the fltk-1.3 directory and type
@@ -117,7 +119,7 @@ If you are planning to use the Code::Blocks IDE, also install this
I like to use subversion to install the latest FLTK-1.3.release:
- svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
+ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
To update to the latest version, just go into the fltk-1.3 directory and type
@@ -152,7 +154,7 @@ yourself to the "sudo" list.
I like to use subversion to install the latest FLTK-1.3.release:
- svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
+ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
To update to the latest version, just go into the fltk-1.3 directory and type
@@ -161,6 +163,108 @@ To update to the latest version, just go into the fltk-1.3 directory and type
FIXME: no FL_SYMBOL font (-*-symbol-*), font 15 (Zapf-Dingbats)
+ 2.8 SunOS / Solaris
+----------------------
+
+SunOS is a commercial operating system from Sun Microsystems (in 2009 the
+company was sold to Oracle). SunOS is also called Solaris since version 5.
+There was an open source derivative called OpenSolaris (based on Solaris 10)
+that was cancelled by Oracle. The successor in spirit is called OpenIndiana
+and can be downloaded from here:
+
+ http://www.openindiana.org/
+
+For FLTK you need at least SunOS 5.7 (aka Solaris 7). This version supports
+64 bit machines and POSIX threads. For machines with 64 bit SPARC processors
+it is highly recommended to use Sun compilers, the 64 bit code generated by
+older versions of GCC for such machines is unusable (expect something between
+horribly broken and immediate crash).
+
+Consider using pkgsrc with this operating system. See the NetBSD section if
+you want to do so.
+If you have GCC and Sun compilers installed, configure your environment like
+this to use the Sun compilers and pkgsrc graphics libraries:
+
+ export CC="cc"
+ export CXX="CC"
+ export CPPFLAGS="-I/usr/pkg/include"
+ export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
+
+To build a 64 bit FLTK library, add the following flags:
+
+ export CFLAGS="-xarch=v9"
+ export CXXFLAGS="-xarch=v9"
+
+
+ 2.10 HP-UX
+-------------
+
+HP-UX is a commercial operating system from HP, no free or open source
+derivatives are available.
+
+For FLTK you need at least HP-UX 11.11 and the latest patch bundles should be
+installed.
+
+Consider using pkgsrc with this operating system. See the NetBSD section if
+you want to do so.
+
+
+ 2.11 AIX
+-----------
+
+AIX is a commercial operating system from IBM, no free or open source
+derivatives are available.
+
+For FLTK you need at least AIX 5L, I have tested version 5.1 patched to ML9.
+
+Consider using pkgsrc with this operating system. See the NetBSD section if
+you want to do so.
+
+
+ 2.12 NetBSD
+--------------
+
+NetBSD can be downloaded here:
+
+ http://www.netbsd.org/
+
+If you have not done so yet, download and install NetBSD. Ensure that the
+optional distribution sets "comp" (Compiler, header files, development tools)
+and x*** (X Window System) are installed.
+
+Now install and configure pkgsrc. The current version can be downloaded here:
+
+ http://www.pkgsrc.org/
+
+To use the current stable version of FLTK, simply install it from pkgsrc:
+
+ cd /usr/pkgsrc/x11/fltk13
+ bmake install
+
+For the latest development snapshot, first install the svn client from pkgsrc:
+
+ cd /usr/pkgsrc/devel/subversion
+ bmake install
+
+Now fetch the latest FLTK source code:
+
+ svn co http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
+
+To update to the latest version, just go into the fltk-1.3 directory and type
+
+ svn update
+
+If you have installed JPEG and PNG libraries from pkgsrc, configure your
+environment as follows so that the FLTK configure script can find them:
+
+ export CPPFLAGS="-I/usr/pkg/include"
+ export LDFLAGS="-L/usr/pkg/lib"
+
+To install GNU autoconf from pkgsrc:
+
+ cd /usr/pkgsrc/devel/autoconf
+ bmake install
+
3 HOW TO BUILD FLTK USING GCC
================================
@@ -189,9 +293,11 @@ dev directory:
3.2 Configuring FLTK
-----------------------
-Stay in your FLTK source-code directory. Type:
-
- autoconf
+If you got FLTK via subversion then you need one extra step. Otherwise skip
+over this part. Stay in your FLTK source-code directory and type the
+following:
+
+ NOCONFIGURE=1 ./autogen.sh
Now configure your FLTK installation:
@@ -296,6 +402,36 @@ The linker flags are located in the "Linker Settings" tab under "Other Linker
Options". Add the flags to `fltk-config --ldstaticflags` in front of the
second "`".
+CodeBlocks can be set up to use fluid to manage modules..
+The following info is from mingodad@gmail.com posted on fltk.general 06/17/2013:
+
+"""
+ I have these settings in codeblocks on linux:
+
+ Settings ->
+ Compiler and debugging settings ->
+ Other settings ->
+ Advanced options:
+
+ -- Add an extension (in my case "fl")
+
+ -- On command line macro:
+ cd $file_dir; fluid -c $file
+
+ -- Generated files (to be further compiled):
+ $file_dir/$file_name.cxx
+ $file_dir/$file_name.h
+
+ Settings -> Environment -> Files extension handling :
+ Wildcard : *.fl
+ To open file: Launch an external program
+ External program: fluid
+
+ With that I can double click on any fluid file I include on a project
+ and it opens with fluid. When I press "run" or "build" codeblocks
+ calls fluid to generate the c++ files and compiles if needed.
+"""
+
5 DOCUMENT HISTORY
@@ -304,3 +440,4 @@ second "`".
Oct 30 2010 - matt: added Code::Blocks chapter
Oct 28 2010 - matt: restructured entire document and verified instructions
Nov 14 2010 - duncan: added install-desktop
+Jun 17 2013 - erco: added mingodad's CodeBlocks/Fluid recommendations
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..31e5c84
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.3.3
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..e27ae85
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+srcdir=`cd $srcdir && pwd`
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoconf --force || exit 1
+automake --add-missing
+if test ! -e config.sub; then echo NOTE: Using frozen copy of config.sub; cp misc/config.sub . ; fi
+if test ! -e config.guess; then echo NOTE: Using frozen copy of config.guess; cp misc/config.guess . ; fi
+cd $ORIGDIR || exit $?
+
+test -n "$NOCONFIGURE" || $srcdir/configure "$@"
diff --git a/cairo/CMakeLists.txt b/cairo/CMakeLists.txt
index e6ac7a6..2cfa912 100644
--- a/cairo/CMakeLists.txt
+++ b/cairo/CMakeLists.txt
@@ -1,27 +1,17 @@
-project(FLTKcairo)
-include_directories(${FLTKcairo_SOURCE_DIR})
-include_directories(${FLTKcairo_BINARY_DIR})
include_directories(${PKG_CAIRO_INCLUDE_DIRS})
# source files for cairo
set(cairo_SRCS Fl_Cairo.cxx)
#######################################################################
-add_library(fltk_cairo ${cairo_SRCS})
+FL_ADD_LIBRARY(fltk_cairo STATIC "${cairo_SRCS}")
-if(MSVC)
- set_target_properties(fltk_cairo
- PROPERTIES
- OUTPUT_NAME fltkcairo
- DEBUG_OUTPUT_NAME fltkcairod
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_cairo PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
-endif(MSVC)
+#######################################################################
+if(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
+FL_ADD_LIBRARY(fltk_cairo SHARED "${cairo_SRCS}")
-install(TARGETS fltk_cairo
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+#######################################################################
+endif(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
diff --git a/cairo/Fl_Cairo.cxx b/cairo/Fl_Cairo.cxx
index eb35265..300e909 100644
--- a/cairo/Fl_Cairo.cxx
+++ b/cairo/Fl_Cairo.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Cairo.cxx 9250 2012-02-21 12:27:31Z manolo $"
+// "$Id: Fl_Cairo.cxx 10027 2013-12-11 06:33:14Z fabien $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
@@ -85,6 +85,7 @@ cairo_t * Fl::cairo_make_current(Fl_Window* wi) {
Creates transparently a cairo_surface_t object.
gc is an HDC context in WIN32, a CGContext* in Quartz, a display on X11
*/
+
static cairo_surface_t * cairo_create_surface(void * gc, int W, int H) {
# if defined(USE_X11)
return cairo_xlib_surface_create(fl_display, fl_window, fl_visual->visual, W, H);
@@ -133,13 +134,15 @@ cairo_t * Fl::cairo_make_current(void *gc) {
cairo_state_.gc(0); // keep track for next time
return 0;
}
- if (gc==Fl::cairo_state_.gc() && fl_window== (Window) Fl::cairo_state_.window())
+ if (gc==Fl::cairo_state_.gc() &&
+ fl_window== (Window) Fl::cairo_state_.window() &&
+ cairo_state_.cc()!=0)
return Fl::cairo_cc();
cairo_state_.gc(fl_gc); // keep track for next time
cairo_surface_t * s = cairo_create_surface(gc, W, H);
cairo_t * c = cairo_create(s);
cairo_surface_destroy(s);
- Fl::cairo_cc(c);
+ cairo_state_.cc(c);
return c;
}
@@ -148,10 +151,17 @@ cairo_t * Fl::cairo_make_current(void *gc) {
\note Only available when configure has the --enable-cairo option
*/
cairo_t * Fl::cairo_make_current(void *gc, int W, int H) {
- cairo_surface_t * s = cairo_create_surface(gc, W, H);
+ if (gc==Fl::cairo_state_.gc() &&
+ fl_window== (Window) Fl::cairo_state_.window() &&
+ cairo_state_.cc()!=0) // no need to create a cc, just return that one
+ return cairo_state_.cc();
+
+ // we need to (re-)create a fresh cc ...
+ cairo_state_.gc(gc); // keep track for next time
+ cairo_surface_t * s = cairo_create_surface(gc, W, H);
cairo_t * c = cairo_create(s);
+ cairo_state_.cc(c); // and purge any previously owned context
cairo_surface_destroy(s);
- Fl::cairo_cc(c);
return c;
}
#else
@@ -161,5 +171,5 @@ FL_EXPORT int fltk_cairo_dummy() { return 1;}
#endif // FLTK_HAVE_CAIRO
//
-// End of "$Id: Fl_Cairo.cxx 9250 2012-02-21 12:27:31Z manolo $" .
+// End of "$Id: Fl_Cairo.cxx 10027 2013-12-11 06:33:14Z fabien $" .
//
diff --git a/cairo/Makefile b/cairo/Makefile
index a775d60..3b239a0 100644
--- a/cairo/Makefile
+++ b/cairo/Makefile
@@ -55,7 +55,7 @@ libfltk_cairo.1.3.dylib: $(CAIROOBJECTS) ../src/libfltk.1.3.dylib
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
- -current_version 1.3.0 \
+ -current_version 1.3.3 \
-compatibility_version 1.3.0 \
$(CAIROOBJECTS) -L../src $(LDLIBS) $(CAIROLIBS) -lfltk
$(RM) libfltk_cairo.dylib
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..9633db7
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1791 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-08-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configh.cmake.in b/configh.cmake.in
index b4d17df..d0b69c4 100644
--- a/configh.cmake.in
+++ b/configh.cmake.in
@@ -1,5 +1,5 @@
/*
- * "$Id: configh.cmake.in 8864 2011-07-19 04:49:30Z greg.ercolano $"
+ * "$Id: configh.cmake.in 10196 2014-06-16 11:17:57Z ossman $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
* @configure_input@
@@ -108,6 +108,22 @@
#define USE_XDBE HAVE_XDBE
/*
+ * HAVE_XFIXES:
+ *
+ * Do we have the X fixes extension?
+ */
+
+#cmakedefine01 HAVE_XFIXES
+
+/*
+ * HAVE_XCURSOR:
+ *
+ * Do we have the X cursor library?
+ */
+
+#cmakedefine01 HAVE_XCURSOR
+
+/*
* __APPLE_QUARTZ__:
*
* If __APPLE_QUARTZ__ is defined, FLTK will be
@@ -293,16 +309,6 @@
#endif /* HAVE_LONG_LONG */
/*
- * Do we have the strtoll() function?
- */
-
-#cmakedefine HAVE_STRTOLL @HAVE_STRTOLL@
-
-#ifndef HAVE_STRTOLL
-# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
-#endif /* !HAVE_STRTOLL */
-
-/*
* Do we have the dlsym() function and header?
*/
@@ -310,5 +316,5 @@
#cmakedefine HAVE_DLSYM @HAVE_DLSYM@
/*
- * End of "$Id: configh.cmake.in 8864 2011-07-19 04:49:30Z greg.ercolano $".
+ * End of "$Id: configh.cmake.in 10196 2014-06-16 11:17:57Z ossman $".
*/
diff --git a/configh.in b/configh.in
index 293b465..b27ad94 100644
--- a/configh.in
+++ b/configh.in
@@ -1,5 +1,5 @@
/*
- * "$Id: configh.in 9123 2011-10-04 09:21:47Z manolo $"
+ * "$Id: configh.in 10196 2014-06-16 11:17:57Z ossman $"
*
* Configuration file for the Fast Light Tool Kit (FLTK).
* @configure_input@
@@ -108,6 +108,22 @@
#define USE_XDBE HAVE_XDBE
/*
+ * HAVE_XFIXES:
+ *
+ * Do we have the X fixes extension?
+ */
+
+#define HAVE_XFIXES 0
+
+/*
+ * HAVE_XCURSOR:
+ *
+ * Do we have the X cursor library?
+ */
+
+#define HAVE_XCURSOR 0
+
+/*
* __APPLE_QUARTZ__:
*
* All Apple implementations are now based on Quartz and Cocoa,
@@ -298,16 +314,6 @@
#endif /* HAVE_LONG_LONG */
/*
- * Do we have the strtoll() function?
- */
-
-#undef HAVE_STRTOLL
-
-#ifndef HAVE_STRTOLL
-# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
-#endif /* !HAVE_STRTOLL */
-
-/*
* Do we have the dlsym() function and header?
*/
@@ -315,5 +321,5 @@
#undef HAVE_DLSYM
/*
- * End of "$Id: configh.in 9123 2011-10-04 09:21:47Z manolo $".
+ * End of "$Id: configh.in 10196 2014-06-16 11:17:57Z ossman $".
*/
diff --git a/configure b/configure
index ea193d4..e55305e 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +132,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -212,21 +236,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -328,6 +356,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -504,28 +544,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -637,22 +657,11 @@ LIBCOMMAND
AR
RANLIB
DOXYDOC
-HTMLDOC
GROFF
NROFF
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-ac_ct_CXX
-CXXFLAGS
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
FLUID
LINKSHARED
SHAREDSUFFIX
@@ -692,6 +701,24 @@ FL_PATCH_VERSION
FL_MINOR_VERSION
FL_MAJOR_VERSION
USEMMFILES
+ac_ct_CXX
+CXXFLAGS
+CXX
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
target_alias
host_alias
build_alias
@@ -753,6 +780,8 @@ with_x
enable_xinerama
enable_xft
enable_xdbe
+enable_xfixes
+enable_xcursor
'
ac_precious_vars='build_alias
host_alias
@@ -1222,8 +1251,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1369,6 +1396,10 @@ _ACEOF
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
@@ -1380,22 +1411,24 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-cygwin use the Cygwin libraries (default=no)
- --enable-x11 use Cygwin with X11 (default=no)
- --enable-cairoext use fltk code instrumentation for cairo extended use (default=no)
- --enable-cairo use lib Cairo (default=no)
- --enable-debug turn on debugging default=no
- --enable-cp936 turn on CP936 default=no
- --enable-gl turn on OpenGL support default=yes
- --enable-shared turn on shared libraries default=no
- --enable-threads enable multi-threading support (default=yes)
+ --enable-cygwin use the Cygwin libraries [default=no]
+ --enable-x11 use Cygwin with X11 [default=no]
+ --enable-cairoext use fltk code instrumentation for cairo extended use [default=no]
+ --enable-cairo use lib Cairo [default=no]
+ --enable-debug turn on debugging [default=no]
+ --enable-cp936 turn on CP936 [default=no]
+ --enable-gl turn on OpenGL support [default=yes]
+ --enable-shared turn on shared libraries [default=no]
+ --enable-threads enable multi-threading support [default=yes]
--disable-largefile omit support for large files
- --enable-localjpeg use local JPEG library, default=auto
- --enable-localzlib use local ZLIB library, default=auto
- --enable-localpng use local PNG library, default=auto
- --enable-xinerama turn on Xinerama support default=yes
- --enable-xft turn on Xft support default=yes
- --enable-xdbe turn on Xdbe support default=yes
+ --enable-localjpeg use local JPEG library [default=auto]
+ --enable-localzlib use local ZLIB library [default=auto]
+ --enable-localpng use local PNG library [default=auto]
+ --enable-xinerama turn on Xinerama support [default=yes]
+ --enable-xft turn on Xft support [default=yes]
+ --enable-xdbe turn on Xdbe support [default=yes]
+ --enable-xfixes turn on Xfixes support [default=yes]
+ --enable-xcursor turn on Xcursor support [default=yes]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1404,7 +1437,7 @@ Optional Packages:
--with-archflags="flags"
use custom architecture flags
(possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)
- --with-links make header links for common misspellings (default=no)
+ --with-links make header links for common misspellings [default=no]
--with-x use the X Window System
Some influential environment variables:
@@ -1487,9 +1520,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1618,74 +1651,6 @@ fi
} # ac_fn_c_try_run
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -1703,7 +1668,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1719,7 +1685,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1745,7 +1712,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1761,7 +1729,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1795,7 +1764,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -1864,6 +1834,74 @@ rm -f conftest.val
} # ac_fn_c_compute_int
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1891,7 +1929,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2068,7 +2106,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2416,36 +2454,106 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test `uname` = Darwin; then
- if test "x$with_archflags" != x ; then
- CFLAGS="$CFLAGS $with_archflags"
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
- USEMMFILES="Yes"
-else
- USEMMFILES="No"
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-FL_MAJOR_VERSION=1
-FL_MINOR_VERSION=3
-FL_PATCH_VERSION=1
-FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-uname=`uname`
-uversion=`uname -r | sed -e '1,$s/[^0-9]//g'`
-if test "x$uname" = xIRIX64; then
- uname="IRIX"
-fi
-if test "x$uname" = x; then
- # Older MinGW doesn't provide any output when uname is run, even with "-s".
- # Current MinGW (as of Jan. 2011) however does, so this is not necessary anymore...
- uname="MINGW"
-fi
ARCHFLAGS="${ARCHFLAGS:=}"
CFLAGS="${CFLAGS:=}"
@@ -2455,346 +2563,6 @@ DSOFLAGS="${DSOFLAGS:=}"
LDFLAGS="${LDFLAGS:=}"
OPTIM="${OPTIM:=}"
-
-
-
-if test "x$cross_compiling" != xno ; then
- case $host_alias in
- *mingw*)
- uname=MINGW
- ;;
- esac
-fi
-
-uname_GUI=$uname
-case $uname in
- CYGWIN*)
- # Handle Cygwin option *first*, before all other tests.
- # Check whether --enable-cygwin was given.
-if test "${enable_cygwin+set}" = set; then :
- enableval=$enable_cygwin;
-fi
-
- # Check whether --enable-x11 was given.
-if test "${enable_x11+set}" = set; then :
- enableval=$enable_x11;
-fi
-
- if test x$enable_cygwin != xyes; then
- # NOTE: We can't use ARCHFLAGS for this, since it does not work
- # with some of the function tests - Cygwin uses a
- # different C library...
- CFLAGS="$CFLAGS -mno-cygwin"
- CPPFLAGS="$CPPFLAGS -mno-cygwin"
- CXXFLAGS="$CXXFLAGS -mno-cygwin"
- LDFLAGS="$LDFLAGS -mno-cygwin"
- DSOFLAGS="$DSOFLAGS -mno-cygwin"
- else
- # we target Cygwin in combination with X11
- if test x$enable_x11 = xyes; then
- uname_GUI="X11$uname"
- fi
- fi
- ;;
-esac
-
-LINKFLTK="../lib/libfltk.a"
-LINKFLTKFORMS="../lib/libfltk_forms.a"
-LINKFLTKGL="../lib/libfltk_gl.a"
-LINKFLTKIMG="../lib/libfltk_images.a"
-GLDEMOS="gldemos"
-
-LIBEXT=".a"
-LIBNAME="../lib/libfltk.a"
-FLLIBNAME="../lib/libfltk_forms.a"
-GLLIBNAME="../lib/libfltk_gl.a"
-IMGLIBNAME="../lib/libfltk_images.a"
-CAIROLIBNAME="../lib/libfltk_cairo.a"
-
-LIBBASENAME="libfltk.a"
-FLLIBBASENAME="libfltk_forms.a"
-GLLIBBASENAME="libfltk_gl.a"
-IMGLIBBASENAME="libfltk_images.a"
-CAIROLIBBASENAME="libfltk_cairo.a"
-
-CAIRODIR=""
-CAIROFLAGS=""
-LINKFLTKCAIRO=""
-FLTKCAIROOPTION=""
-CAIROLIBS=""
-
-# Check whether --enable-cairoext was given.
-if test "${enable_cairoext+set}" = set; then :
- enableval=$enable_cairoext;
-fi
-
-# Check whether --enable-cairo was given.
-if test "${enable_cairo+set}" = set; then :
- enableval=$enable_cairo;
-fi
-
-
-if test x$enable_cairoext = xyes; then
- $as_echo "#define FLTK_USE_CAIRO 1" >>confdefs.h
-
- $as_echo "#define FLTK_HAVE_CAIRO 1" >>confdefs.h
-
- CAIRODIR="cairo"
- CAIROFLAGS="`pkg-config --cflags cairo`"
- CAIROLIBS="-lcairo -lpixman-1"
- CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
- LINKFLTKCAIRO="../lib/libfltk_cairo.a"
- FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
- LIBS="$CAIROLIBS $LIBS"
- LINKFLTK+=" $LINKFLTKCAIRO"
-else
- if test x$enable_cairo = xyes; then
- $as_echo "#define FLTK_HAVE_CAIRO 1" >>confdefs.h
-
- CAIRODIR="cairo"
- CAIROFLAGS="`pkg-config --cflags cairo`"
- CAIROLIBS="-lcairo -lpixman-1"
- CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
- LINKFLTKCAIRO="../lib/libfltk_cairo.a"
- FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
- fi
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
- enableval=$enable_debug;
-fi
-
-if test x$enable_debug = xyes; then
- DEBUGFLAG="-g "
-else
- DEBUGFLAG=""
-fi
-
-# Check whether --enable-cp936 was given.
-if test "${enable_cp936+set}" = set; then :
- enableval=$enable_cp936;
-fi
-
-if test x$enable_cp936 = xyes; then
- CFLAGS="$CFLAGS -DCP936"
-fi
-
-
-# Check whether --enable-gl was given.
-if test "${enable_gl+set}" = set; then :
- enableval=$enable_gl;
-fi
-
-
-# Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared;
-fi
-
-if test x$enable_shared = xyes; then
- PICFLAG=1
- SHAREDSUFFIX=""
- FLUID="fluid-shared"
-
- case $uname in
- Darwin*)
- DSONAME="libfltk.$FL_API_VERSION.dylib"
- FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
- GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
- IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
- CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib"
- DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
- ;;
-
- SunOS* | UNIX_S*)
- DSONAME="libfltk.so.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
- if test "x$libdir" != "x/usr/lib"; then
- DSOLINK="-R$libdir"
- fi
- ;;
- HP-UX*)
- DSONAME="libfltk.sl.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.sl.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.sl.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.sl.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.sl.$FL_API_VERSION"
- DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
- if test "x$libdir" != "x/usr/lib"; then
- DSOLINK="-Wl,-rpath,$libdir"
- fi
- ;;
- IRIX*)
- DSONAME="libfltk.so.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
- DSOLINK="-Wl,-rpath,$libdir"
- fi
- ;;
- OSF1*)
- DSONAME="libfltk.so.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
- if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
- DSOLINK="-Wl,-rpath,$libdir"
- fi
- ;;
- Linux* | *BSD*)
- DSONAME="libfltk.so.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ -shared -fPIC $DEBUGFLAG -o"
-# if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
-# DSOLINK="-Wl,-rpath,$libdir"
-# fi
- ;;
- AIX*)
- DSONAME="libfltk_s.a"
- FLDSONAME="libfltk_forms_s.a"
- GLDSONAME="libfltk_gl_s.a"
- IMGDSONAME="libfltk_images_s.a"
- CAIRODSONAME="libfltk_cairo_s.a"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
- SHAREDSUFFIX="_s"
- ;;
- CYGWIN* | MINGW*)
- PICFLAG=0
- if test x$enable_cygwin != xyes; then
- DSONAME="mgwfltknox-$FL_API_VERSION.dll"
- FLDSONAME="mgwfltknox_forms-$FL_API_VERSION.dll"
- GLDSONAME="mgwfltknox_gl-$FL_API_VERSION.dll"
- IMGDSONAME="mgwfltknox_images-$FL_API_VERSION.dll"
- CAIRODSONAME="mgwfltknox_cairo-$FL_API_VERSION.dll"
- else
- if test x$enable_x11 = xyes; then
- DSONAME="cygfltk-$FL_API_VERSION.dll"
- FLDSONAME="cygfltk_forms-$FL_API_VERSION.dll"
- GLDSONAME="cygfltk_gl-$FL_API_VERSION.dll"
- IMGDSONAME="cygfltk_images-$FL_API_VERSION.dll"
- CAIRODSONAME="cygfltk_cairo-$FL_API_VERSION.dll"
- else
- DSONAME="cygfltknox-$FL_API_VERSION.dll"
- FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll"
- GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll"
- IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll"
- CAIRODSONAME="cygfltknox_cairo-$FL_API_VERSION.dll"
- fi
- fi
- #-----------------------------------------------------------
- # -Wl,--enable-runtime-pseudo-reloc: See str 1585
- # appears to be necessary for older binutils versions < 2.16
- #-----------------------------------------------------------
- LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -shared \
- -Wl,--whole-archive -Wl,--export-all-symbols \
- -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import \
- -Wl,--enable-auto-image-base -o \$@"
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Shared libraries may not be supported. Trying -shared option with compiler." >&5
-$as_echo "$as_me: WARNING: Shared libraries may not be supported. Trying -shared option with compiler." >&2;}
- DSONAME="libfltk.so.$FL_API_VERSION"
- FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
- GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
- IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
- CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
- DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
- ;;
- esac
-
- LINKSHARED="-L../src $FLTKCAIROOPTION -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
-else
- DSOCOMMAND="echo"
- DSOLINK=""
- DSONAME=""
- FLDSONAME=""
- GLDSONAME=""
- IMGDSONAME=""
- CAIRODSONAME=""
- PICFLAG=0
- SHAREDSUFFIX=""
- FLUID="fluid"
- LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-threads was given.
-if test "${enable_threads+set}" = set; then :
- enableval=$enable_threads;
-fi
-
-
-
-# Check whether --with-optim was given.
-if test "${with_optim+set}" = set; then :
- withval=$with_optim;
-fi
-
-
-
-# Check whether --with-archflags was given.
-if test "${with_archflags+set}" = set; then :
- withval=$with_archflags; ARCHFLAGS="$withval"
-fi
-
-case $uname in
- Darwin*)
-# QD is not supported anymore since 1.3
- $as_echo "#define __APPLE_QUARTZ__ 1" >>confdefs.h
-
- ;;
-esac
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2817,7 +2585,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2857,7 +2625,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2910,7 +2678,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2951,7 +2719,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3009,7 +2777,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3053,7 +2821,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3499,8 +3267,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3613,7 +3380,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3657,7 +3424,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3842,35 +3609,451 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+
+case $host_os in
+ darwin*)
+ if test "x$with_archflags" != x ; then
+ CFLAGS="$CFLAGS $with_archflags"
+ fi
+ USEMMFILES="Yes"
+ ;;
+ *)
+ USEMMFILES="No"
+ ;;
+esac
+
+
+FL_MAJOR_VERSION=1
+FL_MINOR_VERSION=3
+FL_PATCH_VERSION=3
+FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
+
+
+
+
+
+
+
+
+
+host_os_gui=$host_os
+case $host_os in
+ cygwin*)
+ # Handle Cygwin option *first*, before all other tests.
+ # Check whether --enable-cygwin was given.
+if test "${enable_cygwin+set}" = set; then :
+ enableval=$enable_cygwin;
fi
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+ # Check whether --enable-x11 was given.
+if test "${enable_x11+set}" = set; then :
+ enableval=$enable_x11;
+fi
+
+ if test x$enable_cygwin = xyes; then
+ # we target Cygwin in combination with X11
+ if test x$enable_x11 = xyes; then
+ host_os_gui="X11$host_os"
+ fi
+ fi
+ ;;
+esac
+
+LINKFLTK="../lib/libfltk.a"
+LINKFLTKFORMS="../lib/libfltk_forms.a"
+LINKFLTKGL="../lib/libfltk_gl.a"
+LINKFLTKIMG="../lib/libfltk_images.a"
+GLDEMOS="gldemos"
+
+LIBEXT=".a"
+LIBNAME="../lib/libfltk.a"
+FLLIBNAME="../lib/libfltk_forms.a"
+GLLIBNAME="../lib/libfltk_gl.a"
+IMGLIBNAME="../lib/libfltk_images.a"
+CAIROLIBNAME="../lib/libfltk_cairo.a"
+
+LIBBASENAME="libfltk.a"
+FLLIBBASENAME="libfltk_forms.a"
+GLLIBBASENAME="libfltk_gl.a"
+IMGLIBBASENAME="libfltk_images.a"
+CAIROLIBBASENAME="libfltk_cairo.a"
+
+CAIRODIR=""
+CAIROFLAGS=""
+LINKFLTKCAIRO=""
+FLTKCAIROOPTION=""
+CAIROLIBS=""
+
+# Check whether --enable-cairoext was given.
+if test "${enable_cairoext+set}" = set; then :
+ enableval=$enable_cairoext;
+fi
+
+# Check whether --enable-cairo was given.
+if test "${enable_cairo+set}" = set; then :
+ enableval=$enable_cairo;
+fi
+
+
+if test x$enable_cairoext = xyes; then
+ $as_echo "#define FLTK_USE_CAIRO 1" >>confdefs.h
+
+ $as_echo "#define FLTK_HAVE_CAIRO 1" >>confdefs.h
+
+ CAIRODIR="cairo"
+ CAIROFLAGS="`pkg-config --cflags cairo`"
+ CAIROLIBS="-lcairo -lpixman-1"
+ CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
+ LINKFLTKCAIRO="../lib/libfltk_cairo.a"
+ FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
+ LIBS="$CAIROLIBS $LIBS"
+ LINKFLTK+=" $LINKFLTKCAIRO"
+else
+ if test x$enable_cairo = xyes; then
+ $as_echo "#define FLTK_HAVE_CAIRO 1" >>confdefs.h
+
+ CAIRODIR="cairo"
+ CAIROFLAGS="`pkg-config --cflags cairo`"
+ CAIROLIBS="-lcairo -lpixman-1"
+ CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
+ LINKFLTKCAIRO="../lib/libfltk_cairo.a"
+ FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
+ fi
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+fi
+
+if test x$enable_debug = xyes; then
+ DEBUGFLAG="-g "
+else
+ DEBUGFLAG=""
+fi
+
+# Check whether --enable-cp936 was given.
+if test "${enable_cp936+set}" = set; then :
+ enableval=$enable_cp936;
+fi
+
+if test x$enable_cp936 = xyes; then
+ CFLAGS="$CFLAGS -DCP936"
+fi
+
+
+# Check whether --enable-gl was given.
+if test "${enable_gl+set}" = set; then :
+ enableval=$enable_gl;
+fi
+
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared;
+fi
+
+if test x$enable_shared = xyes; then
+ PICFLAG=1
+ SHAREDSUFFIX=""
+ FLUID="fluid-shared"
+
+ case $host_os in
+ darwin*)
+ DSONAME="libfltk.$FL_API_VERSION.dylib"
+ FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
+ GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
+ IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
+ CAIRODSONAME="libfltk_cairo.$FL_API_VERSION.dylib"
+ DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
+ ;;
+
+ solaris*)
+ DSONAME="libfltk.so.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
+ if test "x$libdir" != "x/usr/lib"; then
+ DSOLINK="-R$libdir"
+ fi
+ ;;
+ hpux*)
+ DSONAME="libfltk.sl.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.sl.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.sl.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.sl.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.sl.$FL_API_VERSION"
+ DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
+ if test "x$libdir" != "x/usr/lib"; then
+ DSOLINK="-Wl,-rpath,$libdir"
+ fi
+ ;;
+ irix*)
+ DSONAME="libfltk.so.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
+ if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
+ DSOLINK="-Wl,-rpath,$libdir"
+ fi
+ ;;
+ osf*)
+ DSONAME="libfltk.so.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
+ if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
+ DSOLINK="-Wl,-rpath,$libdir"
+ fi
+ ;;
+ linux* | *bsd*)
+ DSONAME="libfltk.so.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ -shared -fPIC $DEBUGFLAG -o"
+
+ # See if the compiler supports -fvisibility...
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports -fvisibility" >&5
+$as_echo_n "checking if the compiler supports -fvisibility... " >&6; }
+if ${ac_cv_cxx_fvisibility+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ OLDCXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_cxx_fvisibility=yes
+else
+ ac_cv_cxx_fvisibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXXFLAGS="$OLDCXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_fvisibility" >&5
+$as_echo "$ac_cv_cxx_fvisibility" >&6; }
+ if test x"$ac_cv_cxx_fvisibility" = xyes; then
+ OPTIM="$OPTIM -fvisibility=hidden"
+ fi
+
+ # See if the compiler supports -fvisibility-inlines-hidden...
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports -fvisibility-inlines-hidden" >&5
+$as_echo_n "checking if the compiler supports -fvisibility-inlines-hidden... " >&6; }
+if ${ac_cv_cxx_fvisibility_inlines+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ OLDCXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_cxx_fvisibility_inlines=yes
+else
+ ac_cv_cxx_fvisibility_inlines=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXXFLAGS="$OLDCXXFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_fvisibility_inlines" >&5
+$as_echo "$ac_cv_cxx_fvisibility_inlines" >&6; }
+ if test x"$ac_cv_cxx_fvisibility_inlines" = xyes; then
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ fi
+
+# if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
+# DSOLINK="-Wl,-rpath,$libdir"
+# fi
+ ;;
+ aix*)
+ DSONAME="libfltk_s.a"
+ FLDSONAME="libfltk_forms_s.a"
+ GLDSONAME="libfltk_gl_s.a"
+ IMGDSONAME="libfltk_images_s.a"
+ CAIRODSONAME="libfltk_cairo_s.a"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
+ SHAREDSUFFIX="_s"
+ ;;
+ cygwin* | mingw*)
+ PICFLAG=0
+ if test x$enable_cygwin != xyes; then
+ DSONAME="mgwfltknox-$FL_API_VERSION.dll"
+ FLDSONAME="mgwfltknox_forms-$FL_API_VERSION.dll"
+ GLDSONAME="mgwfltknox_gl-$FL_API_VERSION.dll"
+ IMGDSONAME="mgwfltknox_images-$FL_API_VERSION.dll"
+ CAIRODSONAME="mgwfltknox_cairo-$FL_API_VERSION.dll"
+ else
+ if test x$enable_x11 = xyes; then
+ DSONAME="cygfltk-$FL_API_VERSION.dll"
+ FLDSONAME="cygfltk_forms-$FL_API_VERSION.dll"
+ GLDSONAME="cygfltk_gl-$FL_API_VERSION.dll"
+ IMGDSONAME="cygfltk_images-$FL_API_VERSION.dll"
+ CAIRODSONAME="cygfltk_cairo-$FL_API_VERSION.dll"
+ else
+ DSONAME="cygfltknox-$FL_API_VERSION.dll"
+ FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll"
+ GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll"
+ IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll"
+ CAIRODSONAME="cygfltknox_cairo-$FL_API_VERSION.dll"
+ fi
+ fi
+ #-----------------------------------------------------------
+ # -Wl,--enable-runtime-pseudo-reloc: See str 1585
+ # appears to be necessary for older binutils versions < 2.16
+ #-----------------------------------------------------------
+ LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -shared \
+ -Wl,--whole-archive -Wl,--export-all-symbols \
+ -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import \
+ -Wl,--enable-auto-image-base -o \$@"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Shared libraries may not be supported. Trying -shared option with compiler." >&5
+$as_echo "$as_me: WARNING: Shared libraries may not be supported. Trying -shared option with compiler." >&2;}
+ DSONAME="libfltk.so.$FL_API_VERSION"
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+ CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
+ DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
+ ;;
+ esac
+
+ LINKSHARED="-L../src $FLTKCAIROOPTION -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
+else
+ DSOCOMMAND="echo"
+ DSOLINK=""
+ DSONAME=""
+ FLDSONAME=""
+ GLDSONAME=""
+ IMGDSONAME=""
+ CAIRODSONAME=""
+ PICFLAG=0
+ SHAREDSUFFIX=""
+ FLUID="fluid"
+ LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-threads was given.
+if test "${enable_threads+set}" = set; then :
+ enableval=$enable_threads;
+fi
+
+
+
+# Check whether --with-optim was given.
+if test "${with_optim+set}" = set; then :
+ withval=$with_optim;
+fi
+
+
+
+# Check whether --with-archflags was given.
+if test "${with_archflags+set}" = set; then :
+ withval=$with_archflags; ARCHFLAGS="$withval"
+fi
+
+case $host_os in
+ darwin*)
+# QD is not supported anymore since 1.3
+ $as_echo "#define __APPLE_QUARTZ__ 1" >>confdefs.h
+
+ ;;
+esac
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -3908,7 +4091,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3964,8 +4147,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-case $uname in
- OSF1*)
+case $host_os in
+ osf*)
INSTALL="`pwd`/install-sh -c"
;;
esac
@@ -3991,7 +4174,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4033,7 +4216,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4061,46 +4244,6 @@ fi
NROFF="$GROFF -T ascii"
fi
fi
-# Extract the first word of "htmldoc", so it can be a program name with args.
-set dummy htmldoc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_HTMLDOC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $HTMLDOC in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_HTMLDOC="$HTMLDOC" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_HTMLDOC="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-HTMLDOC=$ac_cv_path_HTMLDOC
-if test -n "$HTMLDOC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTMLDOC" >&5
-$as_echo "$HTMLDOC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
# Extract the first word of "doxygen", so it can be a program name with args.
set dummy doxygen; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4119,7 +4262,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_DOXYDOC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4159,7 +4302,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4199,7 +4342,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4253,7 +4396,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4296,7 +4439,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_AR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4364,7 +4507,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4407,7 +4550,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_RC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4444,7 +4587,6 @@ else
fi
-if test "$uname" != Darwin; then
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -4600,7 +4742,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4666,7 +4808,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4843,7 +4985,123 @@ fi
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if ${ac_cv_sizeof_short+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (short)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if ${ac_cv_sizeof_int+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+if test $ac_cv_sizeof_short -eq 2; then
+ $as_echo "#define U16 unsigned short" >>confdefs.h
+
+fi
+if test $ac_cv_sizeof_int -eq 4; then
+ $as_echo "#define U32 unsigned" >>confdefs.h
+
+else
+ if test $ac_cv_sizeof_long -eq 4; then
+ $as_echo "#define U32 unsigned long" >>confdefs.h
+
+ fi
+fi
+case $host_os in
+ darwin*)
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
@@ -5067,121 +5325,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
-fi
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_short" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_short=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_int" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_int=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_long" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_long=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-if test $ac_cv_sizeof_short -eq 2; then
- $as_echo "#define U16 unsigned short" >>confdefs.h
-
-fi
-if test $ac_cv_sizeof_int -eq 4; then
- $as_echo "#define U32 unsigned" >>confdefs.h
-
-else
- if test $ac_cv_sizeof_long -eq 4; then
- $as_echo "#define U32 unsigned long" >>confdefs.h
-
- fi
-fi
-if test "$uname" != Darwin; then
if test $ac_cv_sizeof_int -eq 8; then
$as_echo "#define U64 unsigned" >>confdefs.h
@@ -5191,8 +5335,8 @@ if test "$uname" != Darwin; then
fi
fi
-fi
-
+ ;;
+esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler recognizes bool as a built-in type" >&5
$as_echo_n "checking whether the compiler recognizes bool as a built-in type... " >&6; }
@@ -5474,13 +5618,17 @@ if test "$ac_cv_cxx_scandir_posix" = yes; then
else
ac_fn_c_check_func "$LINENO" "scandir" "ac_cv_func_scandir"
if test "x$ac_cv_func_scandir" = xyes; then :
- if test "x$uname" = xSunOS -o "x$uname" = xQNX; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using $uname scandir emulation function." >&5
-$as_echo "$as_me: WARNING: Not using $uname scandir emulation function." >&2;}
- else
- $as_echo "#define HAVE_SCANDIR 1" >>confdefs.h
- fi
+ case $host_os in
+ solaris* | *qnx*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using $host_os scandir emulation function." >&5
+$as_echo "$as_me: WARNING: Not using $host_os scandir emulation function." >&2;}
+ ;;
+ *)
+ $as_echo "#define HAVE_SCANDIR 1" >>confdefs.h
+
+ ;;
+ esac
fi
fi
@@ -5488,62 +5636,38 @@ fi
ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
if test "x$ac_cv_func_vsnprintf" = xyes; then :
- case "$uname" in
- HP-UX*)
- if test "$uversion" = "1020"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in vsnprintf function because you are running HP-UX 10.20." >&5
+ case $host_os in
+ hpux1020)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in vsnprintf function because you are running HP-UX 10.20." >&5
$as_echo "$as_me: WARNING: Not using built-in vsnprintf function because you are running HP-UX 10.20." >&2;}
- else
- $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
-
- fi
- ;;
-
- OSF1*)
- if test "$uversion" = "40"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in vsnprintf function because you are running Tru64 4.0." >&5
+ ;;
+ osf4)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in vsnprintf function because you are running Tru64 4.0." >&5
$as_echo "$as_me: WARNING: Not using built-in vsnprintf function because you are running Tru64 4.0." >&2;}
- else
- $as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
-
- fi
- ;;
-
+ ;;
*)
$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
- ;;
+ ;;
esac
fi
ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
if test "x$ac_cv_func_snprintf" = xyes; then :
- case "$uname" in
- HP-UX*)
- if test "$uversion" = "1020"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in snprintf function because you are running HP-UX 10.20." >&5
+ case $host_os in
+ hpux1020)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in snprintf function because you are running HP-UX 10.20." >&5
$as_echo "$as_me: WARNING: Not using built-in snprintf function because you are running HP-UX 10.20." >&2;}
- else
- $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
-
- fi
- ;;
-
- OSF1*)
- if test "$uversion" = "40"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in snprintf function because you are running Tru64 4.0." >&5
+ ;;
+ osf4)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using built-in snprintf function because you are running Tru64 4.0." >&5
$as_echo "$as_me: WARNING: Not using built-in snprintf function because you are running Tru64 4.0." >&2;}
- else
- $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
-
- fi
- ;;
-
+ ;;
*)
$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
- ;;
+ ;;
esac
fi
@@ -5668,7 +5792,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -5714,7 +5838,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -5738,7 +5862,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -5783,7 +5907,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -5807,7 +5931,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -5839,6 +5963,8 @@ _ACEOF
esac
rm -rf conftest*
fi
+
+
fi
@@ -5891,13 +6017,6 @@ if test $ac_cv_c_long_long = yes; then
fi
-ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
-if test "x$ac_cv_func_strtoll" = xyes; then :
- $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h
-
-fi
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
$as_echo_n "checking for library containing dlsym... " >&6; }
if ${ac_cv_search_dlsym+:} false; then :
@@ -5965,12 +6084,12 @@ fi
AUDIOLIBS=""
-case $uname in
- CYGWIN* | MINGW*)
+case $host_os in
+ cygwin* | mingw*)
AUDIOLIBS="-lwinmm"
;;
- Darwin*)
+ darwin*)
AUDIOLIBS="-framework CoreAudio"
;;
@@ -6364,11 +6483,11 @@ have_pthread=no
PTHREAD_FLAGS=""
check_pthread=yes
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
check_pthread=no
;;
- CYGWIN*)
+ cygwin*)
if test "x$enable_cygwin" != xyes; then
check_pthread=no
fi
@@ -6420,9 +6539,11 @@ $as_echo "$have_pthread" >&6; }
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
# be POSIX-compliant... :(
- if test $uname = SunOS; then
- PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
- fi
+ case $host_os in
+ solaris*)
+ PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
break
fi
done
@@ -6446,8 +6567,8 @@ fi
INSTALL_DESKTOP=""
UNINSTALL_DESKTOP=""
-case $uname_GUI in
- CYGWIN* | MINGW*)
+case $host_os_gui in
+ cygwin* | mingw*)
# Recent versions of Cygwin are seriously broken and the size
# checks don't work because the shell puts out \r\n instead of
# \n. Here we just force U32 to be defined to "unsigned"...
@@ -6501,7 +6622,7 @@ fi
fi
;;
- Darwin*)
+ darwin*)
# MacOS X uses Cocoa for graphics.
LIBS="$LIBS -framework Cocoa"
@@ -7543,7 +7664,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_FTCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7568,6 +7689,7 @@ fi
if test "x$FTCONFIG" != x; then
CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS"
+ CFLAGS="`$FTCONFIG --cflags` $CFLAGS"
CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcPatternCreate in -lfontconfig" >&5
@@ -7722,6 +7844,120 @@ fi
fi
+ # Check whether --enable-xfixes was given.
+if test "${enable_xfixes+set}" = set; then :
+ enableval=$enable_xfixes;
+fi
+
+
+ if test x$enable_xfixes != xno; then
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xfixes.h" "ac_cv_header_X11_extensions_Xfixes_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_Xfixes_h" = xyes; then :
+ $as_echo "#define HAVE_XFIXES 1" >>confdefs.h
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XFixesQueryExtension in -lXfixes" >&5
+$as_echo_n "checking for XFixesQueryExtension in -lXfixes... " >&6; }
+if ${ac_cv_lib_Xfixes_XFixesQueryExtension+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXfixes $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XFixesQueryExtension ();
+int
+main ()
+{
+return XFixesQueryExtension ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xfixes_XFixesQueryExtension=yes
+else
+ ac_cv_lib_Xfixes_XFixesQueryExtension=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xfixes_XFixesQueryExtension" >&5
+$as_echo "$ac_cv_lib_Xfixes_XFixesQueryExtension" >&6; }
+if test "x$ac_cv_lib_Xfixes_XFixesQueryExtension" = xyes; then :
+ LIBS="-lXfixes $LIBS"
+fi
+
+ fi
+
+ # Check whether --enable-xcursor was given.
+if test "${enable_xcursor+set}" = set; then :
+ enableval=$enable_xcursor;
+fi
+
+
+ if test x$enable_xcursor != xno; then
+ ac_fn_c_check_header_compile "$LINENO" "X11/Xcursor/Xcursor.h" "ac_cv_header_X11_Xcursor_Xcursor_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_Xcursor_Xcursor_h" = xyes; then :
+ $as_echo "#define HAVE_XCURSOR 1" >>confdefs.h
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XcursorImageCreate in -lXcursor" >&5
+$as_echo_n "checking for XcursorImageCreate in -lXcursor... " >&6; }
+if ${ac_cv_lib_Xcursor_XcursorImageCreate+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXcursor $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XcursorImageCreate ();
+int
+main ()
+{
+return XcursorImageCreate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xcursor_XcursorImageCreate=yes
+else
+ ac_cv_lib_Xcursor_XcursorImageCreate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xcursor_XcursorImageCreate" >&5
+$as_echo "$ac_cv_lib_Xcursor_XcursorImageCreate" >&6; }
+if test "x$ac_cv_lib_Xcursor_XcursorImageCreate" = xyes; then :
+ LIBS="-lXcursor $LIBS"
+fi
+
+ fi
+
# Extract the first word of "xprop", so it can be a program name with args.
set dummy xprop; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -7740,7 +7976,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XPROP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7787,8 +8023,8 @@ $as_echo "$ac_cv_have_overlay" >&6; }
# Make symlinks since UNIX/Linux is case sensitive,
# but Cygwin in general not.
- case $uname in
- CYGWIN*)
+ case $host_os in
+ cygwin*)
HLINKS="#"
;;
*)
@@ -7815,14 +8051,14 @@ esac
-case "$uname" in
- *BSD* | Darwin*)
+case "$host_os" in
+ *bsd* | darwin*)
# *BSD
CAT1EXT=0
CAT3EXT=0
CAT6EXT=0
;;
- IRIX*)
+ irix*)
# SGI IRIX
CAT1EXT=z
CAT3EXT=z
@@ -7841,12 +8077,12 @@ esac
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then
- case "$uname" in
- *BSD* | Darwin* | Linux*)
+ case "$host_os" in
+ *bsd* | darwin* | linux*)
# *BSD, Darwin, and Linux
mandir="\${prefix}/share/man"
;;
- IRIX*)
+ irix*)
# SGI IRIX
mandir="\${prefix}/share/catman"
;;
@@ -7861,9 +8097,15 @@ if test "$exec_prefix" = NONE; then
exec_prefix="\${prefix}"
fi
-if test "$uname" = "IRIX" -a $uversion -ge 62 -a "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
- libdir="/usr/lib32"
-fi
+case $host_os in
+ irix1-5*)
+ ;;
+ irix*)
+ if test "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
+ libdir="/usr/lib32"
+ fi
+ ;;
+esac
MAKEDEPEND="\$(CXX) -M"
@@ -7879,9 +8121,13 @@ if test -n "$GCC"; then
# We know that Carbon is deprecated on OS X 10.4. To avoid hundreds of warnings
# we will temporarily disable 'deprecated' warnings on OS X.
- if test "$uname" = "Darwin" -a $uversion -ge 800; then
- OPTIM="-Wno-deprecated-declarations $OPTIM"
- fi
+ case $host_os in
+ darwin1-7)
+ ;;
+ darwin*)
+ OPTIM="-Wno-deprecated-declarations $OPTIM"
+ ;;
+ esac
# Set the default compiler optimizations...
if test -z "$DEBUGFLAG"; then
@@ -7965,6 +8211,66 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$OLDCFLAGS"
+ # See if ld supports -Bsymbolic-functions...
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld supports -Bsymbolic-functions" >&5
+$as_echo_n "checking if ld supports -Bsymbolic-functions... " >&6; }
+ OLDLDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ DSOFLAGS="$DSOFLAGS -Wl,-Bsymbolic-functions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$OLDLDFLAGS"
+
+ # See if toolchain supports a sectioned build...
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toolchain supports sections" >&5
+$as_echo_n "checking if toolchain supports sections... " >&6; }
+ OLDLDFLAGS="$LDFLAGS"
+ OLDCFLAGS="$CFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-gc-sections"
+ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ DSOFLAGS="$DSOFLAGS -Wl,-gc-sections"
+ OPTIM="$OPTIM -ffunction-sections -fdata-sections"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$OLDLDFLAGS"
+ CFLAGS="$OLDCFLAGS"
+
# See if we are running Solaris; if so, try the -fpermissive option...
# This option is required on some versions of Solaris to work around
# bugs in the X headers up through Solaris 7.
@@ -7972,13 +8278,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# Unlike the other compiler/optimization settings, this one is placed
# in CFLAGS and CXXFLAGS so that fltk-config will provide the option
# to clients - otherwise client apps will not compile properly...
- if test "$uname" = SunOS; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fpermissive" >&5
+ case $host_os in
+ solaris*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GCC supports -fpermissive" >&5
$as_echo_n "checking if GCC supports -fpermissive... " >&6; }
- OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fpermissive"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fpermissive"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -7991,18 +8298,19 @@ main ()
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
CXXFLAGS="$CXXFLAGS -fpermissive"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
CFLAGS="$OLDCFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+ ;;
+ esac
else
- case "$uname" in
- IRIX*)
+ case "$host_os" in
+ irix*)
# Running some flavor of IRIX; see which version and
# set things up according...
if test "$uversion" -ge 62; then
@@ -8032,7 +8340,7 @@ $as_echo "$as_me: WARNING: FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI \"-
fi
fi
;;
- HP-UX*)
+ hpux*)
# Running HP-UX; these options should work for the HP compilers.
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
@@ -8059,7 +8367,7 @@ $as_echo "$as_me: WARNING: FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI \"-
fi
fi
;;
- SunOS*)
+ solaris*)
# Solaris
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
@@ -8073,7 +8381,7 @@ $as_echo "$as_me: WARNING: FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI \"-
OPTIM="-KPIC $OPTIM"
fi
;;
- AIX*)
+ aix*)
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
OPTIM="$with_optim $OPTIM"
@@ -8098,14 +8406,16 @@ fi
OPTIM="$DEBUGFLAG $OPTIM"
-if test `uname` = Darwin; then
- if test "x$with_archflags" != x ; then
- CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
- fi
-fi
+case $host_os in
+ darwin*)
+ if test "x$with_archflags" != x ; then
+ CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
+ fi
+ ;;
+esac
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
# Determine the path where MSys has /usr installed
msyspath=`mount | grep '\/usr ' | cut -d ' ' -f -1 | sed -e 's/\\\/\// g'`
# Then substitute that in the WIN32 path instead of /usr
@@ -8145,11 +8455,11 @@ echo ""
echo "Configuration Summary"
echo "-------------------------------------------------------------------------"
-case $uname_GUI in
- CYGWIN* | MINGW*)
+case $host_os_gui in
+ cygwin* | mingw*)
graphics="GDI"
;;
- Darwin*)
+ darwin*)
graphics="Quartz"
;;
*)
@@ -8174,8 +8484,8 @@ echo " exec_prefix=$exec_prefix"
echo " includedir=$includedir"
echo " libdir=$libdir"
echo " mandir=$mandir"
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
echo " MSys docpath=$msyspath/local/share/doc/fltk"
;;
esac
@@ -8634,16 +8944,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -8703,28 +9013,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -8746,7 +9044,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -8808,10 +9106,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -8900,7 +9198,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/configure.in b/configure.in
index 8cd0908..c18bc67 100644
--- a/configure.in
+++ b/configure.in
@@ -1,11 +1,11 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
-dnl "$Id: configure.in 9707 2012-11-06 21:13:54Z matt $"
+dnl "$Id: configure.in 10418 2014-10-30 14:07:58Z AlbrechtS $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
-dnl Copyright 1998-2010 by Bill Spitzak and others.
+dnl Copyright 1998-2014 by Bill Spitzak and others.
dnl
dnl This library is free software. Distribution and use rights are outlined in
dnl the file "COPYING" which should have been included with this file. If this
@@ -24,21 +24,40 @@ AC_PREREQ(2.50)
dnl Required file in package...
AC_INIT(src/Fl.cxx)
+AC_CANONICAL_HOST
+
+dnl Do not automatically add "-g" to compiler options...
+dnl This must be _before_ "Find compiler commands..."
+ARCHFLAGS="${ARCHFLAGS:=}"
+CFLAGS="${CFLAGS:=}"
+CPPFLAGS="${CPPFLAGS:=}"
+CXXFLAGS="${CXXFLAGS:=}"
+DSOFLAGS="${DSOFLAGS:=}"
+LDFLAGS="${LDFLAGS:=}"
+OPTIM="${OPTIM:=}"
+
+dnl Find compiler commands...
+AC_PROG_CC
+AC_PROG_CXX
+
dnl So --with-archflags option is used during "checking size of long"
-if test `uname` = Darwin; then
- if test "x$with_archflags" != x ; then
- CFLAGS="$CFLAGS $with_archflags"
- fi
- USEMMFILES="Yes"
-else
- USEMMFILES="No"
-fi
+case $host_os in
+ darwin*)
+ if test "x$with_archflags" != x ; then
+ CFLAGS="$CFLAGS $with_archflags"
+ fi
+ USEMMFILES="Yes"
+ ;;
+ *)
+ USEMMFILES="No"
+ ;;
+esac
AC_SUBST(USEMMFILES)
dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=3
-FL_PATCH_VERSION=1
+FL_PATCH_VERSION=3
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION)
@@ -46,61 +65,21 @@ AC_SUBST(FL_MINOR_VERSION)
AC_SUBST(FL_PATCH_VERSION)
AC_SUBST(FL_API_VERSION)
-dnl Get the operating system and version number...
-uname=`uname`
-uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
-if test "x$uname" = xIRIX64; then
- uname="IRIX"
-fi
-if test "x$uname" = x; then
- # Older MinGW doesn't provide any output when uname is run, even with "-s".
- # Current MinGW (as of Jan. 2011) however does, so this is not necessary anymore...
- uname="MINGW"
-fi
-
-dnl Do not automatically add "-g" to compiler options...
-ARCHFLAGS="${ARCHFLAGS:=}"
-CFLAGS="${CFLAGS:=}"
-CPPFLAGS="${CPPFLAGS:=}"
-CXXFLAGS="${CXXFLAGS:=}"
-DSOFLAGS="${DSOFLAGS:=}"
-LDFLAGS="${LDFLAGS:=}"
-OPTIM="${OPTIM:=}"
-
AC_SUBST(ARCHFLAGS)
AC_SUBST(OPTIM)
-dnl in case of cross-compiling mingw32 under linux we must change uname for Win32 GUI
-dnl run ./configure --host=i686-pc-ming32 try use X11 without change uname
-if test "x$cross_compiling" != xno ; then
- case $host_alias in
- *mingw*)
- uname=MINGW
- ;;
- esac
-fi
-
dnl OS-specific pre-tests...
-dnl uname_GUI equals $uname unless we target Cygwin in combination with X11.
-uname_GUI=$uname
-case $uname in
- CYGWIN*)
+dnl host_os_gui equals $host_os unless we target Cygwin in combination with X11.
+host_os_gui=$host_os
+case $host_os in
+ cygwin*)
# Handle Cygwin option *first*, before all other tests.
- AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the Cygwin libraries [(default=no)]])
- AC_ARG_ENABLE(x11, [ --enable-x11 use Cygwin with X11 [(default=no)]])
- if test x$enable_cygwin != xyes; then
- # NOTE: We can't use ARCHFLAGS for this, since it does not work
- # with some of the function tests - Cygwin uses a
- # different C library...
- CFLAGS="$CFLAGS -mno-cygwin"
- CPPFLAGS="$CPPFLAGS -mno-cygwin"
- CXXFLAGS="$CXXFLAGS -mno-cygwin"
- LDFLAGS="$LDFLAGS -mno-cygwin"
- DSOFLAGS="$DSOFLAGS -mno-cygwin"
- else
+ AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the Cygwin libraries [[default=no]]])
+ AC_ARG_ENABLE(x11, [ --enable-x11 use Cygwin with X11 [[default=no]]])
+ if test x$enable_cygwin = xyes; then
# we target Cygwin in combination with X11
if test x$enable_x11 = xyes; then
- uname_GUI="X11$uname"
+ host_os_gui="X11$host_os"
fi
fi
;;
@@ -133,8 +112,8 @@ LINKFLTKCAIRO=""
FLTKCAIROOPTION=""
CAIROLIBS=""
-AC_ARG_ENABLE(cairoext,[ --enable-cairoext use fltk code instrumentation for cairo extended use (default=no)])
-AC_ARG_ENABLE(cairo,[ --enable-cairo use lib Cairo (default=no)])
+AC_ARG_ENABLE(cairoext,[ --enable-cairoext use fltk code instrumentation for cairo extended use [[default=no]]])
+AC_ARG_ENABLE(cairo, [ --enable-cairo use lib Cairo [[default=no]]])
if test x$enable_cairoext = xyes; then
AC_DEFINE(FLTK_USE_CAIRO)
@@ -190,29 +169,29 @@ AC_SUBST(IMGLIBBASENAME)
AC_SUBST(CAIROLIBBASENAME)
dnl Handle compile-time options...
-AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]])
+AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [[default=no]]])
if test x$enable_debug = xyes; then
DEBUGFLAG="-g "
else
DEBUGFLAG=""
fi
-AC_ARG_ENABLE(cp936, [ --enable-cp936 turn on CP936 [default=no]])
+AC_ARG_ENABLE(cp936, [ --enable-cp936 turn on CP936 [[default=no]]])
if test x$enable_cp936 = xyes; then
CFLAGS="$CFLAGS -DCP936"
fi
-AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [default=yes]])
+AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [[default=yes]]])
-AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]])
+AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [[default=no]]])
if test x$enable_shared = xyes; then
PICFLAG=1
SHAREDSUFFIX=""
FLUID="fluid-shared"
- case $uname in
- Darwin*)
+ case $host_os in
+ darwin*)
DSONAME="libfltk.$FL_API_VERSION.dylib"
FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
@@ -221,7 +200,7 @@ if test x$enable_shared = xyes; then
DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
;;
- SunOS* | UNIX_S*)
+ solaris*)
DSONAME="libfltk.so.$FL_API_VERSION"
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
@@ -232,7 +211,7 @@ if test x$enable_shared = xyes; then
DSOLINK="-R$libdir"
fi
;;
- HP-UX*)
+ hpux*)
DSONAME="libfltk.sl.$FL_API_VERSION"
FLDSONAME="libfltk_forms.sl.$FL_API_VERSION"
GLDSONAME="libfltk_gl.sl.$FL_API_VERSION"
@@ -243,7 +222,7 @@ if test x$enable_shared = xyes; then
DSOLINK="-Wl,-rpath,$libdir"
fi
;;
- IRIX*)
+ irix*)
DSONAME="libfltk.so.$FL_API_VERSION"
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
@@ -254,7 +233,7 @@ if test x$enable_shared = xyes; then
DSOLINK="-Wl,-rpath,$libdir"
fi
;;
- OSF1*)
+ osf*)
DSONAME="libfltk.so.$FL_API_VERSION"
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
@@ -265,18 +244,53 @@ if test x$enable_shared = xyes; then
DSOLINK="-Wl,-rpath,$libdir"
fi
;;
- Linux* | *BSD*)
+ linux* | *bsd*)
DSONAME="libfltk.so.$FL_API_VERSION"
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
CAIRODSONAME="libfltk_cairo.so.$FL_API_VERSION"
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ -shared -fPIC $DEBUGFLAG -o"
+
+ # See if the compiler supports -fvisibility...
+ AC_CACHE_CHECK([if the compiler supports -fvisibility],
+ ac_cv_cxx_fvisibility, [
+ OLDCXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(,,
+ ac_cv_cxx_fvisibility=yes,
+ ac_cv_cxx_fvisibility=no)
+ CXXFLAGS="$OLDCXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test x"$ac_cv_cxx_fvisibility" = xyes; then
+ OPTIM="$OPTIM -fvisibility=hidden"
+ fi
+
+ # See if the compiler supports -fvisibility-inlines-hidden...
+ AC_CACHE_CHECK([if the compiler supports -fvisibility-inlines-hidden],
+ ac_cv_cxx_fvisibility_inlines, [
+ OLDCXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(,,
+ ac_cv_cxx_fvisibility_inlines=yes,
+ ac_cv_cxx_fvisibility_inlines=no)
+ CXXFLAGS="$OLDCXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+ if test x"$ac_cv_cxx_fvisibility_inlines" = xyes; then
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ fi
+
# if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
# DSOLINK="-Wl,-rpath,$libdir"
# fi
;;
- AIX*)
+ aix*)
DSONAME="libfltk_s.a"
FLDSONAME="libfltk_forms_s.a"
GLDSONAME="libfltk_gl_s.a"
@@ -285,7 +299,7 @@ if test x$enable_shared = xyes; then
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
SHAREDSUFFIX="_s"
;;
- CYGWIN* | MINGW*)
+ cygwin* | mingw*)
PICFLAG=0
if test x$enable_cygwin != xyes; then
DSONAME="mgwfltknox-$FL_API_VERSION.dll"
@@ -356,7 +370,7 @@ AC_SUBST(SHAREDSUFFIX)
AC_SUBST(LINKSHARED)
AC_SUBST(FLUID)
-AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support (default=yes)])
+AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support [[default=yes]]])
AC_ARG_WITH(optim, [ --with-optim="flags" use custom optimization flags])
@@ -364,19 +378,17 @@ AC_ARG_WITH(archflags, [ --with-archflags="flags"
use custom architecture flags
(possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)],
ARCHFLAGS="$withval")
-case $uname in
- Darwin*)
+case $host_os in
+ darwin*)
# QD is not supported anymore since 1.3
AC_DEFINE(__APPLE_QUARTZ__)
;;
esac
dnl Find commands...
-AC_PROG_CC
-AC_PROG_CXX
AC_PROG_INSTALL
-case $uname in
- OSF1*)
+case $host_os in
+ osf*)
INSTALL="`pwd`/install-sh -c"
;;
esac
@@ -394,7 +406,6 @@ if test "x$NROFF" = "x:"; then
NROFF="$GROFF -T ascii"
fi
fi
-AC_PATH_PROG(HTMLDOC,htmldoc)
AC_PATH_PROG(DOXYDOC,doxygen)
dnl How do we make libraries?
@@ -418,10 +429,6 @@ dnl this will only be used to compile resources for Windows .exe files
AC_PATH_TOOL(RC,windres)
dnl Architecture checks...
-if test "$uname" != Darwin; then
- AC_C_BIGENDIAN
-fi
-
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
@@ -435,7 +442,12 @@ else
AC_DEFINE(U32,unsigned long)
fi
fi
-if test "$uname" != Darwin; then
+case $host_os in
+ darwin*)
+ ;;
+ *)
+ AC_C_BIGENDIAN
+
if test $ac_cv_sizeof_int -eq 8; then
AC_DEFINE(U64,unsigned)
else
@@ -443,7 +455,8 @@ if test "$uname" != Darwin; then
AC_DEFINE(U64,unsigned long)
fi
fi
-fi
+ ;;
+esac
dnl Does the C++ compiler support the bool type?
AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
@@ -494,57 +507,40 @@ if test "$ac_cv_cxx_scandir_posix" = yes; then
AC_DEFINE(HAVE_SCANDIR)
AC_DEFINE(HAVE_SCANDIR_POSIX)
else
- AC_CHECK_FUNC(scandir,
- if test "x$uname" = xSunOS -o "x$uname" = xQNX; then
- AC_MSG_WARN(Not using $uname scandir emulation function.)
- else
- AC_DEFINE(HAVE_SCANDIR)
- fi)
+ AC_CHECK_FUNC(scandir,[
+ case $host_os in
+ solaris* | *qnx*)
+ AC_MSG_WARN(Not using $host_os scandir emulation function.)
+ ;;
+ *)
+ AC_DEFINE(HAVE_SCANDIR)
+ ;;
+ esac])
fi
AC_CHECK_FUNC(vsnprintf,[
- case "$uname" in
- HP-UX*)
- if test "$uversion" = "1020"; then
- AC_MSG_WARN(Not using built-in vsnprintf function because you are running HP-UX 10.20.)
- else
- AC_DEFINE(HAVE_VSNPRINTF)
- fi
- ;;
-
- OSF1*)
- if test "$uversion" = "40"; then
- AC_MSG_WARN(Not using built-in vsnprintf function because you are running Tru64 4.0.)
- else
- AC_DEFINE(HAVE_VSNPRINTF)
- fi
- ;;
-
+ case $host_os in
+ hpux1020)
+ AC_MSG_WARN(Not using built-in vsnprintf function because you are running HP-UX 10.20.)
+ ;;
+ osf4)
+ AC_MSG_WARN(Not using built-in vsnprintf function because you are running Tru64 4.0.)
+ ;;
*)
AC_DEFINE(HAVE_VSNPRINTF)
- ;;
+ ;;
esac])
AC_CHECK_FUNC(snprintf,[
- case "$uname" in
- HP-UX*)
- if test "$uversion" = "1020"; then
- AC_MSG_WARN(Not using built-in snprintf function because you are running HP-UX 10.20.)
- else
- AC_DEFINE(HAVE_SNPRINTF)
- fi
- ;;
-
- OSF1*)
- if test "$uversion" = "40"; then
- AC_MSG_WARN(Not using built-in snprintf function because you are running Tru64 4.0.)
- else
- AC_DEFINE(HAVE_SNPRINTF)
- fi
- ;;
-
+ case $host_os in
+ hpux1020)
+ AC_MSG_WARN(Not using built-in snprintf function because you are running HP-UX 10.20.)
+ ;;
+ osf4)
+ AC_MSG_WARN(Not using built-in snprintf function because you are running Tru64 4.0.)
+ ;;
*)
AC_DEFINE(HAVE_SNPRINTF)
- ;;
+ ;;
esac])
AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_FUNCS(strcasecmp strlcat strlcpy)
@@ -587,8 +583,6 @@ if test $ac_cv_c_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG)
fi
-AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
-
dnl Check for dlopen/dlsym...
AC_SEARCH_LIBS(dlsym, dl, AC_DEFINE(HAVE_DLSYM))
AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(HAVE_DLFCN_H))
@@ -596,13 +590,13 @@ AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(HAVE_DLFCN_H))
dnl Check for audio libraries...
AUDIOLIBS=""
-case $uname in
- CYGWIN* | MINGW*)
+case $host_os in
+ cygwin* | mingw*)
dnl Cygwin environment...
AUDIOLIBS="-lwinmm"
;;
- Darwin*)
+ darwin*)
AUDIOLIBS="-framework CoreAudio"
;;
@@ -626,7 +620,7 @@ AC_SUBST(STATICIMAGELIBS)
# Handle the JPEG lib linking mode (use fltk local or system lib)
# If --enable-(resp. --disable-)localjpeg parameter is not set by user
# Then we check the JPEG lib usability, with result in sysjpeglib_ok variable
-AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library, default=auto])
+AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library [[default=auto]]])
# Check for System lib use if automatic mode or --disable-localjpeg is requested
sysjpeglib_ok=no
sysjpeginc_ok=no
@@ -661,7 +655,7 @@ fi
# Handle the ZLIB lib linking mode (use fltk local or system lib)
# If --enable-(resp. --disable-)localzlib parameter is not set by user
# Then we check the ZLIB lib usability, with result in syszlib_ok variable
-AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library, default=auto])
+AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library [[default=auto]]])
# Check for System lib use if automatic mode or --disable-localzlib is requested
syszlib_ok=no
syszinc_ok=no
@@ -698,7 +692,7 @@ fi
# Handle the PNG lib linking mode (use fltk local or system lib)
# If --enable-(resp. --disable-)localpng parameter is not set by user
# Then we check the png lib usability with result in syspng_lib variable
-AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto])
+AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library [[default=auto]]])
# Now check if system lib is usable, we check Lib AND include availability with inc variant,
# but only, if the builtin lib is not requested
@@ -762,11 +756,11 @@ dnl Test whether we want to check for pthreads. We must not do it on Windows
dnl unless we run under Cygwin with --enable-cygwin, since we always use
dnl native threads on Windows (even if libpthread is available)
check_pthread=yes
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
check_pthread=no
;;
- CYGWIN*)
+ cygwin*)
if test "x$enable_cygwin" != xyes; then
check_pthread=no
fi
@@ -796,9 +790,11 @@ if test "x$enable_threads" != xno -a x$check_pthread = xyes; then
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
# be POSIX-compliant... :(
- if test $uname = SunOS; then
- PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
- fi
+ case $host_os in
+ solaris*)
+ PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
break
fi
done
@@ -813,13 +809,13 @@ HLINKS=
OSX_ONLY=:
THREADS=
-AC_ARG_WITH(links, [ --with-links make header links for common misspellings (default=no)])
+AC_ARG_WITH(links, [ --with-links make header links for common misspellings [[default=no]]])
INSTALL_DESKTOP=""
UNINSTALL_DESKTOP=""
-case $uname_GUI in
- CYGWIN* | MINGW*)
+case $host_os_gui in
+ cygwin* | mingw*)
dnl Cygwin environment, using windows GDI ...
# Recent versions of Cygwin are seriously broken and the size
# checks don't work because the shell puts out \r\n instead of
@@ -863,7 +859,7 @@ case $uname_GUI in
fi
;;
- Darwin*)
+ darwin*)
# MacOS X uses Cocoa for graphics.
LIBS="$LIBS -framework Cocoa"
@@ -962,7 +958,7 @@ case $uname_GUI in
fi
dnl Check for Xinerama support unless disabled...
- AC_ARG_ENABLE(xinerama, [ --enable-xinerama turn on Xinerama support [default=yes]])
+ AC_ARG_ENABLE(xinerama, [ --enable-xinerama turn on Xinerama support [[default=yes]]])
if test x$enable_xinerama != xno; then
AC_CHECK_LIB(Xinerama,XineramaIsActive,
@@ -971,13 +967,14 @@ case $uname_GUI in
fi
dnl Check for the Xft library unless disabled...
- AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [default=yes]])
+ AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [[default=yes]]])
if test x$enable_xft != xno; then
AC_PATH_PROG(FTCONFIG,freetype-config)
if test "x$FTCONFIG" != x; then
CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS"
+ CFLAGS="`$FTCONFIG --cflags` $CFLAGS"
CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS"
AC_CHECK_LIB(fontconfig, FcPatternCreate)
@@ -989,7 +986,7 @@ case $uname_GUI in
fi
dnl Check for the Xdbe extension unless disabled...
- AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [default=yes]])
+ AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [[default=yes]]])
if test x$enable_xdbe != xno; then
AC_CHECK_HEADER(X11/extensions/Xdbe.h, AC_DEFINE(HAVE_XDBE),,
@@ -998,6 +995,26 @@ case $uname_GUI in
LIBS="-lXext $LIBS")
fi
+ dnl Check for the Xfixes extension unless disabled...
+ AC_ARG_ENABLE(xfixes, [ --enable-xfixes turn on Xfixes support [[default=yes]]])
+
+ if test x$enable_xfixes != xno; then
+ AC_CHECK_HEADER(X11/extensions/Xfixes.h, AC_DEFINE(HAVE_XFIXES),,
+ [#include <X11/Xlib.h>])
+ AC_CHECK_LIB(Xfixes, XFixesQueryExtension,
+ LIBS="-lXfixes $LIBS")
+ fi
+
+ dnl Check for the Xcursor library unless disabled...
+ AC_ARG_ENABLE(xcursor, [ --enable-xcursor turn on Xcursor support [[default=yes]]])
+
+ if test x$enable_xcursor != xno; then
+ AC_CHECK_HEADER(X11/Xcursor/Xcursor.h, AC_DEFINE(HAVE_XCURSOR),,
+ [#include <X11/Xlib.h>])
+ AC_CHECK_LIB(Xcursor, XcursorImageCreate,
+ LIBS="-lXcursor $LIBS")
+ fi
+
dnl Check for overlay visuals...
AC_PATH_PROG(XPROP, xprop)
AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay,
@@ -1017,8 +1034,8 @@ case $uname_GUI in
# Make symlinks since UNIX/Linux is case sensitive,
# but Cygwin in general not.
- case $uname in
- CYGWIN*)
+ case $host_os in
+ cygwin*)
HLINKS="#"
;;
*)
@@ -1046,14 +1063,14 @@ AC_SUBST(INSTALL_DESKTOP)
AC_SUBST(UNINSTALL_DESKTOP)
dnl Figure out the appropriate formatted man page extension...
-case "$uname" in
- *BSD* | Darwin*)
+case "$host_os" in
+ *bsd* | darwin*)
# *BSD
CAT1EXT=0
CAT3EXT=0
CAT6EXT=0
;;
- IRIX*)
+ irix*)
# SGI IRIX
CAT1EXT=z
CAT3EXT=z
@@ -1073,12 +1090,12 @@ AC_SUBST(CAT6EXT)
dnl Fix "mandir" variable...
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then
- case "$uname" in
- *BSD* | Darwin* | Linux*)
+ case "$host_os" in
+ *bsd* | darwin* | linux*)
# *BSD, Darwin, and Linux
mandir="\${prefix}/share/man"
;;
- IRIX*)
+ irix*)
# SGI IRIX
mandir="\${prefix}/share/catman"
;;
@@ -1094,9 +1111,15 @@ if test "$exec_prefix" = NONE; then
exec_prefix="\${prefix}"
fi
-if test "$uname" = "IRIX" -a $uversion -ge 62 -a "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
- libdir="/usr/lib32"
-fi
+case $host_os in
+ irix[1-5]*)
+ ;;
+ irix*)
+ if test "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
+ libdir="/usr/lib32"
+ fi
+ ;;
+esac
dnl Define the command used to update the dependencies (this option
dnl mainly for FLTK core developers - not necessary for users)
@@ -1116,9 +1139,13 @@ if test -n "$GCC"; then
# We know that Carbon is deprecated on OS X 10.4. To avoid hundreds of warnings
# we will temporarily disable 'deprecated' warnings on OS X.
- if test "$uname" = "Darwin" -a $uversion -ge 800; then
- OPTIM="-Wno-deprecated-declarations $OPTIM"
- fi
+ case $host_os in
+ darwin[1-7])
+ ;;
+ darwin*)
+ OPTIM="-Wno-deprecated-declarations $OPTIM"
+ ;;
+ esac
# Set the default compiler optimizations...
if test -z "$DEBUGFLAG"; then
@@ -1168,6 +1195,30 @@ if test -n "$GCC"; then
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
+ # See if ld supports -Bsymbolic-functions...
+ AC_MSG_CHECKING(if ld supports -Bsymbolic-functions)
+ OLDLDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
+ AC_TRY_LINK(,,
+ [DSOFLAGS="$DSOFLAGS -Wl,-Bsymbolic-functions"]
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+ LDFLAGS="$OLDLDFLAGS"
+
+ # See if toolchain supports a sectioned build...
+ AC_MSG_CHECKING(if toolchain supports sections)
+ OLDLDFLAGS="$LDFLAGS"
+ OLDCFLAGS="$CFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-gc-sections"
+ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
+ AC_TRY_LINK(,,
+ [DSOFLAGS="$DSOFLAGS -Wl,-gc-sections"
+ OPTIM="$OPTIM -ffunction-sections -fdata-sections"]
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no))
+ LDFLAGS="$OLDLDFLAGS"
+ CFLAGS="$OLDCFLAGS"
+
# See if we are running Solaris; if so, try the -fpermissive option...
# This option is required on some versions of Solaris to work around
# bugs in the X headers up through Solaris 7.
@@ -1175,20 +1226,22 @@ if test -n "$GCC"; then
# Unlike the other compiler/optimization settings, this one is placed
# in CFLAGS and CXXFLAGS so that fltk-config will provide the option
# to clients - otherwise client apps will not compile properly...
- if test "$uname" = SunOS; then
- AC_MSG_CHECKING(if GCC supports -fpermissive)
-
- OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fpermissive"
- AC_TRY_COMPILE(,,
- CXXFLAGS="$CXXFLAGS -fpermissive"
- AC_MSG_RESULT(yes),
- CFLAGS="$OLDCFLAGS"
- AC_MSG_RESULT(no))
- fi
+ case $host_os in
+ solaris*)
+ AC_MSG_CHECKING(if GCC supports -fpermissive)
+
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fpermissive"
+ AC_TRY_COMPILE(,,
+ CXXFLAGS="$CXXFLAGS -fpermissive"
+ AC_MSG_RESULT(yes),
+ CFLAGS="$OLDCFLAGS"
+ AC_MSG_RESULT(no))
+ ;;
+ esac
else
- case "$uname" in
- IRIX*)
+ case "$host_os" in
+ irix*)
# Running some flavor of IRIX; see which version and
# set things up according...
if test "$uversion" -ge 62; then
@@ -1217,7 +1270,7 @@ else
fi
fi
;;
- HP-UX*)
+ hpux*)
# Running HP-UX; these options should work for the HP compilers.
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
@@ -1244,7 +1297,7 @@ else
fi
fi
;;
- SunOS*)
+ solaris*)
# Solaris
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
@@ -1258,7 +1311,7 @@ else
OPTIM="-KPIC $OPTIM"
fi
;;
- AIX*)
+ aix*)
if test -z "$DEBUGFLAG"; then
if test "x$with_optim" != x; then
OPTIM="$with_optim $OPTIM"
@@ -1281,15 +1334,17 @@ fi
OPTIM="$DEBUGFLAG $OPTIM"
dnl Take archflags away from CFLAGS (makefiles use ARCHFLAGS explicitly)
-if test `uname` = Darwin; then
- if test "x$with_archflags" != x ; then
- CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
- fi
-fi
+case $host_os in
+ darwin*)
+ if test "x$with_archflags" != x ; then
+ CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
+ fi
+ ;;
+esac
dnl Define the FLTK documentation directory...
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
# Determine the path where MSys has /usr installed
msyspath=`mount | grep '\/usr ' | cut -d ' ' -f -1 | sed -e 's/\\\/\// g'`
# Then substitute that in the WIN32 path instead of /usr
@@ -1316,11 +1371,11 @@ echo ""
echo "Configuration Summary"
echo "-------------------------------------------------------------------------"
-case $uname_GUI in
- CYGWIN* | MINGW*)
+case $host_os_gui in
+ cygwin* | mingw*)
graphics="GDI"
;;
- Darwin*)
+ darwin*)
graphics="Quartz"
;;
*)
@@ -1345,8 +1400,8 @@ echo " exec_prefix=$exec_prefix"
echo " includedir=$includedir"
echo " libdir=$libdir"
echo " mandir=$mandir"
-case $uname in
- MINGW*)
+case $host_os in
+ mingw*)
echo " MSys docpath=$msyspath/local/share/doc/fltk"
;;
esac
@@ -1401,5 +1456,5 @@ dnl Make sure the fltk-config script is executable...
chmod +x fltk-config
dnl
-dnl End of "$Id: configure.in 9707 2012-11-06 21:13:54Z matt $".
+dnl End of "$Id: configure.in 10418 2014-10-30 14:07:58Z AlbrechtS $".
dnl
diff --git a/debian/changelog b/debian/changelog
index 0eac83e..bfcc079 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+fltk1.3 (1.3.3-1) UNRELEASED; urgency=medium
+
+ * New upstream release. (Closes: #791346.) (NOT RELEASED YET.)
+
+ -- Aaron M. Ucko <ucko@debian.org> Tue, 07 Jul 2015 01:32:55 -0400
+
fltk1.3 (1.3.2-6) unstable; urgency=medium
* debian/*.symbols*: Move previously mandatory symbols Clang 3.4
diff --git a/documentation/Doxybook b/documentation/Doxybook
index a938a2a..5eddae5 100644
--- a/documentation/Doxybook
+++ b/documentation/Doxybook
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = "FLTK 1.3.2"
+PROJECT_NAME = "FLTK 1.3.3"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@@ -567,6 +567,7 @@ INPUT = src/index.dox \
src/unicode.dox \
../FL \
../src \
+ ../cairo \
src/enumerations.dox \
src/glut.dox \
src/forms.dox \
@@ -576,7 +577,8 @@ INPUT = src/index.dox \
src/development.dox \
src/license.dox \
src/examples.dox \
- src/faq.dox
+ src/faq.dox \
+ ../src/Fl_Sys_Menu_Bar.mm
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -610,7 +612,8 @@ RECURSIVE = YES
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../src/fl_font_win32.cxx \
- ../src/fl_font_mac.cxx
+ ../src/fl_font_mac.cxx \
+ ../src/aimm.h
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
diff --git a/documentation/Doxyfile b/documentation/Doxyfile
index 9171e9d..20d0331 100644
--- a/documentation/Doxyfile
+++ b/documentation/Doxyfile
@@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = "FLTK 1.3.2"
+PROJECT_NAME = "FLTK 1.3.3"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@@ -577,7 +577,8 @@ INPUT = src/index.dox \
src/development.dox \
src/license.dox \
src/examples.dox \
- src/faq.dox
+ src/faq.dox \
+ ../src/Fl_Sys_Menu_Bar.mm
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -611,7 +612,8 @@ RECURSIVE = YES
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../src/fl_font_win32.cxx \
- ../src/fl_font_mac.cxx
+ ../src/fl_font_mac.cxx \
+ ../src/aimm.h
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
diff --git a/documentation/Makefile b/documentation/Makefile
index 3971b15..d0eae03 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile 9146 2011-10-25 02:17:29Z greg.ercolano $"
+# "$Id: Makefile 10361 2014-10-05 22:39:31Z AlbrechtS $"
#
# Documentation makefile for the Fast Light Tool Kit (FLTK).
#
@@ -64,7 +64,7 @@ dist: all html pdf
alldocs: dist
clean:
- $(RM) fltk.pdf refman.pdf
+ $(RM) fltk.pdf refman.pdf src/fltk-book.tex
$(RMDIR) html latex
$(RM) *~ *.bck *.bak *.log
$(RM) $(MANPAGES) $(SRC_DOCDIR)/*.0
@@ -128,7 +128,7 @@ uninstall-linux uninstall-osx:
# is not made by default.
# Use `make html' or `make dist' to create the html docs
-html: $(HTMLFILES) Doxyfile
+html: $(HTMLFILES) Doxyfile src/fltk-book.tex
echo "Generating HTML documentation..."
-$(RMDIR) html
-$(INSTALL_DIR) html
@@ -148,7 +148,7 @@ html-online: html
pdf: refman.pdf
cp -f latex/refman.pdf fltk.pdf
-refman.pdf: $(HTMLFILES) Doxybook
+refman.pdf: $(HTMLFILES) Doxybook src/fltk-book.tex
-$(RMDIR) latex
echo "Generating PDF documentation ..."
$(DOXYDOC) Doxybook ;\
@@ -166,6 +166,13 @@ refman.pdf: $(HTMLFILES) Doxybook
done ; \
cd ..) > pdfall.log 2>&1
+src/fltk-book.tex: src/fltk-book.tex.in
+ DOXY_VERSION=`$(DOXYDOC) --version`; \
+ YEAR=`date +%Y`; \
+ FLTK_VERSION=`cat ../VERSION`; \
+ sed -e"s/@YEAR@/$$YEAR/g" -e"s/@VERSION@/$$FLTK_VERSION/g" \
+ -e"s/@DOXY_VERSION@/$$DOXY_VERSION/g" < $< > $@
+
#
-# End of "$Id: Makefile 9146 2011-10-25 02:17:29Z greg.ercolano $".
+# End of "$Id: Makefile 10361 2014-10-05 22:39:31Z AlbrechtS $".
#
diff --git a/documentation/src/Fl_Check_Button.png b/documentation/src/Fl_Check_Button.png
index 63cfc85..b0084e8 100644
--- a/documentation/src/Fl_Check_Button.png
+++ b/documentation/src/Fl_Check_Button.png
Binary files differ
diff --git a/documentation/src/Fl_Native_File_Chooser.png b/documentation/src/Fl_Native_File_Chooser.png
index 1f1e668..ea92d92 100644
--- a/documentation/src/Fl_Native_File_Chooser.png
+++ b/documentation/src/Fl_Native_File_Chooser.png
Binary files differ
diff --git a/documentation/src/Fl_Tile.png b/documentation/src/Fl_Tile.png
index eafa59c..20d90de 100644
--- a/documentation/src/Fl_Tile.png
+++ b/documentation/src/Fl_Tile.png
Binary files differ
diff --git a/documentation/src/Fl_Tree_Item-dimensions.png b/documentation/src/Fl_Tree_Item-dimensions.png
new file mode 100644
index 0000000..2bbc4cf
--- /dev/null
+++ b/documentation/src/Fl_Tree_Item-dimensions.png
Binary files differ
diff --git a/documentation/src/advanced.dox b/documentation/src/advanced.dox
index fc619e4..30a3ed0 100644
--- a/documentation/src/advanced.dox
+++ b/documentation/src/advanced.dox
@@ -84,7 +84,7 @@ threads on all operating systems:
widgets derived from Fl_Window, including dialogs, file
choosers, subwindows or those using Fl_Gl_Window.
-\li Don't call Fl::wait(), Fl::flush() or any
+\li Don't call Fl::run(), Fl::wait(), Fl::flush() or any
related methods that will handle system messages
\li Don't start or cancel timers
diff --git a/documentation/src/basics.dox b/documentation/src/basics.dox
index b275307..0a539a9 100644
--- a/documentation/src/basics.dox
+++ b/documentation/src/basics.dox
@@ -69,12 +69,12 @@ window->show(argc, argv);
return Fl::run();
\endcode
-The resulting program will display the window in Figure 2-1.
+The resulting program will display the window in Figure 4.1.
You can quit the program by closing the window or pressing the
<tt>ESC</tt>ape key.
-\image html hello.C.png "Figure 2-1: The Hello, World! Window"
-\image latex hello.C.png "The Hello, World! Window" width=8cm
+\image html hello_cxx.png "Figure 4.1: The Hello, World! Window"
+\image latex hello_cxx.png "The Hello, World! Window" width=8cm
\subsection basics_creating Creating the Widgets
diff --git a/documentation/src/common.dox b/documentation/src/common.dox
index 7d7716a..e6a3269 100644
--- a/documentation/src/common.dox
+++ b/documentation/src/common.dox
@@ -372,7 +372,7 @@ The @ sign may also be followed by the following optional
\li +[1-9] or -[1-9] tweaks the scaling a little bigger or smaller.
-\li '$' flips the symbol horizontally, '%' flips it vertically.
+\li '$' flips the symbol horizontally, '\%' flips it vertically.
\li [0-9] - rotates by a multiple of 45 degrees. '5' and '6' do no rotation
while the others point in the direction of that key on a numeric keypad.
@@ -436,14 +436,6 @@ draw the labels in ways inaccessible through the
fl_font() mechanism (e.g. <tt>FL_ENGRAVED_LABEL</tt>) or
with program-generated letters or symbology.
-<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
-<TR>
- <TD><B>Note:</B>
- <P>This interface has changed in FLTK 2.0!
- </TD>
-</TR>
-</TABLE></CENTER>
-
\par Label Type Functions
To setup your own label type you will need to write two
diff --git a/documentation/src/development.dox b/documentation/src/development.dox
index 899fa9a..b53c3a8 100644
--- a/documentation/src/development.dox
+++ b/documentation/src/development.dox
@@ -104,7 +104,7 @@ Gizmo.cxx:
int popup_gizmo(...);
\endverbatim
-<H3>Comments Within Doxygen Comment Blocks:</H3>
+<H3>Comments Within Doxygen Comment Blocks</H3>
You can use HTML comment statements to embed comments in doxygen comment blocks.
These comments will not be visible in the generated document.
@@ -122,19 +122,25 @@ will be shown as:
This will be visible again.
-<H3>Different Headlines:</H3>
+<H3>Different Headlines</H3>
+
+You can use HTML tags \<H1> ... \<H4> for headlines with different sizes.
+As of doxygen 1.8.x there must not be more than three spaces at the
+beginning of the line for this to work. Currently (doxygen 1.8.6)
+there seems to be no difference in the font sizes of \<H3> and \<H4>
+in the pdf output, whereas the html output uses different font sizes.
\code
- <H1>Headline in big text (H1)</H1>
- <H2>Headline in big text (H2)</H2>
- <H3>Headline in big text (H3)</H3>
- <H4>Headline in big text (H4)</H4>
+ <H1>Headline in big text (H1)</H1>
+ <H2>Headline in big text (H2)</H2>
+ <H3>Headline in big text (H3)</H3>
+ <H4>Headline in big text (H4)</H4>
\endcode
- <H1>Headline in big text (H1)</H1>
- <H2>Headline in big text (H2)</H2>
- <H3>Headline in big text (H3)</H3>
- <H4>Headline in big text (H4)</H4>
+ <H1>Headline in big text (H1)</H1>
+ <H2>Headline in big text (H2)</H2>
+ <H3>Headline in big text (H3)</H3>
+ <H4>Headline in big text (H4)</H4>
\section development_non-ascii Non-ASCII Characters
@@ -149,8 +155,8 @@ This will appear in the document:
Doxygen understands many HTML quoting characters like
&quot;, &uuml;, &ccedil;, &Ccedil;, but not all HTML quoting characters.
-For further informations about HTML quoting characters see
- \b http://www.doxygen.org/htmlcmds.html
+For further informations about HTML quoting characters see
+ <br> \b http://www.doxygen.org/htmlcmds.html
Alternatively you can use \b UTF-8 encoding within Doxygen comments.
@@ -190,7 +196,7 @@ at its top.
This section is
\code
- \section development_structure Document structure
+ \section development_structure Document Structure
\endcode
The following section is
@@ -212,7 +218,7 @@ Links to other documents and external links can be embedded with
\code
- see chapter \ref unicode creates a link to the named chapter
- unicode that has been created with a \page statement.
+ unicode that has been created with a \\page statement.
- For further informations about quoting see
http://www.doxygen.org/htmlcmds.html
@@ -239,60 +245,60 @@ appears as:
There is no real need to use HTML \<P\> and \</P\> tags within the text
to tell doxygen to start or stop a paragraph. In most cases, when doxygen
encounters a blank line or some, but not all, \b \\commands in the text it
-knows that it as reached the start or end of a paragraph. Doxygen also
+knows that it has reached the start or end of a paragraph. Doxygen also
offers the \b \\par command for special paragraph handling. It can be used
to provide a paragraph title and also to indent a paragraph. Unfortunately
\b \\par won't do what you expect if you want to have doxygen links and
sometimes html tags don't work either.
- <!-- use verbatim rather than code to avoid links to code reference -->
- \verbatim
- \par Normal Paragraph with title
+<!-- use verbatim rather than code to avoid links to code reference -->
+\verbatim
+ \par Normal Paragraph with title
- This paragraph will have a title, but because there is a blank line
- between the \par and the text, it will have the normal layout.
+ This paragraph will have a title, but because there is a blank line
+ between the \par and the text, it will have the normal layout.
- \par Indented Paragraph with title
- This paragraph will also have a title, but because there is no blank
- line between the \par and the text, it will be indented.
+ \par Indented Paragraph with title
+ This paragraph will also have a title, but because there is no blank
+ line between the \par and the text, it will be indented.
- \par
- It is also possible to have an indented paragraph without title.
- This is how you indent subsequent paragraphs.
+ \par
+ It is also possible to have an indented paragraph without title.
+ This is how you indent subsequent paragraphs.
- \par No link to Fl_Widget::draw()
- Note that the paragraph title is treated as plain text.
- Doxygen type links will not work.
- HTML characters and tags may or may not work.
+ \par No link to Fl_Widget::draw()
+ Note that the paragraph title is treated as plain text.
+ Doxygen type links will not work.
+ HTML characters and tags may or may not work.
- Fl_Widget::draw() links and &quot;html&quot; tags work<br>
- \par
- Use a single line ending with <br> for complicated paragraph titles.
- \endverbatim
+ Fl_Widget::draw() links and &quot;html&quot; tags work<br>
+ \par
+ Use a single line ending with <br> for complicated paragraph titles.
+\endverbatim
The above code produces the following paragraphs:
- \par Normal Paragraph with title
+ \par Normal Paragraph with title
- This paragraph will have a title, but because there is a blank line
- between the \\par and the text, it will have the normal layout.
+ This paragraph will have a title, but because there is a blank line
+ between the \\par and the text, it will have the normal layout.
- \par Indented Paragraph with title
- This paragraph will also have a title, but because there is no blank
- line between the \\par and the text, it will be indented.
+ \par Indented Paragraph with title
+ This paragraph will also have a title, but because there is no blank
+ line between the \\par and the text, it will be indented.
- \par
- It is also possible to have an indented paragraph without title.
- This is how you indent subsequent paragraphs.
+ \par
+ It is also possible to have an indented paragraph without title.
+ This is how you indent subsequent paragraphs.
- \par No link to Fl_Widget::draw()
- Note that the paragraph title is treated as plain text.
- Doxygen type links will not work.
- HTML characters and tags may or may not work.
+ \par No link to Fl_Widget::draw()
+ Note that the paragraph title is treated as plain text.
+ Doxygen type links will not work.
+ HTML characters and tags may or may not work.
- Fl_Widget::draw() links and &quot;html&quot; tags work<br>
- \par
- Use a single line ending with \<br\> for complicated paragraph titles.
+ Fl_Widget::draw() links and &quot;html&quot; tags work<br>
+ \par
+ Use a single line ending with \<br\> for complicated paragraph titles.
\section development_navigation_test Navigation Elements
diff --git a/documentation/src/drawing.dox b/documentation/src/drawing.dox
index 285a61e..f82dc53 100644
--- a/documentation/src/drawing.dox
+++ b/documentation/src/drawing.dox
@@ -154,11 +154,12 @@ the current clipping region.
\section drawing_colors Colors
FLTK manages colors as 32-bit unsigned integers, encoded as RGBI.
-When the RGB bytes are non-zero, the value is treated as RGB.
-If these bytes are zero, the I byte will be used as an index
-into the colormap.
+When the "RGB" bytes are non-zero, the value is treated as RGB.
+If these bytes are zero, the "I" byte will be used as an index
+into the colormap. Colors with both "RGB" set and an "I" >0
+are reserved for special use.
-Values from 0 to 255, i.e. the I index value, represent
+Values from 0 to 255, i.e. the "I" index value, represent
colors from the FLTK 1.3.x standard colormap
and are allocated as needed on screens without TrueColor support.
The \b Fl_Color enumeration type defines the
@@ -216,7 +217,6 @@ void Fl::get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue)
Generate RGB values from a colormap index value \p i.
The first returns the RGB as a 32-bit unsigned integer,
and the second decomposes the RGB into three 8-bit values.
-\todo work out why Fl::get_color() does not give links!
Fl::get_system_colors() <br>
Fl::foreground() <br>
@@ -236,7 +236,6 @@ Fl::set_color(Fl_Color i, unsigned c)
\par
\p Fl::free_color() and \p Fl::set_color() are used to remove and replace
entries from the colormap.
-\todo work out why these do not give links!
There are two predefined graphical interfaces for choosing colors.
The function fl_show_colormap() shows a table of colors and returns an
@@ -354,7 +353,7 @@ void fl_point(int x, int y)
Draw a single pixel at the given coordinates.
void fl_rectf(int x, int y, int w, int h) <br>
-void fl_rectf(int x, int y, int w, int h)
+void fl_rectf(int x, int y, int w, int h, Fl_Color c)
\par
Color a rectangle that exactly fills the given bounding box.
@@ -552,8 +551,8 @@ Add a single vertex to the current path.
void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
\par
-Add a series of points on a Bezier curve to the path. The curve ends
-(and two of the points) are at <tt>X0,Y0</tt> and <tt>X3,Y3</tt>.
+Add a series of points on a Bezier curve to the path. The curve ends
+(and two of the points are) at <tt>X0,Y0</tt> and <tt>X3,Y3</tt>.
\anchor drawing_fl_arc
void fl_arc(double x, double y, double r, double start, double end)
@@ -623,9 +622,6 @@ image is drawn above or below the text as specified by the
The \p draw_symbols argument specifies whether or not
to look for symbol names starting with the "@" character.
-\par
-The text length is limited to 1024 characters per line.
-
void fl_measure(const char *str, int& w, int& h, int draw_symbols)
\par
@@ -636,7 +632,7 @@ white space in the string, kerning, etc.
If the incoming \p w is non-zero it will wrap to that width.
\par
Refer to the full documentation for fl_measure() for details
-on usage and how to avoide common pitfalls.
+on usage and how to avoid common pitfalls.
\see fl_text_extents() -- measure the 'inked' area of a string
\see fl_width() -- measure the pixel width of a string or single character
diff --git a/documentation/src/editor-linenumbers.png b/documentation/src/editor-linenumbers.png
new file mode 100644
index 0000000..54732d4
--- /dev/null
+++ b/documentation/src/editor-linenumbers.png
Binary files differ
diff --git a/documentation/src/enumerations.dox b/documentation/src/enumerations.dox
index e5f65ca..4b69ad8 100644
--- a/documentation/src/enumerations.dox
+++ b/documentation/src/enumerations.dox
@@ -18,11 +18,11 @@ this is often useful to know when programming.
The FLTK version number is stored in a number of compile-time constants:
-\li FL_MAJOR_VERSION - The major release number, currently 1.
-\li FL_MINOR_VERSION - The minor release number, currently 3.
-\li FL_PATCH_VERSION - The patch release number, currently 2.
+\li FL_MAJOR_VERSION - The major release number, currently 1
+\li FL_MINOR_VERSION - The minor release number, currently 3
+\li FL_PATCH_VERSION - The patch release number, currently 3
\li FL_VERSION - A combined floating-point version number for
- the major, minor, and patch release numbers, currently 1.0302.
+ the major, minor, and patch release numbers, currently 1.0303
\section enumerations_events Events
@@ -152,13 +152,10 @@ value:
\li FL_BUTTONS - Any mouse button is pushed.
\li FL_BUTTON(n) - Mouse button \p n ( where <tt>n > 0</tt>) is pushed.
-<!-- NEED 4in -->
-
-
\section enumerations_alignment Alignment Values
The following constants define bits that can be used with
-Fl_Widget::alighn()
+Fl_Widget::align()
to control the positioning of the label:
\li FL_ALIGN_CENTER - The label is centered (0).
diff --git a/documentation/src/events.dox b/documentation/src/events.dox
index b9ba877..82718be 100644
--- a/documentation/src/events.dox
+++ b/documentation/src/events.dox
@@ -161,7 +161,9 @@ it, it will change the event into a \p FL_SHORTCUT event.
FL_KEYBOARD events are also generated by the character palette/map.
To receive \p FL_KEYBOARD events you must also respond to the
-\p FL_FOCUS and \p FL_UNFOCUS events.
+\p FL_FOCUS and \p FL_UNFOCUS events by returning 1. This way
+FLTK knows whether to bother sending your widget keyboard events.
+(Some widgets don't need them, e.g. Fl_Box.)
If you are writing a text-editing widget you may also want to call the
Fl::compose()
@@ -172,6 +174,8 @@ currently has focus. This is not necessarily the same widget
that received the corresponding \p FL_KEYDOWN event
because focus may have changed between events.
+\todo Add details on how to detect repeating keys, since on some X servers a repeating key will generate both FL_KEYUP and FL_KEYDOWN, such that to tell if a key is held, you need Fl::event_key(int) to detect if the key is being held down during FL_KEYUP or not.
+
\subsection events_fl_shortcut FL_SHORTCUT
If the Fl::focus() widget is zero or ignores an \p FL_KEYBOARD event
diff --git a/documentation/src/examples.dox b/documentation/src/examples.dox
index a04a799..5105b7b 100644
--- a/documentation/src/examples.dox
+++ b/documentation/src/examples.dox
@@ -43,69 +43,71 @@ you build FLTK, unlike those in the 'test' directory shown below.
<td> \ref examples_demo </td>
</tr>
<tr>
+<td> \ref examples_device </td>
<td> \ref examples_doublebuffer </td>
<td> \ref examples_editor </td>
<td> \ref examples_fast_slow </td>
<td> \ref examples_file_chooser </td>
<td> \ref examples_fluid </td>
-<td> \ref examples_fonts </td>
</tr>
<tr>
+<td> \ref examples_fonts </td>
<td> \ref examples_forms </td>
<td> \ref examples_fractals </td>
<td> \ref examples_fullscreen </td>
<td> \ref examples_gl_overlay </td>
<td> \ref examples_glpuzzle </td>
-<td> \ref examples_hello </td>
</tr>
<tr>
+<td> \ref examples_hello </td>
<td> \ref examples_help </td>
<td> \ref examples_iconize </td>
<td> \ref examples_image </td>
<td> \ref examples_inactive </td>
<td> \ref examples_input </td>
-<td> \ref examples_input_choice </td>
</tr>
<tr>
+<td> \ref examples_input_choice </td>
<td> \ref examples_keyboard </td>
<td> \ref examples_label </td>
<td> \ref examples_line_style </td>
<td> \ref examples_list_visuals </td>
<td> \ref examples_mandelbrot </td>
-<td> \ref examples_menubar </td>
</tr>
<tr>
+<td> \ref examples_menubar </td>
<td> \ref examples_message </td>
<td> \ref examples_minimum </td>
<td> \ref examples_navigation </td>
<td> \ref examples_output </td>
<td> \ref examples_overlay </td>
-<td> \ref examples_pack </td>
</tr>
<tr>
+<td> \ref examples_pack </td>
<td> \ref examples_pixmap_browser </td>
<td> \ref examples_pixmap </td>
<td> \ref examples_preferences </td>
<td> \ref examples_radio </td>
<td> \ref examples_resizebox </td>
-<td> \ref examples_resize </td>
</tr>
<tr>
+<td> \ref examples_resize </td>
<td> \ref examples_scroll </td>
<td> \ref examples_shape </td>
<td> \ref examples_subwindow </td>
<td> \ref examples_sudoku </td>
<td> \ref examples_symbols </td>
-<td> \ref examples_tabs </td>
</tr>
<tr>
+<td> \ref examples_tabs </td>
<td> \ref examples_threads </td>
<td> \ref examples_tile </td>
<td> \ref examples_tiled_image </td>
+<td> \ref examples_unittests </td>
+<td> \ref examples_utf8 </td>
+</tr>
+<tr>
<td> \ref examples_valuators </td>
-<td> \ref examples_device </td>
-<td> &nbsp; </td>
-<td> &nbsp; </td>
</tr>
</table>
@@ -234,7 +236,11 @@ tree can be changed by editing <tt>test/demo.menu</tt>.
\subsection examples_device device
\par
-Shows how a wide variety of graphics requests can be printed using the Fl_Printer class.
+Exercises the Fl_Image_Surface, Fl_Copy_Surface, and Fl_Printer classes to draw to an
+Fl_Image object, copy graphical data to the clipboard, and for print support.
+\note The clipboard.cxx program of the 'examples' directory is a clipboard watching
+application that continuously displays the textual or graphical content of the system
+clipboard (a.k.a pasteboard on Mac OS X) exercising Fl::paste().
\subsection examples_doublebuffer doublebuffer
@@ -571,6 +577,18 @@ The \c tiled_image demo uses an image as the background
for a window by repeating it over the full size of the widget.
The window is resizable and shows how the image gets repeated.
+\subsection examples_unittests unittests
+
+\par
+\c unittests exercises all of FLTK's drawing features (e.g., text, lines, circles, images),
+as well as scrollbars and schemes.
+
+\subsection examples_utf8 utf8
+
+\par
+\c utf8 shows all fonts available to the platform that runs it, and how each font
+draws each of the Unicode code points ranging between U+0020 and U+FFFF.
+
\subsection examples_valuators valuators
\par
diff --git a/documentation/src/faq.dox b/documentation/src/faq.dox
index 347d22f..530f97e 100644
--- a/documentation/src/faq.dox
+++ b/documentation/src/faq.dox
@@ -36,7 +36,7 @@ If you prefer watching TV to reading books and code, google search for
"FLTK video tutorials" which has some introductory examples of how to
write FLTK programs in C++ and build them.
-\section faq_box_with_text How do a make a box with text?
+\section faq_box_with_text How do I make a box with text?
The 'hello world' program shows how to make a box with text.
All widgets have labels, so picking a simple widget like Fl_Box
@@ -53,10 +53,8 @@ which handles simple HTML formatted text.
\section faq_license Can I use FLTK to make closed-source commercial applications?
-Yes. The
-\ref license FLTK license
-is standard LGPL, but also includes a special clause ("exception")
-to allow for static linking. Specifically:
+Yes. The FLTK \ref license is standard LGPL, but also includes a special
+clause ("exception") to allow for static linking. Specifically:
\verbatim
diff --git a/documentation/src/fltk-book.tex b/documentation/src/fltk-book.tex.in
index 7ea4c31..8b43640 100644
--- a/documentation/src/fltk-book.tex
+++ b/documentation/src/fltk-book.tex.in
@@ -36,7 +36,7 @@
\begin{titlepage}
\vspace*{4.5cm}
\begin{center}
-{\Huge FLTK 1.3.2 Programming Manual}\\
+{\Huge FLTK @VERSION@ Programming Manual}\\
\vspace*{2cm}
\begin{DoxyImageNoCaption}
\mbox{\includegraphics[width=6cm]{FL200}}
@@ -46,7 +46,7 @@
Revision 9 by F. Costantini, D. Gibson, M. Melcher, \\
A. Schlosser, B. Spitzak, and M. Sweet.}\\
\vspace*{1.5cm}
-{\large Copyright 1998-2012 by Bill Spitzak and others.}\\
+{\large Copyright 1998-@YEAR@ by Bill Spitzak and others.}\\
\vspace*{0.75cm}
{\small
This software and manual are provided under the terms of the GNU Library General Public License.}\\
@@ -55,7 +55,7 @@ Permission is granted to reproduce this manual or any portion for any purpose,}\
{\small
provided this copyright and permission notice are preserved.}\\
\vspace*{2.5cm}
-{\large Generated by Doxygen 1.8.7}\\
+{\large Generated by Doxygen @DOXY_VERSION@}\\
\vspace*{0.5cm}
\today{}\\
\end{center}
diff --git a/documentation/src/fltk.book b/documentation/src/fltk.book
deleted file mode 100644
index acd4fcc..0000000
--- a/documentation/src/fltk.book
+++ /dev/null
@@ -1,108 +0,0 @@
-#HTMLDOC 1.8.27.1
--t pdf13 -f "fltk.pdf" --book --toclevels 2 --no-numbered --toctitle "Table of Contents" --title --titleimage "FL.gif" --linkstyle underline --size Universal --left 1.00in --right 0.50in --top 0.50in --bottom 0.50in --header .t. --header1 ... --footer h.1 --nup 1 --tocheader .t. --tocfooter ..i --duplex --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 11.0 --fontspacing 1.2 --headingfont Helvetica --bodyfont Times --headfootsize 11.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode outline --pagelayout single --firstpage c1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --strict --no-overflow
-preface.html
-intro.html
-basics.html
-common.html
-editor.html
-drawing.html
-events.html
-subclassing.html
-opengl.html
-fluid.html
-widgets.html
-advanced.html
-Fl.html
-Fl_Adjuster.html
-Fl_Bitmap.html
-Fl_BMP_Image.html
-Fl_Box.html
-Fl_Browser_.html
-Fl_Browser.html
-Fl_Button.html
-Fl_Chart.html
-Fl_Check_Browser.html
-Fl_Check_Button.html
-Fl_Choice.html
-Fl_Clock.html
-Fl_Clock_Output.html
-Fl_Color_Chooser.html
-Fl_Counter.html
-Fl_Dial.html
-Fl_Double_Window.html
-Fl_End.html
-Fl_File_Browser.html
-Fl_File_Chooser.html
-Fl_File_Icon.html
-Fl_File_Input.html
-Fl_Float_Input.html
-Fl_Free.html
-Fl_GIF_Image.html
-Fl_Gl_Window.html
-Fl_Group.html
-Fl_Help_Dialog.html
-Fl_Help_View.html
-Fl_Hold_Browser.html
-Fl_Image.html
-Fl_Input.html
-Fl_Input_.html
-Fl_Input_Choice.html
-Fl_Int_Input.html
-Fl_JPEG_Image.html
-Fl_Light_Button.html
-Fl_Menu_.html
-Fl_Menu_Bar.html
-Fl_Menu_Button.html
-Fl_Menu_Item.html
-Fl_Menu_Window.html
-Fl_Multi_Browser.html
-Fl_Multiline_Input.html
-Fl_Multiline_Output.html
-Fl_Output.html
-Fl_Overlay_Window.html
-Fl_Pack.html
-Fl_Pixmap.html
-Fl_PNG_Image.html
-Fl_PNM_Image.html
-Fl_Positioner.html
-Fl_Preferences.html
-Fl_Progress.html
-Fl_Repeat_Button.html
-Fl_RGB_Image.html
-Fl_Return_Button.html
-Fl_Roller.html
-Fl_Round_Button.html
-Fl_Scroll.html
-Fl_Scrollbar.html
-Fl_Secret_Input.html
-Fl_Select_Browser.html
-Fl_Shared_Image.html
-Fl_Single_Window.html
-Fl_Slider.html
-Fl_Spinner.html
-Fl_Tabs.html
-Fl_Text_Buffer.html
-Fl_Text_Display.html
-Fl_Text_Editor.html
-Fl_Tile.html
-Fl_Tiled_Image.html
-Fl_Timer.html
-Fl_Toggle_Button.html
-Fl_Tooltip.html
-Fl_Valuator.html
-Fl_Value_Input.html
-Fl_Value_Output.html
-Fl_Value_Slider.html
-Fl_Widget.html
-Fl_Window.html
-Fl_Wizard.html
-Fl_XBM_Image.html
-Fl_XPM_Image.html
-functions.html
-enumerations.html
-glut.html
-forms.html
-osissues.html
-migration.html
-license.html
-examples.html
diff --git a/documentation/src/fluid.dox b/documentation/src/fluid.dox
index 9c93469..35417eb 100644
--- a/documentation/src/fluid.dox
+++ b/documentation/src/fluid.dox
@@ -50,7 +50,7 @@ the <tt>.cxx</tt> file so it still appears to be a single source file.
\image latex fluid-org.png "FLUID organization" width=12cm
Normally the FLUID file defines one or more functions or classes which
-output C++ code. Each function defines a one or more FLTK
+output C++ code. Each function defines one or more FLTK
windows, and all the widgets that go inside those windows.
Widgets created by FLUID are either "named", "complex named" or
@@ -179,7 +179,7 @@ The CubeView class is a subclass of Fl_Gl_Window. It has methods for
setting the zoom, the \e x and \e y pan, and the rotation angle
about the \e x and \e y axes.
-You can safely skip this section as long as you realize the CubeView
+You can safely skip this section as long as you realize that CubeView
is a sublass of Fl_Gl_Window and will respond to calls from
CubeViewUI, generated by FLUID.
@@ -390,7 +390,7 @@ browser window.
Click on the CubeViewUI class in the FLUID window and add a new method
by selecting <b>New->Code->Function/Method.</b> The name of the
-function will also be CubeViewUI. FLUID will understands that this will
+function will also be CubeViewUI. FLUID will understand that this will
be the constructor for the class and will generate the appropriate
code. Make sure you declare the constructor public.
@@ -457,17 +457,17 @@ cube->redraw();
We call <tt>cube->redraw()</tt> after changing the value to update
the CubeView window. CubeView could easily be modified to do this, but
-it is nice to keep this exposed in the case where you may want to do
+it is nice to keep this exposed. In the case where you may want to do
more than one view change only redrawing once saves a lot of time.
-There is no reason no wait until after you have added CubeView to
+There is no reason to wait until after you have added CubeView to
enter these callbacks. FLUID assumes you are smart enough not to refer
to members or functions that don't exist.
\par Adding a Class Method
You can add class methods within FLUID that have nothing to do with the
-GUI. An an example add a show function so that CubeViewUI can actually
+GUI. As an example add a show function so that CubeViewUI can actually
appear on the screen.
Make sure the top level CubeViewUI is selected and select
@@ -484,9 +484,9 @@ Once the new method has been added, highlight its name and select
\subsection fluid_addconst Adding Constructor Initialization Code
-If you need to add code to initialize class, for example setting
+If you need to add code to initialize a class, for example setting
initial values of the horizontal and vertical angles in the
-CubeView, you can simply highlight the Constructor and select
+CubeView, you can simply highlight the constructor and select
<b>New->Code->Code</b>. Add any required code.
\subsection fluid_gencode Generating the Code
@@ -730,10 +730,9 @@ change the selection.
\par
Displays the project settings panel.
-The output filenames control the extensions or names of the
-files the are generated by FLUID. If you check the "Include .h
-from .cxx" button the code file will include the header file
-automatically.
+The output filenames control the extensions or names of the files that
+are generated by FLUID. If you check the "Include Header from Code"
+button the code file will include the header file automatically.
\par
The \ref fluid_i18n "internationalization" options are described
@@ -742,10 +741,10 @@ later in this chapter.
\image html fluid_prefs.png "Figure 9-7: FLUID Preferences Window"
\image latex fluid_prefs.png "FLUID Preferences Window" width=10cm
-\par Edit/GUI Settings... (Shift+Ctrl+p)
+\par Edit/Project Settings... (Shift+Ctrl+p)
\par
-Displays the GUI settings panel. This panel is used
+Displays the project settings ("Preferences") panel. This panel is used
to control the user interface settings.
\par New/Code/Function
@@ -928,10 +927,9 @@ chooser.
\par Alignment (buttons)
\par
-Where to draw the label. The arrows put it on that side of
-the widget, you can combine the to put it in the corner. The
-"box" button puts the label inside the widget, rather
-than outside.
+Where to draw the label. The arrows put it on that side of the
+widget, you can combine them to put it in the corner. The "box"
+button puts the label inside the widget, rather than outside.
\par
The \b clip button clips the label to the widget box, the
@@ -1117,7 +1115,7 @@ blank then no variable is created.
You can name several widgets with "name[0]", "name[1]", "name[2]",
etc. This will cause FLUID to declare an array of pointers. The array
is big enough that the highest number found can be stored. All widgets
-that in the array must be the same type.
+in the array must be the same type.
\par Public (button)
@@ -1125,7 +1123,7 @@ that in the array must be the same type.
Controls whether the widget is publicly accessible. When
embedding widgets in a C++ class, this controls whether the
widget is \p public or \p private in the class.
-Otherwise is controls whether the widget is declared
+Otherwise it controls whether the widget is declared
\p static or global (\p extern ).
\par Extra Code (text fields)
diff --git a/documentation/src/forms.dox b/documentation/src/forms.dox
index 6060ac8..c2379e9 100644
--- a/documentation/src/forms.dox
+++ b/documentation/src/forms.dox
@@ -45,7 +45,7 @@ C++ compiler. The FLTK library does not provide C bindings or header
files.
Although FLTK was designed to be compatible with the GL Forms
-library (version 0.3 or so), XForms has bloated severely and it's
+library (version 0.3 or so), XForms has bloated severely and its
interface is X-specific. Therefore, XForms compatibility is no longer
a goal of FLTK. Compatibility was limited to things that were free, or
that would add code that would not be linked in if the feature is
@@ -81,7 +81,7 @@ Replace <tt>"boxtype"</tt> with <tt>"box()"</tt>.
<tt>const char *</tt> arguments to most FLTK methods are simply
stored, while Forms would \c strdup() the passed string. This is
-most noticable with the label of widgets. Your program must always
+most noticeable with the label of widgets. Your program must always
pass static data such as a string constant or malloc'd buffer to
\c label(). If you are using labels to display program output you
may want to try the Fl_Output widget.
@@ -94,7 +94,7 @@ fdesign outputs a setting of a "fdui" instance variable to the main
window. I did not emulate this because I wanted all instance variables
to be hidden. You can store the same information in the \c user_data()
field of a window. To do this, search through the fdesign output for all
-occurances of <tt>"->fdui"</tt> and edit to use <tt>"->user_data()"</tt>
+occurrences of <tt>"->fdui"</tt> and edit to use <tt>"->user_data()"</tt>
instead. This will require casts and is not trivial.
The prototype for the functions passed to \c fl_add_timeout()
diff --git a/documentation/src/glut.dox b/documentation/src/glut.dox
index 64ab5bb..8333558 100644
--- a/documentation/src/glut.dox
+++ b/documentation/src/glut.dox
@@ -138,7 +138,7 @@ or make the window current.
<tt>window->make_current()</tt> is the same as \p glutSetWindow(number).
If the window has not had \p show() called on it yet, some functions
-that assumme an OpenGL context will not work.
+that assume an OpenGL context will not work.
If you do \p show() the window, call \p make_current()
again to set the context.
@@ -214,7 +214,7 @@ Fl_Glut_Window::Fl_Glut_Window(int w, int h, const char *title = 0)
The first constructor takes 4 int arguments to create the window with
a preset position and size. The second constructor with 2 arguments
will create the window with a preset size, but the window manager will
-choose the position according to it's own whims.
+choose the position according to its own whims.
virtual Fl_Glut_Window::~Fl_Glut_Window()
diff --git a/documentation/src/hello.C.png b/documentation/src/hello_cxx.png
index 43604e3..43604e3 100644
--- a/documentation/src/hello.C.png
+++ b/documentation/src/hello_cxx.png
Binary files differ
diff --git a/documentation/src/html_footer b/documentation/src/html_footer
index 2d29bb7..daef7ac 100644
--- a/documentation/src/html_footer
+++ b/documentation/src/html_footer
@@ -1,7 +1,7 @@
<!--BEGIN GENERATE_TREEVIEW-->
<li class="footer">
<!-- Generated for $projectname by Doxygen -->
- &copy; 1998-2012 by Bill Spitzak and others. &nbsp;&nbsp;&nbsp;
+ &copy; 1998-2014 by Bill Spitzak and others. &nbsp;&nbsp;&nbsp;
<a href="http://www.fltk.org"><img src="tiny.png" align="bottom" alt="FLTK"></a>
</li>
</ul>
@@ -10,7 +10,7 @@
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
<!-- Generated for $projectname by Doxygen -->
- &copy; 1998-2012 by Bill Spitzak and others. &nbsp;&nbsp;&nbsp;
+ &copy; 1998-2014 by Bill Spitzak and others. &nbsp;&nbsp;&nbsp;
<a href="http://www.fltk.org"><img src="tiny.png" align="bottom" alt="FLTK"></a>
</small></address>
<hr class="footer"/><address class="footer"><small>
diff --git a/documentation/src/index.dox b/documentation/src/index.dox
index debda90..78cc369 100644
--- a/documentation/src/index.dox
+++ b/documentation/src/index.dox
@@ -8,12 +8,12 @@
\image latex FL200.png "" width=5cm
</CENTER></TD>
<TD><CENTER>
- <B>FLTK 1.3.2 Programming Manual</B>
+ <B>FLTK 1.3.3 Programming Manual</B>
Revision 9 by F.&nbsp;Costantini, D.&nbsp;Gibson, M.&nbsp;Melcher,
A.&nbsp;Schlosser, B.&nbsp;Spitzak and M.&nbsp;Sweet.
- Copyright 1998-2012 by Bill Spitzak and others.
+ Copyright 1998-2014 by Bill Spitzak and others.
</CENTER></TD>
</TR>
</TABLE>
@@ -70,7 +70,6 @@
&nbsp;
<b>Appendices:</b>
-
- \subpage enumerations
- \subpage glut
diff --git a/documentation/src/intro.dox b/documentation/src/intro.dox
index 73347db..2f7df77 100644
--- a/documentation/src/intro.dox
+++ b/documentation/src/intro.dox
@@ -360,21 +360,13 @@ http://www.fltk.org/software.php [source code]<br>
http://www.fltk.org/newsgroups.php [newsgroup/forums]
\par FTP
-http://ftp.easysw.com/pub/fltk [California, USA, via http]<br>
-ftp://ftp.easysw.com/pub/fltk [California, USA via ftp]<br>
-ftp://ftp2.easysw.com/pub/fltk [Maryland, USA]<br>
ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk [Espoo, Finland]<br>
\par NNTP Newsgroups
-news://news.easysw.com/ [NNTP interface]<br>
+https://groups.google.com/forum/#!forum/fltkgeneral [Google Groups interface]
+news://fltk.org:1024/ [NNTP interface]<br>
http://fltk.org/newsgroups.php [web interface]<br>
-Point your NNTP news reader at news.easysw.com. At minimum, you'll want to subscribe
-to the "fltk.general" group for general FLTK questions and answers.
-
-You can also use the web interface to the newsgroup; just go to the main http://fltk.org/
-page and click on "Forums".
-
\section intro_reporting Reporting Bugs
To report a bug in FLTK, or for feature requests, please use the form at
diff --git a/documentation/src/osissues.dox b/documentation/src/osissues.dox
index e72398e..07fd508 100644
--- a/documentation/src/osissues.dox
+++ b/documentation/src/osissues.dox
@@ -479,6 +479,15 @@ In FLTK, all strings, including filenames, are UTF-8 encoded. The utility functi
fl_fopen() and fl_open() allow to open files potentially having non-ASCII names in a
cross-platform fashion, whereas the standard fopen()/open() functions fail to do so.
+\subsection osissues_wm_quit Responding to WM_QUIT
+
+FLTK will intercept WM_QUIT messages that are directed towards the
+thread that runs the main loop. These are converted to SIGTERM signals
+via \c raise(). This allows you to deal with outside termination
+requests with the same code on both Windows and UNIX systems.
+Other processes can send this message via \c PostThreadMessage() in
+order to request, rather than force your application to terminate.
+
\subsection osissues_win32_messages Handling Other WIN32 Messages
By default a single WNDCLASSEX called "FLTK" is
@@ -716,10 +725,6 @@ void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut)
Attaches the callback \c cb to the "About myprog" item of the system application menu.
\c cb will be called with NULL first argument and \c user_data second argument.
-Fl_Mac_App_Menu class
-\par
-The Fl_Mac_App_Menu class allows to localize the application menu.
-
Fl_Sys_Menu_Bar class
\par
@@ -727,8 +732,24 @@ The Fl_Sys_Menu_Bar class allows to build menu bars that, on Mac OS X, are
placed in the system menu bar (at top-left of display), and, on other platforms,
at a user-chosen location of a user-chosen window.
-\subsection osissues_quartz Drawing Things Using Quartz
+\subsection osissues_icon_osx Setting the icon of an application
+\li First, create a .icns file containing several copies of your icon of decreasing sizes.
+This can be done using the Preview application or the Icon Composer application
+available in "Graphics Tools for Xcode". To create a high resolution icon file,
+it is necessary to use the iconutil command-line utility.
+\li Put your .icns file in the Resources subdirectory of your application bundle.
+\li Add these two lines to the Info.plist file of your application bundle
+\verbatim
+<key>CFBundleIconFile</key>
+<string>foo.icns</string>
+\endverbatim
+replacing <tt>foo</tt> by your application name. If you use Xcode, just add your .icns file to your
+application target.
+
+
+
+\subsection osissues_quartz Drawing Things Using Quartz
All code inside Fl_Widget::draw()
is expected to call Quartz drawing functions. The Quartz coordinate system
is flipped to match
@@ -737,6 +758,27 @@ left corner of the enclosing Fl_Window. The global variable
\c fl_gc (of type \c CGContextRef) is the appropriate Quartz 2D drawing environment.
Include FL/x.H to declare the \c fl_gc variable.
+\subsection osissues_localize Internationalization
+All FLTK programs contain an application menu with, e.g., the About xxx, Hide xxx, and Quit xxx items.
+This menu can be internationalized/localized by any of two means.
+\li using the Fl_Mac_App_Menu class.
+\li using the standard Mac OS X localization procedure. Create a language-specific .lproj directory
+(e.g., <tt>German.lproj</tt>) in the Resources subdirectory of the application bundle.
+Create therein a <tt>Localizable.strings</tt> file that translates all menu items to this language.
+The German <tt>Localizable.strings</tt> file, for example, contains:
+\verbatim
+"About %@" = "Ãœber %@";
+"Print Front Window"="Frontfenster drucken";
+"Services" = "Dienste";
+"Hide %@"="%@ ausblenden";
+"Hide Others"="Andere ausblenden";
+"Show All"="Alle einblenden";
+"Quit %@"="%@ beenden";
+\endverbatim
+Set <tt>"Print Front Window" = "";</tt> therein so the application menu doesn't show a "Print Front Window" item.
+To localize the application name itself, create a file <tt>InfoPlist.strings</tt> in each .lproj directory
+and put <tt>CFBundleName = "localized name";</tt> in each such file.
+
Fl_Double_Window
OS X double-buffers all windows automatically. On OS X,
diff --git a/documentation/src/preface.dox b/documentation/src/preface.dox
index d7c3d35..dbbdf2e 100644
--- a/documentation/src/preface.dox
+++ b/documentation/src/preface.dox
@@ -3,7 +3,7 @@
\page preface Preface
This manual describes the Fast Light Tool Kit ("FLTK")
-version 1.3.2, a C++ Graphical User Interface
+version 1.3.3, a C++ Graphical User Interface
("GUI") toolkit for UNIX, Microsoft Windows and Apple OS X. Each
of the chapters in this manual is designed as a tutorial for
using FLTK, while the appendices provide a convenient reference
@@ -75,7 +75,7 @@ was dropped after FLTK 1.0.10. FLTK uses the preprocessor definition
\section preface_copyrights Copyrights and Trademarks
-FLTK is Copyright 1998-2012 by Bill Spitzak and others. Use and
+FLTK is Copyright 1998-2014 by Bill Spitzak and others. Use and
distribution of FLTK is governed by the GNU Library General Public
License with 4 exceptions, located in \ref license.
diff --git a/documentation/src/tabs_default.png b/documentation/src/tabs_default.png
new file mode 100644
index 0000000..6ba9230
--- /dev/null
+++ b/documentation/src/tabs_default.png
Binary files differ
diff --git a/documentation/src/tabs_selection.png b/documentation/src/tabs_selection.png
new file mode 100644
index 0000000..80b74e5
--- /dev/null
+++ b/documentation/src/tabs_selection.png
Binary files differ
diff --git a/documentation/src/tabs_uniform.png b/documentation/src/tabs_uniform.png
new file mode 100644
index 0000000..1c37af5
--- /dev/null
+++ b/documentation/src/tabs_uniform.png
Binary files differ
diff --git a/documentation/src/tree-dimensions.png b/documentation/src/tree-dimensions.png
new file mode 100644
index 0000000..922d426
--- /dev/null
+++ b/documentation/src/tree-dimensions.png
Binary files differ
diff --git a/documentation/src/unicode.dox b/documentation/src/unicode.dox
index 7996bc8..cbc4aba 100644
--- a/documentation/src/unicode.dox
+++ b/documentation/src/unicode.dox
@@ -89,7 +89,7 @@ but this is even more wasteful for ASCII or Latin1.
The Unicode standard defines various UCS Transformation Formats.
UTF-16 and UTF-32 are based on units of two and four bytes.
-UCS characters requiring more than 16-bits are encoded using
+UCS characters requiring more than 16 bits are encoded using
"surrogate pairs" in UTF-16.
UTF-8 encodes all Unicode characters into variable length
@@ -135,10 +135,9 @@ some level of synchronisation and error detection.
</table>
Moving from ASCII encoding to Unicode will allow all new FLTK
-applications to be easily internationalized and used all
-over the world. By choosing UTF-8 encoding, FLTK remains
-largely source-code compatible to previous iteration of the
-library.
+applications to be easily internationalized and used all over
+the world. By choosing UTF-8 encoding, FLTK remains largely
+source-code compatible to previous iterations of the library.
\section unicode_in_fltk Unicode in FLTK
@@ -231,7 +230,7 @@ of the sequence. Trailing bytes in a UTF-8 sequence will return -1.
know that the byte sequence contains only valid UTF-8 sequences.
- \b WARNING:
- Some of the [OksiD] functions below use still use %fl_utf8len() in
+ Some of the [OksiD] functions below still use %fl_utf8len() in
their implementations. These may need further validation.
Please see the individual function description for further details
@@ -249,7 +248,7 @@ int fl_utf8locale()
\p %fl_utf8locale() returns true if the "locale" seems to indicate
that UTF-8 encoding is used.
\par
-<i>It is highly recommended that your change your system so this does return
+<i>It is highly recommended that you change your system so this does return
true!</i>
@@ -267,7 +266,7 @@ int fl_utf_nb_char(const unsigned char *buf, int len)
\b OksiD
<br>
\par
-Returns the number of UTF-8 character in the first \p len bytes of \p buf.
+Returns the number of UTF-8 characters in the first \p len bytes of \p buf.
int fl_unichar_to_utf8_size(Fl_Unichar)
@@ -340,7 +339,7 @@ If the \p src string contains only ASCII characters, the return value will
be the same as \p srclen.
\par
\p %fl_utf8toa() converts a string containing UTF-8 characters into
-single byte characters. UTF-8 characters do not correspond to ASCII
+single byte characters. UTF-8 characters that do not correspond to ASCII
or ISO-8859-1 characters below 0xFF are replaced with '?'.
\par
@@ -370,7 +369,7 @@ unsigned int fl_utf8toUtf16(const char *src, unsigned srclen, unsigned short *ds
\par
These routines convert between UTF-8 and \p wchar_t or "wide character"
strings.
-The difficulty lies in the fact \p sizeof(wchar_t) is 2 on Windows
+The difficulty lies in the fact that \p sizeof(wchar_t) is 2 on Windows
and 4 on Linux and most other systems.
Therefore some "wide characters" on Windows may be represented
as "surrogate pairs" of more than one \p wchar_t.
@@ -378,7 +377,7 @@ as "surrogate pairs" of more than one \p wchar_t.
\par
\p %fl_utf8fromwc() converts from a "wide character" string to UTF-8.
Note that \p srclen is the number of \p wchar_t elements in the source
-string and on Windows and this might be larger than the number of characters.
+string and on Windows this might be larger than the number of characters.
\p dstlen specifies the maximum number of \b bytes to copy, including
the null terminator.
diff --git a/examples/Makefile b/examples/Makefile
index cc2e4de..def7376 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -5,13 +5,16 @@ SHELL = /bin/sh
.SILENT:
# Executables
-ALL = howto-add_fd-and-popen$(EXEEXT) \
+ALL = clipboard$(EXEEXT) \
+ howto-add_fd-and-popen$(EXEEXT) \
+ howto-browser-with-icons$(EXEEXT) \
howto-drag-and-drop$(EXEEXT) \
howto-parse-args$(EXEEXT) \
howto-text-over-image-button$(EXEEXT) \
menubar-add$(EXEEXT) \
nativefilechooser-simple-app$(EXEEXT) \
progress-simple$(EXEEXT) \
+ shapedwindow$(EXEEXT) \
table-as-container$(EXEEXT) \
table-simple$(EXEEXT) \
table-sort$(EXEEXT) \
@@ -23,6 +26,8 @@ ALL = howto-add_fd-and-popen$(EXEEXT) \
texteditor-simple$(EXEEXT) \
tree-simple$(EXEEXT) \
tree-as-container$(EXEEXT) \
+ tree-custom-draw-items$(EXEEXT) \
+ tree-custom-sort$(EXEEXT) \
tree-of-tables$(EXEEXT) \
wizard-simple$(EXEEXT)
diff --git a/examples/clipboard.cxx b/examples/clipboard.cxx
new file mode 100644
index 0000000..9d5ac24
--- /dev/null
+++ b/examples/clipboard.cxx
@@ -0,0 +1,172 @@
+//
+// "$Id: clipboard.cxx 10377 2014-10-14 11:53:51Z AlbrechtS $"
+//
+// Clipboard display test application for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Image.H>
+#include <FL/Fl_Text_Buffer.H>
+#include <FL/Fl_Text_Display.H>
+#include <FL/Fl_Tabs.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+/* Displays and follows the content of the clipboard with either image or text data
+ */
+
+Fl_Box *image_box;
+Fl_Box *image_size;
+Fl_Text_Display *display;
+
+class chess : public Fl_Box { // a box with a chess-like pattern below its image
+public:
+ chess(int x, int y, int w, int h) : Fl_Box(FL_FLAT_BOX,x,y,w,h,0) {
+ align(FL_ALIGN_CENTER | FL_ALIGN_CLIP);
+ }
+ void draw() {
+ draw_box();
+ Fl_Image *im = image();
+ if (im) { // draw the chess pattern below the box centered image
+ int X = x() + (w()-im->w())/2, Y = y() + (h()-im->h())/2, W = im->w(), H = im->h();
+ fl_push_clip(X,Y,W,H);
+ fl_push_clip(x(),y(),w(),h());
+ fl_color(FL_WHITE); fl_rectf(X,Y,W,H);
+ fl_color(FL_LIGHT2);
+ const int side = 4, side2 = 2*side;
+ for (int j=Y; j<Y+H; j+=side) {
+ for (int i=X + (j-Y)%side2; i<X+W; i+=side2) {
+ fl_rectf(i,j,side,side);
+ }
+ }
+ fl_pop_clip();
+ fl_pop_clip();
+ }
+ draw_label(); // draw the box image
+ }
+} *chess_obj;
+
+#define TAB_COLOR FL_DARK3
+
+class clipboard_viewer : public Fl_Tabs { // use tabs to display as appropriate the image or textual content of the clipboard
+public:
+ clipboard_viewer(int x, int y, int w, int h) : Fl_Tabs(x,y,w,h) {};
+ virtual int handle(int event) {
+ if (event != FL_PASTE) return Fl_Tabs::handle(event);
+ if (strcmp(Fl::event_clipboard_type(), Fl::clipboard_image) == 0) { // an image is being pasted
+ Fl_Image *im = (Fl_Image*)Fl::event_clipboard(); // get it as an Fl_Image object
+ if (!im) return 1;
+ char title[300];
+ sprintf(title, "%dx%d",im->w(), im->h()); // display the image original size
+#ifdef WIN32
+ OpenClipboard(NULL); // display extra technical info about clipboard content
+ char *p=title + strlen(title);
+ int format = EnumClipboardFormats(0);
+ if (format && format < CF_MAX) { sprintf(p, " %d",format); p += strlen(p); }
+ while (format) {
+ format = EnumClipboardFormats(format);
+ if (format && format < CF_MAX) { sprintf(p, " %d",format); p += strlen(p); }
+ }
+ HANDLE h;
+ if ((h = GetClipboardData(CF_DIB))) {
+ LPBITMAPINFO lpBI = (LPBITMAPINFO)GlobalLock(h);
+ sprintf(p, " biBitCount=%d biCompression=%d biClrUsed=%d",
+ lpBI->bmiHeader.biBitCount, (int)lpBI->bmiHeader.biCompression, (int)lpBI->bmiHeader.biClrUsed);
+ }
+ CloseClipboard();
+#endif
+ float scale_x = (float)im->w() / image_box->w(); // rescale the image if larger than the display box
+ float scale_y = (float)im->h() / image_box->h();
+ float scale = scale_x;
+ if (scale_y > scale) scale = scale_y;
+ if (scale > 1) {
+ Fl_Image *im2 = im->copy(im->w()/scale, im->h()/scale);
+ delete im;
+ im = im2;
+ }
+ Fl_Image *oldim = image_box->image();
+ if (oldim) delete oldim;
+ image_box->image(im); // show the scaled image
+ image_size->copy_label(title);
+ value(image_box->parent());
+ window()->redraw();
+ }
+ else { // text is being pasted
+ display->buffer()->text(Fl::event_text());
+ value(display);
+ display->redraw();
+ }
+ return 1;
+ }
+} *tabs;
+
+
+void cb(Fl_Widget *wid, clipboard_viewer *tabs)
+{
+ if (Fl::clipboard_contains(Fl::clipboard_image)) {
+ Fl::paste(*tabs, 1, Fl::clipboard_image); // try to find image in the clipboard
+ return;
+ }
+ if (Fl::clipboard_contains(Fl::clipboard_plain_text)) Fl::paste(*tabs, 1, Fl::clipboard_plain_text); // also try to find text
+}
+
+void clip_callback(int source, void *data) { // called after clipboard was changed or at application activation
+ if ( source == 1 ) cb(NULL, (clipboard_viewer *)data);
+}
+
+int main(int argc, char **argv)
+{
+#if !(defined(__APPLE__) || defined(WIN32))
+ extern void fl_register_images();
+ fl_register_images(); // required to allow pasting of images
+#endif
+ Fl_Window* win = new Fl_Window(500, 550, "clipboard viewer");
+ tabs = new clipboard_viewer(0, 0, 500, 500);
+ Fl_Group *g = new Fl_Group( 5, 30, 490, 460, Fl::clipboard_image); // g will display the image form
+ g->box(FL_FLAT_BOX);
+ image_box = new chess(5, 30, 490, 450);
+ image_size = new Fl_Box(FL_NO_BOX, 5, 485, 490, 10, 0);
+ g->end();
+ g->selection_color(TAB_COLOR);
+
+ Fl_Text_Buffer *buffer = new Fl_Text_Buffer();
+ display = new Fl_Text_Display(5,30,490, 460, Fl::clipboard_plain_text); // display will display the text form
+ display->buffer(buffer);
+ display->selection_color(TAB_COLOR);
+ tabs->end();
+ tabs->resizable(display);
+
+ Fl_Group *g2 = new Fl_Group( 10,510,200,25);
+ Fl_Button *refresh = new Fl_Button(10,510,200,25, "Refresh from clipboard");
+ refresh->callback((Fl_Callback*)cb, tabs);
+ g2->end();
+ g2->resizable(NULL);
+ win->end();
+ win->resizable(tabs);
+ win->show(argc,argv);
+#if defined(__APPLE__) || defined(WIN32)
+ clip_callback(1, tabs); // use clipboard content at start
+#endif
+ Fl::add_clipboard_notify(clip_callback, tabs); // will update with new clipboard content immediately or at application activation
+
+ Fl_Image::RGB_scaling(FL_RGB_SCALING_BILINEAR); // set bilinear image scaling method
+ return Fl::run();
+}
+
+//
+// End of "$Id: clipboard.cxx 10377 2014-10-14 11:53:51Z AlbrechtS $".
+//
diff --git a/examples/howto-browser-with-icons.cxx b/examples/howto-browser-with-icons.cxx
new file mode 100644
index 0000000..d3d9665
--- /dev/null
+++ b/examples/howto-browser-with-icons.cxx
@@ -0,0 +1,186 @@
+//
+// "$Id: howto-browser-with-icons.cxx 9845 2013-03-23 18:40:53Z greg.ercolano $"
+//
+// Demonstrate creating an Fl_Browser with icons - Greg Ercolano 10/07/09 (STR#1739)
+//
+// Shows how one can add icons to items in a browser.
+//
+// Copyright 2009,2013 Greg Ercolano.
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Browser.H>
+#include <FL/Fl_Choice.H>
+#include <FL/Fl_Image.H>
+#include <FL/Fl_Pixmap.H>
+
+static const char *big[] = { // XPM
+ "50 34 4 1",
+ " c #000000",
+ "o c #ff9900",
+ "@ c #ffffff",
+ "# c None",
+ "##################################################",
+ "### ############################## ####",
+ "### ooooo ########################### ooooo ####",
+ "### oo oo ######################### oo oo ####",
+ "### oo oo ####################### oo oo ####",
+ "### oo oo ##################### oo oo ####",
+ "### oo oo ################### oo oo ####",
+ "### oo oo oo oo ####",
+ "### oo oo ooooooooooooooo oo oo ####",
+ "### oo ooooooooooooooooooooo oo ####",
+ "### oo ooooooooooooooooooooooooooo ooo ####",
+ "#### oo ooooooo ooooooooooooo ooooooo oo #####",
+ "#### oo oooooooo ooooooooooooo oooooooo oo #####",
+ "##### oo oooooooo ooooooooooooo oooooooo oo ######",
+ "##### o ooooooooooooooooooooooooooooooo o ######",
+ "###### ooooooooooooooooooooooooooooooooooo #######",
+ "##### ooooooooo ooooooooo ooooooooo ######",
+ "##### oooooooo @@@ ooooooo @@@ oooooooo ######",
+ "##### oooooooo @@@@@ ooooooo @@@@@ oooooooo ######",
+ "##### oooooooo @@@@@ ooooooo @@@@@ oooooooo ######",
+ "##### oooooooo @@@ ooooooo @@@ oooooooo ######",
+ "##### ooooooooo ooooooooo ooooooooo ######",
+ "###### oooooooooooooo oooooooooooooo #######",
+ "###### oooooooo@@@@@@@ @@@@@@@oooooooo #######",
+ "###### ooooooo@@@@@@@@@ @@@@@@@@@ooooooo #######",
+ "####### ooooo@@@@@@@@@@@ @@@@@@@@@@@ooooo ########",
+ "######### oo@@@@@@@@@@@@ @@@@@@@@@@@@oo ##########",
+ "########## o@@@@@@ @@@@@ @@@@@ @@@@@@o ###########",
+ "########### @@@@@@@ @ @@@@@@@ ############",
+ "############ @@@@@@@@@@@@@@@@@@@@@ #############",
+ "############## @@@@@@@@@@@@@@@@@ ###############",
+ "################ @@@@@@@@@ #################",
+ "#################### #####################",
+ "##################################################",
+};
+
+
+static const char *med[] = { // XPM
+ "14 14 2 1",
+ "# c #000000",
+ " c #ffffff",
+ "##############",
+ "##############",
+ "## ##",
+ "## ## ## ##",
+ "## ## ## ##",
+ "## #### ##",
+ "## ## ##",
+ "## ## ##",
+ "## #### ##",
+ "## ## ## ##",
+ "## ## ## ##",
+ "## ##",
+ "##############",
+ "##############",
+};
+
+static const char *sml[] = { // XPM
+ "9 11 5 1",
+ ". c None",
+ "@ c #000000",
+ "+ c #808080",
+ "r c #802020",
+ "# c #ff8080",
+ ".........",
+ ".........",
+ "@+.......",
+ "@@@+.....",
+ "@@r@@+...",
+ "@@##r@@+.",
+ "@@####r@@",
+ "@@##r@@+.",
+ "@@r@@+...",
+ "@@@+.....",
+ "@+.......",
+};
+
+// Create a custom browser
+//
+// You don't *have* to derive a class just to control icons in a browser,
+// but in final apps it's something you'd do to keep the implementation clean.
+//
+// All it really comes down to is calling browser->icon() to define icons
+// for the items you want.
+//
+class MyBrowser : public Fl_Browser {
+ Fl_Image *big_icon;
+ Fl_Image *med_icon;
+ Fl_Image *sml_icon;
+
+public:
+ MyBrowser(int X,int Y,int W,int H,const char *L=0) : Fl_Browser(X,Y,W,H,L) {
+
+ // Create icons (these could also be pngs, jpegs..)
+ big_icon = new Fl_Pixmap(big);
+ med_icon = new Fl_Pixmap(med);
+ sml_icon = new Fl_Pixmap(sml);
+
+ // Normal browser initialization stuff
+ textfont(FL_COURIER);
+ textsize(14);
+ type(FL_MULTI_BROWSER);
+ add("One");
+ add("Two");
+ add("Three");
+ add("Four");
+ add("Five");
+ add("Six");
+ add("Seven");
+ }
+ static void Choice_CB(Fl_Widget*w, void *d) {
+ MyBrowser *mb = (MyBrowser*)d;
+ Fl_Choice *ch = (Fl_Choice*)w;
+
+ // See which icon the user picked
+ Fl_Image *i = 0;
+ if ( strcmp(ch->text(), "None" ) == 0 ) { i = 0; }
+ else if ( strcmp(ch->text(), "Small" ) == 0 ) { i = mb->sml_icon; }
+ else if ( strcmp(ch->text(), "Medium") == 0 ) { i = mb->med_icon; }
+ else if ( strcmp(ch->text(), "Large" ) == 0 ) { i = mb->big_icon; }
+
+ // Change the icon of three browser items to what the user picked
+ // This is all you have to do to change a browser item's icon.
+ // The browser will automatically resize the items if need be.
+ mb->icon(3,i);
+ mb->icon(4,i);
+ mb->icon(5,i);
+ }
+};
+int main() {
+ Fl_Double_Window *w = new Fl_Double_Window(400,300);
+
+ // Create a browser
+ MyBrowser *b = new MyBrowser(10,40,w->w()-20,w->h()-50);
+
+ // Create a chooser to let the user change the icons
+ Fl_Choice *choice = new Fl_Choice(60,10,140,25,"Icon:");
+ choice->add("None");
+ choice->add("Small");
+ choice->add("Medium");
+ choice->add("Large");
+ choice->callback(MyBrowser::Choice_CB, (void*)b);
+ choice->take_focus();
+ choice->value(1); choice->do_callback();
+
+ w->end();
+ w->show();
+ return(Fl::run());
+}
+
+//
+// End of "$Id: howto-browser-with-icons.cxx 9845 2013-03-23 18:40:53Z greg.ercolano $".
+//
diff --git a/examples/nativefilechooser-simple-app.cxx b/examples/nativefilechooser-simple-app.cxx
index 44455a8..9e14040 100644
--- a/examples/nativefilechooser-simple-app.cxx
+++ b/examples/nativefilechooser-simple-app.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: nativefilechooser-simple-app.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: nativefilechooser-simple-app.cxx 10005 2013-10-22 09:09:53Z manolo $"
//
// An example of how to use Fl_Native_File_Chooser to open & save files.
//
@@ -31,7 +31,7 @@ class Application : public Fl_Window {
Fl_Native_File_Chooser *fc;
// Does file exist?
int exist(const char *filename) {
- FILE *fp = fopen(filename, "r");
+ FILE *fp = fl_fopen(filename, "r");
if (fp) { fclose(fp); return(1); }
else { return(0); }
}
@@ -46,7 +46,7 @@ class Application : public Fl_Window {
void save(const char *filename) {
printf("Saving '%s'\n", filename);
if ( !exist(filename) ) {
- FILE *fp = fopen(filename, "w"); // create file if it doesn't exist
+ FILE *fp = fl_fopen(filename, "w"); // create file if it doesn't exist
if ( fp ) {
// A real app would do something useful here.
fprintf(fp, "Hello world.\n");
@@ -148,5 +148,5 @@ int main(int argc, char *argv[]) {
}
//
-// End of "$Id: nativefilechooser-simple-app.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: nativefilechooser-simple-app.cxx 10005 2013-10-22 09:09:53Z manolo $".
//
diff --git a/examples/shapedwindow.cxx b/examples/shapedwindow.cxx
new file mode 100644
index 0000000..fd72bf2
--- /dev/null
+++ b/examples/shapedwindow.cxx
@@ -0,0 +1,125 @@
+//
+// "$Id: shapedwindow.cxx 10325 2014-09-21 14:10:36Z manolo $"
+//
+// shapedwindow example source file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems to:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Image.H>
+#include <FL/Fl_Tiled_Image.H>
+#include <FL/Fl_Image_Surface.H>
+#include "test/pixmaps/tile.xpm"
+
+
+void cb(Fl_Widget *w, void *) {
+ w->window()->hide();
+}
+
+class dragbox : public Fl_Box {
+public:
+ dragbox(int x, int y, int w, int h, const char *t=0) : Fl_Box(x,y,w,h,t) {};
+ int handle(int event) {
+ static int fromx, fromy, winx, winy;
+ if (event == FL_PUSH) {
+ fromx = Fl::event_x_root();
+ fromy = Fl::event_y_root();
+ winx = window()->x_root();
+ winy = window()->y_root();
+ return 1;
+ }
+ else if (event == FL_DRAG) {
+ int deltax = Fl::event_x_root() - fromx;
+ int deltay = Fl::event_y_root() - fromy;
+ window()->resize(winx + deltax, winy + deltay, window()->w(), window()->h());
+ return 1;
+ }
+ return Fl_Box::handle(event);
+ }
+};
+
+const float factor = 1.3;
+
+void shrink(Fl_Widget *wdgt, void *data)
+{
+ Fl_Window *win = wdgt->window();
+ int old = win->w();
+ win->size(old/factor, old/factor);
+ if (win->w() <= *(int*)data) wdgt->deactivate();
+}
+
+void enlarge(Fl_Widget *wdgt, void *data)
+{
+ Fl_Window *win = wdgt->window();
+ int old = win->w();
+ win->size(old*factor, old*factor);
+ ((Fl_Widget*)data)->activate();
+}
+
+Fl_RGB_Image* prepare_shape(int w)
+{
+ // draw a white circle with a hole in it on black background
+ Fl_Image_Surface *surf = new Fl_Image_Surface(w, w);
+ Fl_Surface_Device* current = Fl_Surface_Device::surface();
+ surf->set_current();
+ fl_color(FL_BLACK);
+ fl_rectf(-1, -1, w+2, w+2);
+ fl_color(FL_WHITE);
+ fl_pie(2,2,w-4,w-4,0,360);
+ fl_color(FL_BLACK);
+ fl_pie(0.7*w,w/2,w/4,w/4,0,360);
+ Fl_RGB_Image* img = surf->image();
+ delete surf;
+ current->set_current();
+ return img; // return depth-3 white image on black background
+}
+
+int main(int argc, char **argv) {
+ int dim = 200;
+ Fl_Double_Window *win = new Fl_Double_Window(100, 100, dim, dim, "Testing1");
+ Fl_RGB_Image *img = prepare_shape(dim);
+ win->shape(img);
+ dragbox *box = new dragbox(0, 0, win->w(), win->h());
+ box->image(new Fl_Tiled_Image(new Fl_Pixmap((const char * const *)tile_xpm)));
+ Fl_Group *g = new Fl_Group(10, 20, 80, 20);
+ g->box(FL_NO_BOX);
+ Fl_Button *b = new Fl_Button(10, 20, 80, 20, "Close");
+ b->callback(cb);
+ g->end();
+ g->resizable(NULL);
+ g = new Fl_Group(60, 70, 80, 40, "Drag me");
+ g->box(FL_NO_BOX);
+ g->align(FL_ALIGN_TOP);
+ Fl_Button *bs = new Fl_Button(60, 70, 80, 20, "Shrink");
+ bs->callback(shrink, &dim);
+ bs->deactivate();
+ Fl_Button *be = new Fl_Button(60, 90, 80, 20, "Enlarge");
+ be->callback(enlarge, bs);
+ g->end();
+ g->resizable(NULL);
+ win->end();
+ win->resizable(win);
+ win->show(argc, argv);
+ Fl::run();
+ delete win;
+ return 0;
+}
+
+//
+// End of "$Id: shapedwindow.cxx 10325 2014-09-21 14:10:36Z manolo $".
+//
diff --git a/examples/table-sort.cxx b/examples/table-sort.cxx
index 08b8b6c..a8dfe9f 100644
--- a/examples/table-sort.cxx
+++ b/examples/table-sort.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: table-sort.cxx 9590 2012-06-12 18:32:36Z greg.ercolano $"
+// "$Id: table-sort.cxx 9837 2013-03-17 06:06:52Z greg.ercolano $"
//
// table-sort -- An example application using a sortable Fl_Table
//
@@ -39,7 +39,7 @@
#ifdef WIN32
// WINDOWS
# define DIRCMD "dir"
-# define DIRHEADER { "Date", "Time", "Size", "Filename", "", "", "", "", "" }
+static const char *G_header[] = { "Date", "Time", "Size", "Filename", "", "", "", "", "", 0 };
# ifdef _MSC_VER
# define popen _popen
# endif
@@ -47,9 +47,15 @@
// UNIX
# include <ctype.h>
# define DIRCMD "ls -l"
-# define DIRHEADER { "Perms", "#L", "Own", "Group", "Size", "Date", "", "", "Filename" }
+static const char *G_header[] = { "Perms", "#L", "Own", "Group", "Size", "Date", "", "", "Filename", 0 };
#endif /*WIN32*/
+// Font face/sizes for header and rows
+#define HEADER_FONTFACE FL_HELVETICA_BOLD
+#define HEADER_FONTSIZE 16
+#define ROW_FONTFACE FL_HELVETICA
+#define ROW_FONTSIZE 16
+
// A single row of columns
class Row {
public:
@@ -147,12 +153,11 @@ void MyTable::draw_cell(TableContext context, int R, int C, int X, int Y, int W,
switch ( context ) {
case CONTEXT_COL_HEADER:
fl_push_clip(X,Y,W,H); {
- static const char *head[] = DIRHEADER;
fl_draw_box(FL_THIN_UP_BOX, X,Y,W,H, FL_BACKGROUND_COLOR);
if ( C < 9 ) {
- fl_font(FL_HELVETICA_BOLD, 16);
+ fl_font(HEADER_FONTFACE, HEADER_FONTSIZE);
fl_color(FL_BLACK);
- fl_draw(head[C], X+2,Y,W,H, FL_ALIGN_LEFT, 0, 0); // +2=pad left
+ fl_draw(G_header[C], X+2,Y,W,H, FL_ALIGN_LEFT, 0, 0); // +2=pad left
// Draw sort arrow
if ( C == _sort_lastcol ) {
draw_sort_arrow(X,Y,W,H);
@@ -166,7 +171,7 @@ void MyTable::draw_cell(TableContext context, int R, int C, int X, int Y, int W,
// Bg color
Fl_Color bgcolor = row_selected(R) ? selection_color() : FL_WHITE;
fl_color(bgcolor); fl_rectf(X,Y,W,H);
- fl_font(FL_HELVETICA, 16);
+ fl_font(ROW_FONTFACE, ROW_FONTSIZE);
fl_color(FL_BLACK); fl_draw(s, X+2,Y,W,H, FL_ALIGN_LEFT); // +2=pad left
// Border
fl_color(FL_LIGHT2); fl_rect(X,Y,W,H);
@@ -181,13 +186,17 @@ void MyTable::draw_cell(TableContext context, int R, int C, int X, int Y, int W,
// Automatically set column widths to widest data in each column
void MyTable::autowidth(int pad) {
- fl_font(FL_COURIER, 16);
- // Initialize all column widths to lowest value
- for ( int c=0; c<cols(); c++ ) col_width(c, pad);
+ int w, h;
+ // Initialize all column widths to header width
+ fl_font(HEADER_FONTFACE, HEADER_FONTSIZE);
+ for ( int c=0; G_header[c]; c++ ) {
+ w=0; fl_measure(G_header[c], w, h, 0); // pixel width of header text
+ col_width(c, w+pad);
+ }
+ fl_font(ROW_FONTFACE, ROW_FONTSIZE);
for ( int r=0; r<(int)_rowdata.size(); r++ ) {
- int w, h;
for ( int c=0; c<(int)_rowdata[r].cols.size(); c++ ) {
- fl_measure(_rowdata[r].cols[c], w, h, 0); // get pixel width of text
+ w=0; fl_measure(_rowdata[r].cols[c], w, h, 0); // pixel width of row text
if ( (w + pad) > col_width(c)) col_width(c, w + pad);
}
}
@@ -278,5 +287,5 @@ int main() {
}
//
-// End of "$Id: table-sort.cxx 9590 2012-06-12 18:32:36Z greg.ercolano $".
+// End of "$Id: table-sort.cxx 9837 2013-03-17 06:06:52Z greg.ercolano $".
//
diff --git a/examples/table-spreadsheet-with-keyboard-nav.cxx b/examples/table-spreadsheet-with-keyboard-nav.cxx
index 78a8e1b..2c1abef 100644
--- a/examples/table-spreadsheet-with-keyboard-nav.cxx
+++ b/examples/table-spreadsheet-with-keyboard-nav.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: table-spreadsheet-with-keyboard-nav.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: table-spreadsheet-with-keyboard-nav.cxx 9838 2013-03-18 20:00:04Z greg.ercolano $"
//
// Simple example of an interactive spreadsheet using Fl_Table.
// Uses Mr. Satan's technique of instancing an Fl_Input around.
@@ -290,6 +290,7 @@ void setrows_cb(Fl_Widget* w, void* v) {
}
int main() {
+ Fl::option(Fl::OPTION_ARROW_FOCUS, 1); // we want arrow keys to navigate table's widgets
Fl_Double_Window *win = new Fl_Double_Window(922, 382, "Fl_Table Spreadsheet with Keyboard Navigation");
Spreadsheet* table = new Spreadsheet(20, 20, win->w()-80, win->h()-80);
// Table rows
@@ -337,5 +338,5 @@ int main() {
}
//
-// End of "$Id: table-spreadsheet-with-keyboard-nav.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: table-spreadsheet-with-keyboard-nav.cxx 9838 2013-03-18 20:00:04Z greg.ercolano $".
//
diff --git a/examples/table-spreadsheet.cxx b/examples/table-spreadsheet.cxx
index ff58d4c..25e46cd 100644
--- a/examples/table-spreadsheet.cxx
+++ b/examples/table-spreadsheet.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: table-spreadsheet.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: table-spreadsheet.cxx 10087 2014-01-27 06:47:04Z greg.ercolano $"
//
// Simple example of an interactive spreadsheet using Fl_Table.
// Uses Mr. Satan's technique of instancing an Fl_Input around.
@@ -52,10 +52,13 @@ public:
input->callback(input_cb, (void*)this);
input->when(FL_WHEN_ENTER_KEY_ALWAYS); // callback triggered when user hits Enter
input->maximum_size(5);
+ input->color(FL_YELLOW);
for (int c = 0; c < MAX_COLS; c++)
for (int r = 0; r < MAX_ROWS; r++)
values[r][c] = c + (r*MAX_COLS); // initialize cells
end();
+ row_edit = col_edit = 0;
+ set_selection(0,0,0,0);
}
~Spreadsheet() { }
@@ -72,6 +75,7 @@ public:
void start_editing(int R, int C) {
row_edit = R; // Now editing this row/col
col_edit = C;
+ set_selection(R,C,R,C); // Clear any previous multicell selection
int X,Y,W,H;
find_cell(CONTEXT_CELL, R,C, X,Y,W,H); // Find X/Y/W/H of cell
input->resize(X,Y,W,H); // Move Fl_Input widget there
@@ -156,7 +160,7 @@ void Spreadsheet::draw_cell(TableContext context, int R,int C, int X,int Y,int W
}
// Background
if ( C < cols()-1 && R < rows()-1 ) {
- fl_draw_box(FL_THIN_UP_BOX, X,Y,W,H, FL_WHITE);
+ fl_draw_box(FL_THIN_UP_BOX, X,Y,W,H, is_selected(R,C) ? FL_YELLOW : FL_WHITE);
} else {
fl_draw_box(FL_THIN_UP_BOX, X,Y,W,H, 0xbbddbb00); // money green
}
@@ -184,6 +188,14 @@ void Spreadsheet::draw_cell(TableContext context, int R,int C, int X,int Y,int W
return;
}
+ case CONTEXT_RC_RESIZE: // table resizing rows or columns
+ if ( input->visible() ) {
+ find_cell(CONTEXT_TABLE, row_edit, col_edit, X, Y, W, H);
+ input->resize(X,Y,W,H);
+ init_sizes();
+ }
+ return;
+
default:
return;
}
@@ -206,11 +218,18 @@ void Spreadsheet::event_callback2() {
case FL_KEYBOARD: // key press in table?
if ( Fl::event_key() == FL_Escape ) exit(0); // ESC closes app
- if (C == cols()-1 || R == rows()-1) return; // no editing of totals column
done_editing(); // finish any previous editing
- start_editing(R,C); // start new edit
- if (Fl::event() == FL_KEYBOARD && Fl::e_text[0] != '\r') {
- input->handle(Fl::event()); // pass keypress to input widget
+ if (C==cols()-1 || R==rows()-1) return; // no editing of totals column
+ switch ( Fl::e_text[0] ) {
+ case '0': case '1': case '2': case '3': // any of these should start editing new cell
+ case '4': case '5': case '6': case '7':
+ case '8': case '9': case '+': case '-':
+ start_editing(R,C); // start new edit
+ input->handle(Fl::event()); // pass typed char to input
+ break;
+ case '\r': case '\n': // let enter key edit the cell
+ start_editing(R,C); // start new edit
+ break;
}
return;
}
@@ -231,6 +250,11 @@ void Spreadsheet::event_callback2() {
int main() {
Fl_Double_Window *win = new Fl_Double_Window(862, 322, "Fl_Table Spreadsheet");
Spreadsheet *table = new Spreadsheet(10, 10, win->w()-20, win->h()-20);
+#if FLTK_ABI_VERSION >= 10303
+ table->tab_cell_nav(1); // enable tab navigation of table cells (instead of fltk widgets)
+#endif
+ table->tooltip("Use keyboard to navigate cells:\n"
+ "Arrow keys or Tab/Shift-Tab");
// Table rows
table->row_header(1);
table->row_header_width(70);
@@ -251,5 +275,5 @@ int main() {
}
//
-// End of "$Id: table-spreadsheet.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: table-spreadsheet.cxx 10087 2014-01-27 06:47:04Z greg.ercolano $".
//
diff --git a/examples/table-with-keynav.cxx b/examples/table-with-keynav.cxx
index 5c3a283..1520d4a 100644
--- a/examples/table-with-keynav.cxx
+++ b/examples/table-with-keynav.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: table-with-keynav.cxx 9344 2012-04-14 19:45:50Z greg.ercolano $"
+// "$Id: table-with-keynav.cxx 9848 2013-03-25 23:20:29Z greg.ercolano $"
//
// Example of Fl_Table with keyboard selection navigation - Greg Ercolano 04/14/2012
//
@@ -30,6 +30,7 @@
#include <FL/Fl_Toggle_Button.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Table_Row.H>
+#include <FL/names.h>
#include <stdio.h>
#include <stdlib.h>
@@ -40,24 +41,11 @@ MyTable *G_table = 0; // table widget
Fl_Output *G_sum = 0; // displays sum of user's selection
class MyTable : public Fl_Table_Row {
- int row_beg, col_beg, row_end, col_end; // kb nav + mouse selection
protected:
- // See if row R and column C is inside selection area
- int IsSelected(int R, int C) {
- if ( G_rowselect->value() == 0 )
- return( (R >= row_beg && R <= col_end &&
- C >= col_beg && C <= row_end) ? 1 : 0);
- else
- return( (R >= row_beg && R <= col_end) ? 1 : 0);
- }
// Handle drawing all cells in table
void draw_cell(TableContext context, int R=0,int C=0, int X=0,int Y=0,int W=0,int H=0) {
static char s[30];
switch ( context ) {
- case CONTEXT_STARTPAGE:
- // Whenever we redraw the table, update row/col selection vals first
- get_selection(row_beg, col_beg, col_end, row_end);
- break;
case CONTEXT_COL_HEADER:
case CONTEXT_ROW_HEADER:
fl_font(FL_HELVETICA | FL_BOLD, 14);
@@ -74,8 +62,8 @@ protected:
return;
case CONTEXT_CELL: {
// Keyboard nav and mouse selection highlighting
- int is_select = IsSelected(R,C);
- fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, is_select ? FL_YELLOW : FL_WHITE);
+ int selected = G_rowselect->value() ? row_selected(R) : is_selected(R,C);
+ fl_draw_box(FL_THIN_UP_BOX, X, Y, W, H, selected ? FL_YELLOW : FL_WHITE);
// Draw text for the cell
fl_push_clip(X+3, Y+3, W-6, H-6);
{
@@ -112,9 +100,9 @@ public:
// Update the displayed sum value
int GetSelectionSum() {
int sum = -1;
- for ( int R=0; R<11; R++ ) {
- for ( int C=0; C<11; C++ ) {
- if ( IsSelected(R,C) ) {
+ for ( int R=0; R<rows(); R++ ) {
+ for ( int C=0; C<cols(); C++ ) {
+ if ( G_rowselect->value() ? row_selected(R) : is_selected(R,C) ) {
if ( sum == -1 ) sum = 0;
sum += R*C;
}
@@ -128,15 +116,13 @@ public:
int sum = GetSelectionSum();
if ( sum == -1 ) { sprintf(s, "(nothing selected)"); G_sum->color(48); }
else { sprintf(s, "%d", sum); G_sum->color(FL_WHITE); }
- G_sum->value(s);
- G_sum->redraw();
+ // Update only if different (lets one copy/paste from sum)
+ if ( strcmp(s,G_sum->value()))
+ { G_sum->value(s); G_sum->redraw(); }
}
// Keyboard and mouse events
int handle(int e) {
- // See if selection changed
- static int lastselect = 0;
- int thisselect = row_beg + (row_end*11) + (col_beg*11*2) + (col_end*11*3);
- int ret = Fl_Table::handle(e);
+ int ret = Fl_Table_Row::handle(e);
if ( e == FL_KEYBOARD && Fl::event_key() == FL_Escape ) exit(0);
switch (e) {
case FL_PUSH:
@@ -144,12 +130,9 @@ public:
case FL_KEYUP:
case FL_KEYDOWN:
case FL_DRAG: {
- if ( lastselect != thisselect ) { // Selection changed?
- UpdateSum(); // update the sum
- redraw(); // XXX: needed for row selection to redraw properly
- lastselect = thisselect;
- }
- ret = 1;
+ //ret = 1; // *don't* indicate we 'handled' these, just update ('handling' prevents e.g. tab nav)
+ UpdateSum();
+ redraw();
break;
}
case FL_FOCUS: // tells FLTK we're interested in keyboard events
@@ -167,11 +150,12 @@ void RowSelect_CB(Fl_Widget *w, void*) {
G_table->UpdateSum();
}
int main() {
+ Fl::option(Fl::OPTION_ARROW_FOCUS, 0); // disable arrow focus nav (we want arrows to control cells)
Fl_Double_Window win(862, 312, "table-with-keynav");
win.begin();
// Create table
G_table = new MyTable(10, 30, win.w()-20, win.h()-70, "Times Table");
- G_table->tooltip("Use mouse or arrow keys to make selections.\n"
+ G_table->tooltip("Use mouse or Shift + Arrow Keys to make selections.\n"
"Sum of selected values is shown.");
// Row select toggle button
G_rowselect = new Fl_Toggle_Button(140,10,12,12,"Row selection");
@@ -186,6 +170,7 @@ int main() {
G_sum = new Fl_Output(140,G_table->y()+G_table->h()+10,160,25,"Selection Sum:");
G_sum->value("(nothing selected)");
G_sum->color(48);
+ G_sum->tooltip("This field shows the sum of the selected cells in the table");
win.end();
win.resizable(G_table);
win.show();
@@ -193,5 +178,5 @@ int main() {
}
//
-// End of "$Id: table-with-keynav.cxx 9344 2012-04-14 19:45:50Z greg.ercolano $".
+// End of "$Id: table-with-keynav.cxx 9848 2013-03-25 23:20:29Z greg.ercolano $".
//
diff --git a/examples/tree-as-container.cxx b/examples/tree-as-container.cxx
index 7a2a34c..cbbba58 100644
--- a/examples/tree-as-container.cxx
+++ b/examples/tree-as-container.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: tree-as-container.cxx 9377 2012-04-22 13:40:02Z greg.ercolano $"
+// "$Id: tree-as-container.cxx 9926 2013-05-22 18:27:05Z greg.ercolano $"
//
// Fl_Tree as a container of FLTK widgets. - erco 04/15/2012
//
@@ -32,12 +32,12 @@ class MyData : public Fl_Group {
Fl_Input *fields[MAX_FIELDS];
public:
MyData(int X,int Y,int W,int H) : Fl_Group(X,Y,W,H) {
- static int colors[MAX_FIELDS] = {
+ static unsigned int colors[MAX_FIELDS] = {
0xffffdd00, 0xffdddd00, 0xddffff00, 0xddffdd00, 0xddddff00
};
for ( int t=0; t<MAX_FIELDS; t++ ) {
fields[t] = new Fl_Input(X+t*FIELD_WIDTH,Y,FIELD_WIDTH,H);
- fields[t]->color(colors[t]);
+ fields[t]->color(Fl_Color(colors[t]));
}
end();
}
@@ -86,5 +86,5 @@ int main(int argc, char *argv[]) {
}
//
-// End of "$Id: tree-as-container.cxx 9377 2012-04-22 13:40:02Z greg.ercolano $".
+// End of "$Id: tree-as-container.cxx 9926 2013-05-22 18:27:05Z greg.ercolano $".
//
diff --git a/examples/tree-custom-draw-items.cxx b/examples/tree-custom-draw-items.cxx
new file mode 100644
index 0000000..b04f2c6
--- /dev/null
+++ b/examples/tree-custom-draw-items.cxx
@@ -0,0 +1,191 @@
+//
+// "$Id: tree-custom-draw-items.cxx 10071 2014-01-20 21:23:24Z greg.ercolano $"
+//
+// Demonstrate Fl_Tree custom item draw callback. - erco 11/09/2013
+//
+// Copyright 2013 Greg Ercolano.
+// Copyright 1998-2013 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+#include <stdio.h>
+#include <time.h> /* ctime.. */
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Tree.H>
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b))?(a):(b)
+#endif
+
+#if FLTK_ABI_VERSION >= 10303
+// DERIVE CUSTOM CLASS FROM Fl_Tree_Item TO IMPLEMENT SHOWING THE TIME OF DAY
+// This demonstrates that item content can be dynamic and highly customized.
+//
+class MyTimeItem : public Fl_Tree_Item {
+ const char *time_format;
+protected:
+ // Remove trailing crlf
+ const char* StripCrlf(char *s)
+ { char *ss = strchr(s, '\n'); if (ss) *ss = 0; return s; }
+ const struct tm* GetTimeStruct() {
+ time_t t = time(NULL);
+ if ( strcmp(time_format, "Local") == 0 ) return localtime(&t);
+ if ( strcmp(time_format, "GMT" ) == 0 ) return gmtime(&t);
+ return 0;
+ }
+public:
+ MyTimeItem(Fl_Tree *tree, const char *time_format) : Fl_Tree_Item(tree) {
+ label(time_format);
+ this->time_format = time_format;
+ }
+ // Handle custom drawing of the item
+ // Fl_Tree has already handled drawing everything to the left
+ // of the label area, including any 'user icon', collapse buttons,
+ // connector lines, etc.
+ //
+ // All we're responsible for is drawing the 'label' area of the item
+ // and it's background. Fl_Tree gives us a hint as to what the
+ // foreground and background colors should be via the fg/bg parameters,
+ // and whether we're supposed to render anything or not.
+ //
+ // The only other thing we must do is return the maximum X position
+ // of scrollable content, i.e. the right most X position of content
+ // that we want the user to be able to use the horizontal scrollbar
+ // to reach.
+ //
+ int draw_item_content(int render) {
+ Fl_Color fg = drawfgcolor();
+ Fl_Color bg = drawbgcolor();
+ // Show the date and time as two small strings
+ // one on top of the other in a single item.
+ //
+ // Our item's label dimensions
+ int X = label_x(), Y = label_y(),
+ W = label_w(), H = label_h();
+ // Render background
+ if ( render ) {
+ if ( is_selected() ) { // Selected? Use selectbox() style
+ fl_draw_box(prefs().selectbox(),X,Y,W,H,bg);
+ } else { // Not Selected? use plain filled rectangle
+ fl_color(bg); fl_rectf(X,Y,W,H);
+ }
+ }
+ // Render the label
+ if ( render ) {
+ fl_color(fg);
+ if ( label() ) fl_draw(label(), X,Y,W,H, FL_ALIGN_LEFT);
+ }
+ int lw=0, lh=0;
+ if ( label() ) {
+ lw=0; lh=0; fl_measure(label(), lw, lh);
+ }
+ X += lw + 8;
+ // Draw some red/grn/blu boxes
+ if ( render ) {
+ fl_color(FL_RED); fl_rectf(X+0, Y+2, 10, H-4);
+ fl_color(FL_GREEN); fl_rectf(X+10, Y+2, 10, H-4);
+ fl_color(FL_BLUE); fl_rectf(X+20, Y+2, 10, H-4);
+ }
+ X += 35;
+ // Render the date and time, one over the other
+ fl_font(labelfont(), 8); // small font
+ const struct tm *tm = GetTimeStruct();
+ char s[80];
+ sprintf(s, "Date: %02d/%02d/%02d", tm->tm_mon+1, tm->tm_mday, tm->tm_year % 100);
+ lw=0, lh=0; fl_measure(s, lw, lh); // get box around text (including white space)
+ if ( render ) fl_draw(s, X,Y+4,W,H, FL_ALIGN_LEFT|FL_ALIGN_TOP);
+ sprintf(s, "Time: %02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
+ if ( render ) fl_draw(s, X,Y+H/2,W,H/2, FL_ALIGN_LEFT|FL_ALIGN_TOP);
+ int lw2=0, lh2=0; fl_measure(s, lw2, lh2);
+ X += MAX(lw, lw2);
+ return X; // return right most edge of what we've rendered
+ }
+};
+
+// TIMER TO HANDLE DYNAMIC CONTENT IN THE TREE
+void Timer_CB(void *data) {
+ Fl_Tree *tree = (Fl_Tree*)data;
+ tree->redraw(); // keeps time updated
+ Fl::repeat_timeout(0.2, Timer_CB, data);
+}
+
+int main(int argc, char *argv[]) {
+ Fl::scheme("gtk+");
+ Fl_Double_Window *win = new Fl_Double_Window(350, 400, "Simple Tree");
+ win->begin();
+ {
+ // Create the tree
+ Fl_Tree *tree = new Fl_Tree(0, 0, win->w(), win->h());
+ tree->showroot(0); // don't show root of tree
+ tree->selectmode(FL_TREE_SELECT_MULTI); // multiselect
+
+ // Add some items
+ tree->add("Flintstones/Fred");
+ tree->add("Flintstones/Wilma");
+ tree->add("Flintstones/Pebbles");
+ {
+ MyTimeItem *myitem;
+ myitem = new MyTimeItem(tree, "Local"); // create custom item
+ myitem->labelsize(20);
+ tree->add("Time Add Item/Local", myitem);
+
+ myitem = new MyTimeItem(tree, "GMT"); // create custom item
+ myitem->labelsize(20);
+ tree->add("Time Add Item/GMT", myitem);
+ }
+ // 'Replace' approach
+ {
+ Fl_Tree_Item *item;
+ MyTimeItem *myitem;
+ item = tree->add("Time Replace Item/Local Time");
+ // Replace the 'Local' item with our own
+ myitem = new MyTimeItem(tree, "Local"); // create custom item
+ myitem->labelsize(20);
+ item->replace(myitem); // replace normal item with custom
+
+ item = tree->add("Time Replace Item/GMT Time");
+ // Replace the 'GMT' item with our own
+ myitem = new MyTimeItem(tree, "GMT"); // create custom item
+ myitem->labelsize(20);
+ item->replace(myitem); // replace normal item with custom
+ }
+ tree->add("Superjail/Warden");
+ tree->add("Superjail/Jared");
+ tree->add("Superjail/Alice");
+ tree->add("Superjail/Jailbot");
+
+ tree->show_self();
+
+ // Start with some items closed
+ tree->close("Superjail");
+
+ // Set up a timer to keep time in tree updated
+ Fl::add_timeout(0.2, Timer_CB, (void*)tree);
+ }
+ win->end();
+ win->resizable(win);
+ win->show(argc, argv);
+ return(Fl::run());
+}
+#else
+#include <FL/Fl.H>
+#include <FL/fl_message.H>
+int main(int, char**) {
+ fl_alert("This demo is dependent on an ABI feature.\n"
+ "FLTK_ABI_VERSION must be set to 10303 (or higher) in Enumerations.H");
+ return 1;
+}
+#endif
+
+//
+// End of "$Id: tree-custom-draw-items.cxx 10071 2014-01-20 21:23:24Z greg.ercolano $".
+//
diff --git a/examples/tree-custom-sort.cxx b/examples/tree-custom-sort.cxx
new file mode 100644
index 0000000..2f167fb
--- /dev/null
+++ b/examples/tree-custom-sort.cxx
@@ -0,0 +1,81 @@
+//
+// "$Id: tree-custom-sort.cxx 10319 2014-09-17 16:27:01Z greg.ercolano $"
+//
+// Simple Fl_Tree custom (numeric) sort example. - erco 12/16/2013
+// Demonstrates custom sorting of Fl_Tree items.
+//
+// Copyright 2013 Greg Ercolano.
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+#include <stdio.h>
+#include <stdlib.h> /* qsort(3), srand(3).. */
+#include <time.h> /* time(2) */
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Tree.H>
+#include <FL/Fl_Button.H>
+
+Fl_Tree *G_tree = 0;
+
+// Resort the tree
+void MySortCallback(Fl_Widget*, void *data) {
+ int dir = int(long(data)); // forward or reverse
+ Fl_Tree_Item *i = G_tree->root();
+ // Bubble sort
+ for ( int ax=0; ax<i->children(); ax++ ) {
+ for ( int bx=ax+1; bx<i->children(); bx++ ) {
+ long a; sscanf(i->child(ax)->label(), "%ld", &a);
+ long b; sscanf(i->child(bx)->label(), "%ld", &b);
+ switch ( dir ) {
+ case 1: if ( a > b ) { i->swap_children(ax, bx); } break; // fwd
+ case -1: if ( a < b ) { i->swap_children(ax, bx); } break; // rev
+ }
+ }
+ }
+ G_tree->redraw();
+}
+
+int main(int argc, char *argv[]) {
+ // Randomize the random number generator
+ time_t tval; time(&tval);
+ srand((unsigned)tval);
+
+ // Create window with tree
+ Fl::scheme("gtk+");
+ Fl_Double_Window *win = new Fl_Double_Window(250, 600, "Numeric Sort Tree");
+ win->begin();
+ {
+ G_tree = new Fl_Tree(10, 10, win->w()-20, win->h()-60);
+ G_tree->showroot(0);
+
+ // Add 200 random numbers to the tree
+ char word[50];
+ for ( int t=0; t<200; t++ ) {
+ sprintf(word, "%ld", long((float(rand()) / RAND_MAX) * 1000000));
+ G_tree->add(word);
+ }
+
+ // Add some sort buttons
+ Fl_Button *but;
+ but = new Fl_Button(10, win->h()-40,80,20,"Fwd"); but->callback(MySortCallback, (void*) 1);
+ but = new Fl_Button(20+80,win->h()-40,80,20,"Rev"); but->callback(MySortCallback, (void*)-1);
+ }
+ win->end();
+ win->resizable(win);
+ win->show(argc, argv);
+ return(Fl::run());
+}
+
+//
+// End of "$Id: tree-custom-sort.cxx 10319 2014-09-17 16:27:01Z greg.ercolano $".
+//
diff --git a/examples/tree-of-tables.cxx b/examples/tree-of-tables.cxx
index ff1fa11..e347042 100644
--- a/examples/tree-of-tables.cxx
+++ b/examples/tree-of-tables.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: tree-of-tables.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: tree-of-tables.cxx 10040 2014-01-01 17:13:48Z greg.ercolano $"
//
// Fl_Tree as a container of Fl_Table's. - erco 04/25/2012
//
@@ -31,9 +31,9 @@
#if FLTK_ABI_VERSION >= 10301
class MyTable : public Fl_Table {
- char *mode;
+ const char *mode;
public:
- MyTable(int X,int Y,int W,int H,char *mode) : Fl_Table(X,Y,W,H) {
+ MyTable(int X,int Y,int W,int H,const char *mode) : Fl_Table(X,Y,W,H) {
rows(11); row_height_all(20); row_header(1);
cols(11); col_width_all(60); col_header(1);
col_resize(1); // enable column resizing
@@ -151,5 +151,5 @@ int main(int argc, char *argv[]) {
#endif
//
-// End of "$Id: tree-of-tables.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: tree-of-tables.cxx 10040 2014-01-01 17:13:48Z greg.ercolano $".
//
diff --git a/examples/tree-simple.cxx b/examples/tree-simple.cxx
index d242ba5..737eba5 100644
--- a/examples/tree-simple.cxx
+++ b/examples/tree-simple.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: tree-simple.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: tree-simple.cxx 10015 2013-11-06 20:12:08Z greg.ercolano $"
//
// Simple Fl_Tree widget example. - erco 06/05/2010
//
@@ -43,6 +43,13 @@ void TreeCallback(Fl_Widget *w, void *data) {
break;
case FL_TREE_REASON_CLOSED:
// fprintf(stderr, "TreeCallback: Item '%s' closed\n", item->label());
+ break;
+#if FLTK_ABI_VERSION >= 10301
+ // To enable this callback, use tree->item_reselect_mode(FL_TREE_SELECTABLE_ALWAYS);
+ case FL_TREE_REASON_RESELECTED:
+ // fprintf(stderr, "TreeCallback: Item '%s' reselected\n", item->label());
+ break;
+#endif
default:
break;
}
@@ -82,5 +89,5 @@ int main(int argc, char *argv[]) {
}
//
-// End of "$Id: tree-simple.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: tree-simple.cxx 10015 2013-11-06 20:12:08Z greg.ercolano $".
//
diff --git a/fltk-config.cmake.in b/fltk-config.cmake.in
index 121b109..ff34221 100644
--- a/fltk-config.cmake.in
+++ b/fltk-config.cmake.in
@@ -317,6 +317,8 @@ if test -n "$post"; then
<string>$post</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
EOF
diff --git a/fltk-config.in b/fltk-config.in
index 1e50e34..63d0572 100755
--- a/fltk-config.in
+++ b/fltk-config.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# "$Id: fltk-config.in 8864 2011-07-19 04:49:30Z greg.ercolano $"
+# "$Id: fltk-config.in 9861 2013-04-05 15:28:43Z manolo $"
#
# FLTK configuration utility.
#
@@ -318,6 +318,8 @@ if test -n "$post"; then
<string>$post</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
EOF
@@ -394,5 +396,5 @@ if test "$echo_includedir" = "yes"; then
fi
#
-# End of "$Id: fltk-config.in 8864 2011-07-19 04:49:30Z greg.ercolano $".
+# End of "$Id: fltk-config.in 9861 2013-04-05 15:28:43Z manolo $".
#
diff --git a/fltk.spec b/fltk.spec
deleted file mode 100644
index e19e3ac..0000000
--- a/fltk.spec
+++ /dev/null
@@ -1,136 +0,0 @@
-#
-# "$Id: fltk.spec.in 8864 2011-07-19 04:49:30Z greg.ercolano $"
-#
-# RPM spec file for FLTK.
-#
-# Copyright 1998-2011 by Bill Spitzak and others.
-#
-# This library is free software. Distribution and use rights are outlined in
-# the file "COPYING" which should have been included with this file. If this
-# file is missing or damaged, see the license at:
-#
-# http://www.fltk.org/COPYING.php
-#
-# Please report all bugs and problems on the following page:
-#
-# http://www.fltk.org/str.php
-#
-
-%define version @FL_MAJOR_VERSION@.@FL_MINOR_VERSION@.@FL_PATCH_VERSION@
-%define release 1
-%define prefix /usr
-
-Summary: Fast Light Tool Kit (FLTK)
-Name: fltk
-Version: %{version}
-Release: %{release}
-License: LGPL
-Group: System Environment/Libraries
-Source: ftp://ftp.easysw.com/pub/fltk/1.3.2/fltk-1.3.2-source.tar.bz2
-URL: http://www.fltk.org/
-Packager: FLTK Developer <fltk@fltk.org>
-# use BuildRoot so as not to disturb the version already installed
-BuildRoot: /var/tmp/fltk-%{PACKAGE_VERSION}
-
-%description
-The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a
-cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11),
-Microsoft(r) Windows(r), and MacOS(r) X. FLTK provides modern
-GUI functionality without the bloat and supports 3D graphics via
-OpenGL(r) and its built-in GLUT emulation.
-
-%package devel
-Summary: FLTK Development Environment
-Group: Development/Libraries
-
-%description devel
-Install fltk-devel if you need to develop FLTK applications.
-You'll need to install the fltk package if you plan to run
-dynamically linked applications.
-
-%package games
-Summary: FLTK Games
-Group: Games
-
-%description games
-Install fltk-games to play Block Attack!, Checkers, or Sudoku on your computer.
-
-%prep
-%setup
-
-%build
-CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --mandir=%{_mandir} --enable-largefile --enable-shared --enable-threads --enable-xft --enable-xdbe --enable-xinerama
-
-# If we got this far, all prerequisite libraries must be here.
-make
-
-%install
-# these lines just make sure the directory structure in the
-# RPM_BUILD_ROOT exists
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT
-
-make -e DESTDIR=$RPM_BUILD_ROOT install install-desktop
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%dir %{prefix}/lib
-%{prefix}/lib/libfltk*.so.*
-
-%files devel
-%defattr(-,root,root)
-
-%dir %{prefix}/bin
-%{prefix}/bin/fltk-config
-%{prefix}/bin/fluid
-
-%dir %{prefix}/include/FL
-%{prefix}/include/FL/*
-%{prefix}/include/Fl
-
-%dir %{prefix}/lib
-%{prefix}/lib/libfltk*.so
-%{prefix}/lib/libfltk*.a
-
-%dir %{_mandir}
-%{_mandir}/cat1/*
-%{_mandir}/cat3/*
-%{_mandir}/man1/*
-%{_mandir}/man3/*
-
-%dir %{prefix}/share/doc/fltk
-%{prefix}/share/doc/fltk/*
-
-%dir %{prefix}/share/applications
-%{prefix}/share/applications/*
-
-%dir %{prefix}/share/icons
-%{prefix}/share/icons/hicolor/*/apps/fluid.png
-
-%dir %{prefix}/share/mimelnk
-%{prefix}/share/mimelnk/*
-
-%files games
-%dir %{prefix}/bin
-%{prefix}/bin/blocks
-%{prefix}/bin/checkers
-%{prefix}/bin/sudoku
-
-%dir %{_mandir}
-%{_mandir}/cat6/*
-%{_mandir}/man6/*
-
-%dir %{prefix}/share/applications
-%{prefix}/share/applications/*
-
-%dir %{prefix}/share/icons
-%{prefix}/share/icons/hicolor/*/apps/blocks.png
-%{prefix}/share/icons/hicolor/*/apps/checkers.png
-%{prefix}/share/icons/hicolor/*/apps/sudoku.png
-
-#
-# End of "$Id: fltk.spec.in 8864 2011-07-19 04:49:30Z greg.ercolano $".
-#
diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt
index 57e7352..25424a8 100644
--- a/fluid/CMakeLists.txt
+++ b/fluid/CMakeLists.txt
@@ -1,39 +1,30 @@
set(CPPFILES
- CodeEditor.cxx
- Fl_Function_Type.cxx
- Fl_Group_Type.cxx
- Fl_Menu_Type.cxx
- Fl_Type.cxx
- Fl_Widget_Type.cxx
- Fl_Window_Type.cxx
- Fluid_Image.cxx
- about_panel.cxx
- align_widget.cxx
- alignment_panel.cxx
- code.cxx
- factory.cxx
- file.cxx
- fluid.cxx
- function_panel.cxx
- template_panel.cxx
- undo.cxx
- widget_panel.cxx
+ CodeEditor.cxx
+ Fl_Function_Type.cxx
+ Fl_Group_Type.cxx
+ Fl_Menu_Type.cxx
+ Fl_Type.cxx
+ Fl_Widget_Type.cxx
+ Fl_Window_Type.cxx
+ Fluid_Image.cxx
+ about_panel.cxx
+ align_widget.cxx
+ alignment_panel.cxx
+ code.cxx
+ factory.cxx
+ file.cxx
+ fluid.cxx
+ function_panel.cxx
+ template_panel.cxx
+ undo.cxx
+ widget_panel.cxx
)
add_executable(fluid ${CPPFILES})
target_link_libraries(fluid fltk fltk_images fltk_forms)
# link in optional libraries
-if(FLTK_HAVE_CAIRO)
- target_link_libraries(fluid fltk_cairo)
-endif(FLTK_HAVE_CAIRO)
-
-if(FLTK_USE_GL)
- target_link_libraries(fluid fltk_gl)
- target_link_libraries(fluid ${OPENGL_LIBRARIES})
-endif(FLTK_USE_GL)
-
if(USE_XFT)
target_link_libraries(fluid ${X11_Xft_LIB})
endif(USE_XFT)
@@ -43,6 +34,8 @@ if(HAVE_XINERAMA)
endif(HAVE_XINERAMA)
install(TARGETS fluid
- EXPORT fltk-install
- DESTINATION ${PREFIX_BIN}
-)
+ EXPORT FLTK-Targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
diff --git a/fluid/CodeEditor.cxx b/fluid/CodeEditor.cxx
index 27d73cb..4bff6b0 100644
--- a/fluid/CodeEditor.cxx
+++ b/fluid/CodeEditor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: CodeEditor.cxx 9341 2012-04-13 14:45:18Z ianmacarthur $"
+// "$Id: CodeEditor.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Code editor widget for the Fast Light Tool Kit (FLTK).
//
@@ -126,8 +126,10 @@ void CodeEditor::textsize(Fl_Fontsize s) {
// 'compare_keywords()' - Compare two keywords...
-int CodeEditor::compare_keywords(const void *a, const void *b) {
- return (strcmp(*((const char **)a), *((const char **)b)));
+extern "C" {
+ static int compare_keywords(const void *a, const void *b) {
+ return strcmp(*((const char **)a), *((const char **)b));
+ }
}
// 'style_parse()' - Parse text and produce style data.
@@ -416,5 +418,5 @@ CodeViewer::CodeViewer(int X, int Y, int W, int H, const char *L)
}
//
-// End of "$Id: CodeEditor.cxx 9341 2012-04-13 14:45:18Z ianmacarthur $".
+// End of "$Id: CodeEditor.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/fluid/CodeEditor.h b/fluid/CodeEditor.h
index 88bede1..a369964 100644
--- a/fluid/CodeEditor.h
+++ b/fluid/CodeEditor.h
@@ -1,5 +1,5 @@
//
-// "$Id: CodeEditor.h 9341 2012-04-13 14:45:18Z ianmacarthur $"
+// "$Id: CodeEditor.h 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Code editor widget for the Fast Light Tool Kit (FLTK).
//
@@ -38,9 +38,6 @@ class CodeEditor : public Fl_Text_Editor {
static const char * const code_types[];
- // 'compare_keywords()' - Compare two keywords...
- static int compare_keywords(const void *a, const void *b);
-
// 'style_parse()' - Parse text and produce style data.
static void style_parse(const char *text, char *style, int length);
@@ -79,5 +76,5 @@ class CodeViewer : public CodeEditor {
#endif // !CodeEditor_h
//
-// End of "$Id: CodeEditor.h 9341 2012-04-13 14:45:18Z ianmacarthur $".
+// End of "$Id: CodeEditor.h 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx
index 07f3be5..3471b64 100644
--- a/fluid/Fl_Type.cxx
+++ b/fluid/Fl_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Type.cxx 9635 2012-07-14 18:31:43Z AlbrechtS $"
+// "$Id: Fl_Type.cxx 9992 2013-09-24 19:58:24Z greg.ercolano $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
@@ -237,10 +237,8 @@ int Widget_Browser::item_height(void *l) const {
return textsize()*2+1;
else
return textsize()+2;
- } else {
- return 0;
}
- return ((Fl_Type *)l)->visible ? textsize()+2 : 0;
+ return 0;
}
int Widget_Browser::incr_height() const {return textsize()+2;}
@@ -1022,5 +1020,5 @@ int Fl_Type::user_defined(const char* cbname) const {
//
-// End of "$Id: Fl_Type.cxx 9635 2012-07-14 18:31:43Z AlbrechtS $".
+// End of "$Id: Fl_Type.cxx 9992 2013-09-24 19:58:24Z greg.ercolano $".
//
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
index 99dc08e..480dfd5 100644
--- a/fluid/Fl_Type.h
+++ b/fluid/Fl_Type.h
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Type.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Type.h 10093 2014-02-04 00:34:41Z AlbrechtS $"
//
// Widget type header file for the Fast Light Tool Kit (FLTK).
//
@@ -38,7 +38,7 @@ Fl_Widget *make_type_browser(int,int,int,int,const char *l=0);
class Fl_Type {
friend class Widget_Browser;
- friend Fl_Widget *make_type_browser(int,int,int,int,const char *l);
+ friend Fl_Widget *make_type_browser(int,int,int,int,const char *);
friend class Fl_Window_Type;
virtual void setlabel(const char *); // virtual part of label(char*)
@@ -863,5 +863,5 @@ public:
//
-// End of "$Id: Fl_Type.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Type.h 10093 2014-02-04 00:34:41Z AlbrechtS $".
//
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 2dceb9e..6dc55e8 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget_Type.cxx 9082 2011-09-28 20:43:05Z matt $"
+// "$Id: Fl_Widget_Type.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
@@ -678,6 +678,12 @@ Fl_Menu_Item boxmenu[] = {
{"GTK_THIN_DOWN_BOX",0,0,(void *)FL_GTK_THIN_DOWN_BOX},
{"GTK_ROUND_UP_BOX",0,0,(void *)FL_GTK_ROUND_UP_BOX},
{"GTK_ROUND_DOWN_BOX",0,0,(void *)FL_GTK_ROUND_DOWN_BOX},
+{"GLEAM_UP_BOX",0,0,(void *)FL_GLEAM_UP_BOX},
+{"GLEAM_DOWN_BOX",0,0,(void *)FL_GLEAM_DOWN_BOX},
+{"GLEAM_THIN_UP_BOX",0,0,(void *)FL_GLEAM_THIN_UP_BOX},
+{"GLEAM_THIN_DOWN_BOX",0,0,(void *)FL_GLEAM_THIN_DOWN_BOX},
+{"GLEAM_ROUND_UP_BOX",0,0,(void *)FL_GLEAM_ROUND_UP_BOX},
+{"GLEAM_ROUND_DOWN_BOX",0,0,(void *)FL_GLEAM_ROUND_DOWN_BOX},
{0},
{"frames",0,0,0,FL_SUBMENU},
{"UP_FRAME",0,0,(void *)FL_UP_FRAME},
@@ -696,6 +702,8 @@ Fl_Menu_Item boxmenu[] = {
{"GTK_DOWN_FRAME",0,0,(void *)FL_GTK_DOWN_FRAME},
{"GTK_THIN_UP_FRAME",0,0,(void *)FL_GTK_THIN_UP_FRAME},
{"GTK_THIN_DOWN_FRAME",0,0,(void *)FL_GTK_THIN_DOWN_FRAME},
+{"GLEAM_UP_FRAME",0,0,(void *)FL_GLEAM_UP_FRAME},
+{"GLEAM_DOWN_FRAME",0,0,(void *)FL_GLEAM_DOWN_FRAME},
{0},
{0}};
@@ -2862,5 +2870,5 @@ void Fl_Pack_Type::copy_properties()
}
//
-// End of "$Id: Fl_Widget_Type.cxx 9082 2011-09-28 20:43:05Z matt $".
+// End of "$Id: Fl_Widget_Type.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $".
//
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx
index 2a1d26f..7703b81 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/Fluid_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fluid_Image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fluid_Image.cxx 10358 2014-10-05 11:56:06Z AlbrechtS $"
//
// Pixmap label support for the Fast Light Tool Kit (FLTK).
//
@@ -84,7 +84,7 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_Bitmap.H>\n");
bitmap_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
write_cdata(img->data()[0], ((img->w() + 7) / 8) * img->h());
write_c(";\n");
@@ -99,9 +99,9 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_JPEG_Image.H>\n");
jpeg_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
-
+
FILE *f = fl_fopen(name(), "rb");
if (!f) {
// message = "Can't include binary file. Can't open";
@@ -130,7 +130,7 @@ void Fluid_Image::write_static() {
write_c("#include <FL/Fl_Image.H>\n");
image_header_written = write_number;
}
- write_c("static unsigned char %s[] =\n",
+ write_c("static const unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
write_cdata(img->data()[0], (img->w() * img->d() + img->ld()) * img->h());
write_c(";\n");
@@ -248,5 +248,5 @@ Fluid_Image *ui_find_image(const char *oldname) {
//
-// End of "$Id: Fluid_Image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fluid_Image.cxx 10358 2014-10-05 11:56:06Z AlbrechtS $".
//
diff --git a/fluid/Makefile b/fluid/Makefile
index 90e378c..2a9cee2 100644
--- a/fluid/Makefile
+++ b/fluid/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile 8864 2011-07-19 04:49:30Z greg.ercolano $"
+# "$Id: Makefile 9981 2013-09-21 17:23:09Z greg.ercolano $"
#
# FLUID makefile for the Fast Light Tool Kit (FLTK).
#
@@ -48,13 +48,13 @@ all: $(FLUID) fluid$(EXEEXT)
fluid$(EXEEXT): $(OBJECTS) $(LIBNAME) $(FLLIBNAME) \
$(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) $(INSTALL_BIN) fluid fluid.app/Contents/MacOS
fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
../src/$(IMGDSONAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \
-L../src -Wl,-rpath-link,../src -lfltk_images -lfltk_forms -lfltk \
-lpng -lX11
@@ -124,5 +124,5 @@ rebuild:
./fluid -c widget_panel.fl
#
-# End of "$Id: Makefile 8864 2011-07-19 04:49:30Z greg.ercolano $".
+# End of "$Id: Makefile 9981 2013-09-21 17:23:09Z greg.ercolano $".
#
diff --git a/fluid/about_panel.cxx b/fluid/about_panel.cxx
index 7a4fc27..f1a296d 100644
--- a/fluid/about_panel.cxx
+++ b/fluid/about_panel.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: about_panel.cxx 9707 2012-11-06 21:13:54Z matt $"
+// "$Id: about_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// About dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "about_panel.h"
void show_help(const char *name);
@@ -269,14 +269,17 @@ Fl_Double_Window* make_about_panel() {
{ Fl_Box* o = new Fl_Box(10, 10, 115, 120);
o->image(image_fluid);
} // Fl_Box* o
- { Fl_Box* o = new Fl_Box(135, 10, 200, 70, "FLTK User\nInterface Designer\nVersion 1.3.1");
+ { Fl_Box* o = new Fl_Box(135, 10, 205, 75, "FLTK User\nInterface Designer\nVersion x.x.x");
o->color((Fl_Color)12);
o->selection_color(FL_DARK1);
o->labelfont(1);
o->labelsize(18);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+ char about[80]; // uses less than 60
+ snprintf(about,sizeof(about),"FLTK User\nInterface Designer\nVersion %d.%d.%d",FL_MAJOR_VERSION,FL_MINOR_VERSION,FL_PATCH_VERSION);
+ o->copy_label(about);
} // Fl_Box* o
- { Fl_Box* o = new Fl_Box(135, 90, 200, 45, "Copyright 1998-2010 by\nBill Spitzak and others");
+ { Fl_Box* o = new Fl_Box(135, 90, 200, 45, "Copyright 1998-2014 by\nBill Spitzak and others");
o->align(Fl_Align(132|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Button* o = new Fl_Button(115, 145, 123, 25, "View License...");
@@ -873,5 +876,5 @@ unsigned char fluid_org_png[12690] = /* binary data included from ../documentati
73,69,78,68,174,66,96,130};
//
-// End of "$Id: about_panel.cxx 9707 2012-11-06 21:13:54Z matt $".
+// End of "$Id: about_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/about_panel.fl b/fluid/about_panel.fl
index faf16b8..8791636 100644
--- a/fluid/about_panel.fl
+++ b/fluid/about_panel.fl
@@ -1,13 +1,13 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: about_panel.fl 9707 2012-11-06 21:13:54Z matt $"
+// "$Id: about_panel.fl 10420 2014-10-30 17:24:57Z AlbrechtS $"
//
// About dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -25,10 +25,12 @@ comment {//
decl {void show_help(const char *name);} {public local
}
-Function {make_about_panel()} {} {
+Function {make_about_panel()} {open
+} {
Fl_Window about_panel {
- label {About FLUID} open
- xywh {419 216 345 180} type Double color 50 selection_color 47 hotspot non_modal visible
+ label {About FLUID} open selected
+ xywh {340 195 345 180} type Double color 50 selection_color 47 hotspot
+ code0 {\#include "../src/flstring.h"} non_modal visible
} {
Fl_Box {} {
image {icons/fluid-96.xpm} xywh {10 10 115 120}
@@ -36,11 +38,14 @@ Function {make_about_panel()} {} {
Fl_Box {} {
label {FLTK User
Interface Designer
-Version 1.3.1}
- xywh {135 10 200 70} color 12 selection_color 47 labelfont 1 labelsize 18 align 21
+Version x.x.x}
+ xywh {135 10 205 75} color 12 selection_color 47 labelfont 1 labelsize 18 align 21
+ code0 {char about[80]; // uses less than 60}
+ code1 {snprintf(about,sizeof(about),"FLTK User\\nInterface Designer\\nVersion %d.%d.%d",FL_MAJOR_VERSION,FL_MINOR_VERSION,FL_PATCH_VERSION);}
+ code2 {o->copy_label(about);}
}
Fl_Box {} {
- label {Copyright 1998-2010 by
+ label {Copyright 1998-2014 by
Bill Spitzak and others}
xywh {135 90 200 45} align 148
}
@@ -63,6 +68,6 @@ data fluid_org_png {
comment {
//
-// End of "$Id: about_panel.fl 9707 2012-11-06 21:13:54Z matt $".
+// End of "$Id: about_panel.fl 10420 2014-10-30 17:24:57Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/about_panel.h b/fluid/about_panel.h
index afc1cdb..e3169d9 100644
--- a/fluid/about_panel.h
+++ b/fluid/about_panel.h
@@ -1,9 +1,9 @@
//
-// "$Id: about_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: about_panel.h 10420 2014-10-30 17:24:57Z AlbrechtS $"
//
// About dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,13 +16,14 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef about_panel_h
#define about_panel_h
#include <FL/Fl.H>
extern void show_help(const char *name);
#include <FL/Fl_Double_Window.H>
+#include "../src/flstring.h"
extern Fl_Double_Window *about_panel;
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
@@ -32,5 +33,5 @@ extern unsigned char fluid_org_png[12690];
#endif
//
-// End of "$Id: about_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: about_panel.h 10420 2014-10-30 17:24:57Z AlbrechtS $".
//
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx
index 9c602bb..1e5928a 100644
--- a/fluid/alignment_panel.cxx
+++ b/fluid/alignment_panel.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: alignment_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: alignment_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "alignment_panel.h"
#include <FL/Fl_Preferences.H>
@@ -64,10 +64,10 @@ Fl_Double_Window* make_project_window() {
o->selection_color((Fl_Color)12);
{ Fl_Group* o = new Fl_Group(10, 36, 378, 169, "Output");
o->hide();
- { Fl_Box* o = new Fl_Box(100, 49, 236, 49, "Use \"name.ext\" to set a file name or just \".ext\" to set extension.");
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
+ { Fl_Box* o = new Fl_Box(20, 49, 340, 49, "Use \"name.ext\" to set a file name or just \".ext\" to set extension.");
+ o->align(Fl_Align(132|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { header_file_input = new Fl_Input(99, 103, 272, 20, "Header File:");
+ { header_file_input = new Fl_Input(119, 103, 252, 20, "Header File:");
header_file_input->tooltip("The name of the generated header file.");
header_file_input->box(FL_THIN_DOWN_BOX);
header_file_input->labelfont(1);
@@ -75,7 +75,7 @@ Fl_Double_Window* make_project_window() {
header_file_input->callback((Fl_Callback*)header_input_cb, (void*)(1));
header_file_input->when(FL_WHEN_CHANGED);
} // Fl_Input* header_file_input
- { code_file_input = new Fl_Input(100, 128, 272, 20, "Code File:");
+ { code_file_input = new Fl_Input(119, 128, 252, 20, "Code File:");
code_file_input->tooltip("The name of the generated code file.");
code_file_input->box(FL_THIN_DOWN_BOX);
code_file_input->labelfont(1);
@@ -83,12 +83,12 @@ Fl_Double_Window* make_project_window() {
code_file_input->callback((Fl_Callback*)code_input_cb, (void*)(1));
code_file_input->when(FL_WHEN_CHANGED);
} // Fl_Input* code_file_input
- { include_H_from_C_button = new Fl_Check_Button(100, 153, 272, 20, "Include Header from Code");
+ { include_H_from_C_button = new Fl_Check_Button(117, 153, 272, 20, "Include Header from Code");
include_H_from_C_button->tooltip("Include the header file from the code file.");
include_H_from_C_button->down_box(FL_DOWN_BOX);
include_H_from_C_button->callback((Fl_Callback*)include_H_from_C_button_cb);
} // Fl_Check_Button* include_H_from_C_button
- { use_FL_COMMAND_button = new Fl_Check_Button(100, 176, 272, 20, "Menu shortcuts use FL_COMMAND");
+ { use_FL_COMMAND_button = new Fl_Check_Button(117, 176, 272, 20, "Menu shortcuts use FL_COMMAND");
use_FL_COMMAND_button->tooltip("Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.");
use_FL_COMMAND_button->down_box(FL_DOWN_BOX);
use_FL_COMMAND_button->callback((Fl_Callback*)use_FL_COMMAND_button_cb);
@@ -153,6 +153,7 @@ Fl_Menu_Item menu_scheme_choice[] = {
{"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Plastic", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"GTK+", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Gleam", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0}
};
@@ -201,8 +202,8 @@ static void cb_Close1(Fl_Button*, void*) {
}
Fl_Double_Window* make_settings_window() {
- { settings_window = new Fl_Double_Window(339, 241, "GUI Settings");
- { scheme_choice = new Fl_Choice(116, 10, 115, 25, "Scheme: ");
+ { settings_window = new Fl_Double_Window(349, 241, "GUI Settings");
+ { scheme_choice = new Fl_Choice(140, 10, 115, 25, "Scheme: ");
scheme_choice->down_box(FL_BORDER_BOX);
scheme_choice->labelfont(1);
scheme_choice->callback((Fl_Callback*)scheme_cb);
@@ -215,48 +216,53 @@ Fl_Double_Window* make_settings_window() {
{ Fl_Group* o = new Fl_Group(116, 43, 220, 126);
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_CENTER));
- { Fl_Box* o = new Fl_Box(116, 43, 1, 25, "Options: ");
+ { Fl_Box* o = new Fl_Box(140, 43, 1, 25, "Options: ");
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_LEFT));
} // Fl_Box* o
- { tooltips_button = new Fl_Check_Button(116, 43, 113, 25, "Show Tooltips");
+ { tooltips_button = new Fl_Check_Button(138, 43, 113, 25, "Show Tooltips");
tooltips_button->down_box(FL_DOWN_BOX);
+ tooltips_button->labelsize(12);
tooltips_button->callback((Fl_Callback*)cb_tooltips_button);
int b;
fluid_prefs.get("show_tooltips", b, 1);
tooltips_button->value(b);
Fl_Tooltip::enable(b);
} // Fl_Check_Button* tooltips_button
- { completion_button = new Fl_Check_Button(116, 68, 186, 25, "Show Completion Dialogs");
+ { completion_button = new Fl_Check_Button(138, 68, 186, 25, "Show Completion Dialogs");
completion_button->down_box(FL_DOWN_BOX);
+ completion_button->labelsize(12);
completion_button->callback((Fl_Callback*)cb_completion_button);
int b;
fluid_prefs.get("show_completion_dialogs", b, 1);
completion_button->value(b);
} // Fl_Check_Button* completion_button
- { openlast_button = new Fl_Check_Button(116, 93, 214, 25, "Open Previous File on Startup");
+ { openlast_button = new Fl_Check_Button(138, 93, 214, 25, "Open Previous File on Startup");
openlast_button->down_box(FL_DOWN_BOX);
+ openlast_button->labelsize(12);
openlast_button->callback((Fl_Callback*)cb_openlast_button);
int b;
fluid_prefs.get("open_previous_file", b, 0);
openlast_button->value(b);
} // Fl_Check_Button* openlast_button
- { prevpos_button = new Fl_Check_Button(116, 118, 209, 25, "Remember Window Positions");
+ { prevpos_button = new Fl_Check_Button(138, 118, 209, 25, "Remember Window Positions");
prevpos_button->down_box(FL_DOWN_BOX);
+ prevpos_button->labelsize(12);
prevpos_button->callback((Fl_Callback*)cb_prevpos_button);
int b;
fluid_prefs.get("prev_window_pos", b, 1);
prevpos_button->value(b);
} // Fl_Check_Button* prevpos_button
- { show_comments_button = new Fl_Check_Button(116, 143, 209, 25, "Show Comments in Browser");
+ { show_comments_button = new Fl_Check_Button(138, 143, 209, 25, "Show Comments in Browser");
show_comments_button->down_box(FL_DOWN_BOX);
+ show_comments_button->labelsize(12);
show_comments_button->callback((Fl_Callback*)cb_show_comments_button);
fluid_prefs.get("show_comments", show_comments, 1);
show_comments_button->value(show_comments);
} // Fl_Check_Button* show_comments_button
o->end();
} // Fl_Group* o
- { recent_spinner = new Fl_Spinner(115, 173, 40, 25, "# Recent Files: ");
+ { recent_spinner = new Fl_Spinner(140, 173, 40, 25, "# Recent Files: ");
recent_spinner->labelfont(1);
recent_spinner->callback((Fl_Callback*)cb_recent_spinner);
recent_spinner->when(FL_WHEN_CHANGED);
@@ -265,7 +271,7 @@ Fl_Double_Window* make_settings_window() {
recent_spinner->maximum(10);
recent_spinner->value(c);
} // Fl_Spinner* recent_spinner
- { Fl_Button* o = new Fl_Button(266, 205, 64, 25, "Close");
+ { Fl_Button* o = new Fl_Button(276, 205, 64, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close1);
} // Fl_Button* o
@@ -387,8 +393,8 @@ static void cb_Close2(Fl_Button*, void*) {
Fl_Round_Button *def_widget_size[6]={(Fl_Round_Button *)0};
Fl_Double_Window* make_layout_window() {
- { grid_window = new Fl_Double_Window(285, 245, "Layout Settings");
- { Fl_Int_Input* o = horizontal_input = new Fl_Int_Input(106, 10, 50, 25, "x");
+ { grid_window = new Fl_Double_Window(310, 245, "Layout Settings");
+ { Fl_Int_Input* o = horizontal_input = new Fl_Int_Input(116, 10, 50, 25, "x");
horizontal_input->tooltip("Horizontal grid spacing.");
horizontal_input->type(2);
horizontal_input->box(FL_THIN_DOWN_BOX);
@@ -396,7 +402,7 @@ Fl_Double_Window* make_layout_window() {
horizontal_input->align(Fl_Align(FL_ALIGN_RIGHT));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} // Fl_Int_Input* horizontal_input
- { Fl_Int_Input* o = vertical_input = new Fl_Int_Input(166, 10, 50, 25, "pixels");
+ { Fl_Int_Input* o = vertical_input = new Fl_Int_Input(179, 10, 50, 25, "pixels");
vertical_input->tooltip("Vertical grid spacing.");
vertical_input->type(2);
vertical_input->box(FL_THIN_DOWN_BOX);
@@ -404,7 +410,7 @@ Fl_Double_Window* make_layout_window() {
vertical_input->align(Fl_Align(FL_ALIGN_RIGHT));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} // Fl_Int_Input* vertical_input
- { Fl_Int_Input* o = snap_input = new Fl_Int_Input(106, 45, 50, 25, "pixel snap");
+ { Fl_Int_Input* o = snap_input = new Fl_Int_Input(116, 45, 50, 25, "pixel snap");
snap_input->tooltip("Snap to grid within this many pixels.");
snap_input->type(2);
snap_input->box(FL_THIN_DOWN_BOX);
@@ -412,74 +418,74 @@ Fl_Double_Window* make_layout_window() {
snap_input->align(Fl_Align(FL_ALIGN_RIGHT));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
} // Fl_Int_Input* snap_input
- { guides_toggle = new Fl_Check_Button(106, 80, 110, 25, "Show Guides");
+ { guides_toggle = new Fl_Check_Button(116, 80, 110, 25, "Show Guides");
guides_toggle->tooltip("Show distance and alignment guides in overlay");
guides_toggle->down_box(FL_DOWN_BOX);
guides_toggle->callback((Fl_Callback*)guides_cb, (void*)(4));
} // Fl_Check_Button* guides_toggle
- { Fl_Button* o = new Fl_Button(215, 210, 60, 25, "Close");
+ { Fl_Button* o = new Fl_Button(240, 210, 60, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close2);
} // Fl_Button* o
- { Fl_Box* o = new Fl_Box(26, 10, 70, 25, "Grid:");
+ { Fl_Box* o = new Fl_Box(47, 10, 70, 25, "Grid:");
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { Fl_Box* o = new Fl_Box(-1, 115, 97, 25, "Widget Size:");
+ { Fl_Box* o = new Fl_Box(10, 115, 107, 25, "Widget Size:");
o->labelfont(1);
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
} // Fl_Box* o
{ Fl_Group* o = new Fl_Group(105, 115, 170, 75);
- { def_widget_size[0] = new Fl_Round_Button(105, 115, 70, 25);
+ { def_widget_size[0] = new Fl_Round_Button(115, 115, 70, 25);
def_widget_size[0]->type(102);
def_widget_size[0]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[0]->callback((Fl_Callback*)default_widget_size_cb, (void*)(8));
} // Fl_Round_Button* def_widget_size[0]
- { Fl_Box* o = new Fl_Box(120, 115, 50, 25, "tiny");
+ { Fl_Box* o = new Fl_Box(130, 115, 50, 25, "tiny");
o->labelsize(8);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { def_widget_size[1] = new Fl_Round_Button(180, 115, 70, 25);
+ { def_widget_size[1] = new Fl_Round_Button(202, 115, 70, 25);
def_widget_size[1]->type(102);
def_widget_size[1]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[1]->callback((Fl_Callback*)default_widget_size_cb, (void*)(11));
} // Fl_Round_Button* def_widget_size[1]
- { Fl_Box* o = new Fl_Box(195, 115, 50, 25, "small");
+ { Fl_Box* o = new Fl_Box(218, 115, 50, 25, "small");
o->labelsize(11);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { def_widget_size[2] = new Fl_Round_Button(105, 140, 70, 25);
+ { def_widget_size[2] = new Fl_Round_Button(115, 140, 70, 25);
def_widget_size[2]->type(102);
def_widget_size[2]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[2]->callback((Fl_Callback*)default_widget_size_cb, (void*)(14));
} // Fl_Round_Button* def_widget_size[2]
- { Fl_Box* o = new Fl_Box(120, 140, 50, 25, "normal");
+ { Fl_Box* o = new Fl_Box(130, 140, 50, 25, "normal");
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { def_widget_size[3] = new Fl_Round_Button(180, 140, 90, 25);
+ { def_widget_size[3] = new Fl_Round_Button(202, 140, 90, 25);
def_widget_size[3]->type(102);
def_widget_size[3]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[3]->callback((Fl_Callback*)default_widget_size_cb, (void*)(18));
} // Fl_Round_Button* def_widget_size[3]
- { Fl_Box* o = new Fl_Box(195, 140, 68, 25, "medium");
+ { Fl_Box* o = new Fl_Box(218, 140, 68, 25, "medium");
o->labelsize(18);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { def_widget_size[4] = new Fl_Round_Button(105, 165, 75, 25);
+ { def_widget_size[4] = new Fl_Round_Button(115, 165, 75, 25);
def_widget_size[4]->type(102);
def_widget_size[4]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[4]->callback((Fl_Callback*)default_widget_size_cb, (void*)(24));
} // Fl_Round_Button* def_widget_size[4]
- { Fl_Box* o = new Fl_Box(120, 165, 64, 25, "large");
+ { Fl_Box* o = new Fl_Box(130, 165, 64, 25, "large");
o->labelsize(24);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
- { def_widget_size[5] = new Fl_Round_Button(180, 165, 95, 25);
+ { def_widget_size[5] = new Fl_Round_Button(202, 165, 95, 25);
def_widget_size[5]->type(102);
def_widget_size[5]->down_box(FL_ROUND_DOWN_BOX);
def_widget_size[5]->callback((Fl_Callback*)default_widget_size_cb, (void*)(32));
} // Fl_Round_Button* def_widget_size[5]
- { Fl_Box* o = new Fl_Box(195, 165, 76, 25, "huge");
+ { Fl_Box* o = new Fl_Box(218, 165, 76, 25, "huge");
o->labelsize(32);
o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
} // Fl_Box* o
@@ -504,6 +510,7 @@ static void refreshUI() {
wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
+ wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);
}
/**
@@ -518,6 +525,7 @@ static void readPrefs() {
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
+ opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
@@ -526,6 +534,7 @@ static void readPrefs() {
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
+ opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
}
refreshUI();
}
@@ -546,6 +555,8 @@ static void writePrefs() {
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
+ if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
+ else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
@@ -558,6 +569,8 @@ static void writePrefs() {
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
+ if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
+ else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
}
}
@@ -634,6 +647,20 @@ Fl_Menu_Item menu_wDNDText[] = {
{0,0,0,0,0,0,0,0,0}
};
+Fl_Choice *wGTKText=(Fl_Choice *)0;
+
+static void cb_wGTKText(Fl_Choice*, void*) {
+ int mode = wUserOrSystem->value();
+opt[Fl::OPTION_FNFC_USES_GTK ][mode] = wGTKText->value();
+}
+
+Fl_Menu_Item menu_wGTKText[] = {
+ {"off", 0, 0, (void*)(0), 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"on", 0, 0, (void*)(1), 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"default", 0, 0, (void*)(2), 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0}
+};
+
Fl_Choice *wUserOrSystem=(Fl_Choice *)0;
static void cb_wUserOrSystem(Fl_Choice*, void*) {
@@ -656,7 +683,7 @@ global_settings_window->hide();
}
Fl_Double_Window* make_global_settings_window() {
- { global_settings_window = new Fl_Double_Window(403, 317, "FLTK Preferences");
+ { global_settings_window = new Fl_Double_Window(400, 378, "FLTK Preferences");
global_settings_window->color(FL_LIGHT1);
{ Fl_Group* o = new Fl_Group(10, 10, 380, 100, "Keyboard Focus Options");
o->box(FL_GTK_DOWN_BOX);
@@ -711,7 +738,23 @@ dropping text from other applications still works.\n\nDefault is on.");
} // Fl_Choice* wDNDText
o->end();
} // Fl_Group* o
- { wUserOrSystem = new Fl_Choice(14, 275, 141, 25);
+ { Fl_Group* o = new Fl_Group(10, 269, 380, 66, "Native File Chooser Options");
+ o->box(FL_GTK_DOWN_BOX);
+ o->labelfont(2);
+ o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+ { wGTKText = new Fl_Choice(245, 300, 100, 25, "Native File Chooser uses GTK:");
+ wGTKText->tooltip("OPTION_FNFC_USES_GTK\n \nIf \'Native File Chooser uses GTK\' is enable\
+d, the Fl_Native_File_Chooser class\ncalls the GTK open/save file dialogs when\
+ they are available on the platfom. If disabled, the Fl_Native_File_Chooser cl\
+ass\nalways uses FLTK\'s own file dialog (i.e., Fl_File_Chooser) even if GTK i\
+s available.\n\nDefault is on.");
+ wGTKText->down_box(FL_BORDER_BOX);
+ wGTKText->callback((Fl_Callback*)cb_wGTKText);
+ wGTKText->menu(menu_wGTKText);
+ } // Fl_Choice* wGTKText
+ o->end();
+ } // Fl_Group* o
+ { wUserOrSystem = new Fl_Choice(10, 345, 141, 25);
wUserOrSystem->tooltip("Change settings for the current user, or default values for all users of this\
computer. Individual users can override system options, if they set their opt\
ions to specific values (not \'default\').");
@@ -719,10 +762,10 @@ ions to specific values (not \'default\').");
wUserOrSystem->callback((Fl_Callback*)cb_wUserOrSystem);
wUserOrSystem->menu(menu_wUserOrSystem);
} // Fl_Choice* wUserOrSystem
- { Fl_Button* o = new Fl_Button(230, 275, 75, 25, "Cancel");
+ { Fl_Button* o = new Fl_Button(230, 345, 75, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel1);
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(315, 275, 75, 25, "OK");
+ { Fl_Button* o = new Fl_Button(315, 345, 75, 25, "OK");
o->callback((Fl_Callback*)cb_OK);
} // Fl_Button* o
global_settings_window->end();
@@ -733,5 +776,5 @@ ions to specific values (not \'default\').");
}
//
-// End of "$Id: alignment_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: alignment_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl
index b59da6e..946453e 100644
--- a/fluid/alignment_panel.fl
+++ b/fluid/alignment_panel.fl
@@ -1,13 +1,13 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: alignment_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: alignment_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -58,10 +58,11 @@ decl {extern Fl_Preferences fluid_prefs;} {public local
decl {Fl_Text_Buffer *shell_run_buffer;} {public local
}
-Function {make_project_window()} {} {
+Function {make_project_window()} {open
+} {
Fl_Window project_window {
label {Project Settings} open
- xywh {393 460 399 252} type Double
+ xywh {396 475 399 252} type Double
code0 {\#include <FL/Fl_Preferences.H>}
code1 {\#include <FL/Fl_Tooltip.H>} modal visible
} {
@@ -79,29 +80,29 @@ Function {make_project_window()} {} {
} {
Fl_Box {} {
label {Use "name.ext" to set a file name or just ".ext" to set extension.}
- xywh {100 49 236 49} align 144
+ xywh {20 49 340 49} align 148
}
Fl_Input header_file_input {
label {Header File:}
user_data 1 user_data_type {void*}
callback header_input_cb
- tooltip {The name of the generated header file.} xywh {99 103 272 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
+ tooltip {The name of the generated header file.} xywh {119 103 252 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
}
Fl_Input code_file_input {
label {Code File:}
user_data 1 user_data_type {void*}
callback code_input_cb
- tooltip {The name of the generated code file.} xywh {100 128 272 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
+ tooltip {The name of the generated code file.} xywh {119 128 252 20} box THIN_DOWN_BOX labelfont 1 when 1 textfont 4
}
Fl_Check_Button include_H_from_C_button {
label {Include Header from Code}
callback include_H_from_C_button_cb
- tooltip {Include the header file from the code file.} xywh {100 153 272 20} down_box DOWN_BOX
+ tooltip {Include the header file from the code file.} xywh {117 153 272 20} down_box DOWN_BOX
}
Fl_Check_Button use_FL_COMMAND_button {
label {Menu shortcuts use FL_COMMAND}
callback use_FL_COMMAND_button_cb
- tooltip {Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.} xywh {100 176 272 20} down_box DOWN_BOX
+ tooltip {Replace FL_CTRL with FL_COMMAND when generating menu shortcut code.} xywh {117 176 272 20} down_box DOWN_BOX
}
}
Fl_Group {} {
@@ -128,7 +129,7 @@ Function {make_project_window()} {} {
}
Fl_Input i18n_include_input {
label {\#include:}
- callback i18n_text_cb
+ callback i18n_text_cb selected
tooltip {The include file for internationalization.} xywh {100 78 272 20} box THIN_DOWN_BOX labelfont 1 textfont 4
}
Fl_Input i18n_file_input {
@@ -160,12 +161,12 @@ decl {void scheme_cb(Fl_Choice *, void *);} {public local
Function {make_settings_window()} {} {
Fl_Window settings_window {
label {GUI Settings} open
- xywh {393 191 339 241} type Double non_modal visible
+ xywh {393 191 349 241} type Double non_modal visible
} {
Fl_Choice scheme_choice {
label {Scheme: }
callback scheme_cb open
- xywh {116 10 115 25} down_box BORDER_BOX labelfont 1
+ xywh {140 10 115 25} down_box BORDER_BOX labelfont 1
code0 {int s;}
code1 {fluid_prefs.get("scheme", s, 0);}
code2 {scheme_choice->value(s);}
@@ -187,19 +188,23 @@ Function {make_settings_window()} {} {
label {GTK+}
xywh {10 10 35 25}
}
+ MenuItem {} {
+ label Gleam
+ xywh {20 20 35 25}
+ }
}
Fl_Group {} {open
xywh {116 43 220 126} labelfont 1 align 0
} {
Fl_Box {} {
label {Options: }
- xywh {116 43 1 25} labelfont 1 align 4
+ xywh {140 43 1 25} labelfont 1 align 4
}
Fl_Check_Button tooltips_button {
label {Show Tooltips}
callback {Fl_Tooltip::enable(tooltips_button->value());
fluid_prefs.set("show_tooltips", tooltips_button->value());}
- xywh {116 43 113 25} down_box DOWN_BOX
+ xywh {138 43 113 25} down_box DOWN_BOX labelsize 12
code0 {int b;}
code1 {fluid_prefs.get("show_tooltips", b, 1);}
code2 {tooltips_button->value(b);}
@@ -208,7 +213,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button completion_button {
label {Show Completion Dialogs}
callback {fluid_prefs.set("show_completion_dialogs", completion_button->value());}
- xywh {116 68 186 25} down_box DOWN_BOX
+ xywh {138 68 186 25} down_box DOWN_BOX labelsize 12
code0 {int b;}
code1 {fluid_prefs.get("show_completion_dialogs", b, 1);}
code2 {completion_button->value(b);}
@@ -216,7 +221,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button openlast_button {
label {Open Previous File on Startup}
callback {fluid_prefs.set("open_previous_file", openlast_button->value());}
- xywh {116 93 214 25} down_box DOWN_BOX
+ xywh {138 93 214 25} down_box DOWN_BOX labelsize 12
code0 {int b;}
code1 {fluid_prefs.get("open_previous_file", b, 0);}
code2 {openlast_button->value(b);}
@@ -224,7 +229,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
Fl_Check_Button prevpos_button {
label {Remember Window Positions}
callback {fluid_prefs.set("prev_window_pos", prevpos_button->value());}
- xywh {116 118 209 25} down_box DOWN_BOX
+ xywh {138 118 209 25} down_box DOWN_BOX labelsize 12
code0 {int b;}
code1 {fluid_prefs.get("prev_window_pos", b, 1);}
code2 {prevpos_button->value(b);}
@@ -234,7 +239,7 @@ fluid_prefs.set("show_tooltips", tooltips_button->value());}
callback {show_comments = show_comments_button->value();
fluid_prefs.set("show_comments", show_comments);
redraw_browser();}
- xywh {116 143 209 25} down_box DOWN_BOX
+ xywh {138 143 209 25} down_box DOWN_BOX labelsize 12
code1 {fluid_prefs.get("show_comments", show_comments, 1);}
code2 {show_comments_button->value(show_comments);}
}
@@ -243,7 +248,7 @@ redraw_browser();}
label {\# Recent Files: }
callback {fluid_prefs.set("recent_files", recent_spinner->value());
load_history();}
- xywh {115 173 40 25} labelfont 1 when 1
+ xywh {140 173 40 25} labelfont 1 when 1
code0 {int c;}
code1 {fluid_prefs.get("recent_files", c, 5);}
code2 {recent_spinner->maximum(10);}
@@ -252,7 +257,7 @@ load_history();}
Fl_Button {} {
label Close
callback {settings_window->hide();}
- tooltip {Close this dialog.} xywh {266 205 64 25}
+ tooltip {Close this dialog.} xywh {276 205 64 25}
}
}
}
@@ -260,7 +265,7 @@ load_history();}
Function {make_shell_window()} {} {
Fl_Window shell_window {
label {Shell Command} open
- xywh {741 195 365 125} type Double visible
+ xywh {761 190 365 125} type Double visible
} {
Fl_Input shell_command_input {
label {Command:}
@@ -325,47 +330,47 @@ Function {make_shell_window()} {} {
Function {make_layout_window()} {} {
Fl_Window grid_window {
label {Layout Settings} open
- xywh {760 427 285 245} type Double non_modal visible
+ xywh {812 369 310 245} type Double non_modal visible
} {
Fl_Input horizontal_input {
label x
user_data 1 user_data_type long
callback grid_cb
- tooltip {Horizontal grid spacing.} xywh {106 10 50 25} type Int box THIN_DOWN_BOX align 8
+ tooltip {Horizontal grid spacing.} xywh {116 10 50 25} type Int box THIN_DOWN_BOX align 8
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input vertical_input {
label pixels
user_data 2 user_data_type long
callback grid_cb
- tooltip {Vertical grid spacing.} xywh {166 10 50 25} type Int box THIN_DOWN_BOX align 8
+ tooltip {Vertical grid spacing.} xywh {179 10 50 25} type Int box THIN_DOWN_BOX align 8
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input snap_input {
label {pixel snap}
user_data 3 user_data_type long
callback grid_cb
- tooltip {Snap to grid within this many pixels.} xywh {106 45 50 25} type Int box THIN_DOWN_BOX align 8
+ tooltip {Snap to grid within this many pixels.} xywh {116 45 50 25} type Int box THIN_DOWN_BOX align 8
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Check_Button guides_toggle {
label {Show Guides}
user_data 4 user_data_type long
callback guides_cb
- tooltip {Show distance and alignment guides in overlay} xywh {106 80 110 25} down_box DOWN_BOX
+ tooltip {Show distance and alignment guides in overlay} xywh {116 80 110 25} down_box DOWN_BOX
}
Fl_Button {} {
label Close
callback {grid_window->hide();}
- tooltip {Close this dialog.} xywh {215 210 60 25}
+ tooltip {Close this dialog.} xywh {240 210 60 25}
}
Fl_Box {} {
label {Grid:}
- xywh {26 10 70 25} labelfont 1 align 24
+ xywh {47 10 70 25} labelfont 1 align 24
}
Fl_Box {} {
label {Widget Size:}
- xywh {-1 115 97 25} labelfont 1 align 24
+ xywh {10 115 107 25} labelfont 1 align 24
}
Fl_Group {} {open
xywh {105 115 170 75}
@@ -373,56 +378,56 @@ Function {make_layout_window()} {} {
Fl_Round_Button {def_widget_size[0]} {
user_data 8 user_data_type long
callback default_widget_size_cb
- xywh {105 115 70 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {115 115 70 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label tiny
- xywh {120 115 50 25} labelsize 8 align 20
+ xywh {130 115 50 25} labelsize 8 align 20
}
Fl_Round_Button {def_widget_size[1]} {
user_data 11 user_data_type long
callback default_widget_size_cb
- xywh {180 115 70 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {202 115 70 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label small
- xywh {195 115 50 25} labelsize 11 align 20
+ xywh {218 115 50 25} labelsize 11 align 20
}
Fl_Round_Button {def_widget_size[2]} {
user_data 14 user_data_type long
callback default_widget_size_cb
- xywh {105 140 70 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {115 140 70 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label normal
- xywh {120 140 50 25} align 20
+ xywh {130 140 50 25} align 20
}
Fl_Round_Button {def_widget_size[3]} {
user_data 18 user_data_type long
callback default_widget_size_cb
- xywh {180 140 90 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {202 140 90 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label medium
- xywh {195 140 68 25} labelsize 18 align 20
+ xywh {218 140 68 25} labelsize 18 align 20
}
Fl_Round_Button {def_widget_size[4]} {
user_data 24 user_data_type long
callback default_widget_size_cb
- xywh {105 165 75 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {115 165 75 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label large
- xywh {120 165 64 25} labelsize 24 align 20
+ xywh {130 165 64 25} labelsize 24 align 20
}
Fl_Round_Button {def_widget_size[5]} {
user_data 32 user_data_type long
callback default_widget_size_cb
- xywh {180 165 95 25} type Radio down_box ROUND_DOWN_BOX
+ xywh {202 165 95 25} type Radio down_box ROUND_DOWN_BOX
}
Fl_Box {} {
label huge
- xywh {195 165 76 25} labelsize 32 align 20
+ xywh {218 165 76 25} labelsize 32 align 20
}
}
}
@@ -439,7 +444,8 @@ Function {refreshUI()} {
wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]);
wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]);
wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]);
-wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);} {}
+wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]);
+wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);} {}
}
Function {readPrefs()} {
@@ -453,6 +459,7 @@ Function {readPrefs()} {
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2);
+ opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2);
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
@@ -461,6 +468,7 @@ Function {readPrefs()} {
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2);
opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2);
+ opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2);
}
refreshUI();} {}
}
@@ -480,6 +488,8 @@ Function {writePrefs()} {
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][1]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][1]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]);
+ if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
+ else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]);
}
{
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
@@ -492,6 +502,8 @@ Function {writePrefs()} {
else opt_prefs.set("DNDText", opt[Fl::OPTION_DND_TEXT][0]);
if (opt[Fl::OPTION_SHOW_TOOLTIPS][0]==2) opt_prefs.deleteEntry("ShowTooltips");
else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]);
+ if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK");
+ else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]);
}} {}
}
@@ -508,14 +520,13 @@ fl_message(
"ALL users on this machine.\\n\\n"
"Please choose these settings carefully, or reset\\n"
"user and system settings to \\"default\\".");
-global_settings_window->show();} {selected
- }
+global_settings_window->show();} {}
}
Function {make_global_settings_window()} {} {
Fl_Window global_settings_window {
label {FLTK Preferences} open
- xywh {444 220 403 317} type Double color 50 visible
+ xywh {1147 190 400 378} type Double color 50 visible
} {
Fl_Group {} {
label {Keyboard Focus Options} open
@@ -636,9 +647,42 @@ Default is on.} xywh {245 225 100 25} down_box BORDER_BOX
}
}
}
+ Fl_Group {} {
+ label {Native File Chooser Options} open
+ xywh {10 269 380 66} box GTK_DOWN_BOX labelfont 2 align 21
+ } {
+ Fl_Choice wGTKText {
+ label {Native File Chooser uses GTK:}
+ callback {int mode = wUserOrSystem->value();
+opt[Fl::OPTION_FNFC_USES_GTK ][mode] = wGTKText->value();} open
+ tooltip {OPTION_FNFC_USES_GTK
+
+If 'Native File Chooser uses GTK' is enabled, the Fl_Native_File_Chooser class
+calls the GTK open/save file dialogs when they are available on the platfom. If disabled, the Fl_Native_File_Chooser class
+always uses FLTK's own file dialog (i.e., Fl_File_Chooser) even if GTK is available.
+
+Default is on.} xywh {245 300 100 25} down_box BORDER_BOX
+ } {
+ MenuItem {} {
+ label off
+ user_data 0 user_data_type long
+ xywh {30 30 31 20}
+ }
+ MenuItem {} {
+ label on
+ user_data 1 user_data_type long
+ xywh {30 30 31 20} divider
+ }
+ MenuItem {} {
+ label default
+ user_data 2 user_data_type long
+ xywh {30 30 31 20}
+ }
+ }
+ }
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
- tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {14 275 141 25} down_box BORDER_BOX
+ tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 345 141 25} down_box BORDER_BOX
} {
MenuItem {} {
label {User Settings}
@@ -654,13 +698,13 @@ Default is on.} xywh {245 225 100 25} down_box BORDER_BOX
Fl_Button {} {
label Cancel
callback {global_settings_window->hide();}
- xywh {230 275 75 25}
+ xywh {230 345 75 25}
}
Fl_Button {} {
label OK
callback {writePrefs();
global_settings_window->hide();}
- xywh {315 275 75 25}
+ xywh {315 345 75 25}
}
}
code {readPrefs();
@@ -669,6 +713,6 @@ global_settings_window->hide();}
comment {
//
-// End of "$Id: alignment_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: alignment_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/alignment_panel.h b/fluid/alignment_panel.h
index f02ea18..e7317d2 100644
--- a/fluid/alignment_panel.h
+++ b/fluid/alignment_panel.h
@@ -1,9 +1,9 @@
//
-// "$Id: alignment_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: alignment_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Setting and shell dialogs for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef alignment_panel_h
#define alignment_panel_h
@@ -104,15 +104,17 @@ extern Fl_Choice *wVisibleFocus;
extern Fl_Choice *wArrowFocus;
extern Fl_Choice *wShowTooltips;
extern Fl_Choice *wDNDText;
+extern Fl_Choice *wGTKText;
extern Fl_Choice *wUserOrSystem;
Fl_Double_Window* make_global_settings_window();
extern Fl_Menu_Item menu_wVisibleFocus[];
extern Fl_Menu_Item menu_wArrowFocus[];
extern Fl_Menu_Item menu_wShowTooltips[];
extern Fl_Menu_Item menu_wDNDText[];
+extern Fl_Menu_Item menu_wGTKText[];
extern Fl_Menu_Item menu_wUserOrSystem[];
#endif
//
-// End of "$Id: alignment_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: alignment_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index 4bf92d6..6d73fe2 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: factory.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: factory.cxx 10336 2014-09-25 10:37:35Z AlbrechtS $"
//
// Widget factory code for the Fast Light Tool Kit (FLTK).
//
@@ -37,32 +37,6 @@
extern Fl_Pixmap *pixmap[];
-#if !HAVE_STRCASECMP
-//
-// 'strcasecmp()' - Do a case-insensitive compare...
-//
-
-static int
-strcasecmp(const char *s, const char *t) {
- while (*s != '\0' && *t != '\0') {
- if (tolower(*s) < tolower(*t))
- return (-1);
- else if (tolower(*s) > tolower(*t))
- return (1);
-
- s ++;
- t ++;
- }
-
- if (*s == '\0' && *t == '\0')
- return (0);
- else if (*s != '\0')
- return (1);
- else
- return (-1);
-}
-#endif // !HAVE_STRCASECMP
-
////////////////////////////////////////////////////////////////
#include <FL/Fl_Box.H>
@@ -1118,8 +1092,8 @@ Fl_Type *Fl_Type_make(const char *tn) {
Fl_Menu_Item *m = New_Menu+i;
if (!m->user_data()) continue;
Fl_Type *t = (Fl_Type*)(m->user_data());
- if (!strcasecmp(tn,t->type_name())) {r = t->make(); break;}
- if (!strcasecmp(tn,t->alt_type_name())) {r = t->make(); break;}
+ if (!fl_ascii_strcasecmp(tn,t->type_name())) {r = t->make(); break;}
+ if (!fl_ascii_strcasecmp(tn,t->alt_type_name())) {r = t->make(); break;}
}
reading_file = 0;
return r;
@@ -1259,11 +1233,11 @@ static symbol table[] = {
int lookup_symbol(const char *name, int &v, int numberok) {
if (name[0]=='F' && name[1]=='L' && name[2]=='_') name += 3;
for (int i=0; i < int(sizeof(table)/sizeof(*table)); i++)
- if (!strcasecmp(name,table[i].name)) {v = table[i].value; return 1;}
+ if (!fl_ascii_strcasecmp(name,table[i].name)) {v = table[i].value; return 1;}
if (numberok && ((v = atoi(name)) || !strcmp(name,"0"))) return 1;
return 0;
}
//
-// End of "$Id: factory.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: factory.cxx 10336 2014-09-25 10:37:35Z AlbrechtS $".
//
diff --git a/fluid/file.cxx b/fluid/file.cxx
index 386ef3f..a00236b 100644
--- a/fluid/file.cxx
+++ b/fluid/file.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: file.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: file.cxx 10381 2014-10-15 20:51:39Z ianmacarthur $"
//
// Fluid file routines for the Fast Light Tool Kit (FLTK).
//
@@ -379,7 +379,7 @@ static void read_children(Fl_Type *p, int paste) {
if (!strcmp(c,"version")) {
c = read_word();
read_version = strtod(c,0);
- if (read_version<=0 || read_version>FL_VERSION)
+ if (read_version<=0 || read_version>double(FL_VERSION+0.00001))
read_error("unknown version '%s'",c);
continue;
}
@@ -637,5 +637,5 @@ void read_fdesign() {
}
//
-// End of "$Id: file.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: file.cxx 10381 2014-10-15 20:51:39Z ianmacarthur $".
//
diff --git a/fluid/fluid.app/Contents/Info.plist b/fluid/fluid.app/Contents/Info.plist
index 0d19a44..60aedd8 100644
--- a/fluid/fluid.app/Contents/Info.plist
+++ b/fluid/fluid.app/Contents/Info.plist
@@ -1,68 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
-<plist version="0.9">
- <dict>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
-
<key>CFBundleExecutable</key>
<string>fluid</string>
-
<key>CFBundleIdentifier</key>
<string>org.fltk.fluid</string>
-
<key>CFBundleVersion</key>
- <string>1.1.7</string>
-
+ <string>1.3.3</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
-
<key>NSHumanReadableCopyright</key>
- <string>Copyright 1998-2010 by Bill Spitzak and others</string>
-
+ <string>Copyright 1998-2014 by Bill Spitzak and others</string>
<key>CFAppleHelpAnchor</key>
<string>help</string>
-
<key>CFBundleName</key>
- <string>FLUID</string>
-
+ <string>Fluid</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
-
<key>CFBundleSignature</key>
<string>FLID</string>
-
<key>CFBundleIconFile</key>
<string>fluid.icns</string>
-
<key>CFBundleShortVersionString</key>
- <string>1.1.7</string>
-
+ <string>1.3.3</string>
<key>CFBundleGetInfoString</key>
- <string>1.1.7, Copyright 1998-2010 by Bill Spitzak and others</string>
-
+ <string>1.3.3, Copyright 1998-2014 by Bill Spitzak and others</string>
<key>CFBundleDocumentTypes</key>
<array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>fl</string>
- </array>
-
- <key>CFBundleTypeIconFile</key>
- <string>fluid.icns</string>
-
- <key>CFBundleTypeName</key>
- <string>FLUID Designer File</string>
-
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>Flid</string>
- </array>
-
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>fl</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>fluid.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>FLUID Designer File</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>Flid</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
</array>
-
- </dict>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+</dict>
</plist>
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index f6164a1..2653154 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fluid.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: fluid.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@@ -1113,6 +1113,9 @@ void scheme_cb(Fl_Choice *, void *) {
case 3 : // GTK+
Fl::scheme("gtk+");
break;
+ case 4 : // Gleam
+ Fl::scheme("gleam");
+ break;
}
fluid_prefs.set("scheme", scheme_choice->value());
@@ -1801,5 +1804,5 @@ int main(int argc,char **argv) {
}
//
-// End of "$Id: fluid.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: fluid.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $".
//
diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx
index 71499fa..9ad5818 100644
--- a/fluid/function_panel.cxx
+++ b/fluid/function_panel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: function_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: function_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "function_panel.h"
#include <FL/Fl_Pixmap.H>
@@ -78,7 +78,7 @@ Fl_Double_Window* make_function_panel() {
f_public_choice->when(FL_WHEN_CHANGED);
f_public_choice->menu(menu_f_public_choice);
} // Fl_Choice* f_public_choice
- { f_c_button = new Fl_Light_Button(95, 10, 80, 20, "C declaration");
+ { f_c_button = new Fl_Light_Button(95, 10, 120, 20, "C declaration");
f_c_button->tooltip("Declare with a C interface instead of C++.");
f_c_button->labelsize(11);
} // Fl_Light_Button* f_c_button
@@ -113,7 +113,6 @@ Fl_Double_Window* make_function_panel() {
} // Fl_Return_Button* f_panel_ok
{ f_panel_cancel = new Fl_Button(280, 200, 50, 20, "Cancel");
f_panel_cancel->tooltip("Cancel the changes.");
- f_panel_cancel->shortcut(0xff1b);
f_panel_cancel->labelsize(11);
} // Fl_Button* f_panel_cancel
{ Fl_Box* o = new Fl_Box(10, 200, 205, 20);
@@ -140,6 +139,12 @@ Fl_Double_Window* make_function_panel() {
Fl_Double_Window *code_panel=(Fl_Double_Window *)0;
+static void cb_code_panel(Fl_Double_Window*, void*) {
+ if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
+ return; // ignore Escape
+code_panel->hide(); // otherwise hide..;
+}
+
CodeEditor *code_input=(CodeEditor *)0;
Fl_Return_Button *code_panel_ok=(Fl_Return_Button *)0;
@@ -149,6 +154,7 @@ Fl_Button *code_panel_cancel=(Fl_Button *)0;
Fl_Double_Window* make_code_panel() {
{ Fl_Double_Window* o = code_panel = new Fl_Double_Window(540, 180, "Code Properties");
code_panel->labelsize(11);
+ code_panel->callback((Fl_Callback*)cb_code_panel);
{ CodeEditor* o = code_input = new CodeEditor(10, 10, 520, 130);
code_input->box(FL_DOWN_BOX);
code_input->color(FL_BACKGROUND2_COLOR);
@@ -171,7 +177,6 @@ Fl_Double_Window* make_code_panel() {
code_panel_ok->window()->hotspot(code_panel_ok);
} // Fl_Return_Button* code_panel_ok
{ code_panel_cancel = new Fl_Button(470, 150, 60, 20, "Cancel");
- code_panel_cancel->shortcut(0xff1b);
code_panel_cancel->labelsize(11);
} // Fl_Button* code_panel_cancel
{ Fl_Box* o = new Fl_Box(10, 150, 380, 20);
@@ -1069,7 +1074,6 @@ Fl_Double_Window* make_sourceview() {
sv_tab->callback((Fl_Callback*)update_sourceview_position_cb);
{ Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Source");
o->labelsize(13);
- o->hide();
{ sv_source = new CodeViewer(20, 50, 480, 390);
sv_source->box(FL_DOWN_FRAME);
sv_source->color(FL_BACKGROUND2_COLOR);
@@ -1089,6 +1093,7 @@ Fl_Double_Window* make_sourceview() {
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Header");
o->labelsize(13);
+ o->hide();
{ sv_header = new CodeViewer(20, 50, 480, 390);
sv_header->box(FL_DOWN_FRAME);
sv_header->color(FL_BACKGROUND2_COLOR);
@@ -1136,5 +1141,5 @@ Fl_Double_Window* make_sourceview() {
}
//
-// End of "$Id: function_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: function_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl
index b5176c0..8f49936 100644
--- a/fluid/function_panel.fl
+++ b/fluid/function_panel.fl
@@ -1,9 +1,9 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: function_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: function_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
@@ -89,7 +89,7 @@ Function {make_function_panel()} {} {
}
Fl_Light_Button f_c_button {
label {C declaration}
- tooltip {Declare with a C interface instead of C++.} xywh {95 10 80 20} labelsize 11
+ tooltip {Declare with a C interface instead of C++.} xywh {95 10 120 20} labelsize 11
}
Fl_Box {} {
xywh {235 10 45 20} resizable
@@ -112,7 +112,7 @@ Function {make_function_panel()} {} {
}
Fl_Button f_panel_cancel {
label Cancel
- tooltip {Cancel the changes.} xywh {280 200 50 20} shortcut 0xff1b labelsize 11
+ tooltip {Cancel the changes.} xywh {280 200 50 20} labelsize 11
}
Fl_Box {} {
xywh {10 200 205 20} resizable
@@ -126,9 +126,13 @@ Function {make_function_panel()} {} {
}
}
-Function {make_code_panel()} {} {
+Function {make_code_panel()} {open
+} {
Fl_Window code_panel {
label {Code Properties}
+ callback {if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
+ return; // ignore Escape
+code_panel->hide(); // otherwise hide..} open
xywh {353 262 540 180} type Double labelsize 11 resizable
code0 {o->size_range(200, 150);} modal visible
} {
@@ -147,7 +151,7 @@ Function {make_code_panel()} {} {
}
Fl_Button code_panel_cancel {
label Cancel
- xywh {470 150 60 20} shortcut 0xff1b labelsize 11
+ xywh {470 150 60 20} labelsize 11
}
Fl_Box {} {
xywh {10 150 380 20} labelsize 11 resizable
@@ -406,7 +410,7 @@ Function {make_data_panel()} {open
Function {make_class_panel()} {} {
Fl_Window class_panel {
label {Class Properties} open
- xywh {395 191 342 196} type Double labelsize 11 resizable modal size_range {343 188 0 0} visible
+ xywh {783 191 342 196} type Double labelsize 11 hide resizable modal size_range {343 188 0 0}
} {
Fl_Group {} {open
xywh {10 10 280 20} hide
@@ -452,8 +456,8 @@ Function {make_class_panel()} {} {
Function {make_comment_panel()} {} {
Fl_Window comment_panel {
- label {Comment Properties} open
- xywh {422 190 550 280} type Double labelsize 11 resizable
+ label {Comment Properties} open selected
+ xywh {780 296 550 280} type Double labelsize 11 resizable
code0 {o->size_range(320, 180);} modal visible
} {
Fl_Text_Editor comment_input {
@@ -524,7 +528,7 @@ Function {make_widgetbin()} {open
exit_cb((Fl_Widget*)o, v);
else
toggle_widgetbin_cb((Fl_Widget*)o, v);} open
- xywh {410 171 574 85} type Single align 80 non_modal visible
+ xywh {410 171 574 85} type Single align 80 hide non_modal
} {
Fl_Group {} {
xywh {3 3 79 79}
@@ -825,7 +829,7 @@ else
}
Fl_Button {} {
user_data {"Fl_Tree"}
- callback type_make_cb selected
+ callback type_make_cb
tooltip Tree xywh {484 5 24 24} box THIN_UP_BOX
code0 {o->image(pixmap[50]);}
}
@@ -877,7 +881,7 @@ Function {make_sourceview()} {} {
Fl_Window sourceview_panel {
label {Code View}
callback toggle_sourceview_cb
- xywh {430 273 520 490} type Double align 80 resizable size_range {384 120 0 0} visible
+ xywh {430 273 520 490} type Double align 80 hide resizable size_range {384 120 0 0}
} {
Fl_Tabs sv_tab {
callback update_sourceview_position_cb
@@ -885,7 +889,7 @@ Function {make_sourceview()} {} {
} {
Fl_Group {} {
label Source open
- xywh {10 35 500 415} labelsize 13 hide resizable
+ xywh {10 35 500 415} labelsize 13 resizable
} {
Fl_Text_Editor sv_source {
xywh {20 50 480 390} textfont 4 textsize 11 resizable
@@ -895,7 +899,7 @@ Function {make_sourceview()} {} {
}
Fl_Group {} {
label Header open
- xywh {10 35 500 415} labelsize 13
+ xywh {10 35 500 415} labelsize 13 hide
} {
Fl_Text_Editor sv_header {
xywh {20 50 480 390} textfont 4 textsize 11 resizable
@@ -935,6 +939,6 @@ Function {make_sourceview()} {} {
comment {
//
-// End of "$Id: function_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: function_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/function_panel.h b/fluid/function_panel.h
index 8bc5ae0..d949989 100644
--- a/fluid/function_panel.h
+++ b/fluid/function_panel.h
@@ -1,5 +1,5 @@
//
-// "$Id: function_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: function_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef function_panel_h
#define function_panel_h
@@ -122,5 +122,5 @@ Fl_Double_Window* make_sourceview();
#endif
//
-// End of "$Id: function_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: function_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/makedepend b/fluid/makedepend
index 6e4cd82..3c4f4f7 100644
--- a/fluid/makedepend
+++ b/fluid/makedepend
@@ -1,27 +1,27 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
CodeEditor.o: CodeEditor.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-CodeEditor.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-CodeEditor.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Editor.H
-CodeEditor.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H
-CodeEditor.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-CodeEditor.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-CodeEditor.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-CodeEditor.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-CodeEditor.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-CodeEditor.o: ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H
+CodeEditor.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Text_Buffer.H
+CodeEditor.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H ../FL/fl_draw.H
+CodeEditor.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+CodeEditor.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Enumerations.H
+CodeEditor.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+CodeEditor.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+CodeEditor.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H
+CodeEditor.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H
Fl_Function_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Function_Type.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Function_Type.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Function_Type.o: ../FL/Fl_Preferences.H ../FL/Fl_File_Chooser.H
Fl_Function_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
-Fl_Function_Type.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
-Fl_Function_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-Fl_Function_Type.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
-Fl_Function_Type.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
-Fl_Function_Type.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-Fl_Function_Type.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Function_Type.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-Fl_Function_Type.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
+Fl_Function_Type.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_Function_Type.o: ../FL/Fl_Image.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
+Fl_Function_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+Fl_Function_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Tile.H
+Fl_Function_Type.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
+Fl_Function_Type.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
+Fl_Function_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Function_Type.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
+Fl_Function_Type.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
Fl_Function_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
Fl_Function_Type.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
Fl_Function_Type.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H Fl_Type.h
@@ -40,15 +40,15 @@ Fl_Function_Type.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H
Fl_Function_Type.o: ../FL/Fl_Text_Buffer.H CodeEditor.h
Fl_Function_Type.o: ../FL/Fl_Text_Buffer.H comments.h
Fl_Group_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Group_Type.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Group_Type.o: ../FL/Fl_Group.H ../FL/Fl_Table.H ../FL/Fl_Scroll.H
-Fl_Group_Type.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
-Fl_Group_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
-Fl_Group_Type.o: ../FL/Fl_Scrollbar.H ../FL/fl_message.H ../FL/fl_ask.H
-Fl_Group_Type.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
-Fl_Group_Type.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Plugin.H
-Fl_Group_Type.o: ../FL/Fl_Preferences.H Fluid_Image.h ../FL/Fl_Shared_Image.H
-Fl_Group_Type.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Group_Type.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+Fl_Group_Type.o: ../FL/Fl_Table.H ../FL/Fl_Scroll.H ../FL/Fl_Group.H
+Fl_Group_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_Group_Type.o: ../FL/Fl_Valuator.H ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
+Fl_Group_Type.o: ../FL/fl_message.H ../FL/fl_ask.H Fl_Widget_Type.h Fl_Type.h
+Fl_Group_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
+Fl_Group_Type.o: ../FL/Fl_Image.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Group_Type.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/fl_draw.H
+Fl_Group_Type.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
Fl_Group_Type.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
Fl_Group_Type.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Group_Type.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
@@ -57,36 +57,37 @@ Fl_Group_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H
Fl_Group_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H
Fl_Group_Type.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h
Fl_Menu_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Menu_Type.o: ../FL/Xutf8.h ../FL/Enumerations.H Fl_Widget_Type.h Fl_Type.h
+Fl_Menu_Type.o: ../FL/Enumerations.H Fl_Widget_Type.h Fl_Type.h
Fl_Menu_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
Fl_Menu_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Image.H ../FL/Fl_Plugin.H
Fl_Menu_Type.o: ../FL/Fl_Preferences.H Fluid_Image.h ../FL/Fl_Shared_Image.H
Fl_Menu_Type.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Menu_Type.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_Menu_Type.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
-Fl_Menu_Type.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
-Fl_Menu_Type.o: ../FL/Fl_Group.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
-Fl_Menu_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
-Fl_Menu_Type.o: ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-Fl_Menu_Type.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Text_Buffer.H
-Fl_Menu_Type.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/Fl_Scrollbar.H
-Fl_Menu_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H
-Fl_Menu_Type.o: ../FL/filename.H ../FL/Fl_Double_Window.H
-Fl_Menu_Type.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
-Fl_Menu_Type.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
-Fl_Menu_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-Fl_Menu_Type.o: ../FL/Fl_Int_Input.H ../FL/Fl_Input.H ../FL/Fl_Spinner.H
-Fl_Menu_Type.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Return_Button.H
-Fl_Menu_Type.o: ../FL/Fl_Round_Button.H ../FL/fl_message.H ../FL/fl_ask.H
-Fl_Menu_Type.o: ../FL/Fl_Value_Input.H ../src/flstring.h ../FL/Fl_Export.H
-Fl_Menu_Type.o: ../config.h ../FL/Fl_Output.H Shortcut_Button.h
+Fl_Menu_Type.o: ../FL/Fl_Bitmap.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Menu_Type.o: ../FL/Fl_Device.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Menu_Type.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H
+Fl_Menu_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
+Fl_Menu_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
+Fl_Menu_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H
+Fl_Menu_Type.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H alignment_panel.h
+Fl_Menu_Type.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
+Fl_Menu_Type.o: ../FL/fl_draw.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_Menu_Type.o: ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H ../FL/filename.H
+Fl_Menu_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Preferences.H
+Fl_Menu_Type.o: ../FL/Fl_Tooltip.H ../FL/Fl_Button.H ../FL/Fl_Box.H
+Fl_Menu_Type.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+Fl_Menu_Type.o: ../FL/Fl_Button.H ../FL/Fl_Int_Input.H ../FL/Fl_Input.H
+Fl_Menu_Type.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
+Fl_Menu_Type.o: ../FL/Fl_Return_Button.H ../FL/Fl_Round_Button.H
+Fl_Menu_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/Fl_Value_Input.H
+Fl_Menu_Type.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Menu_Type.o: ../FL/Fl_Output.H Shortcut_Button.h
Fl_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Type.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Browser_.H
-Fl_Type.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
-Fl_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H
-Fl_Type.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Type.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Type.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Type.o: ../FL/Enumerations.H ../FL/Fl_Browser_.H ../FL/Fl_Group.H
+Fl_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_Type.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Type.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Enumerations.H
+Fl_Type.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Type.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
Fl_Type.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../src/flstring.h
Fl_Type.o: ../FL/Fl_Export.H ../config.h Fl_Type.h ../FL/Fl_Widget.H
Fl_Type.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
@@ -118,24 +119,24 @@ Fl_Type.o: pixmaps/flValueInput.xpm pixmaps/flValueOutput.xpm
Fl_Type.o: pixmaps/flSpinner.xpm pixmaps/flWidgetClass.xpm pixmaps/flTree.xpm
Fl_Type.o: pixmaps/flTable.xpm
Fl_Widget_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Widget_Type.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Widget_Type.o: ../FL/Fl_Group.H ../FL/Fl_Table.H ../FL/Fl_Scroll.H
-Fl_Widget_Type.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
-Fl_Widget_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
-Fl_Widget_Type.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-Fl_Widget_Type.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H
-Fl_Widget_Type.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
-Fl_Widget_Type.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H Fluid_Image.h
+Fl_Widget_Type.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+Fl_Widget_Type.o: ../FL/Fl_Table.H ../FL/Fl_Scroll.H ../FL/Fl_Group.H
+Fl_Widget_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_Widget_Type.o: ../FL/Fl_Valuator.H ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
+Fl_Widget_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H Fl_Widget_Type.h
+Fl_Widget_Type.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
+Fl_Widget_Type.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Plugin.H
+Fl_Widget_Type.o: ../FL/Fl_Preferences.H Fluid_Image.h
Fl_Widget_Type.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/x.H
-Fl_Widget_Type.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Widget_Type.o: ../FL/Fl_Device.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Widget_Type.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H
-Fl_Widget_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
-Fl_Widget_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
-Fl_Widget_Type.o: ../FL/Fl_Input_Choice.H ../FL/Fl_Menu_Bar.H
-Fl_Widget_Type.o: alignment_panel.h ../FL/Fl_Text_Buffer.H
-Fl_Widget_Type.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H
-Fl_Widget_Type.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H
+Fl_Widget_Type.o: ../FL/Fl_Window.H ../FL/Fl_Bitmap.H ../FL/Enumerations.H
+Fl_Widget_Type.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Image.H
+Fl_Widget_Type.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Widget_Type.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Wizard.H
+Fl_Widget_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
+Fl_Widget_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H
+Fl_Widget_Type.o: ../FL/Fl_Menu_Bar.H alignment_panel.h
+Fl_Widget_Type.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
+Fl_Widget_Type.o: ../FL/fl_draw.H ../FL/Fl_Text_Buffer.H ../FL/filename.H
Fl_Widget_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Preferences.H
Fl_Widget_Type.o: ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
Fl_Widget_Type.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
@@ -149,23 +150,23 @@ Fl_Widget_Type.o: ../FL/Fl_Light_Button.H Shortcut_Button.h CodeEditor.h
Fl_Widget_Type.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
Fl_Widget_Type.o: ../FL/fl_show_colormap.H
Fl_Window_Type.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Window_Type.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Window_Type.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Window_Type.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
Fl_Window_Type.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Window_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/fl_draw.H ../FL/x.H
+Fl_Window_Type.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_message.H
+Fl_Window_Type.o: ../FL/fl_ask.H ../FL/fl_draw.H ../FL/x.H
Fl_Window_Type.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
Fl_Window_Type.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Window_Type.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Window_Type.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Menu_Item.H
-Fl_Window_Type.o: ../FL/Fl_Round_Button.H ../FL/Fl_Light_Button.H
-Fl_Window_Type.o: ../FL/Fl_Button.H Fl_Widget_Type.h Fl_Type.h
-Fl_Window_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
-Fl_Window_Type.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/Fl_Tabs.H
-Fl_Window_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
-Fl_Window_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
-Fl_Window_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H
-Fl_Window_Type.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H undo.h
-Fl_Window_Type.o: alignment_panel.h ../FL/Fl_Text_Buffer.H
+Fl_Window_Type.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Window_Type.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Round_Button.H
+Fl_Window_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H Fl_Widget_Type.h
+Fl_Window_Type.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
+Fl_Window_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Shared_Image.H
+Fl_Window_Type.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
+Fl_Window_Type.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
+Fl_Window_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H
+Fl_Window_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H
+Fl_Window_Type.o: undo.h alignment_panel.h ../FL/Fl_Text_Buffer.H
Fl_Window_Type.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H
Fl_Window_Type.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
Fl_Window_Type.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H
@@ -180,11 +181,11 @@ Fl_Window_Type.o: Shortcut_Button.h CodeEditor.h ../FL/Fl_Text_Editor.H
Fl_Window_Type.o: ../FL/Fl_Text_Display.H ../src/flstring.h ../FL/Fl_Export.H
Fl_Window_Type.o: ../config.h
Fluid_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fluid_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H Fl_Type.h
+Fluid_Image.o: ../FL/Enumerations.H ../FL/Fl_Widget.H Fl_Type.h
Fluid_Image.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H
Fluid_Image.o: ../FL/Fl_Image.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
Fluid_Image.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/fl_draw.H
-Fluid_Image.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fluid_Image.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
Fluid_Image.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
Fluid_Image.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fluid_Image.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
@@ -202,32 +203,32 @@ Fluid_Image.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
Fluid_Image.o: ../FL/Fl_Button.H ../FL/Fl_File_Input.H
Fluid_Image.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H
about_panel.o: about_panel.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-about_panel.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-about_panel.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-about_panel.o: ../FL/Fl_Widget.H ../FL/Fl_Box.H ../FL/Fl_Button.H
+about_panel.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+about_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+about_panel.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../src/flstring.h
+about_panel.o: ../FL/Fl_Export.H ../config.h ../FL/Fl_Box.H ../FL/Fl_Button.H
about_panel.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Pixmap.H
-about_panel.o: ../FL/Fl_Image.H
align_widget.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-align_widget.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-align_widget.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
+align_widget.o: ../FL/Enumerations.H ../FL/Fl_Window.H Fl_Widget_Type.h
+align_widget.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
align_widget.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
align_widget.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H Fluid_Image.h
align_widget.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/x.H
-align_widget.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Enumerations.H
-align_widget.o: ../FL/Fl_Device.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-align_widget.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H
-align_widget.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
-align_widget.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
-align_widget.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H
-align_widget.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H undo.h
+align_widget.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+align_widget.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Image.H
+align_widget.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+align_widget.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
+align_widget.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
+align_widget.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H
+align_widget.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H undo.h
alignment_panel.o: alignment_panel.h ../FL/Fl.H ../FL/fl_utf8.h
-alignment_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-alignment_panel.o: ../FL/Enumerations.H ../FL/Fl_Text_Buffer.H
-alignment_panel.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H
-alignment_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-alignment_panel.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-alignment_panel.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-alignment_panel.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+alignment_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+alignment_panel.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
+alignment_panel.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+alignment_panel.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+alignment_panel.o: ../FL/Fl_Image.H ../FL/Enumerations.H ../FL/Fl_Window.H
+alignment_panel.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+alignment_panel.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
alignment_panel.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H
alignment_panel.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
alignment_panel.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H
@@ -242,31 +243,31 @@ alignment_panel.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H
alignment_panel.o: ../FL/Fl_Return_Button.H ../FL/Fl_Round_Button.H
alignment_panel.o: ../FL/fl_ask.H
code.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
-code.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
+code.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
code.o: ../FL/Enumerations.H Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
code.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
code.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H Fluid_Image.h
code.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-code.o: ../FL/Fl_Group.H ../FL/Enumerations.H ../FL/Fl_Window.H
-code.o: ../FL/Fl_Device.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-code.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tabs.H
-code.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
-code.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
-code.o: ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-code.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Text_Buffer.H
-code.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/Fl_Scrollbar.H
-code.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H
-code.o: ../FL/filename.H ../FL/Fl_Double_Window.H ../FL/Fl_Preferences.H
-code.o: ../FL/Fl_Tooltip.H ../FL/Fl_Button.H ../FL/Fl_Box.H
-code.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-code.o: ../FL/Fl_Int_Input.H ../FL/Fl_Input.H ../FL/Fl_Spinner.H
-code.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Return_Button.H
-code.o: ../FL/Fl_Round_Button.H
+code.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Enumerations.H
+code.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Image.H
+code.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+code.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
+code.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
+code.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H
+code.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H alignment_panel.h
+code.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H ../FL/fl_draw.H
+code.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+code.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H ../FL/Fl_Double_Window.H
+code.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
+code.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+code.o: ../FL/Fl_Button.H ../FL/Fl_Int_Input.H ../FL/Fl_Input.H
+code.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
+code.o: ../FL/Fl_Return_Button.H ../FL/Fl_Round_Button.H
factory.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-factory.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Group.H
-factory.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
-factory.o: ../FL/Fl_Pixmap.H ../FL/Fl_Tree.H ../FL/Fl_Scrollbar.H
-factory.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+factory.o: ../FL/Enumerations.H ../FL/Fl_Group.H ../FL/Fl_Menu_Item.H
+factory.o: ../FL/Fl_Widget.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+factory.o: ../FL/Fl_Tree.H ../FL/Fl_Scrollbar.H ../FL/fl_draw.H ../FL/x.H
+factory.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
factory.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
factory.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
factory.o: ../FL/Fl_Bitmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tree_Item.H
@@ -295,12 +296,12 @@ factory.o: ../FL/Fl_Value_Output.H ../FL/Fl_Value_Slider.H
factory.o: ../FL/Fl_Multi_Label.H
file.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h alignment_panel.h
file.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-file.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Text_Buffer.H
-file.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-file.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Enumerations.H
-file.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-file.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-file.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+file.o: ../FL/Enumerations.H ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
+file.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+file.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+file.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
+file.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+file.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
file.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
file.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H ../FL/Fl_Double_Window.H
file.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
@@ -315,24 +316,26 @@ file.o: ../FL/Fl_Menu.H Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/fl_draw.H
file.o: ../FL/Fl_Pack.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
file.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Input_Choice.H ../FL/Fl_Menu_Bar.H
fluid.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fluid.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-fluid.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Box.H
-fluid.o: ../FL/Fl_Button.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-fluid.o: ../FL/Fl_Help_Dialog.H ../FL/Fl_Group.H ../FL/Fl_Input.H
-fluid.o: ../FL/Fl_Input_.H ../FL/Fl_Help_View.H ../FL/Fl_Scrollbar.H
-fluid.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H
-fluid.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-fluid.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fluid.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fluid.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H ../FL/filename.H
-fluid.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-fluid.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-fluid.o: ../FL/fl_ask.H ../FL/fl_draw.H ../FL/Fl_File_Chooser.H
-fluid.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H ../FL/Fl_Preferences.H
-fluid.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H
-fluid.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-fluid.o: ../FL/Fl_File_Input.H ../FL/Fl_Return_Button.H ../FL/Fl_PNG_Image.H
-fluid.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/filename.H ../src/flstring.h
+fluid.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+fluid.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fluid.o: ../FL/Fl_Image.H ../FL/Fl_Box.H ../FL/Fl_Button.H
+fluid.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/Fl_Help_Dialog.H
+fluid.o: ../FL/Fl_Group.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+fluid.o: ../FL/Fl_Help_View.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+fluid.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
+fluid.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fluid.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fluid.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H
+fluid.o: ../FL/filename.H ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H
+fluid.o: ../FL/Fl_Browser_.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H
+fluid.o: ../FL/Fl_Menu_Item.H ../FL/fl_ask.H ../FL/fl_draw.H
+fluid.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
+fluid.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
+fluid.o: ../FL/Fl_File_Icon.H ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+fluid.o: ../FL/Fl_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Return_Button.H
+fluid.o: ../FL/Fl_PNG_Image.H ../FL/fl_message.H ../FL/fl_ask.H
+fluid.o: ../FL/filename.H ../FL/Fl_Native_File_Chooser.H ../FL/Fl_Printer.H
+fluid.o: ../FL/Fl_Paged_Device.H ../FL/Fl_PostScript.H ../src/flstring.h
fluid.o: ../FL/Fl_Export.H ../config.h alignment_panel.h
fluid.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
fluid.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
@@ -340,18 +343,16 @@ fluid.o: ../FL/Fl_Tabs.H ../FL/Fl_Int_Input.H ../FL/Fl_Input.H
fluid.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl_Round_Button.H
fluid.o: function_panel.h ../FL/Fl_Light_Button.H ../FL/Fl_Text_Editor.H
fluid.o: ../FL/Fl_Text_Display.H CodeEditor.h template_panel.h
-fluid.o: ../FL/Fl_Browser.H print_panel.cxx print_panel.h ../FL/Fl_Progress.H
-fluid.o: about_panel.h undo.h Fl_Type.h ../FL/Fl_Menu.H Fluid_Image.h
-fluid.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Pack.H ../FL/Fl_Wizard.H
-fluid.o: ../FL/Fl_Menu_.H ../FL/Fl_Input_Choice.H
+fluid.o: ../FL/Fl_Browser.H about_panel.h undo.h Fl_Type.h ../FL/Fl_Menu.H
+fluid.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/Fl_Pack.H
+fluid.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Input_Choice.H
function_panel.o: function_panel.h ../FL/Fl.H ../FL/fl_utf8.h
-function_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-function_panel.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-function_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+function_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+function_panel.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+function_panel.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
function_panel.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-function_panel.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
-function_panel.o: ../FL/Fl_Light_Button.H ../FL/Fl_Box.H ../FL/Fl_Input.H
-function_panel.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
+function_panel.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Light_Button.H ../FL/Fl_Box.H
+function_panel.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
function_panel.o: ../FL/Fl_Button.H ../FL/Fl_Button.H ../FL/Fl_Text_Editor.H
function_panel.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H
function_panel.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
@@ -365,22 +366,22 @@ function_panel.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/Fl_Pack.H
function_panel.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Input_Choice.H
function_panel.o: ../FL/Fl_Menu_Bar.H undo.h
template_panel.o: template_panel.h ../FL/Fl.H ../FL/fl_utf8.h
-template_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-template_panel.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-template_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+template_panel.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+template_panel.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+template_panel.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
template_panel.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-template_panel.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Image.H
-template_panel.o: ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-template_panel.o: ../FL/Fl_Group.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
+template_panel.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
+template_panel.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Group.H
+template_panel.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
template_panel.o: ../FL/Fl_Button.H ../src/flstring.h ../FL/Fl_Export.H
template_panel.o: ../config.h ../FL/filename.H ../FL/fl_ask.H
template_panel.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Preferences.H
undo.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-undo.o: ../FL/Xutf8.h ../FL/Enumerations.H Fl_Type.h ../FL/Fl_Widget.H
-undo.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H
-undo.o: ../FL/Fl_Image.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-undo.o: Fluid_Image.h ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/x.H
-undo.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Enumerations.H
+undo.o: ../FL/Enumerations.H Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
+undo.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
+undo.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H Fluid_Image.h
+undo.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+undo.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Enumerations.H
undo.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Image.H
undo.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
undo.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
@@ -389,18 +390,18 @@ undo.o: ../FL/Fl_Choice.H ../FL/Fl_Input_Choice.H ../FL/Fl_Input.H
undo.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Bar.H undo.h ../FL/Fl_Preferences.H
undo.o: ../FL/filename.H ../src/flstring.h ../FL/Fl_Export.H ../config.h
widget_panel.o: widget_panel.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-widget_panel.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+widget_panel.o: ../FL/fl_types.h ../FL/Enumerations.H
widget_panel.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-widget_panel.o: ../FL/Fl_Widget.H ../FL/Fl_Tabs.H ../FL/Fl_Group.H
-widget_panel.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Choice.H
-widget_panel.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
-widget_panel.o: ../FL/Fl_Button.H ../FL/Fl_Box.H ../FL/Fl_Value_Input.H
-widget_panel.o: ../FL/Fl_Valuator.H ../FL/Fl_Input.H ../FL/Fl_Light_Button.H
-widget_panel.o: Shortcut_Button.h CodeEditor.h ../FL/Fl_Text_Buffer.H
-widget_panel.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
-widget_panel.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
-widget_panel.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-widget_panel.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-widget_panel.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H
-widget_panel.o: ../FL/Fl_Slider.H ../FL/Fl_Text_Buffer.H
+widget_panel.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+widget_panel.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Input.H
+widget_panel.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+widget_panel.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Button.H ../FL/Fl_Box.H
+widget_panel.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H ../FL/Fl_Input.H
+widget_panel.o: ../FL/Fl_Light_Button.H Shortcut_Button.h CodeEditor.h
+widget_panel.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Editor.H
+widget_panel.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H
+widget_panel.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
+widget_panel.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+widget_panel.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+widget_panel.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Text_Buffer.H
widget_panel.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
diff --git a/fluid/print_panel.cxx b/fluid/print_panel.cxx
index 2b93b11..86eb21f 100644
--- a/fluid/print_panel.cxx
+++ b/fluid/print_panel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: print_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: print_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID print panel for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "print_panel.h"
#include <stdio.h>
@@ -443,10 +443,12 @@ Fl_Double_Window* make_print_panel() {
{ print_page_size = new Fl_Choice(110, 10, 80, 25, "Page Size:");
print_page_size->down_box(FL_BORDER_BOX);
print_page_size->labelfont(1);
+ print_page_size->labelsize(12);
print_page_size->menu(menu_print_page_size);
} // Fl_Choice* print_page_size
{ Fl_Group* o = new Fl_Group(110, 45, 170, 40, "Output Mode:");
o->labelfont(1);
+ o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ print_output_mode[0] = new Fl_Button(110, 45, 30, 40);
print_output_mode[0]->type(102);
@@ -575,5 +577,5 @@ void print_update_status() {
}
//
-// End of "$Id: print_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: print_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/print_panel.fl b/fluid/print_panel.fl
index df881fe..282c668 100644
--- a/fluid/print_panel.fl
+++ b/fluid/print_panel.fl
@@ -1,9 +1,9 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0107
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: print_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: print_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID print panel for the Fast Light Tool Kit (FLTK).
//
@@ -22,21 +22,26 @@ comment {//
} {in_source in_header
}
-decl {\#include <stdio.h>} {}
+decl {\#include <stdio.h>} {private local
+}
-decl {\#include <stdlib.h>} {}
+decl {\#include <stdlib.h>} {private local
+}
-decl {\#include "../src/flstring.h"} {}
+decl {\#include "../src/flstring.h"} {private local
+}
-decl {\#include <FL/Fl_Preferences.H>} {}
+decl {\#include <FL/Fl_Preferences.H>} {private local
+}
-decl {extern Fl_Preferences fluid_prefs;} {}
+decl {extern Fl_Preferences fluid_prefs;} {private local
+}
Function {make_print_panel()} {open
} {
Fl_Window print_panel {
label Print open
- xywh {342 21 465 235} type Double modal visible
+ xywh {394 209 465 235} type Double modal visible
} {
Fl_Group print_panel_controls {open
xywh {10 10 447 216}
@@ -48,7 +53,7 @@ Function {make_print_panel()} {open
} {}
Fl_Button print_properties {
label {Properties...}
- callback {print_properties_panel->show();}
+ callback {print_properties_panel->show();} selected
xywh {294 10 105 25}
}
Fl_Box print_status {
@@ -100,7 +105,7 @@ print_to->deactivate();}
print_collate_button->activate();
print_collate_group[0]->activate();
print_collate_group[1]->activate();
-}} selected
+}}
xywh {321 96 45 25} when 1
}
Fl_Check_Button print_collate_button {
@@ -210,11 +215,11 @@ print_collate_group[1 - i]->hide();}
label {Printer Properties}
callback {print_properties_panel->hide();
print_update_status();} open
- xywh {340 213 290 130} type Double modal visible
+ xywh {400 537 290 130} type Double modal visible
} {
Fl_Choice print_page_size {
label {Page Size:}
- xywh {110 10 80 25} down_box BORDER_BOX labelfont 1
+ xywh {110 10 80 25} down_box BORDER_BOX labelfont 1 labelsize 12
} {
MenuItem {} {
label Letter
@@ -227,7 +232,7 @@ print_update_status();} open
}
Fl_Group {} {
label {Output Mode:} open
- xywh {110 45 170 40} labelfont 1 align 4
+ xywh {110 45 170 40} labelfont 1 labelsize 12 align 4
} {
Fl_Button {print_output_mode[0]} {
image {pixmaps/print_color.xpm} xywh {110 45 30 40} type Radio box BORDER_BOX down_box BORDER_BOX value 1 color 7 selection_color 0
@@ -274,7 +279,7 @@ print_update_status();}
}
}
-decl {void print_cb(Fl_Return_Button *, void *);} {public
+decl {void print_cb(Fl_Return_Button *, void *);} {public local
}
Function {print_load()} {open return_type void
@@ -356,6 +361,6 @@ print_output_mode[val]->setonly();} {}
comment {
//
-// End of "$Id: print_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: print_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/print_panel.h b/fluid/print_panel.h
index 8a98f69..81e149d 100644
--- a/fluid/print_panel.h
+++ b/fluid/print_panel.h
@@ -1,5 +1,5 @@
//
-// "$Id: print_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: print_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID print panel for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef print_panel_h
#define print_panel_h
@@ -58,5 +58,5 @@ void print_update_status();
#endif
//
-// End of "$Id: print_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: print_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/template_panel.cxx b/fluid/template_panel.cxx
index 34c44f0..305d240 100644
--- a/fluid/template_panel.cxx
+++ b/fluid/template_panel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: template_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: template_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID template support for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "template_panel.h"
#include <stdio.h>
@@ -147,7 +147,7 @@ Fl_Double_Window* make_template_panel() {
template_preview->align(Fl_Align(69|FL_ALIGN_INSIDE));
Fl_Group::current()->resizable(template_preview);
} // Fl_Box* template_preview
- { template_name = new Fl_Input(124, 288, 326, 25, "Template Name:");
+ { template_name = new Fl_Input(144, 288, 306, 25, "Template Name:");
template_name->labelfont(1);
template_name->textfont(4);
template_name->callback((Fl_Callback*)cb_template_name);
@@ -159,7 +159,7 @@ Fl_Double_Window* make_template_panel() {
template_instance->hide();
} // Fl_Input* template_instance
{ Fl_Group* o = new Fl_Group(10, 323, 440, 25);
- { template_delete = new Fl_Button(10, 323, 133, 25, "Delete Template");
+ { template_delete = new Fl_Button(10, 323, 143, 25, "Delete Template");
template_delete->callback((Fl_Callback*)template_delete_cb);
} // Fl_Button* template_delete
{ Fl_Box* o = new Fl_Box(153, 323, 126, 25);
@@ -245,5 +245,5 @@ void template_load() {
}
//
-// End of "$Id: template_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: template_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/template_panel.fl b/fluid/template_panel.fl
index 1f34e5d..c9a9a60 100644
--- a/fluid/template_panel.fl
+++ b/fluid/template_panel.fl
@@ -1,9 +1,9 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: template_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: template_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID template support for the Fast Light Tool Kit (FLTK).
//
@@ -22,32 +22,45 @@ comment {//
} {in_source in_header
}
-decl {\#include <stdio.h>} {}
+decl {\#include <stdio.h>} {private local
+}
-decl {\#include <stdlib.h>} {}
+decl {\#include <stdlib.h>} {private local
+}
-decl {\#include "../src/flstring.h"} {}
+decl {\#include "../src/flstring.h"} {private local
+}
-decl {\#include <errno.h>} {}
+decl {\#include <errno.h>} {private local
+}
-decl {\#include <FL/filename.H>} {}
+decl {\#include <FL/filename.H>} {private local
+}
-decl {\#include <FL/fl_ask.H>} {}
+decl {\#include <FL/fl_ask.H>} {private local
+}
-decl {\#include <FL/Fl_Shared_Image.H>} {}
+decl {\#include <FL/Fl_Shared_Image.H>} {private local
+}
-decl {\#include <FL/Fl_Preferences.H>} {}
+decl {\#include <FL/Fl_Preferences.H>} {private local
+}
declblock {\#if defined(WIN32) && !defined(__CYGWIN__)} {after {\#endif // WIN32 && !__CYGWIN__}
} {
- decl {\#include <io.h>} {}
- decl {\#else} {}
- decl {\#include <unistd.h>} {}
+ decl {\#include <io.h>} {private local
+ }
+ decl {\#else} {private local
+ }
+ decl {\#include <unistd.h>} {private local
+ }
}
-decl {extern Fl_Preferences fluid_prefs;} {}
+decl {extern Fl_Preferences fluid_prefs;} {private local
+}
-Function {make_template_panel()} {} {
+Function {make_template_panel()} {open
+} {
Fl_Window template_panel {
label {New/Save Template}
callback {Fl_Shared_Image *img = (Fl_Shared_Image *)template_preview->image();
@@ -58,7 +71,7 @@ template_browser->deselect();
template_name->value("");
template_instance->value("");
template_panel->hide();} open
- xywh {340 237 460 355} type Double resizable modal visible
+ xywh {398 200 460 355} type Double resizable modal visible
} {
Fl_Browser template_browser {
label {Available Templates:}
@@ -116,8 +129,8 @@ if (img) {
callback {if (strlen(template_name->value())) {
template_submit->activate();
if (Fl::event_key() == FL_Enter) template_panel->hide();
-} else template_submit->deactivate();}
- xywh {124 288 326 25} labelfont 1 when 3 textfont 4
+} else template_submit->deactivate();} selected
+ xywh {144 288 306 25} labelfont 1 when 3 textfont 4
}
Fl_Input template_instance {
label {Instance Name:}
@@ -129,7 +142,7 @@ if (img) {
Fl_Button template_delete {
label {Delete Template}
callback template_delete_cb
- xywh {10 323 133 25}
+ xywh {10 323 143 25}
}
Fl_Box {} {
xywh {153 323 126 25} resizable
@@ -172,7 +185,7 @@ template_browser->deselect();
template_browser->clear();} {}
}
-Function {template_delete_cb(Fl_Button *, void *)} {selected return_type void
+Function {template_delete_cb(Fl_Button *, void *)} {return_type void
} {
code {int item = template_browser->value();
if (item < 1) return;
@@ -229,6 +242,6 @@ if (num_files > 0) free(files);} {}
comment {
//
-// End of "$Id: template_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: template_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/template_panel.h b/fluid/template_panel.h
index b377347..839a1ee 100644
--- a/fluid/template_panel.h
+++ b/fluid/template_panel.h
@@ -1,5 +1,5 @@
//
-// "$Id: template_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: template_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// FLUID template support for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef template_panel_h
#define template_panel_h
@@ -42,5 +42,5 @@ void template_load();
#endif
//
-// End of "$Id: template_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: template_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx
index 13a6d91..4588b94 100644
--- a/fluid/widget_panel.cxx
+++ b/fluid/widget_panel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: widget_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: widget_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Widget panel for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "widget_panel.h"
@@ -161,7 +161,7 @@ Fl_Double_Window* make_widget_panel() {
} // Fl_Button* o
o->end();
} // Fl_Group* o
- { Fl_Group* o = new Fl_Group(95, 115, 300, 20, "Alignment:");
+ { Fl_Group* o = new Fl_Group(95, 115, 310, 20, "Alignment:");
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
@@ -174,14 +174,14 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_CLIP));
o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(130, 115, 30, 20, "Wrap");
+ { Fl_Button* o = new Fl_Button(130, 115, 38, 20, "Wrap");
o->tooltip("Wrap the label text.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
o->labelsize(11);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_WRAP));
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(270, 115, 20, 20, "@-1<-");
+ { Fl_Button* o = new Fl_Button(278, 115, 20, 20, "@-1<-");
o->tooltip("Left-align the label.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
@@ -190,7 +190,7 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_LEFT));
o->hide();
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(295, 115, 20, 20, "@-1->");
+ { Fl_Button* o = new Fl_Button(303, 115, 20, 20, "@-1->");
o->tooltip("Right-align the label.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
@@ -199,7 +199,7 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_RIGHT));
o->hide();
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(320, 115, 20, 20, "@-18");
+ { Fl_Button* o = new Fl_Button(328, 115, 20, 20, "@-18");
o->tooltip("Top-align the label.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
@@ -208,7 +208,7 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_TOP));
o->hide();
} // Fl_Button* o
- { Fl_Button* o = new Fl_Button(345, 115, 20, 20, "@-12");
+ { Fl_Button* o = new Fl_Button(353, 115, 20, 20, "@-12");
o->tooltip("Bottom-align the label.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
@@ -217,21 +217,21 @@ Fl_Double_Window* make_widget_panel() {
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_BOTTOM));
o->hide();
} // Fl_Button* o
- { Fl_Choice* o = new Fl_Choice(165, 115, 110, 20);
+ { Fl_Choice* o = new Fl_Choice(172, 115, 110, 20);
o->down_box(FL_BORDER_BOX);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)align_text_image_cb);
o->menu(menu_);
} // Fl_Choice* o
- { Fl_Choice* o = new Fl_Choice(280, 115, 85, 20);
+ { Fl_Choice* o = new Fl_Choice(288, 115, 85, 20);
o->down_box(FL_BORDER_BOX);
o->labelsize(11);
o->textsize(11);
o->callback((Fl_Callback*)align_position_cb);
o->menu(menu_1);
} // Fl_Choice* o
- { Fl_Button* o = new Fl_Button(370, 115, 20, 20, "@-3square");
+ { Fl_Button* o = new Fl_Button(378, 115, 20, 20, "@-3square");
o->tooltip("Show the label inside the widget.");
o->type(1);
o->selection_color(FL_INACTIVE_COLOR);
@@ -239,13 +239,13 @@ Fl_Double_Window* make_widget_panel() {
o->labelcolor(FL_INACTIVE_COLOR);
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_INSIDE));
} // Fl_Button* o
- { Fl_Box* o = new Fl_Box(395, 115, 0, 20);
+ { Fl_Box* o = new Fl_Box(404, 115, 0, 20);
o->labelsize(11);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
- { Fl_Group* o = new Fl_Group(95, 150, 300, 20, "Position:");
+ { Fl_Group* o = new Fl_Group(95, 150, 314, 20, "Position:");
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
@@ -286,13 +286,13 @@ Fl_Double_Window* make_widget_panel() {
widget_h_input->callback((Fl_Callback*)h_cb);
widget_h_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* widget_h_input
- { Fl_Light_Button* o = new Fl_Light_Button(335, 150, 55, 20, "Relative");
+ { Fl_Light_Button* o = new Fl_Light_Button(335, 150, 65, 20, "Relative");
o->tooltip("If set, widgets inside a widget class of type Fl_Group are repositioned relat\
ive to the origin at construction time");
o->labelsize(11);
o->callback((Fl_Callback*)wc_relative_cb);
} // Fl_Light_Button* o
- { Fl_Box* o = new Fl_Box(394, 150, 1, 20);
+ { Fl_Box* o = new Fl_Box(398, 150, 1, 20);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
@@ -822,5 +822,5 @@ avior.");
}
//
-// End of "$Id: widget_panel.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: widget_panel.cxx 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl
index 9aa3edb..405ca17 100644
--- a/fluid/widget_panel.fl
+++ b/fluid/widget_panel.fl
@@ -1,9 +1,9 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
comment {//
-// "$Id: widget_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: widget_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Widget panel for the Fast Light Tool Kit (FLTK).
//
@@ -43,7 +43,7 @@ Function {make_widget_panel()} {open
xywh {95 40 309 20} labelfont 1 labelsize 11 align 4
} {
Fl_Input {} {
- callback label_cb
+ callback label_cb selected
tooltip {The label text for the widget.
Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 textsize 11 resizable
}
@@ -87,7 +87,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
Fl_Group {} {
label {Alignment:}
callback propagate_load open
- xywh {95 115 300 20} labelfont 1 labelsize 11 align 4
+ xywh {95 115 310 20} labelfont 1 labelsize 11 align 4
} {
Fl_Button {} {
label Clip
@@ -99,35 +99,35 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
label Wrap
user_data FL_ALIGN_WRAP
callback align_cb
- tooltip {Wrap the label text.} xywh {130 115 30 20} type Toggle selection_color 8 labelsize 11
+ tooltip {Wrap the label text.} xywh {130 115 38 20} type Toggle selection_color 8 labelsize 11
}
Fl_Button {} {
label {@-1<-}
user_data FL_ALIGN_LEFT
callback align_cb
- tooltip {Left-align the label.} xywh {270 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
+ tooltip {Left-align the label.} xywh {278 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-1->}
user_data FL_ALIGN_RIGHT
callback align_cb
- tooltip {Right-align the label.} xywh {295 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
+ tooltip {Right-align the label.} xywh {303 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-18}
user_data FL_ALIGN_TOP
callback align_cb
- tooltip {Top-align the label.} xywh {320 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
+ tooltip {Top-align the label.} xywh {328 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Button {} {
label {@-12}
user_data FL_ALIGN_BOTTOM
callback align_cb
- tooltip {Bottom-align the label.} xywh {345 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
+ tooltip {Bottom-align the label.} xywh {353 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8 hide
}
Fl_Choice {} {
- callback align_text_image_cb open selected
- xywh {165 115 110 20} down_box BORDER_BOX labelsize 11 textsize 11
+ callback align_text_image_cb open
+ xywh {172 115 110 20} down_box BORDER_BOX labelsize 11 textsize 11
} {
MenuItem {} {
label { Image Alignment }
@@ -162,7 +162,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
}
Fl_Choice {} {
callback align_position_cb open
- xywh {280 115 85 20} down_box BORDER_BOX labelsize 11 textsize 11
+ xywh {288 115 85 20} down_box BORDER_BOX labelsize 11 textsize 11
} {
MenuItem {} {
label { Inside && Outside }
@@ -244,16 +244,16 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
label {@-3square}
user_data FL_ALIGN_INSIDE
callback align_cb
- tooltip {Show the label inside the widget.} xywh {370 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8
+ tooltip {Show the label inside the widget.} xywh {378 115 20 20} type Toggle selection_color 8 labelsize 11 labelcolor 8
}
Fl_Box {} {
- xywh {395 115 0 20} labelsize 11 resizable
+ xywh {404 115 0 20} labelsize 11 resizable
}
}
Fl_Group {} {
label {Position:}
callback propagate_load
- xywh {95 150 300 20} labelfont 1 labelsize 11 align 4
+ xywh {95 150 314 20} labelfont 1 labelsize 11 align 4
} {
Fl_Value_Input widget_x_input {
label {X:}
@@ -278,10 +278,10 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 1 te
Fl_Light_Button {} {
label Relative
callback wc_relative_cb
- tooltip {If set, widgets inside a widget class of type Fl_Group are repositioned relative to the origin at construction time} xywh {335 150 55 20} labelsize 11
+ tooltip {If set, widgets inside a widget class of type Fl_Group are repositioned relative to the origin at construction time} xywh {335 150 65 20} labelsize 11
}
Fl_Box {} {
- xywh {394 150 1 20} resizable
+ xywh {398 150 1 20} resizable
}
}
Fl_Group {} {
@@ -676,6 +676,6 @@ Use Ctrl-J for newlines.} xywh {95 285 310 20} labelfont 1 labelsize 11 textsize
comment {
//
-// End of "$Id: widget_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: widget_panel.fl 10353 2014-10-05 00:03:27Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/fluid/widget_panel.h b/fluid/widget_panel.h
index 42b5e9d..441d383 100644
--- a/fluid/widget_panel.h
+++ b/fluid/widget_panel.h
@@ -1,5 +1,5 @@
//
-// "$Id: widget_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: widget_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $"
//
// Widget panel for the Fast Light Tool Kit (FLTK).
//
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#ifndef widget_panel_h
#define widget_panel_h
@@ -113,5 +113,5 @@ extern Fl_Menu_Item menu_3[];
#endif
//
-// End of "$Id: widget_panel.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: widget_panel.h 10353 2014-10-05 00:03:27Z AlbrechtS $".
//
diff --git a/ide/README.IDE b/ide/README.IDE
index e0c375f..2a70d79 100755
--- a/ide/README.IDE
+++ b/ide/README.IDE
@@ -18,7 +18,7 @@ Notes :
-------
(1) For *nix platforms based on the autoconf/configure/make toolchain,
simply run autoconf, then the configure script on the root dir.
- read the ./README file for more info.
+ Read the ./README file for more info.
(2) When first using the project file (ide/VisualC6/fltk.dsw) with
VC++ 2005, you will be asked to convert the project to the newer
format.
diff --git a/ide/VisualC2008/fltk.lib.vcproj b/ide/VisualC2008/fltk.lib.vcproj
index ba75fba..4d4755d 100644
--- a/ide/VisualC2008/fltk.lib.vcproj
+++ b/ide/VisualC2008/fltk.lib.vcproj
@@ -367,7 +367,11 @@
RelativePath="..\..\FL\Fl_Color_Chooser.H"
>
</File>
- <File
+ <File
+ RelativePath="..\..\FL\Fl_Copy_Surface.H"
+ >
+ </File>
+ <File
RelativePath="..\..\FL\Fl_Counter.H"
>
</File>
@@ -476,6 +480,10 @@
>
</File>
<File
+ RelativePath="..\..\FL\Fl_Image_Surface.H"
+ >
+ </File>
+ <File
RelativePath="..\..\FL\Fl_Input.H"
>
</File>
@@ -2222,7 +2230,53 @@
/>
</FileConfiguration>
</File>
- <File
+ <File
+ RelativePath="..\..\src\Fl_Copy_Surface.cxx"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Counter.cxx"
>
<FileConfiguration
@@ -3289,6 +3343,10 @@
>
</File>
<File
+ RelativePath="..\..\src\fl_gleam.cxx"
+ >
+ </File>
+ <File
RelativePath="..\..\src\Fl_Help_View.cxx"
>
<FileConfiguration
@@ -3381,6 +3439,52 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_Image_Surface.cxx"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Input.cxx"
>
<FileConfiguration
@@ -4493,6 +4597,52 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_PostScript.cxx"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Preferences.cxx"
>
<FileConfiguration
@@ -5190,7 +5340,7 @@
/>
</FileConfiguration>
</File>
- <File
+ <File
RelativePath="..\..\src\Fl_Shared_Image.cxx"
>
<FileConfiguration
@@ -6579,6 +6729,52 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_Window_shape.cxx"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BrowseInformation="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ FavorSizeOrSpeed="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Wizard.cxx"
>
<FileConfiguration
diff --git a/ide/VisualC2008/fltkdll.vcproj b/ide/VisualC2008/fltkdll.vcproj
index 0ea446c..334aef8 100644
--- a/ide/VisualC2008/fltkdll.vcproj
+++ b/ide/VisualC2008/fltkdll.vcproj
@@ -1740,6 +1740,48 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_Copy_Surface.cxx"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Counter.cxx"
>
<FileConfiguration
@@ -2928,6 +2970,10 @@
>
</File>
<File
+ RelativePath="..\..\src\fl_gleam.cxx"
+ >
+ </File>
+ <File
RelativePath="..\..\src\Fl_Help_Dialog.cxx"
>
<FileConfiguration
@@ -3054,6 +3100,48 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_Image_Surface.cxx"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\fl_images_core.cxx"
>
<FileConfiguration
@@ -4238,6 +4326,48 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_PostScript.cxx"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Preferences.cxx"
>
<FileConfiguration
@@ -6144,6 +6274,48 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\src\Fl_Window_shape.cxx"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Cairo|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN;$(NoInherit)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\src\Fl_Wizard.cxx"
>
<FileConfiguration
diff --git a/ide/VisualC2010/fltk.lib.vcxproj b/ide/VisualC2010/fltk.lib.vcxproj
index 47cee9e..e30058b 100644
--- a/ide/VisualC2010/fltk.lib.vcxproj
+++ b/ide/VisualC2010/fltk.lib.vcxproj
@@ -184,6 +184,7 @@
<ClInclude Include="..\..\FL\Fl_Choice.H" />
<ClInclude Include="..\..\FL\Fl_Clock.H" />
<ClInclude Include="..\..\FL\Fl_Color_Chooser.H" />
+ <ClInclude Include="..\..\FL\Fl_Copy_Surface.H" />
<ClInclude Include="..\..\FL\Fl_Counter.H" />
<ClInclude Include="..\..\FL\Fl_Device.H" />
<ClInclude Include="..\..\FL\Fl_Dial.H" />
@@ -211,6 +212,7 @@
<ClInclude Include="..\..\FL\Fl_Hor_Slider.H" />
<ClInclude Include="..\..\FL\Fl_Hor_Value_Slider.H" />
<ClInclude Include="..\..\FL\Fl_Image.H" />
+ <ClInclude Include="..\..\FL\Fl_Image_Surface.H" />
<ClInclude Include="..\..\FL\Fl_Input.H" />
<ClInclude Include="..\..\FL\Fl_Input_.H" />
<ClInclude Include="..\..\FL\Fl_Input_Choice.H" />
@@ -789,6 +791,22 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_Copy_Surface.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">true</BrowseInformation>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\Fl_Counter.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1159,6 +1177,7 @@
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\src\fl_gtk.cxx" />
+ <ClCompile Include="..\..\src\fl_gleam.cxx" />
<ClCompile Include="..\..\src\Fl_Help_View.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1191,6 +1210,22 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_Image_Surface.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">true</BrowseInformation>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\Fl_Input.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1577,6 +1612,22 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_PostScript.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">true</BrowseInformation>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\Fl_Preferences.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1819,7 +1870,7 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <ClCompile Include="..\..\src\Fl_Shared_Image.cxx">
+ <ClCompile Include="..\..\src\Fl_Shared_Image.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -2301,7 +2352,23 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <ClCompile Include="..\..\src\Fl_Wizard.cxx">
+ <ClCompile Include="..\..\src\Fl_Window_shape.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">true</BrowseInformation>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Neither</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\src\Fl_Wizard.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -2452,4 +2519,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/ide/VisualC2010/fltk.lib.vcxproj.filters b/ide/VisualC2010/fltk.lib.vcxproj.filters
index 0a03fcb..1259c87 100644
--- a/ide/VisualC2010/fltk.lib.vcxproj.filters
+++ b/ide/VisualC2010/fltk.lib.vcxproj.filters
@@ -52,6 +52,9 @@
<ClInclude Include="..\..\FL\Fl_Color_Chooser.H">
<Filter>Headers</Filter>
</ClInclude>
+ <ClInclude Include="..\..\FL\Fl_Copy_Surface.H">
+ <Filter>Headers</Filter>
+ </ClInclude>
<ClInclude Include="..\..\FL\Fl_Counter.H">
<Filter>Headers</Filter>
</ClInclude>
@@ -133,6 +136,9 @@
<ClInclude Include="..\..\FL\Fl_Image.H">
<Filter>Headers</Filter>
</ClInclude>
+ <ClInclude Include="..\..\FL\Fl_Image_Surface.H">
+ <Filter>Headers</Filter>
+ </ClInclude>
<ClInclude Include="..\..\FL\Fl_Input.H">
<Filter>Headers</Filter>
</ClInclude>
@@ -402,6 +408,7 @@
<ClCompile Include="..\..\src\fl_color.cxx" />
<ClCompile Include="..\..\src\Fl_Color_Chooser.cxx" />
<ClCompile Include="..\..\src\Fl_compose.cxx" />
+ <ClCompile Include="..\..\src\Fl_Copy_Surface.cxx" />
<ClCompile Include="..\..\src\Fl_Counter.cxx" />
<ClCompile Include="..\..\src\fl_cursor.cxx" />
<ClCompile Include="..\..\src\fl_curve.cxx" />
@@ -427,8 +434,10 @@
<ClCompile Include="..\..\src\Fl_grab.cxx" />
<ClCompile Include="..\..\src\Fl_Group.cxx" />
<ClCompile Include="..\..\src\fl_gtk.cxx" />
+ <ClCompile Include="..\..\src\fl_gleam.cxx" />
<ClCompile Include="..\..\src\Fl_Help_View.cxx" />
<ClCompile Include="..\..\src\Fl_Image.cxx" />
+ <ClCompile Include="..\..\src\Fl_Image_Surface.cxx" />
<ClCompile Include="..\..\src\Fl_Input.cxx" />
<ClCompile Include="..\..\src\Fl_Input_.cxx" />
<ClCompile Include="..\..\src\fl_labeltype.cxx" />
@@ -455,6 +464,7 @@
<ClCompile Include="..\..\src\Fl_Pixmap.cxx" />
<ClCompile Include="..\..\src\fl_plastic.cxx" />
<ClCompile Include="..\..\src\Fl_Positioner.cxx" />
+ <ClCompile Include="..\..\src\Fl_PostScript.cxx" />
<ClCompile Include="..\..\src\Fl_Preferences.cxx" />
<ClCompile Include="..\..\src\Fl_Printer.cxx" />
<ClCompile Include="..\..\src\Fl_Progress.cxx" />
@@ -504,6 +514,7 @@
<ClCompile Include="..\..\src\Fl_Window_fullscreen.cxx" />
<ClCompile Include="..\..\src\Fl_Window_hotspot.cxx" />
<ClCompile Include="..\..\src\Fl_Window_iconize.cxx" />
+ <ClCompile Include="..\..\src\Fl_Window_shape.cxx" />
<ClCompile Include="..\..\src\Fl_Wizard.cxx" />
<ClCompile Include="..\..\src\Fl_x.cxx" />
<ClCompile Include="..\..\src\Fl_XBM_Image.cxx" />
@@ -517,4 +528,4 @@
<ClCompile Include="..\..\src\screen_xywh.cxx" />
<ClCompile Include="..\..\src\vsnprintf.c" />
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/ide/VisualC2010/fltkdll.vcxproj b/ide/VisualC2010/fltkdll.vcxproj
index a3f8f64..bdc27fd 100644
--- a/ide/VisualC2010/fltkdll.vcxproj
+++ b/ide/VisualC2010/fltkdll.vcxproj
@@ -632,7 +632,19 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
</ClCompile>
- <ClCompile Include="..\..\src\Fl_Counter.cxx">
+ <ClCompile Include="..\..\src\Fl_Copy_Surface.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\src\Fl_Counter.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
@@ -971,6 +983,7 @@
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\src\fl_gtk.cxx" />
+ <ClCompile Include="..\..\src\fl_gleam.cxx" />
<ClCompile Include="..\..\src\Fl_Help_Dialog.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1007,6 +1020,18 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_Image_Surface.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\fl_images_core.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1345,6 +1370,18 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_PostScript.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\Fl_Preferences.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -1889,6 +1926,18 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
</ClCompile>
+ <ClCompile Include="..\..\src\Fl_Window_shape.cxx">
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;_DEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Cairo|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_CRT_SECURE_NO_DEPRECATE;FL_DLL;FL_LIBRARY;WIN32;NDEBUG;_WINDOWS;WIN32_LEAN_AND_MEAN;VC_EXTRA_LEAN;WIN32_EXTRA_LEAN</PreprocessorDefinitions>
+ </ClCompile>
<ClCompile Include="..\..\src\Fl_Wizard.cxx">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">Disabled</Optimization>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Cairo|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -2146,4 +2195,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/ide/VisualC6/fltk.dsp b/ide/VisualC6/fltk.dsp
index 6f89ace..5b29aca 100644
--- a/ide/VisualC6/fltk.dsp
+++ b/ide/VisualC6/fltk.dsp
@@ -211,6 +211,10 @@ SOURCE=..\..\src\Fl_Color_Chooser.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Copy_Surface.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_compose.cxx
# End Source File
# Begin Source File
@@ -323,6 +327,10 @@ SOURCE=..\..\src\fl_gtk.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\fl_gleam.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Help_View.cxx
# End Source File
# Begin Source File
@@ -331,6 +339,10 @@ SOURCE=..\..\src\Fl_Image.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Image_Surface.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Input.cxx
# End Source File
# Begin Source File
@@ -435,6 +447,10 @@ SOURCE=..\..\src\Fl_Positioner.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_PostScript.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Preferences.cxx
# End Source File
# Begin Source File
@@ -527,10 +543,6 @@ SOURCE=..\..\src\fl_symbols.cxx
# End Source File
# Begin Source File
-SOURCE=..\..\src\Fl_Sys_Menu_Bar.cxx
-# End Source File
-# Begin Source File
-
SOURCE=..\..\src\Fl_Table.cxx
# End Source File
# Begin Source File
@@ -635,6 +647,10 @@ SOURCE=..\..\src\Fl_Window_iconize.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Window_shape.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Wizard.cxx
# End Source File
# Begin Source File
diff --git a/ide/VisualC6/fltk.dsw b/ide/VisualC6/fltk.dsw
index 592425d..29105f9 100644
--- a/ide/VisualC6/fltk.dsw
+++ b/ide/VisualC6/fltk.dsw
@@ -728,6 +728,12 @@ Package=<4>
Begin Project Dependency
Project_Dep_Name fltk
End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name fltk_png
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name fltk_jpeg
+ End Project Dependency
}}}
###############################################################################
diff --git a/ide/VisualC6/fltkdll.dsp b/ide/VisualC6/fltkdll.dsp
index 5d9773b..d09f93c 100644
--- a/ide/VisualC6/fltkdll.dsp
+++ b/ide/VisualC6/fltkdll.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /Os /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "FL_DLL" /D "FL_LIBRARY" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /c
+# ADD CPP /nologo /MD /GX /Os /Ob2 /I "." /I "..\.." /I "..\..\zlib" /I "..\..\png" /I "..\..\jpeg" /D "FL_DLL" /D "FL_LIBRARY" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32_LEAN_AND_MEAN" /D "VC_EXTRA_LEAN" /D "WIN32_EXTRA_LEAN" /YX /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -233,6 +233,10 @@ SOURCE=..\..\src\Fl_compose.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Copy_Surface.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Counter.cxx
# End Source File
# Begin Source File
@@ -341,6 +345,10 @@ SOURCE=..\..\src\fl_gtk.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\fl_gleam.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Help_View.cxx
# End Source File
# Begin Source File
@@ -349,6 +357,10 @@ SOURCE=..\..\src\Fl_Image.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Image_Surface.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Input.cxx
# End Source File
# Begin Source File
@@ -453,6 +465,10 @@ SOURCE=..\..\src\Fl_Positioner.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_PostScript.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Preferences.cxx
# End Source File
# Begin Source File
@@ -545,10 +561,6 @@ SOURCE=..\..\src\fl_symbols.cxx
# End Source File
# Begin Source File
-SOURCE=..\..\src\Fl_Sys_Menu_Bar.cxx
-# End Source File
-# Begin Source File
-
SOURCE=..\..\src\Fl_Table.cxx
# End Source File
# Begin Source File
@@ -653,6 +665,10 @@ SOURCE=..\..\src\Fl_Window_iconize.cxx
# End Source File
# Begin Source File
+SOURCE=..\..\src\Fl_Window_shape.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\..\src\Fl_Wizard.cxx
# End Source File
# Begin Source File
diff --git a/ide/Xcode3/FLTK.xcodeproj/project.pbxproj b/ide/Xcode3/FLTK.xcodeproj/project.pbxproj
index dfa1d4b..abf2922 100644
--- a/ide/Xcode3/FLTK.xcodeproj/project.pbxproj
+++ b/ide/Xcode3/FLTK.xcodeproj/project.pbxproj
@@ -134,7 +134,6 @@
319E158B9FA80488D676A040 /* fltk_jpeg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C39FA04F3B7CD8E53876D0F4 /* fltk_jpeg.framework */; };
31F6473A9B5FD4FFB078BA78 /* fltk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FEB0F8FE6383384180570D94 /* fltk.framework */; };
3222D7D927BF1220D08F1DF8 /* fltk.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FEB0F8FE6383384180570D94 /* fltk.framework */; };
- 32824BE9A80F72339A5B441F /* Fl_Sys_Menu_Bar.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */; };
33175A3FB04A133479A558BA /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 11A4DF1725F38E4341C5C663 /* pngwrite.c */; };
339D0DFC256DE06A10F214B3 /* Fl_Wizard.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 9951B49F640C2C15321EED9C /* Fl_Wizard.cxx */; };
33FCC793A92F544711E09A1E /* fltk_png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98A16A4EC098BA7DB21E13DC /* fltk_png.framework */; };
@@ -328,6 +327,12 @@
7F66B1D912BB924C00C67B59 /* Fl_cocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */; };
7F66B1DA12BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */; };
7F66B1DB12BB924C00C67B59 /* Fl_Quartz_Printer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */; };
+ 7F6F526219CF0F530075F408 /* Fl_Window_shape.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7F6F526119CF0F530075F408 /* Fl_Window_shape.cxx */; };
+ 7F74F393190D7F0500C56950 /* fl_gleam.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 299E717718BC503400FF83F2 /* fl_gleam.cxx */; };
+ 7F76E016192FAD420071728B /* Fl_Copy_Surface.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7F76E015192FAD420071728B /* Fl_Copy_Surface.cxx */; };
+ 7F76E018192FAD590071728B /* Fl_Image_Surface.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7F76E017192FAD590071728B /* Fl_Image_Surface.cxx */; };
+ 7FFDD15A19BE072000779AD1 /* Fl_PostScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7FFDD15919BE072000779AD1 /* Fl_PostScript.cxx */; };
+ 7FFDE4AD171D8AA3008753A3 /* Fl_Sys_Menu_Bar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7FFDE4AC171D8AA3008753A3 /* Fl_Sys_Menu_Bar.mm */; };
812129561A1981D6DEFBCBFB /* Fl_Positioner.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 05BBBFE4BED0452E5D6A81F7 /* Fl_Positioner.cxx */; };
812761E94039F13357F56EE6 /* fltk_png.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98A16A4EC098BA7DB21E13DC /* fltk_png.framework */; };
813BAC8244B19F51594C89C4 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = D33C668435685F7CCB359EE2 /* pngrio.c */; };
@@ -627,7 +632,6 @@
C9EDD4B01274B93000ADB21C /* Fl_Wizard.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = A57A8421086F1F0F9906B692 /* Fl_Wizard.H */; };
C9EDD4B11274B93000ADB21C /* Fl_XBM_Image.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = D2DE1079C826533A91053A9C /* Fl_XBM_Image.H */; };
C9EDD4B21274B93000ADB21C /* Fl_XPM_Image.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1433F1B8C4085D5D5E1BA0E1 /* Fl_XPM_Image.H */; };
- C9EDD4B31274B93000ADB21C /* Xutf8.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 91A43F37963443EA5E91BF1F /* Xutf8.h */; };
C9EDD4B41274B93000ADB21C /* dirent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E448719A354B3D80FD2E1992 /* dirent.h */; };
C9EDD4B51274B93000ADB21C /* filename.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF65626F49A71525D24ED1B0 /* filename.H */; };
C9EDD4B61274B93000ADB21C /* fl_ask.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = 87259ACF8723616344D9AEB2 /* fl_ask.H */; };
@@ -3818,7 +3822,6 @@
C9EDD4B01274B93000ADB21C /* Fl_Wizard.H in CopyFiles */,
C9EDD4B11274B93000ADB21C /* Fl_XBM_Image.H in CopyFiles */,
C9EDD4B21274B93000ADB21C /* Fl_XPM_Image.H in CopyFiles */,
- C9EDD4B31274B93000ADB21C /* Xutf8.h in CopyFiles */,
C9EDD4B41274B93000ADB21C /* dirent.h in CopyFiles */,
C9EDD4B51274B93000ADB21C /* filename.H in CopyFiles */,
C9EDD4B61274B93000ADB21C /* fl_ask.H in CopyFiles */,
@@ -4145,6 +4148,7 @@
28AFF174A53E38CCB7475C19 /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdmaster.c; path = ../../jpeg/jdmaster.c; sourceTree = SOURCE_ROOT; };
28E8F2802DEA5334F914BE98 /* Fl_grab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_grab.cxx; path = ../../src/Fl_grab.cxx; sourceTree = SOURCE_ROOT; };
28F3E4EBB6E5F8420624A5DA /* Fl_Scrollbar.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Scrollbar.H; path = ../../FL/Fl_Scrollbar.H; sourceTree = SOURCE_ROOT; };
+ 299E717718BC503400FF83F2 /* fl_gleam.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fl_gleam.cxx; path = ../../src/fl_gleam.cxx; sourceTree = SOURCE_ROOT; };
29E61287C1F4A1123829C900 /* glut_font.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = glut_font.cxx; path = ../../src/glut_font.cxx; sourceTree = SOURCE_ROOT; };
2A3CEBA07E8AE9BF4C002531 /* CubeMain.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CubeMain.cxx; path = ../../test/CubeMain.cxx; sourceTree = SOURCE_ROOT; };
2A5CB08352A0DBD0980FC770 /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = ../../png/pngpread.c; sourceTree = SOURCE_ROOT; };
@@ -4155,7 +4159,6 @@
2DD93178E8AFA850DAC293FC /* fl_dnd.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fl_dnd.cxx; path = ../../src/fl_dnd.cxx; sourceTree = SOURCE_ROOT; };
2DE25DB4CE986C1857B5ECF7 /* Fl_Native_File_Chooser.cxx */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; name = Fl_Native_File_Chooser.cxx; path = ../../src/Fl_Native_File_Chooser.cxx; sourceTree = SOURCE_ROOT; };
2E774D7FE17DC45AFDF985FE /* message.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = message.cxx; path = ../../test/message.cxx; sourceTree = SOURCE_ROOT; };
- 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Sys_Menu_Bar.cxx; path = ../../src/Fl_Sys_Menu_Bar.cxx; sourceTree = SOURCE_ROOT; };
31D736821E68F01A1A11FC9F /* Fl_Help_View.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Help_View.H; path = ../../FL/Fl_Help_View.H; sourceTree = SOURCE_ROOT; };
31FF037FBCA8B6C0CACB0A37 /* list_visuals.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = list_visuals.cxx; path = ../../test/list_visuals.cxx; sourceTree = SOURCE_ROOT; };
323779B8DE42371A98337337 /* CubeView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CubeView.cxx; path = ../../test/CubeView.cxx; sourceTree = SOURCE_ROOT; };
@@ -4335,9 +4338,16 @@
7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_cocoa.mm; path = ../../src/Fl_cocoa.mm; sourceTree = SOURCE_ROOT; };
7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Native_File_Chooser_MAC.mm; path = ../../src/Fl_Native_File_Chooser_MAC.mm; sourceTree = SOURCE_ROOT; };
7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Quartz_Printer.mm; path = ../../src/Fl_Quartz_Printer.mm; sourceTree = SOURCE_ROOT; };
+ 7F6F526119CF0F530075F408 /* Fl_Window_shape.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Window_shape.cxx; path = ../../src/Fl_Window_shape.cxx; sourceTree = "<group>"; };
+ 7F76E015192FAD420071728B /* Fl_Copy_Surface.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Copy_Surface.cxx; path = ../../src/Fl_Copy_Surface.cxx; sourceTree = SOURCE_ROOT; };
+ 7F76E017192FAD590071728B /* Fl_Image_Surface.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Image_Surface.cxx; path = ../../src/Fl_Image_Surface.cxx; sourceTree = SOURCE_ROOT; };
+ 7F76E019192FAD740071728B /* Fl_Copy_Surface.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Copy_Surface.H; path = ../../FL/Fl_Copy_Surface.H; sourceTree = SOURCE_ROOT; };
+ 7F76E01A192FAD840071728B /* Fl_Image_Surface.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Image_Surface.H; path = ../../FL/Fl_Image_Surface.H; sourceTree = SOURCE_ROOT; };
7F784151AF1B748D0F3DB1C0 /* forms.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = forms.cxx; path = ../../test/forms.cxx; sourceTree = SOURCE_ROOT; };
7FAC914955D699539F73B996 /* bitmap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cxx; path = ../../test/bitmap.cxx; sourceTree = SOURCE_ROOT; };
7FC91721DA7888C8A1FD762E /* input_choice.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = input_choice.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7FFDD15919BE072000779AD1 /* Fl_PostScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_PostScript.cxx; path = ../../src/Fl_PostScript.cxx; sourceTree = "<group>"; };
+ 7FFDE4AC171D8AA3008753A3 /* Fl_Sys_Menu_Bar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Sys_Menu_Bar.mm; path = ../../src/Fl_Sys_Menu_Bar.mm; sourceTree = SOURCE_ROOT; };
800E34DEF9E503C5EC6C4FA5 /* Fl_XBM_Image.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_XBM_Image.cxx; path = ../../src/Fl_XBM_Image.cxx; sourceTree = SOURCE_ROOT; };
806103D71A8CD0075BF8E1DA /* Fl_Group.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Group.cxx; path = ../../src/Fl_Group.cxx; sourceTree = SOURCE_ROOT; };
80CD4956321634F723D3C40B /* fluid.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = fluid.icns; path = icons/fluid.icns; sourceTree = "<group>"; };
@@ -4377,7 +4387,6 @@
90D9C06A2DCECD5B99C4A90A /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../../jpeg/jdatadst.c; sourceTree = SOURCE_ROOT; };
91173358E60D137409651286 /* Fl_Preferences.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Preferences.H; path = ../../FL/Fl_Preferences.H; sourceTree = SOURCE_ROOT; };
91726A70C25E6155A2FAF315 /* undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = undo.h; path = ../../fluid/undo.h; sourceTree = SOURCE_ROOT; };
- 91A43F37963443EA5E91BF1F /* Xutf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Xutf8.h; path = ../../FL/Xutf8.h; sourceTree = SOURCE_ROOT; };
91E088F22E63779E9E9FA651 /* alignment_panel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = alignment_panel.cxx; path = ../../fluid/alignment_panel.cxx; sourceTree = SOURCE_ROOT; };
922182C23B114BA60D9CF160 /* native-filechooser.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "native-filechooser.cxx"; path = "../../test/native-filechooser.cxx"; sourceTree = SOURCE_ROOT; };
9305831B5D584A1C9652C308 /* scroll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = scroll.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -5440,6 +5449,7 @@
7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */,
7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */,
7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */,
+ 7FFDE4AC171D8AA3008753A3 /* Fl_Sys_Menu_Bar.mm */,
F4EFF27D730BED51EF0EAA8D /* Fl.cxx */,
19C5DB6F3DD5011DAE6F79AB /* Fl_Adjuster.cxx */,
3F000DD5F091F66BC42822E3 /* Fl_Bitmap.cxx */,
@@ -5454,6 +5464,7 @@
4D55C9FE101986BC47029A16 /* Fl_Choice.cxx */,
F5CAE7DC565B8398F02ED7BA /* Fl_Clock.cxx */,
058BCBC36ADE724A418F1C43 /* Fl_Color_Chooser.cxx */,
+ 7F76E015192FAD420071728B /* Fl_Copy_Surface.cxx */,
E9893274B0B6C5F24730235F /* Fl_Counter.cxx */,
D9A7DCBAFF41CBC3DCB67C6F /* Fl_Device.cxx */,
3AFC31503AB99F6D00BAC647 /* Fl_Dial.cxx */,
@@ -5466,6 +5477,7 @@
806103D71A8CD0075BF8E1DA /* Fl_Group.cxx */,
790419B5A0AD64D66F9B19E1 /* Fl_Help_View.cxx */,
6DCFF326B588B1B27618F28C /* Fl_Image.cxx */,
+ 7F76E017192FAD590071728B /* Fl_Image_Surface.cxx */,
63CB19652C470F1E58DCF01E /* Fl_Input.cxx */,
D531F77A15AACC9E297B4490 /* Fl_Input_.cxx */,
BA7B1E9C7AA7316E98D369C2 /* Fl_Light_Button.cxx */,
@@ -5483,6 +5495,7 @@
6C1C9A4F054C48CDD6A2DE44 /* Fl_Paged_Device.cxx */,
D79D3910F834D4B78FED92F3 /* Fl_Pixmap.cxx */,
05BBBFE4BED0452E5D6A81F7 /* Fl_Positioner.cxx */,
+ 7FFDD15919BE072000779AD1 /* Fl_PostScript.cxx */,
B4CAFA162560925C4591997A /* Fl_Printer.cxx */,
3789CACF6C845E9C0DE0C58F /* Fl_Preferences.cxx */,
570D0C7510FE3A3FB7A1BD5D /* Fl_Progress.cxx */,
@@ -5495,7 +5508,6 @@
57639C1D5415FB55436556A2 /* Fl_Shared_Image.cxx */,
9D942824B8FC886F6FCD853D /* Fl_Single_Window.cxx */,
5AF5119D08DFC92EA1032671 /* Fl_Slider.cxx */,
- 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */,
116F849BE68830F05CA66B9A /* Fl_Table.cxx */,
351BFCA4747AF494F84FFE36 /* Fl_Table_Row.cxx */,
D5F75B6C9483B2BB47965789 /* Fl_Tabs.cxx */,
@@ -5518,6 +5530,7 @@
F42EEFA08A75F71B33094D50 /* Fl_Window_fullscreen.cxx */,
CC2482EC04B752BF38D4DBE2 /* Fl_Window_hotspot.cxx */,
9E22773911BDBADEA86730D4 /* Fl_Window_iconize.cxx */,
+ 7F6F526119CF0F530075F408 /* Fl_Window_shape.cxx */,
9951B49F640C2C15321EED9C /* Fl_Wizard.cxx */,
800E34DEF9E503C5EC6C4FA5 /* Fl_XBM_Image.cxx */,
0CBC6DC7942212D47B70681B /* Fl_XPM_Image.cxx */,
@@ -5560,6 +5573,7 @@
FA2F70BA8FF4E7F4B7B36971 /* fl_file_dir.cxx */,
9E8F7BCC0292044D887D423B /* fl_font.cxx */,
7A2CE7959780A1C6E60103E8 /* fl_gtk.cxx */,
+ 299E717718BC503400FF83F2 /* fl_gleam.cxx */,
EF6D2F48B12359DE60E499C2 /* fl_labeltype.cxx */,
0B5987E1A293E67A6290612A /* fl_line_style.cxx */,
FAD24127A06F3F9F0EEB843A /* fl_open_uri.cxx */,
@@ -6213,6 +6227,7 @@
C8AE10A8DDF53B8B27E3215A /* Fl_Choice.H */,
9BCF393F94482AE7C7421397 /* Fl_Clock.H */,
2CD1EF8B4BFD0820E9A42641 /* Fl_Color_Chooser.H */,
+ 7F76E019192FAD740071728B /* Fl_Copy_Surface.H */,
CE97D58B5B0F1A2A7DB2A3FF /* Fl_Counter.H */,
82863AEFE086C3469C386C22 /* Fl_Device.H */,
02C21BB31E7DDFE9E76F4997 /* Fl_Dial.H */,
@@ -6235,6 +6250,7 @@
AE1717E43F50EBA343960B1E /* Fl_Hor_Slider.H */,
5B8BFBDF9C48A998F0781C9E /* Fl_Hor_Value_Slider.H */,
332598626430923370C48554 /* Fl_Image.H */,
+ 7F76E01A192FAD840071728B /* Fl_Image_Surface.H */,
EFEEE679374D7E4191873447 /* Fl_Input.H */,
A5166C3C9311628F6E450095 /* Fl_Input_.H */,
648E9C3B61328280244FCCA5 /* Fl_Input_Choice.H */,
@@ -6309,7 +6325,6 @@
A57A8421086F1F0F9906B692 /* Fl_Wizard.H */,
D2DE1079C826533A91053A9C /* Fl_XBM_Image.H */,
1433F1B8C4085D5D5E1BA0E1 /* Fl_XPM_Image.H */,
- 91A43F37963443EA5E91BF1F /* Xutf8.h */,
E448719A354B3D80FD2E1992 /* dirent.h */,
AF65626F49A71525D24ED1B0 /* filename.H */,
87259ACF8723616344D9AEB2 /* fl_ask.H */,
@@ -8456,6 +8471,8 @@
/* Begin PBXProject section */
4BF1A7FFEACF5F31B4127482 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };
buildConfigurationList = 615453DB5B8EBEE070930DA7 /* Build configuration list for PBXProject "FLTK" */;
compatibilityVersion = "Xcode 3.0";
developmentRegion = English;
@@ -9357,6 +9374,7 @@
7F66B1D912BB924C00C67B59 /* Fl_cocoa.mm in Sources */,
7F66B1DA12BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm in Sources */,
7F66B1DB12BB924C00C67B59 /* Fl_Quartz_Printer.mm in Sources */,
+ 7FFDE4AD171D8AA3008753A3 /* Fl_Sys_Menu_Bar.mm in Sources */,
ED83B85BA678C8C9B5E91535 /* Fl.cxx in Sources */,
B371C5FF1106E69056784D6C /* Fl_Adjuster.cxx in Sources */,
274F92CF30A586E0F8E21530 /* Fl_Bitmap.cxx in Sources */,
@@ -9383,6 +9401,7 @@
302D959F1FBBC3D44D27BA3F /* Fl_Group.cxx in Sources */,
74D195DEE3A33FA0C8C7A5BE /* Fl_Help_View.cxx in Sources */,
6F8B4EC22CC54B6B06F9D5C7 /* Fl_Image.cxx in Sources */,
+ 7FFDD15A19BE072000779AD1 /* Fl_PostScript.cxx in Sources */,
0BD1B4FF53C27EDA7B9F2C66 /* Fl_Input.cxx in Sources */,
2CFBED9BA0BE01679B285434 /* Fl_Input_.cxx in Sources */,
5D1D08BF3F79DC7C29D6FCF4 /* Fl_Light_Button.cxx in Sources */,
@@ -9411,10 +9430,10 @@
2C4DB237B4B8ACD2FB305BD5 /* Fl_Shared_Image.cxx in Sources */,
ED169E1E1FC93C1F97D21AC4 /* Fl_Single_Window.cxx in Sources */,
29A99477531233BE9391CE66 /* Fl_Slider.cxx in Sources */,
- 32824BE9A80F72339A5B441F /* Fl_Sys_Menu_Bar.cxx in Sources */,
DB29DA4D89702B490E69B569 /* Fl_Table.cxx in Sources */,
644FEEF43A0CCBD89E2CE6FC /* Fl_Table_Row.cxx in Sources */,
CDCB453B3493D8E96E80DFF7 /* Fl_Tabs.cxx in Sources */,
+ 7F6F526219CF0F530075F408 /* Fl_Window_shape.cxx in Sources */,
FB93EB94C997FC6F8C5D389D /* Fl_Text_Buffer.cxx in Sources */,
4536387C357FBA58B3C5258B /* Fl_Text_Display.cxx in Sources */,
8F77031B8CCFF315D4CB151E /* Fl_Text_Editor.cxx in Sources */,
@@ -9507,6 +9526,9 @@
CE14EC6653D4EF4779992758 /* is_right2left.c in Sources */,
9DD7A2B6D63D30C07781F446 /* is_spacing.c in Sources */,
299CB8A2848CB844BCEC7829 /* Fl_Paged_Device.cxx in Sources */,
+ 7F74F393190D7F0500C56950 /* fl_gleam.cxx in Sources */,
+ 7F76E016192FAD420071728B /* Fl_Copy_Surface.cxx in Sources */,
+ 7F76E018192FAD590071728B /* Fl_Image_Surface.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -13063,8 +13085,7 @@
793DEFB743639835433A664B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
- ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_SSE41_EXTENSIONS = NO;
GCC_ENABLE_SSE42_EXTENSIONS = YES;
@@ -13074,7 +13095,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ SDKROOT = macosx;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
@@ -14160,14 +14181,14 @@
AC3226B9FE17327A0476ACA0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)";
+ ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ SDKROOT = macosx;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
diff --git a/ide/Xcode4/FLTK.xcodeproj/project.pbxproj b/ide/Xcode4/FLTK.xcodeproj/project.pbxproj
index 705da6b..516af4c 100644
--- a/ide/Xcode4/FLTK.xcodeproj/project.pbxproj
+++ b/ide/Xcode4/FLTK.xcodeproj/project.pbxproj
@@ -133,7 +133,6 @@
319E158B9FA80488D676A040 /* fltk_jpeg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C39FA04F3B7CD8E53876D0F4 /* fltk_jpeg.framework */; };
31F6473A9B5FD4FFB078BA78 /* fltk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FEB0F8FE6383384180570D94 /* fltk.framework */; };
3222D7D927BF1220D08F1DF8 /* fltk.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FEB0F8FE6383384180570D94 /* fltk.framework */; };
- 32824BE9A80F72339A5B441F /* Fl_Sys_Menu_Bar.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */; };
33175A3FB04A133479A558BA /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 11A4DF1725F38E4341C5C663 /* pngwrite.c */; };
339D0DFC256DE06A10F214B3 /* Fl_Wizard.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 9951B49F640C2C15321EED9C /* Fl_Wizard.cxx */; };
33FCC793A92F544711E09A1E /* fltk_png.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 98A16A4EC098BA7DB21E13DC /* fltk_png.framework */; };
@@ -318,6 +317,7 @@
7E8E2DC7A53A62D0F1EB860E /* fltk.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = FEB0F8FE6383384180570D94 /* fltk.framework */; };
7EA88708B9A088FCEB7CAA27 /* file_chooser.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 39CD231E22E0B53E92CABDC9 /* file_chooser.cxx */; };
7EC3AD9A56535A54430B8DCD /* Fl_Browser_.cxx in Sources */ = {isa = PBXBuildFile; fileRef = AAD25B747F4122A2C5224708 /* Fl_Browser_.cxx */; };
+ 7F12FCC718E1EEB900AB6A11 /* fl_gleam.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7F12FCC618E1EEB900AB6A11 /* fl_gleam.cxx */; };
7F4762EE12D22C470073A4F9 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F4762ED12D22C470073A4F9 /* ApplicationServices.framework */; };
7F54C8A8130FAC4F00E736F3 /* gzclose.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F54C8A3130FAC4F00E736F3 /* gzclose.c */; };
7F54C8A9130FAC4F00E736F3 /* gzlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 7F54C8A4130FAC4F00E736F3 /* gzlib.c */; };
@@ -327,6 +327,16 @@
7F66B1D912BB924C00C67B59 /* Fl_cocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */; };
7F66B1DA12BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */; };
7F66B1DB12BB924C00C67B59 /* Fl_Quartz_Printer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */; };
+ 7F6F526419CF0FED0075F408 /* Fl_Window_shape.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7F6F526319CF0FED0075F408 /* Fl_Window_shape.cxx */; };
+ 7FA5C2BE192FAEBB00519823 /* Fl_Copy_Surface.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7FA5C2BD192FAEBB00519823 /* Fl_Copy_Surface.cxx */; };
+ 7FA5C2C0192FAECA00519823 /* Fl_Image_Surface.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7FA5C2BF192FAECA00519823 /* Fl_Image_Surface.cxx */; };
+ 7FDBB8F416B2D1EA00AE76EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F92032516B1A90A000FC50F /* Localizable.strings */; };
+ 7FDBB8F516B2D1EE00AE76EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F92032216B1A909000FC50F /* Localizable.strings */; };
+ 7FDBB8F616B2D1FA00AE76EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F92031F16B1A909000FC50F /* Localizable.strings */; };
+ 7FDBB8F716B2D1FF00AE76EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F92031C16B1A909000FC50F /* Localizable.strings */; };
+ 7FDBB8F816B2D20A00AE76EF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F92031916B1A909000FC50F /* Localizable.strings */; };
+ 7FFDD15C19BE08A800779AD1 /* Fl_PostScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 7FFDD15B19BE08A800779AD1 /* Fl_PostScript.cxx */; };
+ 7FFDE552171D8D0D008753A3 /* Fl_Sys_Menu_Bar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7FFDE551171D8D0D008753A3 /* Fl_Sys_Menu_Bar.mm */; };
812129561A1981D6DEFBCBFB /* Fl_Positioner.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 05BBBFE4BED0452E5D6A81F7 /* Fl_Positioner.cxx */; };
812761E94039F13357F56EE6 /* fltk_png.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 98A16A4EC098BA7DB21E13DC /* fltk_png.framework */; };
813BAC8244B19F51594C89C4 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = D33C668435685F7CCB359EE2 /* pngrio.c */; };
@@ -612,7 +622,6 @@
C9EDD4B01274B93000ADB21C /* Fl_Wizard.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = A57A8421086F1F0F9906B692 /* Fl_Wizard.H */; };
C9EDD4B11274B93000ADB21C /* Fl_XBM_Image.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = D2DE1079C826533A91053A9C /* Fl_XBM_Image.H */; };
C9EDD4B21274B93000ADB21C /* Fl_XPM_Image.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1433F1B8C4085D5D5E1BA0E1 /* Fl_XPM_Image.H */; };
- C9EDD4B31274B93000ADB21C /* Xutf8.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 91A43F37963443EA5E91BF1F /* Xutf8.h */; };
C9EDD4B41274B93000ADB21C /* dirent.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E448719A354B3D80FD2E1992 /* dirent.h */; };
C9EDD4B51274B93000ADB21C /* filename.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF65626F49A71525D24ED1B0 /* filename.H */; };
C9EDD4B61274B93000ADB21C /* fl_ask.H in CopyFiles */ = {isa = PBXBuildFile; fileRef = 87259ACF8723616344D9AEB2 /* fl_ask.H */; };
@@ -3803,7 +3812,6 @@
C9EDD4B01274B93000ADB21C /* Fl_Wizard.H in CopyFiles */,
C9EDD4B11274B93000ADB21C /* Fl_XBM_Image.H in CopyFiles */,
C9EDD4B21274B93000ADB21C /* Fl_XPM_Image.H in CopyFiles */,
- C9EDD4B31274B93000ADB21C /* Xutf8.h in CopyFiles */,
C9EDD4B41274B93000ADB21C /* dirent.h in CopyFiles */,
C9EDD4B51274B93000ADB21C /* filename.H in CopyFiles */,
C9EDD4B61274B93000ADB21C /* fl_ask.H in CopyFiles */,
@@ -4140,7 +4148,6 @@
2DD93178E8AFA850DAC293FC /* fl_dnd.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fl_dnd.cxx; path = ../../src/fl_dnd.cxx; sourceTree = SOURCE_ROOT; };
2DE25DB4CE986C1857B5ECF7 /* Fl_Native_File_Chooser.cxx */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; name = Fl_Native_File_Chooser.cxx; path = ../../src/Fl_Native_File_Chooser.cxx; sourceTree = SOURCE_ROOT; };
2E774D7FE17DC45AFDF985FE /* message.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = message.cxx; path = ../../test/message.cxx; sourceTree = SOURCE_ROOT; };
- 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Sys_Menu_Bar.cxx; path = ../../src/Fl_Sys_Menu_Bar.cxx; sourceTree = SOURCE_ROOT; };
31D736821E68F01A1A11FC9F /* Fl_Help_View.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Help_View.H; path = ../../FL/Fl_Help_View.H; sourceTree = SOURCE_ROOT; };
31FF037FBCA8B6C0CACB0A37 /* list_visuals.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = list_visuals.cxx; path = ../../test/list_visuals.cxx; sourceTree = SOURCE_ROOT; };
323779B8DE42371A98337337 /* CubeView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CubeView.cxx; path = ../../test/CubeView.cxx; sourceTree = SOURCE_ROOT; };
@@ -4305,6 +4312,7 @@
7DF4AD3769671959EA813845 /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jcparam.c; path = ../../jpeg/jcparam.c; sourceTree = SOURCE_ROOT; };
7E05602BE68211B11E493E18 /* Fl_Menu.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Menu.cxx; path = ../../src/Fl_Menu.cxx; sourceTree = SOURCE_ROOT; };
7E51DAB7D0F93ACFB736EE9A /* Fl_Tree_Prefs.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Tree_Prefs.H; path = ../../FL/Fl_Tree_Prefs.H; sourceTree = SOURCE_ROOT; };
+ 7F12FCC618E1EEB900AB6A11 /* fl_gleam.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fl_gleam.cxx; path = ../../src/fl_gleam.cxx; sourceTree = "<group>"; };
7F2A29041338C6B80033C0A6 /* pnglibconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pnglibconf.h; path = ../../png/pnglibconf.h; sourceTree = SOURCE_ROOT; };
7F2A29051338C6D40033C0A6 /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngpriv.h; path = ../../png/pngpriv.h; sourceTree = SOURCE_ROOT; };
7F2A29071338C7450033C0A6 /* pngstruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngstruct.h; path = ../../png/pngstruct.h; sourceTree = SOURCE_ROOT; };
@@ -4320,9 +4328,21 @@
7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_cocoa.mm; path = ../../src/Fl_cocoa.mm; sourceTree = SOURCE_ROOT; };
7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Native_File_Chooser_MAC.mm; path = ../../src/Fl_Native_File_Chooser_MAC.mm; sourceTree = SOURCE_ROOT; };
7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Quartz_Printer.mm; path = ../../src/Fl_Quartz_Printer.mm; sourceTree = SOURCE_ROOT; };
+ 7F6F526319CF0FED0075F408 /* Fl_Window_shape.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Window_shape.cxx; path = ../../src/Fl_Window_shape.cxx; sourceTree = "<group>"; };
7F784151AF1B748D0F3DB1C0 /* forms.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = forms.cxx; path = ../../test/forms.cxx; sourceTree = SOURCE_ROOT; };
+ 7F92031A16B1A909000FC50F /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = Localizable.strings; sourceTree = "<group>"; };
+ 7F92031D16B1A909000FC50F /* French */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = French; path = Localizable.strings; sourceTree = "<group>"; };
+ 7F92032016B1A909000FC50F /* German */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = German; path = Localizable.strings; sourceTree = "<group>"; };
+ 7F92032316B1A90A000FC50F /* Italian */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Italian; path = Localizable.strings; sourceTree = "<group>"; };
+ 7F92032616B1A90A000FC50F /* Spanish */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = Spanish; path = Localizable.strings; sourceTree = "<group>"; };
+ 7FA5C2BD192FAEBB00519823 /* Fl_Copy_Surface.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Copy_Surface.cxx; path = ../../src/Fl_Copy_Surface.cxx; sourceTree = SOURCE_ROOT; };
+ 7FA5C2BF192FAECA00519823 /* Fl_Image_Surface.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Image_Surface.cxx; path = ../../src/Fl_Image_Surface.cxx; sourceTree = SOURCE_ROOT; };
+ 7FA5C2C1192FAEE300519823 /* Fl_Image_Surface.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Image_Surface.H; path = ../../FL/Fl_Image_Surface.H; sourceTree = SOURCE_ROOT; };
+ 7FA5C2C2192FAEF200519823 /* Fl_Copy_Surface.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Copy_Surface.H; path = ../../FL/Fl_Copy_Surface.H; sourceTree = SOURCE_ROOT; };
7FAC914955D699539F73B996 /* bitmap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cxx; path = ../../test/bitmap.cxx; sourceTree = SOURCE_ROOT; };
7FC91721DA7888C8A1FD762E /* input_choice.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = input_choice.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7FFDD15B19BE08A800779AD1 /* Fl_PostScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_PostScript.cxx; path = ../../src/Fl_PostScript.cxx; sourceTree = "<group>"; };
+ 7FFDE551171D8D0D008753A3 /* Fl_Sys_Menu_Bar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Fl_Sys_Menu_Bar.mm; path = ../../src/Fl_Sys_Menu_Bar.mm; sourceTree = SOURCE_ROOT; };
800E34DEF9E503C5EC6C4FA5 /* Fl_XBM_Image.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_XBM_Image.cxx; path = ../../src/Fl_XBM_Image.cxx; sourceTree = SOURCE_ROOT; };
806103D71A8CD0075BF8E1DA /* Fl_Group.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Fl_Group.cxx; path = ../../src/Fl_Group.cxx; sourceTree = SOURCE_ROOT; };
80CD4956321634F723D3C40B /* fluid.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = fluid.icns; path = icons/fluid.icns; sourceTree = "<group>"; };
@@ -4362,7 +4382,6 @@
90D9C06A2DCECD5B99C4A90A /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jdatadst.c; path = ../../jpeg/jdatadst.c; sourceTree = SOURCE_ROOT; };
91173358E60D137409651286 /* Fl_Preferences.H */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = Fl_Preferences.H; path = ../../FL/Fl_Preferences.H; sourceTree = SOURCE_ROOT; };
91726A70C25E6155A2FAF315 /* undo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = undo.h; path = ../../fluid/undo.h; sourceTree = SOURCE_ROOT; };
- 91A43F37963443EA5E91BF1F /* Xutf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Xutf8.h; path = ../../FL/Xutf8.h; sourceTree = SOURCE_ROOT; };
91E088F22E63779E9E9FA651 /* alignment_panel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = alignment_panel.cxx; path = ../../fluid/alignment_panel.cxx; sourceTree = SOURCE_ROOT; };
922182C23B114BA60D9CF160 /* native-filechooser.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "native-filechooser.cxx"; path = "../../test/native-filechooser.cxx"; sourceTree = SOURCE_ROOT; };
9305831B5D584A1C9652C308 /* scroll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = scroll.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -5424,6 +5443,7 @@
7F66B1D612BB924C00C67B59 /* Fl_cocoa.mm */,
7F66B1D712BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm */,
7F66B1D812BB924C00C67B59 /* Fl_Quartz_Printer.mm */,
+ 7FFDE551171D8D0D008753A3 /* Fl_Sys_Menu_Bar.mm */,
F4EFF27D730BED51EF0EAA8D /* Fl.cxx */,
19C5DB6F3DD5011DAE6F79AB /* Fl_Adjuster.cxx */,
3F000DD5F091F66BC42822E3 /* Fl_Bitmap.cxx */,
@@ -5438,6 +5458,7 @@
4D55C9FE101986BC47029A16 /* Fl_Choice.cxx */,
F5CAE7DC565B8398F02ED7BA /* Fl_Clock.cxx */,
058BCBC36ADE724A418F1C43 /* Fl_Color_Chooser.cxx */,
+ 7FA5C2BD192FAEBB00519823 /* Fl_Copy_Surface.cxx */,
E9893274B0B6C5F24730235F /* Fl_Counter.cxx */,
D9A7DCBAFF41CBC3DCB67C6F /* Fl_Device.cxx */,
3AFC31503AB99F6D00BAC647 /* Fl_Dial.cxx */,
@@ -5450,6 +5471,7 @@
806103D71A8CD0075BF8E1DA /* Fl_Group.cxx */,
790419B5A0AD64D66F9B19E1 /* Fl_Help_View.cxx */,
6DCFF326B588B1B27618F28C /* Fl_Image.cxx */,
+ 7FA5C2BF192FAECA00519823 /* Fl_Image_Surface.cxx */,
63CB19652C470F1E58DCF01E /* Fl_Input.cxx */,
D531F77A15AACC9E297B4490 /* Fl_Input_.cxx */,
BA7B1E9C7AA7316E98D369C2 /* Fl_Light_Button.cxx */,
@@ -5467,6 +5489,7 @@
6C1C9A4F054C48CDD6A2DE44 /* Fl_Paged_Device.cxx */,
D79D3910F834D4B78FED92F3 /* Fl_Pixmap.cxx */,
05BBBFE4BED0452E5D6A81F7 /* Fl_Positioner.cxx */,
+ 7FFDD15B19BE08A800779AD1 /* Fl_PostScript.cxx */,
B4CAFA162560925C4591997A /* Fl_Printer.cxx */,
3789CACF6C845E9C0DE0C58F /* Fl_Preferences.cxx */,
570D0C7510FE3A3FB7A1BD5D /* Fl_Progress.cxx */,
@@ -5479,7 +5502,6 @@
57639C1D5415FB55436556A2 /* Fl_Shared_Image.cxx */,
9D942824B8FC886F6FCD853D /* Fl_Single_Window.cxx */,
5AF5119D08DFC92EA1032671 /* Fl_Slider.cxx */,
- 30662FB4292F9C613576933B /* Fl_Sys_Menu_Bar.cxx */,
116F849BE68830F05CA66B9A /* Fl_Table.cxx */,
351BFCA4747AF494F84FFE36 /* Fl_Table_Row.cxx */,
D5F75B6C9483B2BB47965789 /* Fl_Tabs.cxx */,
@@ -5502,6 +5524,7 @@
F42EEFA08A75F71B33094D50 /* Fl_Window_fullscreen.cxx */,
CC2482EC04B752BF38D4DBE2 /* Fl_Window_hotspot.cxx */,
9E22773911BDBADEA86730D4 /* Fl_Window_iconize.cxx */,
+ 7F6F526319CF0FED0075F408 /* Fl_Window_shape.cxx */,
9951B49F640C2C15321EED9C /* Fl_Wizard.cxx */,
800E34DEF9E503C5EC6C4FA5 /* Fl_XBM_Image.cxx */,
0CBC6DC7942212D47B70681B /* Fl_XPM_Image.cxx */,
@@ -5543,6 +5566,7 @@
3D85A740C2D5F1D6C6A9420D /* fl_engraved_label.cxx */,
FA2F70BA8FF4E7F4B7B36971 /* fl_file_dir.cxx */,
9E8F7BCC0292044D887D423B /* fl_font.cxx */,
+ 7F12FCC618E1EEB900AB6A11 /* fl_gleam.cxx */,
7A2CE7959780A1C6E60103E8 /* fl_gtk.cxx */,
EF6D2F48B12359DE60E499C2 /* fl_labeltype.cxx */,
0B5987E1A293E67A6290612A /* fl_line_style.cxx */,
@@ -5977,6 +6001,51 @@
name = file_chooser;
sourceTree = "<group>";
};
+ 7F92031816B1A909000FC50F /* English.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 7F92031916B1A909000FC50F /* Localizable.strings */,
+ );
+ name = English.lproj;
+ path = Resources/English.lproj;
+ sourceTree = "<group>";
+ };
+ 7F92031B16B1A909000FC50F /* French.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 7F92031C16B1A909000FC50F /* Localizable.strings */,
+ );
+ name = French.lproj;
+ path = Resources/French.lproj;
+ sourceTree = "<group>";
+ };
+ 7F92031E16B1A909000FC50F /* German.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 7F92031F16B1A909000FC50F /* Localizable.strings */,
+ );
+ name = German.lproj;
+ path = Resources/German.lproj;
+ sourceTree = "<group>";
+ };
+ 7F92032116B1A909000FC50F /* Italian.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 7F92032216B1A909000FC50F /* Localizable.strings */,
+ );
+ name = Italian.lproj;
+ path = Resources/Italian.lproj;
+ sourceTree = "<group>";
+ };
+ 7F92032416B1A90A000FC50F /* Spanish.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ 7F92032516B1A90A000FC50F /* Localizable.strings */,
+ );
+ name = Spanish.lproj;
+ path = Resources/Spanish.lproj;
+ sourceTree = "<group>";
+ };
848F81CFD125BD49A9DAEC03 /* button */ = {
isa = PBXGroup;
children = (
@@ -6197,6 +6266,7 @@
C8AE10A8DDF53B8B27E3215A /* Fl_Choice.H */,
9BCF393F94482AE7C7421397 /* Fl_Clock.H */,
2CD1EF8B4BFD0820E9A42641 /* Fl_Color_Chooser.H */,
+ 7FA5C2C2192FAEF200519823 /* Fl_Copy_Surface.H */,
CE97D58B5B0F1A2A7DB2A3FF /* Fl_Counter.H */,
82863AEFE086C3469C386C22 /* Fl_Device.H */,
02C21BB31E7DDFE9E76F4997 /* Fl_Dial.H */,
@@ -6219,6 +6289,7 @@
AE1717E43F50EBA343960B1E /* Fl_Hor_Slider.H */,
5B8BFBDF9C48A998F0781C9E /* Fl_Hor_Value_Slider.H */,
332598626430923370C48554 /* Fl_Image.H */,
+ 7FA5C2C1192FAEE300519823 /* Fl_Image_Surface.H */,
EFEEE679374D7E4191873447 /* Fl_Input.H */,
A5166C3C9311628F6E450095 /* Fl_Input_.H */,
648E9C3B61328280244FCCA5 /* Fl_Input_Choice.H */,
@@ -6293,7 +6364,6 @@
A57A8421086F1F0F9906B692 /* Fl_Wizard.H */,
D2DE1079C826533A91053A9C /* Fl_XBM_Image.H */,
1433F1B8C4085D5D5E1BA0E1 /* Fl_XPM_Image.H */,
- 91A43F37963443EA5E91BF1F /* Xutf8.h */,
E448719A354B3D80FD2E1992 /* dirent.h */,
AF65626F49A71525D24ED1B0 /* filename.H */,
87259ACF8723616344D9AEB2 /* fl_ask.H */,
@@ -6373,6 +6443,11 @@
C9628FFA1274D0A1007D3CFE /* Resources */ = {
isa = PBXGroup;
children = (
+ 7F92031816B1A909000FC50F /* English.lproj */,
+ 7F92031B16B1A909000FC50F /* French.lproj */,
+ 7F92031E16B1A909000FC50F /* German.lproj */,
+ 7F92032116B1A909000FC50F /* Italian.lproj */,
+ 7F92032416B1A90A000FC50F /* Spanish.lproj */,
7F4762ED12D22C470073A4F9 /* ApplicationServices.framework */,
C9628FFD1274D0B3007D3CFE /* Cocoa.framework */,
C96290E11274D0EF007D3CFE /* AGL.framework */,
@@ -8444,11 +8519,13 @@
Japanese,
French,
German,
+ Italian,
+ Spanish,
);
mainGroup = 2000E0C1AD91ACA63811D339;
productRefGroup = DCB546B00EC62A9F8CC4181A /* Products */;
projectDirPath = "";
- projectRoot = "";
+ projectRoot = ../..;
targets = (
AE6BC0AEB24EBBBDBA4071E0 /* Fluid */,
A57FDE871C99A52BEEDEE68C /* fltk */,
@@ -8917,6 +8994,11 @@
buildActionMask = 2147483647;
files = (
27C588BBFC1BE5D0F8202036 /* fluid.icns in Resources */,
+ 7FDBB8F416B2D1EA00AE76EF /* Localizable.strings in Resources */,
+ 7FDBB8F516B2D1EE00AE76EF /* Localizable.strings in Resources */,
+ 7FDBB8F616B2D1FA00AE76EF /* Localizable.strings in Resources */,
+ 7FDBB8F716B2D1FF00AE76EF /* Localizable.strings in Resources */,
+ 7FDBB8F816B2D20A00AE76EF /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -9329,6 +9411,7 @@
7F66B1D912BB924C00C67B59 /* Fl_cocoa.mm in Sources */,
7F66B1DA12BB924C00C67B59 /* Fl_Native_File_Chooser_MAC.mm in Sources */,
7F66B1DB12BB924C00C67B59 /* Fl_Quartz_Printer.mm in Sources */,
+ 7FFDE552171D8D0D008753A3 /* Fl_Sys_Menu_Bar.mm in Sources */,
ED83B85BA678C8C9B5E91535 /* Fl.cxx in Sources */,
B371C5FF1106E69056784D6C /* Fl_Adjuster.cxx in Sources */,
274F92CF30A586E0F8E21530 /* Fl_Bitmap.cxx in Sources */,
@@ -9383,7 +9466,6 @@
2C4DB237B4B8ACD2FB305BD5 /* Fl_Shared_Image.cxx in Sources */,
ED169E1E1FC93C1F97D21AC4 /* Fl_Single_Window.cxx in Sources */,
29A99477531233BE9391CE66 /* Fl_Slider.cxx in Sources */,
- 32824BE9A80F72339A5B441F /* Fl_Sys_Menu_Bar.cxx in Sources */,
DB29DA4D89702B490E69B569 /* Fl_Table.cxx in Sources */,
644FEEF43A0CCBD89E2CE6FC /* Fl_Table_Row.cxx in Sources */,
CDCB453B3493D8E96E80DFF7 /* Fl_Tabs.cxx in Sources */,
@@ -9402,6 +9484,7 @@
86C566B54637B5F773257067 /* Fl_Value_Output.cxx in Sources */,
A40F3E633565708E8113728D /* Fl_Value_Slider.cxx in Sources */,
CAF6CE97B3EBEFFA65AAEEAD /* Fl_Widget.cxx in Sources */,
+ 7F12FCC718E1EEB900AB6A11 /* fl_gleam.cxx in Sources */,
023D5B2431F40114C118A5DB /* Fl_Window.cxx in Sources */,
5FE596C22B71AF1F7235ECAE /* Fl_Window_fullscreen.cxx in Sources */,
382C61DCD714A86859AA21CC /* Fl_Window_hotspot.cxx in Sources */,
@@ -9434,8 +9517,10 @@
12E4293A141DD684369D6B8F /* fl_boxtype.cxx in Sources */,
34870EA10DBD90DB3DD49DA0 /* fl_call_main.c in Sources */,
854002A1B71DBAE327B8C4E8 /* fl_color.cxx in Sources */,
+ 7FFDD15C19BE08A800779AD1 /* Fl_PostScript.cxx in Sources */,
2C8EFE6F2A1297FB4B263B2A /* fl_cursor.cxx in Sources */,
5DE5BC3242C44595E62FA505 /* fl_curve.cxx in Sources */,
+ 7F6F526419CF0FED0075F408 /* Fl_Window_shape.cxx in Sources */,
CD2C6C2797C19E76EA67D308 /* fl_diamond_box.cxx in Sources */,
BDB3A4C9B2AC519DC6A95D84 /* fl_dnd.cxx in Sources */,
93E6F83B3B6E8F6473DE0FFC /* fl_draw.cxx in Sources */,
@@ -9478,6 +9563,8 @@
CE14EC6653D4EF4779992758 /* is_right2left.c in Sources */,
9DD7A2B6D63D30C07781F446 /* is_spacing.c in Sources */,
299CB8A2848CB844BCEC7829 /* Fl_Paged_Device.cxx in Sources */,
+ 7FA5C2BE192FAEBB00519823 /* Fl_Copy_Surface.cxx in Sources */,
+ 7FA5C2C0192FAECA00519823 /* Fl_Image_Surface.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -10978,6 +11065,49 @@
};
/* End PBXTargetDependency section */
+/* Begin PBXVariantGroup section */
+ 7F92031916B1A909000FC50F /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7F92031A16B1A909000FC50F /* English */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 7F92031C16B1A909000FC50F /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7F92031D16B1A909000FC50F /* French */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 7F92031F16B1A909000FC50F /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7F92032016B1A909000FC50F /* German */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 7F92032216B1A909000FC50F /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7F92032316B1A90A000FC50F /* Italian */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ 7F92032516B1A90A000FC50F /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 7F92032616B1A90A000FC50F /* Spanish */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
/* Begin XCBuildConfiguration section */
019F39A6C006F4478D926097 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -13056,6 +13186,7 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
SDKROOT = "";
diff --git a/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/___PROJECTNAMEASIDENTIFIER___-Info.plist b/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/___PROJECTNAMEASIDENTIFIER___-Info.plist
index 95f5aa4..3ec4068 100644
--- a/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/___PROJECTNAMEASIDENTIFIER___-Info.plist
+++ b/ide/Xcode4/Project Templates/FLTK Application/FLTK 1.3/___PROJECTNAMEASIDENTIFIER___-Info.plist
@@ -24,5 +24,7 @@
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
diff --git a/ide/Xcode4/Resources/English.lproj/Localizable.strings b/ide/Xcode4/Resources/English.lproj/Localizable.strings
new file mode 100644
index 0000000..c53f164
--- /dev/null
+++ b/ide/Xcode4/Resources/English.lproj/Localizable.strings
@@ -0,0 +1,7 @@
+"About %@" = "About %@";
+"Print Front Window"="Print Front Window";
+"Services" = "Services";
+"Hide %@"="Hide %@";
+"Hide Others"="Hide Others";
+"Show All"="Show All";
+"Quit %@"="Quit %@";
diff --git a/ide/Xcode4/Resources/French.lproj/Localizable.strings b/ide/Xcode4/Resources/French.lproj/Localizable.strings
new file mode 100644
index 0000000..2ddf800
--- /dev/null
+++ b/ide/Xcode4/Resources/French.lproj/Localizable.strings
@@ -0,0 +1,7 @@
+"About %@" = "A propos de %@";
+"Print Front Window"="Imprimer la fenêtre";
+"Services" = "Services";
+"Hide %@"="Masquer %@";
+"Hide Others"="Masquer les autres";
+"Show All"="Tout afficher";
+"Quit %@"="Quitter %@";
diff --git a/ide/Xcode4/Resources/German.lproj/Localizable.strings b/ide/Xcode4/Resources/German.lproj/Localizable.strings
new file mode 100644
index 0000000..4ac56d2
--- /dev/null
+++ b/ide/Xcode4/Resources/German.lproj/Localizable.strings
@@ -0,0 +1,7 @@
+"About %@" = "Ãœber %@";
+"Print Front Window"="Vordergrundfenster drucken";
+"Services" = "Dienste";
+"Hide %@"="%@ ausblenden";
+"Hide Others"="Andere ausblenden";
+"Show All"="Alle einblenden";
+"Quit %@"="%@ beenden";
diff --git a/ide/Xcode4/Resources/Italian.lproj/Localizable.strings b/ide/Xcode4/Resources/Italian.lproj/Localizable.strings
new file mode 100644
index 0000000..13c2ddb
--- /dev/null
+++ b/ide/Xcode4/Resources/Italian.lproj/Localizable.strings
@@ -0,0 +1,7 @@
+"About %@" = "Informazioni su %@";
+"Print Front Window"="Stampa la finestra";
+"Services" = "Servizi";
+"Hide %@"="Nascondi %@";
+"Hide Others"="Nascondi altre";
+"Show All"="Mostra tutte";
+"Quit %@"="Esci da %@";
diff --git a/ide/Xcode4/Resources/Spanish.lproj/Localizable.strings b/ide/Xcode4/Resources/Spanish.lproj/Localizable.strings
new file mode 100644
index 0000000..db89f9d
--- /dev/null
+++ b/ide/Xcode4/Resources/Spanish.lproj/Localizable.strings
@@ -0,0 +1,7 @@
+"About %@" = "Acerca de %@";
+"Print Front Window"="Imprimir la ventana";
+"Services" = "Servicios";
+"Hide %@"="Ocultar %@";
+"Hide Others"="Ocultar otros";
+"Show All"="Mostrar todo";
+"Quit %@"="Salir de %@";
diff --git a/ide/Xcode4/plists/CubeView-Info.plist b/ide/Xcode4/plists/CubeView-Info.plist
index 2afa608..6a95eef 100644
--- a/ide/Xcode4/plists/CubeView-Info.plist
+++ b/ide/Xcode4/plists/CubeView-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/Demo-Info.plist b/ide/Xcode4/plists/Demo-Info.plist
index e5b26e8..d2984ea 100644
--- a/ide/Xcode4/plists/Demo-Info.plist
+++ b/ide/Xcode4/plists/Demo-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/Fluid-Info.plist b/ide/Xcode4/plists/Fluid-Info.plist
index 89174a6..a12af50 100644
--- a/ide/Xcode4/plists/Fluid-Info.plist
+++ b/ide/Xcode4/plists/Fluid-Info.plist
@@ -30,7 +30,8 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
- <string>fluid</string> <key>CFBundleIdentifier</key>
+ <string>fluid</string>
+ <key>CFBundleIdentifier</key>
<string>org.fltk.Fluid</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
@@ -39,10 +40,12 @@
<key>CFBundleSignature</key>
<string>FLTK</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>1.3.3</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+ <string>Copyright 1998-2014 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/adjuster-Info.plist b/ide/Xcode4/plists/adjuster-Info.plist
index 9b60518..e2b4534 100644
--- a/ide/Xcode4/plists/adjuster-Info.plist
+++ b/ide/Xcode4/plists/adjuster-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/arc-Info.plist b/ide/Xcode4/plists/arc-Info.plist
index 933ef09..8723012 100644
--- a/ide/Xcode4/plists/arc-Info.plist
+++ b/ide/Xcode4/plists/arc-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/ask-Info.plist b/ide/Xcode4/plists/ask-Info.plist
index 650a92c..edc2e83 100644
--- a/ide/Xcode4/plists/ask-Info.plist
+++ b/ide/Xcode4/plists/ask-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/bitmap-Info.plist b/ide/Xcode4/plists/bitmap-Info.plist
index 5cdc24f..d683927 100644
--- a/ide/Xcode4/plists/bitmap-Info.plist
+++ b/ide/Xcode4/plists/bitmap-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/blocks-Info.plist b/ide/Xcode4/plists/blocks-Info.plist
index f1af7e3..9b6e72a 100644
--- a/ide/Xcode4/plists/blocks-Info.plist
+++ b/ide/Xcode4/plists/blocks-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/boxtype-Info.plist b/ide/Xcode4/plists/boxtype-Info.plist
index 79b46aa..56955fa 100644
--- a/ide/Xcode4/plists/boxtype-Info.plist
+++ b/ide/Xcode4/plists/boxtype-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/browser-Info.plist b/ide/Xcode4/plists/browser-Info.plist
index 9a7261a..6d40cf2 100644
--- a/ide/Xcode4/plists/browser-Info.plist
+++ b/ide/Xcode4/plists/browser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/button-Info.plist b/ide/Xcode4/plists/button-Info.plist
index 2460426..9d351dd 100644
--- a/ide/Xcode4/plists/button-Info.plist
+++ b/ide/Xcode4/plists/button-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/buttons-Info.plist b/ide/Xcode4/plists/buttons-Info.plist
index f76fed7..16da6e3 100644
--- a/ide/Xcode4/plists/buttons-Info.plist
+++ b/ide/Xcode4/plists/buttons-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/checkers-Info.plist b/ide/Xcode4/plists/checkers-Info.plist
index 960f342..3da7b84 100644
--- a/ide/Xcode4/plists/checkers-Info.plist
+++ b/ide/Xcode4/plists/checkers-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/clock-Info.plist b/ide/Xcode4/plists/clock-Info.plist
index 8c17ec5..85559e9 100644
--- a/ide/Xcode4/plists/clock-Info.plist
+++ b/ide/Xcode4/plists/clock-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/colbrowser-Info.plist b/ide/Xcode4/plists/colbrowser-Info.plist
index f816401..c6a6e9a 100644
--- a/ide/Xcode4/plists/colbrowser-Info.plist
+++ b/ide/Xcode4/plists/colbrowser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/color_chooser-Info.plist b/ide/Xcode4/plists/color_chooser-Info.plist
index 1193873..68f39f8 100644
--- a/ide/Xcode4/plists/color_chooser-Info.plist
+++ b/ide/Xcode4/plists/color_chooser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/cube-Info.plist b/ide/Xcode4/plists/cube-Info.plist
index 67640ad..89424f8 100644
--- a/ide/Xcode4/plists/cube-Info.plist
+++ b/ide/Xcode4/plists/cube-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/cursor-Info.plist b/ide/Xcode4/plists/cursor-Info.plist
index b903c5f..fdf9266 100644
--- a/ide/Xcode4/plists/cursor-Info.plist
+++ b/ide/Xcode4/plists/cursor-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/curve-Info.plist b/ide/Xcode4/plists/curve-Info.plist
index 44777f8..35dc215 100644
--- a/ide/Xcode4/plists/curve-Info.plist
+++ b/ide/Xcode4/plists/curve-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/device-Info.plist b/ide/Xcode4/plists/device-Info.plist
index da2f9c1..8c9ad27 100644
--- a/ide/Xcode4/plists/device-Info.plist
+++ b/ide/Xcode4/plists/device-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
diff --git a/ide/Xcode4/plists/doublebuffer-Info.plist b/ide/Xcode4/plists/doublebuffer-Info.plist
index b76e1c2..bb92b82 100644
--- a/ide/Xcode4/plists/doublebuffer-Info.plist
+++ b/ide/Xcode4/plists/doublebuffer-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/editor-Info.plist b/ide/Xcode4/plists/editor-Info.plist
index d49c555..422e991 100644
--- a/ide/Xcode4/plists/editor-Info.plist
+++ b/ide/Xcode4/plists/editor-Info.plist
@@ -37,5 +37,7 @@
<string>1.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
diff --git a/ide/Xcode4/plists/fast_slow-Info.plist b/ide/Xcode4/plists/fast_slow-Info.plist
index 6041228..b3d0383 100644
--- a/ide/Xcode4/plists/fast_slow-Info.plist
+++ b/ide/Xcode4/plists/fast_slow-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/file_chooser-Info.plist b/ide/Xcode4/plists/file_chooser-Info.plist
index 7910e7c..1660838 100644
--- a/ide/Xcode4/plists/file_chooser-Info.plist
+++ b/ide/Xcode4/plists/file_chooser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk-Info.plist b/ide/Xcode4/plists/fltk-Info.plist
index 9a0eaa3..be4ecb8 100644
--- a/ide/Xcode4/plists/fltk-Info.plist
+++ b/ide/Xcode4/plists/fltk-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_forms-Info.plist b/ide/Xcode4/plists/fltk_forms-Info.plist
index 8cea73d..208ad6a 100644
--- a/ide/Xcode4/plists/fltk_forms-Info.plist
+++ b/ide/Xcode4/plists/fltk_forms-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_gl-Info.plist b/ide/Xcode4/plists/fltk_gl-Info.plist
index 0955f7f..87b476c 100644
--- a/ide/Xcode4/plists/fltk_gl-Info.plist
+++ b/ide/Xcode4/plists/fltk_gl-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_images-Info.plist b/ide/Xcode4/plists/fltk_images-Info.plist
index 8966c7a..6089b15 100644
--- a/ide/Xcode4/plists/fltk_images-Info.plist
+++ b/ide/Xcode4/plists/fltk_images-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_jpeg-Info.plist b/ide/Xcode4/plists/fltk_jpeg-Info.plist
index 9ae5ac9..cb3f3c3 100644
--- a/ide/Xcode4/plists/fltk_jpeg-Info.plist
+++ b/ide/Xcode4/plists/fltk_jpeg-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_png-Info.plist b/ide/Xcode4/plists/fltk_png-Info.plist
index 434a0b1..1c525ad 100644
--- a/ide/Xcode4/plists/fltk_png-Info.plist
+++ b/ide/Xcode4/plists/fltk_png-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fltk_zlib-Info.plist b/ide/Xcode4/plists/fltk_zlib-Info.plist
index 1c540d3..94113ce 100644
--- a/ide/Xcode4/plists/fltk_zlib-Info.plist
+++ b/ide/Xcode4/plists/fltk_zlib-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fonts-Info.plist b/ide/Xcode4/plists/fonts-Info.plist
index 0b64fcd..a953536 100644
--- a/ide/Xcode4/plists/fonts-Info.plist
+++ b/ide/Xcode4/plists/fonts-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/forms-Info.plist b/ide/Xcode4/plists/forms-Info.plist
index 3f48b57..4635af0 100644
--- a/ide/Xcode4/plists/forms-Info.plist
+++ b/ide/Xcode4/plists/forms-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fractals-Info.plist b/ide/Xcode4/plists/fractals-Info.plist
index b00f56f..7106622 100644
--- a/ide/Xcode4/plists/fractals-Info.plist
+++ b/ide/Xcode4/plists/fractals-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/fullscreen-Info.plist b/ide/Xcode4/plists/fullscreen-Info.plist
index cf281eb..28c29c5 100644
--- a/ide/Xcode4/plists/fullscreen-Info.plist
+++ b/ide/Xcode4/plists/fullscreen-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/gl_overlay-Info.plist b/ide/Xcode4/plists/gl_overlay-Info.plist
index e1796a6..3573ee2 100644
--- a/ide/Xcode4/plists/gl_overlay-Info.plist
+++ b/ide/Xcode4/plists/gl_overlay-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/glpuzzle-Info.plist b/ide/Xcode4/plists/glpuzzle-Info.plist
index 9850197..3d8d3df 100644
--- a/ide/Xcode4/plists/glpuzzle-Info.plist
+++ b/ide/Xcode4/plists/glpuzzle-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/hello-Info.plist b/ide/Xcode4/plists/hello-Info.plist
index 2602831..5dc3d90 100644
--- a/ide/Xcode4/plists/hello-Info.plist
+++ b/ide/Xcode4/plists/hello-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/help-Info.plist b/ide/Xcode4/plists/help-Info.plist
index 7b1ead2..97330a6 100644
--- a/ide/Xcode4/plists/help-Info.plist
+++ b/ide/Xcode4/plists/help-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/iconize-Info.plist b/ide/Xcode4/plists/iconize-Info.plist
index c09b9bc..67b82aa 100644
--- a/ide/Xcode4/plists/iconize-Info.plist
+++ b/ide/Xcode4/plists/iconize-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/image-Info.plist b/ide/Xcode4/plists/image-Info.plist
index 4f1e599..c17069a 100644
--- a/ide/Xcode4/plists/image-Info.plist
+++ b/ide/Xcode4/plists/image-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/inactive-Info.plist b/ide/Xcode4/plists/inactive-Info.plist
index fc24bfc..c7d2137 100644
--- a/ide/Xcode4/plists/inactive-Info.plist
+++ b/ide/Xcode4/plists/inactive-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/input-Info.plist b/ide/Xcode4/plists/input-Info.plist
index 135254d..a2b4914 100644
--- a/ide/Xcode4/plists/input-Info.plist
+++ b/ide/Xcode4/plists/input-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/input_choice-Info.plist b/ide/Xcode4/plists/input_choice-Info.plist
index 0567a89..430215f 100644
--- a/ide/Xcode4/plists/input_choice-Info.plist
+++ b/ide/Xcode4/plists/input_choice-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/keyboard-Info.plist b/ide/Xcode4/plists/keyboard-Info.plist
index 1a79d0b..f27374d 100644
--- a/ide/Xcode4/plists/keyboard-Info.plist
+++ b/ide/Xcode4/plists/keyboard-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/label-Info.plist b/ide/Xcode4/plists/label-Info.plist
index b9e6d27..fbf04b2 100644
--- a/ide/Xcode4/plists/label-Info.plist
+++ b/ide/Xcode4/plists/label-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/line_style-Info.plist b/ide/Xcode4/plists/line_style-Info.plist
index 88c647c..c4aef5b 100644
--- a/ide/Xcode4/plists/line_style-Info.plist
+++ b/ide/Xcode4/plists/line_style-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/list_visuals-Info.plist b/ide/Xcode4/plists/list_visuals-Info.plist
index d74166b..12ed1c6 100644
--- a/ide/Xcode4/plists/list_visuals-Info.plist
+++ b/ide/Xcode4/plists/list_visuals-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/mandelbrot-Info.plist b/ide/Xcode4/plists/mandelbrot-Info.plist
index 39c7ff7..fe7fbb2 100644
--- a/ide/Xcode4/plists/mandelbrot-Info.plist
+++ b/ide/Xcode4/plists/mandelbrot-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/menubar-Info.plist b/ide/Xcode4/plists/menubar-Info.plist
index 9fe6aab..8737bf7 100644
--- a/ide/Xcode4/plists/menubar-Info.plist
+++ b/ide/Xcode4/plists/menubar-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/message-Info.plist b/ide/Xcode4/plists/message-Info.plist
index a1f690f..47cd800 100644
--- a/ide/Xcode4/plists/message-Info.plist
+++ b/ide/Xcode4/plists/message-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/minimum-Info.plist b/ide/Xcode4/plists/minimum-Info.plist
index bc0ac5d..7c66ea3 100644
--- a/ide/Xcode4/plists/minimum-Info.plist
+++ b/ide/Xcode4/plists/minimum-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/native-filechooser-Info.plist b/ide/Xcode4/plists/native-filechooser-Info.plist
index e57a1ce..b409b67 100644
--- a/ide/Xcode4/plists/native-filechooser-Info.plist
+++ b/ide/Xcode4/plists/native-filechooser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/navigation-Info.plist b/ide/Xcode4/plists/navigation-Info.plist
index a1400af..7d5eb70 100644
--- a/ide/Xcode4/plists/navigation-Info.plist
+++ b/ide/Xcode4/plists/navigation-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/output-Info.plist b/ide/Xcode4/plists/output-Info.plist
index 6723e05..3bd008a 100644
--- a/ide/Xcode4/plists/output-Info.plist
+++ b/ide/Xcode4/plists/output-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/overlay-Info.plist b/ide/Xcode4/plists/overlay-Info.plist
index df5991f..ff846c5 100644
--- a/ide/Xcode4/plists/overlay-Info.plist
+++ b/ide/Xcode4/plists/overlay-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/pack-Info.plist b/ide/Xcode4/plists/pack-Info.plist
index 03599e3..dc2e559 100644
--- a/ide/Xcode4/plists/pack-Info.plist
+++ b/ide/Xcode4/plists/pack-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/pixmap-Info.plist b/ide/Xcode4/plists/pixmap-Info.plist
index c10d970..b490c76 100644
--- a/ide/Xcode4/plists/pixmap-Info.plist
+++ b/ide/Xcode4/plists/pixmap-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/pixmap_browser-Info.plist b/ide/Xcode4/plists/pixmap_browser-Info.plist
index d77e5d5..1fc87ae 100644
--- a/ide/Xcode4/plists/pixmap_browser-Info.plist
+++ b/ide/Xcode4/plists/pixmap_browser-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/preferences-Info.plist b/ide/Xcode4/plists/preferences-Info.plist
index 506f823..33be150 100644
--- a/ide/Xcode4/plists/preferences-Info.plist
+++ b/ide/Xcode4/plists/preferences-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/radio-Info.plist b/ide/Xcode4/plists/radio-Info.plist
index 5161c77..dd1f3c3 100644
--- a/ide/Xcode4/plists/radio-Info.plist
+++ b/ide/Xcode4/plists/radio-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/resize-Info.plist b/ide/Xcode4/plists/resize-Info.plist
index a328061..7c64176 100644
--- a/ide/Xcode4/plists/resize-Info.plist
+++ b/ide/Xcode4/plists/resize-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/resizebox-Info.plist b/ide/Xcode4/plists/resizebox-Info.plist
index c3dbe49..d94305f 100644
--- a/ide/Xcode4/plists/resizebox-Info.plist
+++ b/ide/Xcode4/plists/resizebox-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/rotated_text-Info.plist b/ide/Xcode4/plists/rotated_text-Info.plist
index d97592c..5662abd 100644
--- a/ide/Xcode4/plists/rotated_text-Info.plist
+++ b/ide/Xcode4/plists/rotated_text-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/scroll-Info.plist b/ide/Xcode4/plists/scroll-Info.plist
index 2603dac..291f8cf 100644
--- a/ide/Xcode4/plists/scroll-Info.plist
+++ b/ide/Xcode4/plists/scroll-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/shape-Info.plist b/ide/Xcode4/plists/shape-Info.plist
index f6d1c88..2c13c81 100644
--- a/ide/Xcode4/plists/shape-Info.plist
+++ b/ide/Xcode4/plists/shape-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/subwindow-Info.plist b/ide/Xcode4/plists/subwindow-Info.plist
index 8dacaf9..f3d1fa7 100644
--- a/ide/Xcode4/plists/subwindow-Info.plist
+++ b/ide/Xcode4/plists/subwindow-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/sudoku-Info.plist b/ide/Xcode4/plists/sudoku-Info.plist
index c04b901..854cc6e 100644
--- a/ide/Xcode4/plists/sudoku-Info.plist
+++ b/ide/Xcode4/plists/sudoku-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/symbols-Info.plist b/ide/Xcode4/plists/symbols-Info.plist
index 2055d75..3f279f3 100644
--- a/ide/Xcode4/plists/symbols-Info.plist
+++ b/ide/Xcode4/plists/symbols-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/table-Info.plist b/ide/Xcode4/plists/table-Info.plist
index e68219e..e7a3322 100644
--- a/ide/Xcode4/plists/table-Info.plist
+++ b/ide/Xcode4/plists/table-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/tabs-Info.plist b/ide/Xcode4/plists/tabs-Info.plist
index 5827ed1..8931fb9 100644
--- a/ide/Xcode4/plists/tabs-Info.plist
+++ b/ide/Xcode4/plists/tabs-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/threads-Info.plist b/ide/Xcode4/plists/threads-Info.plist
index 0501065..8f4c0c7 100644
--- a/ide/Xcode4/plists/threads-Info.plist
+++ b/ide/Xcode4/plists/threads-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/tile-Info.plist b/ide/Xcode4/plists/tile-Info.plist
index 47dc1d4..aa9408a 100644
--- a/ide/Xcode4/plists/tile-Info.plist
+++ b/ide/Xcode4/plists/tile-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/tiled_image-Info.plist b/ide/Xcode4/plists/tiled_image-Info.plist
index fb82a58..96a341f 100644
--- a/ide/Xcode4/plists/tiled_image-Info.plist
+++ b/ide/Xcode4/plists/tiled_image-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/tree-Info.plist b/ide/Xcode4/plists/tree-Info.plist
index e955a3a..f288a24 100644
--- a/ide/Xcode4/plists/tree-Info.plist
+++ b/ide/Xcode4/plists/tree-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/utf8-Info.plist b/ide/Xcode4/plists/utf8-Info.plist
index cffb74d..035d983 100644
--- a/ide/Xcode4/plists/utf8-Info.plist
+++ b/ide/Xcode4/plists/utf8-Info.plist
@@ -20,5 +20,7 @@
<string>1.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
</plist>
diff --git a/ide/Xcode4/plists/valuators-Info.plist b/ide/Xcode4/plists/valuators-Info.plist
index 88d6b46..fc94ecb 100644
--- a/ide/Xcode4/plists/valuators-Info.plist
+++ b/ide/Xcode4/plists/valuators-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/ide/Xcode4/plists/zlib-Info.plist b/ide/Xcode4/plists/zlib-Info.plist
index 6bca93a..597c46e 100644
--- a/ide/Xcode4/plists/zlib-Info.plist
+++ b/ide/Xcode4/plists/zlib-Info.plist
@@ -20,5 +20,7 @@
<string>Copyright 1998-2010 by Bill Spitzak and others.</string>
<key>CFBundleGetInfoString</key>
<string>Part of the FLTK library. Please visit www.fltk.org.</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
</dict>
- </plist>
+</plist>
diff --git a/jpeg/CMakeLists.txt b/jpeg/CMakeLists.txt
index ef14317..20e215b 100644
--- a/jpeg/CMakeLists.txt
+++ b/jpeg/CMakeLists.txt
@@ -1,9 +1,3 @@
-project(FLTKJPEG)
-
-include_regular_expression("^j.*[.][c|h]$")
-
-include_directories(${FLTKJPEG_SOURCE_DIR})
-include_directories(${FLTKJPEG_BINARY_DIR})
# memmgr back ends: compile only one of these into a working library
# (For now, let's use the mode that requires the image fit into memory.
@@ -31,21 +25,16 @@ set(decompression_SRCS
jdsample.c jdcolor.c jquant1.c jquant2.c jdmerge.c
)
+list(APPEND BUILD_SRCS "${systemdependent_SRCS};${common_SRCS}")
+list(APPEND BUILD_SRCS "${compression_SRCS};${decompression_SRCS}")
#######################################################################
-add_library(fltk_jpeg ${systemdependent_SRCS} ${common_SRCS} ${compression_SRCS} ${decompression_SRCS})
+FL_ADD_LIBRARY(fltk_jpeg STATIC "${BUILD_SRCS}")
-if(MSVC)
- set_target_properties(fltk_jpeg
- PROPERTIES
- OUTPUT_NAME fltkjpeg
- DEBUG_OUTPUT_NAME fltkjpegd
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_jpeg PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
-endif(MSVC)
+#######################################################################
+if(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
+FL_ADD_LIBRARY(fltk_jpeg SHARED "${BUILD_SRCS}")
-install(TARGETS fltk_jpeg
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+#######################################################################
+endif(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
diff --git a/makeinclude.in b/makeinclude.in
index 4d3de71..6a423aa 100644
--- a/makeinclude.in
+++ b/makeinclude.in
@@ -1,9 +1,9 @@
#
-# "$Id: makeinclude.in 9736 2012-12-05 14:53:03Z manolo $"
+# "$Id: makeinclude.in 10351 2014-10-04 22:32:34Z AlbrechtS $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
#
-# Copyright 1998-2010 by Bill Spitzak and others.
+# Copyright 1998-2014 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -27,9 +27,9 @@ mandir = @mandir@
srcdir = @srcdir@
docdir = $(datadir)/doc/fltk1.3-doc
VPATH = @srcdir@
-USEMMFILES = @USEMMFILES@
+USEMMFILES = @USEMMFILES@
+
# programs we use...
-HTMLDOC = @HTMLDOC@
DOXYDOC = @DOXYDOC@
INSTALL = @INSTALL@
LN = ln -s
@@ -167,5 +167,5 @@ UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
mv t.z $@
#
-# End of "$Id: makeinclude.in 9736 2012-12-05 14:53:03Z manolo $".
+# End of "$Id: makeinclude.in 10351 2014-10-04 22:32:34Z AlbrechtS $".
#
diff --git a/misc/config.guess b/misc/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/misc/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/misc/config.sub b/misc/config.sub
new file mode 100755
index 0000000..8b612ab
--- /dev/null
+++ b/misc/config.sub
@@ -0,0 +1,1788 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-04-24'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/png/CMakeLists.txt b/png/CMakeLists.txt
index 8cd4111..4ebb905 100644
--- a/png/CMakeLists.txt
+++ b/png/CMakeLists.txt
@@ -1,11 +1,3 @@
-project(FLTKPNG)
-include_regular_expression("^png.*[.][c|h]$")
-
-include_directories(${FLTKZLIB_SOURCE_DIR})
-include_directories(${ZLIB_INCLUDE_DIR})
-
-include_directories(${FLTKPNG_SOURCE_DIR})
-include_directories(${FLTKPNG_BINARY_DIR})
# source files for png
set(PNG_SRCS
@@ -16,20 +8,25 @@ set(PNG_SRCS
)
#######################################################################
-add_library(fltk_png ${PNG_SRCS})
+FL_ADD_LIBRARY(fltk_png STATIC "${PNG_SRCS}")
-if(MSVC)
- set_target_properties(fltk_png PROPERTIES OUTPUT_NAME fltkpng)
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_png PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
+if(OPTION_USE_SYSTEM_ZLIB)
+ target_link_libraries(fltk_png ${FLTK_ZLIB_LIBRARIES})
else()
- set_target_properties(fltk_png PROPERTIES OUTPUT_NAME fltk_png)
-endif(MSVC)
+ target_link_libraries(fltk_png fltk_z)
+endif(OPTION_USE_SYSTEM_ZLIB)
-target_link_libraries(fltk_png ${FLTK_ZLIB_LIBRARIES})
+#######################################################################
+if(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
+FL_ADD_LIBRARY(fltk_png SHARED "${PNG_SRCS}")
-install(TARGETS fltk_png
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+if(OPTION_USE_SYSTEM_ZLIB)
+ target_link_libraries(fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES})
+else()
+ target_link_libraries(fltk_png_SHARED fltk_z_SHARED)
+endif(OPTION_USE_SYSTEM_ZLIB)
+
+#######################################################################
+endif(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0c0865a..d53ab80 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-include_regular_expression("[.][cxx|c|h]$")
set(CPPFILES
Fl.cxx
@@ -15,9 +14,11 @@ set(CPPFILES
Fl_Choice.cxx
Fl_Clock.cxx
Fl_Color_Chooser.cxx
+ Fl_Copy_Surface.cxx
Fl_Counter.cxx
Fl_Device.cxx
Fl_Dial.cxx
+ Fl_Help_Dialog_Dox.cxx
Fl_Double_Window.cxx
Fl_File_Browser.cxx
Fl_File_Chooser.cxx
@@ -27,13 +28,13 @@ set(CPPFILES
Fl_Group.cxx
Fl_Help_View.cxx
Fl_Image.cxx
+ Fl_Image_Surface.cxx
Fl_Input.cxx
Fl_Input_.cxx
Fl_Light_Button.cxx
Fl_Menu.cxx
Fl_Menu_.cxx
Fl_Menu_Bar.cxx
- Fl_Sys_Menu_Bar.cxx
Fl_Menu_Button.cxx
Fl_Menu_Window.cxx
Fl_Menu_add.cxx
@@ -45,6 +46,7 @@ set(CPPFILES
Fl_Paged_Device.cxx
Fl_Pixmap.cxx
Fl_Positioner.cxx
+ Fl_PostScript.cxx
Fl_Printer.cxx
Fl_Preferences.cxx
Fl_Progress.cxx
@@ -79,6 +81,7 @@ set(CPPFILES
Fl_Window_fullscreen.cxx
Fl_Window_hotspot.cxx
Fl_Window_iconize.cxx
+ Fl_Window_shape.cxx
Fl_Wizard.cxx
Fl_XBM_Image.cxx
Fl_XPM_Image.cxx
@@ -116,6 +119,7 @@ set(CPPFILES
fl_engraved_label.cxx
fl_file_dir.cxx
fl_font.cxx
+ fl_gleam.cxx
fl_gtk.cxx
fl_labeltype.cxx
fl_line_style.cxx
@@ -195,32 +199,22 @@ set(CFILES
add_definitions(-DFL_LIBRARY)
if(APPLE)
- set(MMFILES
- Fl_cocoa.mm
- Fl_Quartz_Printer.mm
- Fl_Native_File_Chooser_MAC.mm
- )
+ set(MMFILES
+ Fl_cocoa.mm
+ Fl_Quartz_Printer.mm
+ Fl_Native_File_Chooser_MAC.mm
+ Fl_Sys_Menu_Bar.mm
+ )
else()
set(MMFILES
)
endif(APPLE)
#######################################################################
-add_library(fltk STATIC ${CPPFILES} ${MMFILES} ${CFILES} fl_call_main.c)
-set_target_properties(fltk PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-if(MSVC)
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif()
- set_target_properties(fltk
- PROPERTIES
- OUTPUT_NAME fltk
- DEBUG_OUTPUT_NAME fltkd
- )
-endif(MSVC)
+FL_ADD_LIBRARY(fltk STATIC "${CPPFILES};${MMFILES};${CFILES};fl_call_main.c")
if(USE_THREADS)
- target_link_libraries(fltk ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(fltk ${CMAKE_THREAD_LIBS_INIT} ${LIB_dl})
endif(USE_THREADS)
if(USE_X11)
@@ -239,73 +233,52 @@ if(HAVE_XINERAMA)
target_link_libraries(fltk ${X11_Xinerama_LIB})
endif(HAVE_XINERAMA)
+if(HAVE_XFIXES)
+ target_link_libraries(fltk ${X11_Xfixes_LIB})
+endif(HAVE_XFIXES)
+
+if(HAVE_XCURSOR)
+ target_link_libraries(fltk ${X11_Xcursor_LIB})
+endif(HAVE_XCURSOR)
+
if(USE_XFT)
target_link_libraries(fltk ${X11_Xft_LIB})
+ if(LIB_fontconfig)
+ target_link_libraries(fltk ${LIB_fontconfig})
+ endif(LIB_fontconfig)
endif(USE_XFT)
-if(LIB_fontconfig)
- target_link_libraries(fltk ${LIB_fontconfig})
-endif(LIB_fontconfig)
-
#######################################################################
-add_library(fltk_forms STATIC ${FLCPPFILES})
+FL_ADD_LIBRARY(fltk_forms STATIC "${FLCPPFILES}")
target_link_libraries(fltk_forms fltk)
-set_target_properties(fltk_forms
- PROPERTIES CLEAN_DIRECT_OUTPUT 1
-)
-if(MSVC)
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_forms PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif()
- set_target_properties(fltk_forms
- PROPERTIES
- OUTPUT_NAME fltkforms
- DEBUG_OUTPUT_NAME fltkformsd
- )
-endif(MSVC)
#######################################################################
-add_library(fltk_images STATIC ${IMGCPPFILES})
+FL_ADD_LIBRARY(fltk_images STATIC "${IMGCPPFILES}")
target_link_libraries(fltk_images fltk ${FLTK_PNG_LIBRARIES}
${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES})
-set_target_properties(fltk_images PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-if(MSVC)
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_images PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif()
- set_target_properties(fltk_images
- PROPERTIES
- OUTPUT_NAME fltkimages
- DEBUG_OUTPUT_NAME fltkimagesd
- )
-endif(MSVC)
-#######################################################################
-install(TARGETS fltk fltk_forms fltk_images
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+if(OPTION_USE_SYSTEM_LIBJPEG)
+ target_link_libraries(fltk_images ${FLTK_JPEG_LIBRARIES})
+else()
+ target_link_libraries(fltk_images fltk_jpeg)
+endif(OPTION_USE_SYSTEM_LIBJPEG)
+
+if(OPTION_USE_SYSTEM_ZLIB)
+ target_link_libraries(fltk_images ${FLTK_ZLIB_LIBRARIES})
+else()
+ target_link_libraries(fltk_images fltk_z)
+endif(OPTION_USE_SYSTEM_ZLIB)
+
+if(OPTION_USE_SYSTEM_LIBPNG)
+ target_link_libraries(fltk_images ${FLTK_PNG_LIBRARIES})
+else()
+ target_link_libraries(fltk_images fltk_png)
+endif(OPTION_USE_SYSTEM_LIBPNG)
#######################################################################
if(OPENGL_FOUND)
- add_library(fltk_gl STATIC ${GLCPPFILES})
+ FL_ADD_LIBRARY(fltk_gl STATIC "${GLCPPFILES}")
target_link_libraries(fltk_gl fltk ${OPENGL_LIBRARIES})
- set_target_properties(fltk_gl PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- if(MSVC)
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_gl PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif()
- set_target_properties(fltk_gl
- PROPERTIES
- OUTPUT_NAME fltkgl
- DEBUG_OUTPUT_NAME fltkgld
- )
- endif(MSVC)
-
- install(TARGETS fltk_gl
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
- )
endif(OPENGL_FOUND)
#######################################################################
@@ -313,28 +286,10 @@ endif(OPENGL_FOUND)
if(OPTION_BUILD_SHARED_LIBS)
#######################################################################
-add_library(fltk_SHARED SHARED ${CPPFILES} ${MMFILES} ${CFILES})
-set_target_properties(fltk_SHARED
- PROPERTIES CLEAN_DIRECT_OUTPUT 1
- VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
- SOVERSION ${FLTK_VERSION_PATCH}
-)
-if(MSVC)
- set_target_properties(fltk_SHARED
- PROPERTIES
- OUTPUT_NAME fltkdll
- DEBUG_OUTPUT_NAME fltkdlld
- COMPILE_DEFINITIONS "FL_DLL;FL_LIBRARY"
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_SHARED PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
-else()
- set_target_properties(fltk_SHARED PROPERTIES OUTPUT_NAME fltk)
-endif(MSVC)
+FL_ADD_LIBRARY(fltk SHARED "${CPPFILES};${MMFILES};${CFILES}")
if(USE_THREADS)
- target_link_libraries(fltk_SHARED ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(fltk_SHARED ${CMAKE_THREAD_LIBS_INIT} ${LIB_dl})
endif(USE_THREADS)
if(USE_X11)
@@ -346,7 +301,7 @@ if(WIN32)
endif(WIN32)
if(FLTK_HAVE_CAIRO)
- target_link_libraries(fltk_SHARED fltk_cairo ${PKG_CAIRO_LIBRARIES})
+ target_link_libraries(fltk_SHARED fltk_cairo_SHARED ${PKG_CAIRO_LIBRARIES})
ENDif(FLTK_HAVE_CAIRO)
if(HAVE_XINERAMA)
@@ -355,99 +310,51 @@ endif(HAVE_XINERAMA)
if(USE_XFT)
target_link_libraries(fltk_SHARED ${X11_Xft_LIB})
+ if(LIB_fontconfig)
+ target_link_libraries(fltk_SHARED ${LIB_fontconfig})
+ endif(LIB_fontconfig)
endif(USE_XFT)
-if(LIB_fontconfig)
- target_link_libraries(fltk_SHARED ${LIB_fontconfig})
-endif(LIB_fontconfig)
-
#######################################################################
-add_library(fltk_forms_SHARED SHARED ${FLCPPFILES})
-target_link_libraries(fltk_forms_SHARED fltk)
-set_target_properties(fltk_forms_SHARED
- PROPERTIES CLEAN_DIRECT_OUTPUT 1
- VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
- SOVERSION ${FLTK_VERSION_PATCH}
-)
-if(MSVC)
- set_target_properties(fltk_forms_SHARED
- PROPERTIES
- OUTPUT_NAME fltkformsdll
- DEBUG_OUTPUT_NAME fltkformsdlld
- COMPILE_DEFINITIONS "FL_DLL;FL_LIBRARY"
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_forms_SHARED PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
-else()
- set_target_properties(fltk_forms_SHARED PROPERTIES OUTPUT_NAME fltk_forms)
-endif(MSVC)
+FL_ADD_LIBRARY(fltk_forms SHARED "${FLCPPFILES}")
+target_link_libraries(fltk_forms_SHARED fltk_SHARED)
if(USE_THREADS)
- target_link_libraries(fltk_SHARED ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(fltk_forms_SHARED ${CMAKE_THREAD_LIBS_INIT} ${LIB_dl})
endif(USE_THREADS)
if(USE_X11)
- target_link_libraries(fltk_SHARED ${X11_LIBRARIES})
+ target_link_libraries(fltk_forms_SHARED ${X11_LIBRARIES})
endif(USE_X11)
#######################################################################
-add_library(fltk_images_SHARED SHARED ${IMGCPPFILES})
-target_link_libraries(fltk_images_SHARED fltk
- ${FLTK_PNG_LIBRARIES} ${FLTK_JPEG_LIBRARIES} ${FLTK_ZLIB_LIBRARIES}
-)
-set_target_properties(fltk_images_SHARED
- PROPERTIES CLEAN_DIRECT_OUTPUT 1
- VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
- SOVERSION ${FLTK_VERSION_PATCH}
-)
-if(MSVC)
- set_target_properties(fltk_images_SHARED
- PROPERTIES
- OUTPUT_NAME fltkimagesdll
- DEBUG_OUTPUT_NAME fltkimagesdlld
- COMPILE_DEFINITIONS "FL_DLL;FL_LIBRARY"
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_images_SHARED PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
+FL_ADD_LIBRARY(fltk_images SHARED "${IMGCPPFILES}")
+target_link_libraries(fltk_images_SHARED fltk_SHARED)
+
+if(OPTION_USE_SYSTEM_LIBJPEG)
+ target_link_libraries(fltk_images_SHARED ${FLTK_JPEG_LIBRARIES})
else()
- set_target_properties(fltk_images_SHARED PROPERTIES OUTPUT_NAME fltk_images)
-endif(MSVC)
+ target_link_libraries(fltk_images_SHARED fltk_jpeg_SHARED)
+endif(OPTION_USE_SYSTEM_LIBJPEG)
-#######################################################################
-install(TARGETS fltk_SHARED fltk_forms_SHARED fltk_images_SHARED
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+if(OPTION_USE_SYSTEM_ZLIB)
+ target_link_libraries(fltk_images_SHARED ${FLTK_ZLIB_LIBRARIES})
+else()
+ target_link_libraries(fltk_images_SHARED fltk_z_SHARED)
+endif(OPTION_USE_SYSTEM_ZLIB)
+
+if(OPTION_USE_SYSTEM_LIBPNG)
+ target_link_libraries(fltk_images_SHARED ${FLTK_PNG_LIBRARIES})
+else()
+ target_link_libraries(fltk_images_SHARED fltk_png_SHARED)
+endif(OPTION_USE_SYSTEM_LIBPNG)
#######################################################################
if(OPENGL_FOUND)
- add_library(fltk_gl_SHARED SHARED ${GLCPPFILES})
- target_link_libraries(fltk_gl_SHARED fltk ${OPENGL_LIBRARIES})
- set_target_properties(fltk_gl_SHARED
- PROPERTIES CLEAN_DIRECT_OUTPUT 1
- VERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
- SOVERSION ${FLTK_VERSION_PATCH}
- )
- if(MSVC)
- set_target_properties(fltk_gl_SHARED
- PROPERTIES
- OUTPUT_NAME fltkgldll
- DEBUG_OUTPUT_NAME fltkgldlld
- COMPILE_DEFINITIONS "FL_DLL;FL_LIBRARY"
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_gl_SHARED PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
- else()
- set_target_properties(fltk_gl_SHARED PROPERTIES OUTPUT_NAME fltk_gl)
- endif(MSVC)
-
- install(TARGETS fltk_gl_SHARED
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
- )
+ FL_ADD_LIBRARY(fltk_gl SHARED "${GLCPPFILES}")
+ target_link_libraries(fltk_gl_SHARED fltk_SHARED ${OPENGL_LIBRARIES})
endif(OPENGL_FOUND)
+#######################################################################
endif(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
diff --git a/src/Fl.cxx b/src/Fl.cxx
index e8cfd5e..05618d6 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx 9666 2012-08-16 20:59:36Z matt $"
+// "$Id: Fl.cxx 10364 2014-10-08 12:47:20Z ossman $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -67,20 +67,20 @@ void fl_cleanup_pens(void);
void fl_release_dc(HWND,HDC);
void fl_cleanup_dc_list(void);
#elif defined(__APPLE__)
-extern double fl_mac_flush_and_wait(double time_to_wait, char in_idle);
+extern double fl_mac_flush_and_wait(double time_to_wait);
#endif // WIN32
//
// Globals...
//
#if defined(__APPLE__) || defined(FL_DOXYGEN)
-const char *Fl_Mac_App_Menu::about = "About ";
+const char *Fl_Mac_App_Menu::about = "About %@";
const char *Fl_Mac_App_Menu::print = "Print Front Window";
const char *Fl_Mac_App_Menu::services = "Services";
-const char *Fl_Mac_App_Menu::hide = "Hide ";
+const char *Fl_Mac_App_Menu::hide = "Hide %@";
const char *Fl_Mac_App_Menu::hide_others = "Hide Others";
const char *Fl_Mac_App_Menu::show = "Show All";
-const char *Fl_Mac_App_Menu::quit = "Quit ";
+const char *Fl_Mac_App_Menu::quit = "Quit %@";
#endif // __APPLE__
#ifndef FL_DOXYGEN
Fl_Widget *Fl::belowmouse_,
@@ -104,6 +104,8 @@ int Fl::damage_,
char *Fl::e_text = (char *)"";
int Fl::e_length;
+const char* Fl::e_clipboard_type = "";
+void * Fl::e_clipboard_data = NULL;
Fl_Event_Dispatch Fl::e_dispatch = 0;
@@ -111,13 +113,16 @@ unsigned char Fl::options_[] = { 0, 0 };
unsigned char Fl::options_read_ = 0;
-Fl_Window *fl_xfocus; // which window X thinks has focus
+Fl_Window *fl_xfocus = NULL; // which window X thinks has focus
Fl_Window *fl_xmousewin;// which window X thinks has FL_ENTER
Fl_Window *Fl::grab_; // most recent Fl::grab()
Fl_Window *Fl::modal_; // topmost modal() window
#endif // FL_DOXYGEN
+char const * const Fl::clipboard_plain_text = "text/plain";
+char const * const Fl::clipboard_image = "image";
+
//
// 'Fl::version()' - Return the API version number...
//
@@ -220,7 +225,7 @@ int Fl::event_inside(const Fl_Widget *o) /*const*/ {
#elif defined(__APPLE__)
-// implementation in Fl_mac.cxx
+// implementation in Fl_cocoa.mm (was Fl_mac.cxx)
#else
@@ -430,11 +435,75 @@ static void run_checks()
}
}
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__APPLE__)
static char in_idle;
#endif
////////////////////////////////////////////////////////////////
+// Clipboard notifications
+
+struct Clipboard_Notify {
+ Fl_Clipboard_Notify_Handler handler;
+ void *data;
+ struct Clipboard_Notify *next;
+};
+
+static struct Clipboard_Notify *clip_notify_list = NULL;
+
+extern void fl_clipboard_notify_change(); // in Fl_<platform>.cxx
+
+void Fl::add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data) {
+ struct Clipboard_Notify *node;
+
+ remove_clipboard_notify(h);
+
+ node = new Clipboard_Notify;
+
+ node->handler = h;
+ node->data = data;
+ node->next = clip_notify_list;
+
+ clip_notify_list = node;
+
+ fl_clipboard_notify_change();
+}
+
+void Fl::remove_clipboard_notify(Fl_Clipboard_Notify_Handler h) {
+ struct Clipboard_Notify *node, **prev;
+
+ node = clip_notify_list;
+ prev = &clip_notify_list;
+ while (node != NULL) {
+ if (node->handler == h) {
+ *prev = node->next;
+ delete node;
+
+ fl_clipboard_notify_change();
+
+ return;
+ }
+
+ prev = &node->next;
+ node = node->next;
+ }
+}
+
+bool fl_clipboard_notify_empty(void) {
+ return clip_notify_list == NULL;
+}
+
+void fl_trigger_clipboard_notify(int source) {
+ struct Clipboard_Notify *node, *next;
+
+ node = clip_notify_list;
+ while (node != NULL) {
+ next = node->next;
+ node->handler(source, node->data);
+ node = next;
+ }
+}
+
+////////////////////////////////////////////////////////////////
// wait/run/check/ready:
void (*Fl::idle)(); // see Fl::add_idle.cxx for the add/remove functions
@@ -456,16 +525,7 @@ double Fl::wait(double time_to_wait) {
#elif defined(__APPLE__)
run_checks();
- if (idle) {
- if (!in_idle) {
- in_idle = 1;
- idle();
- in_idle = 0;
- }
- // the idle function may turn off idle, we can then wait:
- if (idle) time_to_wait = 0.0;
- }
- return fl_mac_flush_and_wait(time_to_wait, in_idle);
+ return fl_mac_flush_and_wait(time_to_wait);
#else
@@ -530,45 +590,6 @@ int Fl::run() {
return 0;
}
-#ifdef WIN32
-
-// Function to initialize COM/OLE for usage. This must be done only once.
-// We define a flag to register whether we called it:
-static char oleInitialized = 0;
-
-// This calls the Windows function OleInitialize() exactly once.
-void fl_OleInitialize() {
- if (!oleInitialized) {
- OleInitialize(0L);
- oleInitialized = 1;
- }
-}
-
-// This calls the Windows function OleUninitialize() only, if
-// OleInitialize has been called before.
-void fl_OleUninitialize() {
- if (oleInitialized) {
- OleUninitialize();
- oleInitialized = 0;
- }
-}
-
-class Fl_Win32_At_Exit {
-public:
- Fl_Win32_At_Exit() { }
- ~Fl_Win32_At_Exit() {
- fl_free_fonts(); // do some WIN32 cleanup
- fl_cleanup_pens();
- fl_OleUninitialize();
- fl_brush_action(1);
- fl_cleanup_dc_list();
- }
-};
-static Fl_Win32_At_Exit win32_at_exit;
-#endif
-
-
-
/**
Waits until "something happens" and then returns. Call this
repeatedly to "run" your program. You can also check what happened
@@ -828,6 +849,83 @@ static int send_handlers(int e) {
return 0;
}
+
+////////////////////////////////////////////////////////////////
+// System event handlers:
+
+
+struct system_handler_link {
+ Fl_System_Handler handle;
+ void *data;
+ system_handler_link *next;
+};
+
+
+static system_handler_link *sys_handlers = 0;
+
+
+/**
+ \brief Install a function to intercept system events.
+
+ FLTK calls each of these functions as soon as a new system event is
+ received. The processing will stop at the first function to return
+ non-zero. If all functions return zero then the event is passed on
+ for normal handling by FLTK.
+
+ Each function will be called with a pointer to the system event as
+ the first argument and \p data as the second argument. The system
+ event pointer will always be void *, but will point to different
+ objects depending on the platform:
+ - X11: XEvent
+ - Windows: MSG
+ - OS X: NSEvent
+
+ \param ha The event handler function to register
+ \param data User data to include on each call
+
+ \see Fl::remove_system_handler(Fl_System_Handler)
+*/
+void Fl::add_system_handler(Fl_System_Handler ha, void *data) {
+ system_handler_link *l = new system_handler_link;
+ l->handle = ha;
+ l->data = data;
+ l->next = sys_handlers;
+ sys_handlers = l;
+}
+
+
+/**
+ Removes a previously added system event handler.
+
+ \param ha The event handler function to remove
+
+ \see Fl::add_system_handler(Fl_System_Handler)
+*/
+void Fl::remove_system_handler(Fl_System_Handler ha) {
+ system_handler_link *l, *p;
+
+ // Search for the handler in the list...
+ for (l = sys_handlers, p = 0; l && l->handle != ha; p = l, l = l->next);
+
+ if (l) {
+ // Found it, so remove it from the list...
+ if (p) p->next = l->next;
+ else sys_handlers = l->next;
+
+ // And free the record...
+ delete l;
+ }
+}
+
+int fl_send_system_handlers(void *e) {
+ for (const system_handler_link *hl = sys_handlers; hl; hl = hl->next) {
+ if (hl->handle(e, hl->data))
+ return 1;
+ }
+ return 0;
+}
+
+
////////////////////////////////////////////////////////////////
Fl_Widget* fl_oldfocus; // kludge for Fl_Group...
@@ -862,10 +960,18 @@ void Fl::focus(Fl_Widget *o) {
if (fl_xfocus != win) {
Fl_X *x = Fl_X::i(win);
if (x) x->set_key_window();
- }
+ }
+#elif defined(USE_X11)
+ if (fl_xfocus != win) {
+ Fl_X *x = Fl_X::i(win);
+ if (!Fl_X::ewmh_supported())
+ win->show(); // Old WMs, XMapRaised
+ else if (x) // New WMs use the NETWM attribute:
+ Fl_X::activate_window(x->xid);
+ }
#endif
fl_xfocus = win;
- }
+ }
}
// take focus from the old focused window
fl_oldfocus = 0;
@@ -1357,11 +1463,38 @@ int Fl::handle_(int e, Fl_Window* window)
////////////////////////////////////////////////////////////////
// hide() destroys the X window, it does not do unmap!
-#if !defined(WIN32) && USE_XFT
+#if defined(WIN32)
+extern void fl_clipboard_notify_retarget(HWND wnd);
+extern void fl_update_clipboard(void);
+#elif USE_XFT
extern void fl_destroy_xft_draw(Window);
#endif
void Fl_Window::hide() {
+#ifdef WIN32
+ // STR#3079: if there remains a window and a non-modal window, and the window is deleted,
+ // the app remains running without any apparent window.
+ // Bug mechanism: hiding an owner window unmaps the owned (non-modal) window(s)
+ // but does not delete it(them) in FLTK.
+ // Fix for it:
+ // when hiding a window, build list of windows it owns, and do hide/show on them.
+ int count = 0;
+ Fl_Window *win, **doit = NULL;
+ for (win = Fl::first_window(); win && i; win = Fl::next_window(win)) {
+ if (win->non_modal() && GetWindow(fl_xid(win), GW_OWNER) == i->xid) {
+ count++;
+ }
+ }
+ if (count) {
+ doit = new Fl_Window*[count];
+ count = 0;
+ for (win = Fl::first_window(); win && i; win = Fl::next_window(win)) {
+ if (win->non_modal() && GetWindow(fl_xid(win), GW_OWNER) == i->xid) {
+ doit[count++] = win;
+ }
+ }
+ }
+#endif
clear_visible();
if (!shown()) return;
@@ -1402,16 +1535,14 @@ void Fl_Window::hide() {
handle(FL_HIDE);
#if defined(WIN32)
+ // make sure any custom icons get freed
+ icons(NULL, 0);
// this little trick keeps the current clipboard alive, even if we are about
// to destroy the window that owns the selection.
- if (GetClipboardOwner()==ip->xid) {
- Fl_Window *w1 = Fl::first_window();
- if (w1 && OpenClipboard(fl_xid(w1))) {
- EmptyClipboard();
- SetClipboardData(CF_TEXT, NULL);
- CloseClipboard();
- }
- }
+ if (GetClipboardOwner()==ip->xid)
+ fl_update_clipboard();
+ // Make sure we unlink this window from the clipboard chain
+ fl_clipboard_notify_retarget(ip->xid);
// Send a message to myself so that I'll get out of the event loop...
PostMessage(ip->xid, WM_APP, 0, 0);
if (ip->private_dc) fl_release_dc(ip->xid, ip->private_dc);
@@ -1445,6 +1576,12 @@ void Fl_Window::hide() {
ShowWindow(p, SW_SHOWNA);
}
XDestroyWindow(fl_display, ip->xid);
+ // end of fix for STR#3079
+ for (int ii = 0; ii < count; ii++) {
+ doit[ii]->hide();
+ doit[ii]->show();
+ }
+ if (count) delete[] doit;
#elif defined(__APPLE_QUARTZ__)
ip->destroy();
#else
@@ -1459,12 +1596,6 @@ void Fl_Window::hide() {
delete ip;
}
-Fl_Window::~Fl_Window() {
- hide();
- if (xclass_) {
- free(xclass_);
- }
-}
// FL_SHOW and FL_HIDE are called whenever the visibility of this widget
// or any parent changes. We must correctly map/unmap the system's window.
@@ -1551,12 +1682,23 @@ void Fl::selection(Fl_Widget &owner, const char* text, int len) {
/** Backward compatibility only.
This calls Fl::paste(receiver, 0);
- \see Fl::paste(Fl_Widget &receiver, int clipboard)
+ \see Fl::paste(Fl_Widget &receiver, int clipboard, const char* type)
*/
void Fl::paste(Fl_Widget &receiver) {
Fl::paste(receiver, 0);
}
+#if FLTK_ABI_VERSION >= 10303
+#elif !defined(FL_DOXYGEN)
+void Fl::paste(Fl_Widget &receiver, int source)
+{
+ Fl::paste(receiver, source, Fl::clipboard_plain_text);
+}
+
+void Fl::copy(const char* stuff, int len, int destination) {
+ Fl::copy(stuff, len, destination, Fl::clipboard_plain_text);
+}
+#endif
////////////////////////////////////////////////////////////////
#include <FL/fl_draw.H>
@@ -1696,6 +1838,7 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
Fl::damage(FL_DAMAGE_CHILD);
}
void Fl_Window::flush() {
+ if (!shown()) return;
make_current();
//if (damage() == FL_DAMAGE_EXPOSE && can_boxcheat(box())) fl_boxcheat = this;
fl_clip_region(i->region); i->region = 0;
@@ -1931,6 +2074,14 @@ void Fl::clear_widget_pointer(Fl_Widget const *w)
There should be an application that manages options system wide, per user, and
per application.
+ Example:
+ \code
+ if ( Fl::option(Fl::OPTION_ARROW_FOCUS) )
+ { ..on.. }
+ else
+ { ..off.. }
+ \endcode
+
\note As of FLTK 1.3.0, options can be managed within fluid, using the menu
<i>Edit/Global FLTK Settings</i>.
@@ -1960,6 +2111,8 @@ bool Fl::option(Fl_Option opt)
options_[OPTION_DND_TEXT] = tmp;
opt_prefs.get("ShowTooltips", tmp, 1); // default: on
options_[OPTION_SHOW_TOOLTIPS] = tmp;
+ opt_prefs.get("FNFCUsesGTK", tmp, 1); // default: on
+ options_[OPTION_FNFC_USES_GTK] = tmp;
}
{ // next, check the user preferences
// override system options only, if the option is set ( >= 0 )
@@ -1977,6 +2130,8 @@ bool Fl::option(Fl_Option opt)
if (tmp >= 0) options_[OPTION_DND_TEXT] = tmp;
opt_prefs.get("ShowTooltips", tmp, -1);
if (tmp >= 0) options_[OPTION_SHOW_TOOLTIPS] = tmp;
+ opt_prefs.get("FNFCUsesGTK", tmp, -1);
+ if (tmp >= 0) options_[OPTION_FNFC_USES_GTK] = tmp;
}
{ // now, if the developer has registered this app, we could as for per-application preferences
}
@@ -1992,6 +2147,12 @@ bool Fl::option(Fl_Option opt)
This function does not change any system or user settings.
+ Example:
+ \code
+ Fl::option(Fl::OPTION_ARROW_FOCUS, true); // on
+ Fl::option(Fl::OPTION_ARROW_FOCUS, false); // off
+ \endcode
+
\param opt which option
\param val set to true or false
\see enum Fl::Fl_Option
@@ -2030,5 +2191,5 @@ Fl_Widget_Tracker::~Fl_Widget_Tracker()
//
-// End of "$Id: Fl.cxx 9666 2012-08-16 20:59:36Z matt $".
+// End of "$Id: Fl.cxx 10364 2014-10-08 12:47:20Z ossman $".
//
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx
index 01fb41a..67a2905 100644
--- a/src/Fl_Bitmap.cxx
+++ b/src/Fl_Bitmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Bitmap.cxx 9293 2012-03-18 18:48:29Z manolo $"
+// "$Id: Fl_Bitmap.cxx 10132 2014-04-28 09:17:12Z manolo $"
//
// Bitmap drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -243,35 +243,39 @@ void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
fl_graphics_driver->draw(this, XP, YP, WP, HP, cx, cy);
}
-static int start(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int w, int h, int &cx, int &cy,
+int Fl_Bitmap::start(int XP, int YP, int WP, int HP, int &cx, int &cy,
int &X, int &Y, int &W, int &H)
{
+ if (!array) {
+ draw_empty(XP, YP);
+ return 1;
+ }
// account for current clip region (faster on Irix):
fl_clip_box(XP,YP,WP,HP,X,Y,W,H);
cx += X-XP; cy += Y-YP;
// clip the box down to the size of image, quit if empty:
if (cx < 0) {W += cx; X -= cx; cx = 0;}
- if (cx+W > w) W = w-cx;
+ if (cx+W > w()) W = w()-cx;
if (W <= 0) return 1;
if (cy < 0) {H += cy; Y -= cy; cy = 0;}
- if (cy+H > h) H = h-cy;
+ if (cy+H > h()) H = h()-cy;
if (H <= 0) return 1;
+#if defined(WIN32)
+ if (!id_) id_ = fl_create_bitmap(w(), h(), array);
+#else
+ if (!id_) id_ = fl_create_bitmask(w(), h(), array);
+#endif
return 0;
}
#ifdef __APPLE__
void Fl_Quartz_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
int X, Y, W, H;
- if (!bm->array) {
- bm->draw_empty(XP, YP);
+ if (bm->start(XP, YP, WP, HP, cx, cy, X, Y, W, H)) {
return;
}
- if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
- return;
- }
- if (!bm->id_) bm->id_ = fl_create_bitmask(bm->w(), bm->h(), bm->array);
if (bm->id_ && fl_gc) {
- CGRect rect = { { X, Y }, { W, H } };
+ CGRect rect = { { (CGFloat)X, (CGFloat)Y }, { (CGFloat)W, (CGFloat)H } };
Fl_X::q_begin_image(rect, cx, cy, bm->w(), bm->h());
CGContextDrawImage(fl_gc, rect, (CGImageRef)bm->id_);
Fl_X::q_end_image();
@@ -281,60 +285,62 @@ void Fl_Quartz_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int
#elif defined(WIN32)
void Fl_GDI_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
int X, Y, W, H;
- if (!bm->array) {
- bm->draw_empty(XP, YP);
+ if (bm->start(XP, YP, WP, HP, cx, cy, X, Y, W, H)) {
return;
}
- if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
+
+ HDC tempdc = CreateCompatibleDC(fl_gc);
+ int save = SaveDC(tempdc);
+ SelectObject(tempdc, (HGDIOBJ)bm->id_);
+ SelectObject(fl_gc, fl_brush());
+ // secret bitblt code found in old MSWindows reference manual:
+ BitBlt(fl_gc, X, Y, W, H, tempdc, cx, cy, 0xE20746L);
+ RestoreDC(tempdc, save);
+ DeleteDC(tempdc);
+}
+
+void Fl_GDI_Printer_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+ int X, Y, W, H;
+ typedef BOOL (WINAPI* fl_transp_func) (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
+ static fl_transp_func fl_TransparentBlt = NULL;
+ static HMODULE hMod = NULL;
+ if (!hMod) {
+ hMod = LoadLibrary("MSIMG32.DLL");
+ if (hMod) fl_TransparentBlt = (fl_transp_func)GetProcAddress(hMod, "TransparentBlt");
+ }
+ if (!fl_TransparentBlt) {
+ Fl_GDI_Graphics_Driver::draw(bm, XP, YP, WP, HP, cx, cy);
+ return;
+ }
+ if (bm->start(XP, YP, WP, HP, cx, cy, X, Y, W, H)) {
return;
}
- if (!bm->id_) bm->id_ = fl_create_bitmap(bm->w(), bm->h(), bm->array);
- typedef BOOL (WINAPI* fl_transp_func) (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
- static fl_transp_func fl_TransparentBlt;
HDC tempdc;
int save;
- BOOL use_print_algo = false;
- if (Fl_Surface_Device::surface() != Fl_Display_Device::display_device()) {
- static HMODULE hMod = NULL;
- if (!hMod) {
- hMod = LoadLibrary("MSIMG32.DLL");
- if (hMod) fl_TransparentBlt = (fl_transp_func)GetProcAddress(hMod, "TransparentBlt");
- }
- if (fl_TransparentBlt) use_print_algo = true;
- }
- if (use_print_algo) { // algorithm for bitmap output to Fl_GDI_Printer
- Fl_Color save_c = fl_color(); // save bitmap's desired color
- uchar r, g, b;
- Fl::get_color(save_c, r, g, b);
- r = 255-r;
- g = 255-g;
- b = 255-b;
- Fl_Color background = fl_rgb_color(r, g, b); // a color very different from the bitmap's
- Fl_Offscreen tmp_id = fl_create_offscreen(W, H);
- fl_begin_offscreen(tmp_id);
- fl_color(background);
- fl_rectf(0,0,W,H); // use this color as offscreen background
- fl_color(save_c); // back to bitmap's color
- tempdc = CreateCompatibleDC(fl_gc);
- save = SaveDC(tempdc);
- SelectObject(tempdc, (HGDIOBJ)bm->id_);
- SelectObject(fl_gc, fl_brush()); // use bitmap's desired color
- BitBlt(fl_gc, 0, 0, W, H, tempdc, 0, 0, 0xE20746L); // draw bitmap to offscreen
- fl_end_offscreen(); // offscreen data is in tmp_id
- SelectObject(tempdc, (HGDIOBJ)tmp_id); // use offscreen data
- // draw it to printer context with background color as transparent
- fl_TransparentBlt(fl_gc, X,Y,W,H, tempdc, cx, cy, bm->w(), bm->h(), RGB(r, g, b) );
- fl_delete_offscreen(tmp_id);
- }
- else { // algorithm for bitmap output to display
- tempdc = CreateCompatibleDC(fl_gc);
- save = SaveDC(tempdc);
- SelectObject(tempdc, (HGDIOBJ)bm->id_);
- SelectObject(fl_gc, fl_brush());
- // secret bitblt code found in old MSWindows reference manual:
- BitBlt(fl_gc, X, Y, W, H, tempdc, cx, cy, 0xE20746L);
- }
+ // algorithm for bitmap output to Fl_GDI_Printer
+ Fl_Color save_c = fl_color(); // save bitmap's desired color
+ uchar r, g, b;
+ Fl::get_color(save_c, r, g, b);
+ r = 255-r;
+ g = 255-g;
+ b = 255-b;
+ Fl_Color background = fl_rgb_color(r, g, b); // a color very different from the bitmap's
+ Fl_Offscreen tmp_id = fl_create_offscreen(W, H);
+ fl_begin_offscreen(tmp_id);
+ fl_color(background);
+ fl_rectf(0,0,W,H); // use this color as offscreen background
+ fl_color(save_c); // back to bitmap's color
+ tempdc = CreateCompatibleDC(fl_gc);
+ save = SaveDC(tempdc);
+ SelectObject(tempdc, (HGDIOBJ)bm->id_);
+ SelectObject(fl_gc, fl_brush()); // use bitmap's desired color
+ BitBlt(fl_gc, 0, 0, W, H, tempdc, 0, 0, 0xE20746L); // draw bitmap to offscreen
+ fl_end_offscreen(); // offscreen data is in tmp_id
+ SelectObject(tempdc, (HGDIOBJ)tmp_id); // use offscreen data
+ // draw it to printer context with background color as transparent
+ fl_TransparentBlt(fl_gc, X,Y,W,H, tempdc, cx, cy, bm->w(), bm->h(), RGB(r, g, b) );
+ fl_delete_offscreen(tmp_id);
RestoreDC(tempdc, save);
DeleteDC(tempdc);
}
@@ -342,14 +348,9 @@ void Fl_GDI_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP,
#else // Xlib
void Fl_Xlib_Graphics_Driver::draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
int X, Y, W, H;
- if (!bm->array) {
- bm->draw_empty(XP, YP);
- return;
- }
- if (start(bm, XP, YP, WP, HP, bm->w(), bm->h(), cx, cy, X, Y, W, H)) {
+ if (bm->start(XP, YP, WP, HP, cx, cy, X, Y, W, H)) {
return;
}
- if (!bm->id_) bm->id_ = fl_create_bitmask(bm->w(), bm->h(), bm->array);
XSetStipple(fl_display, fl_gc, bm->id_);
int ox = X-cx; if (ox < 0) ox += bm->w();
@@ -469,5 +470,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
//
-// End of "$Id: Fl_Bitmap.cxx 9293 2012-03-18 18:48:29Z manolo $".
+// End of "$Id: Fl_Bitmap.cxx 10132 2014-04-28 09:17:12Z manolo $".
//
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx
index e75621b..145c80d 100644
--- a/src/Fl_Button.cxx
+++ b/src/Fl_Button.cxx
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Button.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Button.cxx 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Button widget for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -89,12 +89,12 @@ int Fl_Button::handle(int event) {
return 1;
case FL_PUSH:
if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
+ /* FALLTHROUGH */
case FL_DRAG:
if (Fl::event_inside(this)) {
if (type() == FL_RADIO_BUTTON) newval = 1;
else newval = !oldval;
- } else
- {
+ } else {
clear_changed();
newval = oldval;
}
@@ -126,10 +126,10 @@ int Fl_Button::handle(int event) {
return 1;
case FL_SHORTCUT:
if (!(shortcut() ?
- Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;
+ Fl::test_shortcut(shortcut()) : test_shortcut())) return 0;
if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
goto triggered_by_keyboard;
- case FL_FOCUS : /* FALLTHROUGH */
+ case FL_FOCUS :
case FL_UNFOCUS :
if (Fl::visible_focus()) {
if (box() == FL_NO_BOX) {
@@ -142,6 +142,7 @@ int Fl_Button::handle(int event) {
} else redraw();
return 1;
} else return 0;
+ /* NOTREACHED */
case FL_KEYBOARD :
if (Fl::focus() == this && Fl::event_key() == ' ' &&
!(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
@@ -174,7 +175,7 @@ void Fl_Button::simulate_key_action()
Fl::remove_timeout(key_release_timeout, key_release_tracker);
key_release_timeout(key_release_tracker);
}
- value(1);
+ value(1);
redraw();
key_release_tracker = new Fl_Widget_Tracker(this);
Fl::add_timeout(0.15, key_release_timeout, key_release_tracker);
@@ -185,7 +186,7 @@ void Fl_Button::key_release_timeout(void *d)
Fl_Widget_Tracker *wt = (Fl_Widget_Tracker*)d;
if (!wt)
return;
- if (wt==key_release_tracker)
+ if (wt==key_release_tracker)
key_release_tracker = 0L;
Fl_Button *btn = (Fl_Button*)wt->widget();
if (btn) {
@@ -196,7 +197,16 @@ void Fl_Button::key_release_timeout(void *d)
}
/**
- The constructor creates the button using the given position, size and label.
+ The constructor creates the button using the given position, size, and label.
+
+ The default box type is box(FL_UP_BOX).
+
+ You can control how the button is drawn when ON by setting down_box().
+ The default is FL_NO_BOX (0) which will select an appropriate box type
+ using the normal (OFF) box type by using fl_down(box()).
+
+ Derived classes may handle this differently.
+
\param[in] X, Y, W, H position and size of the widget
\param[in] L widget label, default is no label
*/
@@ -209,20 +219,34 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *L)
set_flag(SHORTCUT_LABEL);
}
+/**
+ The constructor creates the button using the given position, size, and label.
+
+ The Button type() is set to FL_RADIO_BUTTON.
+ \param[in] X, Y, W, H position and size of the widget
+ \param[in] L widget label, default is no label
+ */
Fl_Radio_Button::Fl_Radio_Button(int X,int Y,int W,int H,const char *L)
: Fl_Button(X, Y, W, H, L) {
type(FL_RADIO_BUTTON);
}
+/**
+ The constructor creates the button using the given position, size, and label.
+
+ The Button type() is set to FL_TOGGLE_BUTTON.
-Fl_Toggle_Button::Fl_Toggle_Button(int X,int Y,int W,int H,const char *l)
-: Fl_Button(X,Y,W,H,l)
+ \param[in] X, Y, W, H position and size of the widget
+ \param[in] L widget label, default is no label
+ */
+Fl_Toggle_Button::Fl_Toggle_Button(int X,int Y,int W,int H,const char *L)
+: Fl_Button(X,Y,W,H,L)
{
type(FL_TOGGLE_BUTTON);
}
//
-// End of "$Id: Fl_Button.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Button.cxx 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/src/Fl_Check_Button.cxx b/src/Fl_Check_Button.cxx
index 2da2e99..e42cac1 100644
--- a/src/Fl_Check_Button.cxx
+++ b/src/Fl_Check_Button.cxx
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Check_Button.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Check_Button.cxx 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Check button widget for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -19,14 +19,32 @@
#include <FL/Fl.H>
#include <FL/Fl_Check_Button.H>
-// TODO Correct incorrect Fl_Check_Button comments.
-// A subclass of Fl_Button that always draws as a diamond box. This
-// diamond is smaller than the widget size and can be surchecked by
-// another box type, for compatibility with Forms.
+/**
+ \class Fl_Check_Button
+ \brief A button with a "checkmark" to show its status.
+
+ \image html Fl_Check_Button.png
+ \image latex Fl_Check_Button.png "Fl_Check_Button" width=4cm
+
+ Buttons generate callbacks when they are clicked by the user. You control
+ exactly when and how by changing the values for type() and when().
+
+ The Fl_Check_Button subclass displays its "ON" state by showing a "checkmark"
+ rather than drawing itself pushed in.
+ */
/**
- Creates a new Fl_Check_Button widget using the given position, size and
- label string.
+ Creates a new Fl_Check_Button widget using the given position, size, and label string.
+
+ The default box type is FL_NO_BOX, which draws the label w/o a box
+ right of the checkmark.
+
+ The selection_color() sets the color of the checkmark.
+ Default is FL_FOREGROUND_COLOR (usually black).
+
+ You can use down_box() to change the box type of the checkmark.
+ Default is FL_DOWN_BOX.
+
\param[in] X, Y, W, H position and size of the widget
\param[in] L widget label, default is no label
*/
diff --git a/src/Fl_Color_Chooser.cxx b/src/Fl_Color_Chooser.cxx
index bfcc682..4b4ce1d 100644
--- a/src/Fl_Color_Chooser.cxx
+++ b/src/Fl_Color_Chooser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Color_Chooser.cxx 9673 2012-08-18 10:47:48Z AlbrechtS $"
+// "$Id: Fl_Color_Chooser.cxx 10234 2014-08-21 12:18:32Z cand $"
//
// Color chooser for the Fast Light Tool Kit (FLTK).
//
@@ -91,7 +91,7 @@ enum {
M_HEX, /**< mode() of Fl_Color_Chooser showing hex values */
M_HSV /**< mode() of Fl_Color_Chooser showing HSV values */
};
-static Fl_Menu_Item mode_menu[] = {
+static const Fl_Menu_Item mode_menu[] = {
{"rgb"},
{"byte"},
{"hex"},
@@ -619,5 +619,5 @@ int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int cmode)
/** @} */
//
-// End of "$Id: Fl_Color_Chooser.cxx 9673 2012-08-18 10:47:48Z AlbrechtS $".
+// End of "$Id: Fl_Color_Chooser.cxx 10234 2014-08-21 12:18:32Z cand $".
//
diff --git a/src/Fl_Copy_Surface.cxx b/src/Fl_Copy_Surface.cxx
new file mode 100644
index 0000000..ecb8ebc
--- /dev/null
+++ b/src/Fl_Copy_Surface.cxx
@@ -0,0 +1,399 @@
+//
+// "$Id: Fl_Copy_Surface.cxx 10209 2014-06-26 16:14:42Z manolo $"
+//
+// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Copy_Surface.H>
+#include <FL/Fl.H>
+
+
+#if defined(__APPLE__)
+#include <ApplicationServices/ApplicationServices.h>
+#if defined(__ppc__)
+#include <QuickTime/QuickTimeComponents.h>
+#endif // __ppc__
+
+Fl_Quartz_Surface_::Fl_Quartz_Surface_(int w, int h) : Fl_System_Printer(), width(w), height(h) {
+}
+
+int Fl_Quartz_Surface_::printable_rect(int *w, int *h) {
+ *w = width;
+ *h = height;
+ return 0;
+}
+
+const char *Fl_Quartz_Surface_::class_id = "Fl_Quartz_Surface_";
+
+#elif defined(WIN32)
+
+Fl_GDI_Surface_::Fl_GDI_Surface_() : Fl_Paged_Device() {
+ driver(new Fl_GDI_Graphics_Driver);
+ depth = 0;
+}
+
+Fl_GDI_Surface_::~Fl_GDI_Surface_() {
+ delete driver();
+}
+
+void Fl_GDI_Surface_::translate(int x, int y) {
+ GetWindowOrgEx(fl_gc, origins+depth);
+ SetWindowOrgEx(fl_gc, origins[depth].x - x, origins[depth].y - y, NULL);
+ if (depth < sizeof(origins)/sizeof(POINT)) depth++;
+ else Fl::warning("Fl_GDI_Surface_: translate stack overflow!");
+}
+
+void Fl_GDI_Surface_::untranslate() {
+ if (depth > 0) depth--;
+ SetWindowOrgEx(fl_gc, origins[depth].x, origins[depth].y, NULL);
+}
+
+const char *Fl_GDI_Surface_::class_id = "Fl_GDI_Surface_";
+
+#endif
+
+
+const char *Fl_Copy_Surface::class_id = "Fl_Copy_Surface";
+
+/** Constructor.
+ \param w and \param h are the width and height of the clipboard surface
+ in pixels where drawing will occur.
+ */
+Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL)
+{
+ width = w;
+ height = h;
+#ifdef __APPLE__
+ helper = new Fl_Quartz_Surface_(width, height);
+ driver(helper->driver());
+ prepare_copy_pdf_and_tiff(w, h);
+ oldgc = fl_gc;
+#elif defined(WIN32)
+ helper = new Fl_GDI_Surface_();
+ driver(helper->driver());
+ oldgc = fl_gc;
+ // exact computation of factor from screen units to EnhMetaFile units (0.01 mm)
+ HDC hdc = GetDC(NULL);
+ int hmm = GetDeviceCaps(hdc, HORZSIZE);
+ int hdots = GetDeviceCaps(hdc, HORZRES);
+ int vmm = GetDeviceCaps(hdc, VERTSIZE);
+ int vdots = GetDeviceCaps(hdc, VERTRES);
+ ReleaseDC(NULL, hdc);
+ float factorw = (100. * hmm) / hdots;
+ float factorh = (100. * vmm) / vdots + 0.5;
+
+ RECT rect; rect.left = 0; rect.top = 0; rect.right = w * factorw; rect.bottom = h * factorh;
+ gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL);
+ if (gc != NULL) {
+ SetTextAlign(gc, TA_BASELINE|TA_LEFT);
+ SetBkMode(gc, TRANSPARENT);
+ }
+#else // Xlib
+ helper = new Fl_Xlib_Surface_();
+ driver(helper->driver());
+ Fl::first_window()->make_current();
+ oldwindow = fl_xid(Fl::first_window());
+ xid = fl_create_offscreen(w,h);
+ Fl_Surface_Device *present_surface = Fl_Surface_Device::surface();
+ set_current();
+ fl_color(FL_WHITE);
+ fl_rectf(0, 0, w, h);
+ present_surface->set_current();
+#endif
+}
+
+/** Destructor.
+ */
+Fl_Copy_Surface::~Fl_Copy_Surface()
+{
+#ifdef __APPLE__
+ complete_copy_pdf_and_tiff();
+ fl_gc = oldgc;
+ delete (Fl_Quartz_Surface_*)helper;
+#elif defined(WIN32)
+ if(oldgc == fl_gc) oldgc = NULL;
+ HENHMETAFILE hmf = CloseEnhMetaFile (gc);
+ if ( hmf != NULL ) {
+ if ( OpenClipboard (NULL) ){
+ EmptyClipboard ();
+ SetClipboardData (CF_ENHMETAFILE, hmf);
+ CloseClipboard ();
+ }
+ DeleteEnhMetaFile(hmf);
+ }
+ DeleteDC(gc);
+ fl_gc = oldgc;
+ delete (Fl_GDI_Surface_*)helper;
+#else // Xlib
+ fl_pop_clip();
+ unsigned char *data = fl_read_image(NULL,0,0,width,height,0);
+ fl_window = oldwindow;
+ _ss->set_current();
+ Fl::copy_image(data,width,height,1);
+ delete[] data;
+ fl_delete_offscreen(xid);
+ delete (Fl_Xlib_Surface_*)helper;
+#endif
+}
+
+/** Copies a widget in the clipboard
+
+ \param widget any FLTK widget (e.g., standard, custom, window, GL view) to copy
+ \param delta_x and \param delta_y give
+ the position in the clipboard of the top-left corner of the widget
+ */
+void Fl_Copy_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
+{
+ helper->print_widget(widget, delta_x, delta_y);
+}
+
+void Fl_Copy_Surface::set_current()
+{
+#if defined(__APPLE__) || defined(WIN32)
+ fl_gc = gc;
+ fl_window = (Window)1;
+ Fl_Surface_Device::set_current();
+#else
+ fl_window=xid;
+ _ss = Fl_Surface_Device::surface();
+ Fl_Surface_Device::set_current();
+ fl_push_no_clip();
+#endif
+}
+
+
+#if defined(__APPLE__)
+
+size_t Fl_Copy_Surface::MyPutBytes(void* info, const void* buffer, size_t count)
+ {
+ CFDataAppendBytes ((CFMutableDataRef) info, (const UInt8 *)buffer, count);
+ return count;
+}
+
+void Fl_Copy_Surface::init_PDF_context(int w, int h)
+{
+ CGRect bounds = CGRectMake(0, 0, w, h );
+ pdfdata = CFDataCreateMutable(NULL, 0);
+ CGDataConsumerRef myconsumer;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+ if(CGDataConsumerCreateWithCFData != NULL) {
+ myconsumer = CGDataConsumerCreateWithCFData(pdfdata); // 10.4
+ }
+ else
+#endif
+ {
+ static CGDataConsumerCallbacks callbacks = { Fl_Copy_Surface::MyPutBytes, NULL };
+ myconsumer = CGDataConsumerCreate ((void*) pdfdata, &callbacks);
+ }
+ gc = CGPDFContextCreate (myconsumer, &bounds, NULL);
+ CGDataConsumerRelease (myconsumer);
+}
+
+void Fl_Copy_Surface::prepare_copy_pdf_and_tiff(int w, int h)
+{
+ init_PDF_context(w, h);
+ if (gc == NULL) return;
+ CGRect bounds = CGRectMake(0, 0, w, h );
+ CGContextBeginPage (gc, &bounds);
+ CGContextTranslateCTM(gc, 0, h);
+ CGContextScaleCTM(gc, 1.0f, -1.0f);
+ CGContextSaveGState(gc);
+}
+
+
+void Fl_Copy_Surface::complete_copy_pdf_and_tiff()
+{
+ CGContextRestoreGState(gc);
+ CGContextEndPage(gc);
+ CGContextRelease(gc);
+ PasteboardRef clipboard = NULL;
+ PasteboardCreate(kPasteboardClipboard, &clipboard);
+ PasteboardClear(clipboard); // first, copy PDF to clipboard
+ PasteboardPutItemFlavor (clipboard, (PasteboardItemID)1,
+ CFSTR("com.adobe.pdf"), // kUTTypePDF
+ pdfdata, kPasteboardFlavorNoFlags);
+ //second, transform this PDF to a bitmap image and put it as tiff in clipboard
+ CGDataProviderRef prov;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+ if(fl_mac_os_version >= 100400)
+ prov = CGDataProviderCreateWithCFData(pdfdata); // 10.4
+ else
+#endif
+ prov = CGDataProviderCreateWithData(NULL, CFDataGetBytePtr(pdfdata), CFDataGetLength(pdfdata), NULL);
+ CGPDFDocumentRef pdfdoc = CGPDFDocumentCreateWithProvider(prov);
+ CGPDFPageRef pdfpage = CGPDFDocumentGetPage(pdfdoc, 1);
+ CGDataProviderRelease(prov);
+ CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
+ void *mem = ( fl_mac_os_version >= 100600 ? NULL : malloc(width * height * 4) );
+ gc = CGBitmapContextCreate(mem, width, height, 8, width * 4, space, kCGImageAlphaNoneSkipLast);
+ CFRelease(space);
+ if (gc == NULL) { if (mem) free(mem); return; }
+ CGRect rect = CGRectMake(0, 0, width, height);
+ CGContextSetRGBFillColor(gc, 1,1,1,1);//need to clear background
+ CGContextFillRect(gc, rect);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ CGContextDrawPDFPage(gc, pdfpage); // requires 10.3
+#endif
+ CGPDFDocumentRelease(pdfdoc);
+ CFRelease(pdfdata);
+ PasteboardPutItemFlavor(clipboard, (PasteboardItemID)1, CFSTR("public.tiff"),
+ Fl_X::CGBitmapContextToTIFF(gc), kPasteboardFlavorNoFlags);
+ CFRelease(clipboard);
+ CGContextRelease(gc);
+ if (mem) free(mem);
+}
+
+#endif // __APPLE__
+
+#if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN))
+/* graphics driver that translates all graphics coordinates before calling Xlib */
+class Fl_translated_Xlib_Graphics_Driver_ : public Fl_Xlib_Graphics_Driver {
+ int offset_x, offset_y; // translation between user and graphical coordinates: graphical = user + offset
+ unsigned depth; // depth of translation stack
+ int stack_x[20], stack_y[20]; // translation stack allowing cumulative translations
+public:
+ static const char *class_id;
+ const char *class_name() {return class_id;};
+ Fl_translated_Xlib_Graphics_Driver_() {
+ offset_x = 0; offset_y = 0;
+ depth = 0;
+ }
+ virtual ~Fl_translated_Xlib_Graphics_Driver_() {};
+ void translate_all(int dx, int dy) { // reversibly adds dx,dy to the offset between user and graphical coordinates
+ stack_x[depth] = offset_x;
+ stack_y[depth] = offset_y;
+ offset_x = stack_x[depth] + dx;
+ offset_y = stack_y[depth] + dy;
+ push_matrix();
+ translate(dx, dy);
+ if (depth < sizeof(stack_x)/sizeof(int)) depth++;
+ else Fl::warning("%s: translate stack overflow!", class_id);
+ }
+ void untranslate_all() { // undoes previous translate_all()
+ if (depth > 0) depth--;
+ offset_x = stack_x[depth];
+ offset_y = stack_y[depth];
+ pop_matrix();
+ }
+ void rect(int x, int y, int w, int h) { Fl_Xlib_Graphics_Driver::rect(x+offset_x, y+offset_y, w, h); }
+ void rectf(int x, int y, int w, int h) { Fl_Xlib_Graphics_Driver::rectf(x+offset_x, y+offset_y, w, h); }
+ void xyline(int x, int y, int x1) { Fl_Xlib_Graphics_Driver::xyline(x+offset_x, y+offset_y, x1+offset_x); }
+ void xyline(int x, int y, int x1, int y2) { Fl_Xlib_Graphics_Driver::xyline(x+offset_x, y+offset_y, x1+offset_x, y2+offset_y); }
+ void xyline(int x, int y, int x1, int y2, int x3) { Fl_Xlib_Graphics_Driver::xyline(x+offset_x, y+offset_y, x1+offset_x, y2+offset_y, x3+offset_x); }
+ void yxline(int x, int y, int y1) { Fl_Xlib_Graphics_Driver::yxline(x+offset_x, y+offset_y, y1+offset_y); }
+ void yxline(int x, int y, int y1, int x2) { Fl_Xlib_Graphics_Driver::yxline(x+offset_x, y+offset_y, y1+offset_y, x2+offset_x); }
+ void yxline(int x, int y, int y1, int x2, int y3) { Fl_Xlib_Graphics_Driver::yxline(x+offset_x, y+offset_y, y1+offset_y, x2+offset_x, y3+offset_y); }
+ void line(int x, int y, int x1, int y1) { Fl_Xlib_Graphics_Driver::line(x+offset_x, y+offset_y, x1+offset_x, y1+offset_y); }
+ void line(int x, int y, int x1, int y1, int x2, int y2) { Fl_Xlib_Graphics_Driver::line(x+offset_x, y+offset_y, x1+offset_x, y1+offset_y, x2+offset_x, y2+offset_y); }
+ void draw(const char* str, int n, int x, int y) {
+ Fl_Xlib_Graphics_Driver::draw(str, n, x+offset_x, y+offset_y);
+ }
+ void draw(int angle, const char *str, int n, int x, int y) {
+ Fl_Xlib_Graphics_Driver::draw(angle, str, n, x+offset_x, y+offset_y);
+ }
+ void rtl_draw(const char* str, int n, int x, int y) {
+ Fl_Xlib_Graphics_Driver::rtl_draw(str, n, x+offset_x, y+offset_y);
+ }
+ void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy) {
+ XP += offset_x; YP += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw(pxm, XP, YP, WP,HP,cx,cy);
+ untranslate_all();
+ }
+ void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy) {
+ XP += offset_x; YP += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw(bm, XP, YP, WP,HP,cx,cy);
+ untranslate_all();
+ }
+ void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy) {
+ XP += offset_x; YP += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw(img, XP, YP, WP,HP,cx,cy);
+ untranslate_all();
+ }
+ void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) {
+ X += offset_x; Y += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw_image(buf, X, Y, W,H,D,L);
+ untranslate_all();
+ }
+ void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) {
+ X += offset_x; Y += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw_image(cb, data, X, Y, W,H,D);
+ untranslate_all();
+ }
+ void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) {
+ X += offset_x; Y += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw_image_mono(buf, X, Y, W,H,D,L);
+ untranslate_all();
+ }
+ void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) {
+ X += offset_x; Y += offset_y;
+ translate_all(-offset_x, -offset_y);
+ Fl_Xlib_Graphics_Driver::draw_image_mono(cb, data, X, Y, W,H,D);
+ untranslate_all();
+ }
+ void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
+ Fl_Xlib_Graphics_Driver::copy_offscreen(x+offset_x, y+offset_y, w, h,pixmap,srcx,srcy);
+ }
+ void push_clip(int x, int y, int w, int h) {
+ Fl_Xlib_Graphics_Driver::push_clip(x+offset_x, y+offset_y, w, h);
+ }
+ int not_clipped(int x, int y, int w, int h) { return Fl_Xlib_Graphics_Driver::not_clipped(x + offset_x, y + offset_y, w, h); };
+ int clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H) {
+ int retval = Fl_Xlib_Graphics_Driver::clip_box(x + offset_x, y + offset_y, w,h,X,Y,W,H);
+ X -= offset_x;
+ Y -= offset_y;
+ return retval;
+ }
+ void pie(int x, int y, int w, int h, double a1, double a2) { Fl_Xlib_Graphics_Driver::pie(x+offset_x,y+offset_y,w,h,a1,a2); }
+ void arc(int x, int y, int w, int h, double a1, double a2) { Fl_Xlib_Graphics_Driver::arc(x+offset_x,y+offset_y,w,h,a1,a2); }
+ void polygon(int x0, int y0, int x1, int y1, int x2, int y2) { Fl_Xlib_Graphics_Driver::polygon(x0+offset_x,y0+offset_y,x1+offset_x,y1+offset_y,x2+offset_x,y2+offset_y);}
+ void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
+ Fl_Xlib_Graphics_Driver::polygon(x0+offset_x,y0+offset_y,x1+offset_x,y1+offset_y,x2+offset_x,y2+offset_y,x3+offset_x,y3+offset_y);
+ }
+ void loop(int x0, int y0, int x1, int y1, int x2, int y2) {Fl_Xlib_Graphics_Driver::loop(x0+offset_x,y0+offset_y,x1+offset_x,y1+offset_y,x2+offset_x,y2+offset_y);}
+ void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) {
+ Fl_Xlib_Graphics_Driver::loop(x0+offset_x,y0+offset_y,x1+offset_x,y1+offset_y,x2+offset_x,y2+offset_y,x3+offset_x,y3+offset_y);
+ }
+ void point(int x, int y) { Fl_Xlib_Graphics_Driver::point(x+offset_x, y+offset_y); }
+};
+
+const char *Fl_translated_Xlib_Graphics_Driver_::class_id = "Fl_translated_Xlib_Graphics_Driver_";
+
+void Fl_Xlib_Surface_::translate(int x, int y) {
+ ((Fl_translated_Xlib_Graphics_Driver_*)driver())->translate_all(x, y);
+}
+void Fl_Xlib_Surface_::untranslate() {
+ ((Fl_translated_Xlib_Graphics_Driver_*)driver())->untranslate_all();
+}
+
+Fl_Xlib_Surface_::Fl_Xlib_Surface_() : Fl_Paged_Device() {
+ driver(new Fl_translated_Xlib_Graphics_Driver_());
+}
+Fl_Xlib_Surface_::~Fl_Xlib_Surface_() {
+ delete driver();
+}
+
+const char *Fl_Xlib_Surface_::class_id = "Fl_Xlib_Surface_";
+
+#endif
+
+//
+// End of "$Id: Fl_Copy_Surface.cxx 10209 2014-06-26 16:14:42Z manolo $".
+//
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index e31643d..6fbfa24 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Double_Window.cxx 9719 2012-11-13 14:45:42Z manolo $"
+// "$Id: Fl_Double_Window.cxx 10335 2014-09-23 10:48:36Z manolo $"
//
// Double-buffered window code for the Fast Light Tool Kit (FLTK).
//
@@ -214,12 +214,10 @@ void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,H
HDC new_gc = CreateCompatibleDC(fl_gc);
int save = SaveDC(new_gc);
SelectObject(new_gc, bitmap);
- fl_can_do_alpha_blending(); // make sure this is called
BOOL alpha_ok = 0;
// first try to alpha blend
- // if to printer, always try alpha_blend
- if ( Fl_Surface_Device::surface() != Fl_Display_Device::display_device() || fl_can_do_alpha_blending() ) {
- if (fl_alpha_blend) alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc);
+ if ( fl_can_do_alpha_blending() ) {
+ alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc);
}
// if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1
if (!alpha_ok) {
@@ -229,7 +227,6 @@ void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,H
DeleteDC(new_gc);
}
-extern void fl_restore_clip();
#elif defined(__APPLE_QUARTZ__) || defined(FL_DOXYGEN)
@@ -349,7 +346,6 @@ void fl_end_offscreen() {
/** @} */
-extern void fl_restore_clip();
#else
# error unsupported platform
@@ -369,6 +365,7 @@ void Fl_Double_Window::flush() {flush(0);}
and leaving the clip region set to the entire window.
*/
void Fl_Double_Window::flush(int eraseoverlay) {
+ if (!shown()) return;
make_current(); // make sure fl_gc is non-zero
Fl_X *myi = Fl_X::i(this);
if (!myi) return; // window not yet created
@@ -514,5 +511,5 @@ Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l)
//
-// End of "$Id: Fl_Double_Window.cxx 9719 2012-11-13 14:45:42Z manolo $".
+// End of "$Id: Fl_Double_Window.cxx 10335 2014-09-23 10:48:36Z manolo $".
//
diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx
index f6d4d65..d7f3d2a 100644
--- a/src/Fl_File_Browser.cxx
+++ b/src/Fl_File_Browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Browser.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: Fl_File_Browser.cxx 10145 2014-05-04 13:46:09Z manolo $"
//
// Fl_File_Browser routines.
//
@@ -62,6 +62,33 @@
# include <sys/mount.h>
#endif // __APPLE__
+#if defined(_AIX)
+extern "C" {
+# include <sys/types.h>
+# include <sys/vmount.h>
+# include <sys/mntctl.h>
+ // Older AIX versions don't expose this prototype
+ int
+ mntctl(int, int, char *);
+}
+#endif // _AIX
+
+#if defined(__NetBSD__)
+extern "C" {
+# include <sys/param.h> // For '__NetBSD_Version__' definition
+# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 300000000)
+# include <sys/types.h>
+# include <sys/statvfs.h>
+# if defined(HAVE_PTHREAD) && defined(HAVE_PTHREAD_H)
+# include <pthread.h>
+# endif // HAVE_PTHREAD && HAVE_PTHREAD_H
+# ifdef HAVE_PTHREAD
+ static pthread_mutex_t getvfsstat_mutex = PTHREAD_MUTEX_INITIALIZER;
+# endif // HAVE_PTHREAD/
+# endif // __NetBSD_Version__
+}
+#endif // __NetBSD__
+
//
// FL_BLINE definition from "Fl_Browser.cxx"...
//
@@ -349,7 +376,7 @@ Fl_File_Browser::item_draw(void *p, // I - List item data
if (columns)
{
// Try clipping inside this column...
- for (i = 0; i < column && columns[i]; i ++);
+ for (i = 0; i < column && columns[i]; i ++) { ; }
if (columns[i])
cW = columns[i];
@@ -522,6 +549,77 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
// Free the memory used for the file system info array...
delete[] fs;
}
+#elif defined(_AIX)
+ // AIX don't write the mounted filesystems to a file like '/etc/mnttab'.
+ // But reading the list of mounted filesystems from the kernel is possible:
+ // http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf1/mntctl.htm
+ int res = -1, len;
+ char *list = NULL, *name;
+ struct vmount *vp;
+
+ // We always have the root filesystem
+ add("/", icon);
+ // Get the required buffer size for the vmount structures
+ res = mntctl(MCTL_QUERY, sizeof(len), (char *) &len);
+ if (!res) {
+ // Allocate buffer ...
+ list = (char *) malloc((size_t) len);
+ if (NULL == list) {
+ res = -1;
+ } else {
+ // ... and read vmount structures from kernel
+ res = mntctl(MCTL_QUERY, len, list);
+ if (0 >= res) {
+ res = -1;
+ } else {
+ for (i = 0, vp = (struct vmount *) list; i < res; ++i) {
+ name = (char *) vp + vp->vmt_data[VMT_STUB].vmt_off;
+ strlcpy(filename, name, sizeof(filename));
+ // Skip the already added root filesystem
+ if (strcmp("/", filename) != 0) {
+ strlcat(filename, "/", sizeof(filename));
+ add(filename, icon);
+ }
+ vp = (struct vmount *) ((char *) vp + vp->vmt_length);
+ }
+ }
+ }
+ }
+ // Note: Executing 'free(NULL)' is allowed and simply do nothing
+ free((void *) list);
+#elif defined(__NetBSD__) && defined(__NetBSD_Version__) \
+ && (__NetBSD_Version__ >= 300000000)
+ // NetBSD don't write the mounted filesystems to a file like '/etc/mnttab'.
+ // Since NetBSD 3.0 the system call getvfsstat(2) has replaced getfsstat(2)
+ // that is used by getmntinfo(3):
+ // http://www.daemon-systems.org/man/getmntinfo.3.html
+ int res = -1;
+ struct statvfs *list;
+
+ // We always have the root filesystem
+ add("/", icon);
+# ifdef HAVE_PTHREAD
+ // Lock mutex for thread safety
+ if (!pthread_mutex_lock(&getvfsstat_mutex)) {
+# endif // HAVE_PTHREAD
+ // Get list of statvfs structures
+ res = getmntinfo(&list, ST_WAIT);
+ if(0 < res) {
+ for (i = 0; i < res; ++i) {
+ strlcpy(filename, list[i].f_mntonname, sizeof(filename));
+ // Skip the already added root filesystem
+ if (strcmp("/", filename) != 0) {
+ strlcat(filename, "/", sizeof(filename));
+ add(filename, icon);
+ }
+ }
+ } else {
+ res = -1;
+ }
+# ifdef HAVE_PTHREAD
+ pthread_mutex_unlock(&getvfsstat_mutex);
+ }
+# endif // HAVE_PTHREAD
#else
//
// UNIX code uses /etc/fstab or similar...
@@ -550,7 +648,10 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
if (sscanf(line, "%*s%4095s", filename) != 1)
continue;
- strlcat(filename, "/", sizeof(filename));
+ // Add a trailing slash (except for the root filesystem)
+ if (strcmp("/", filename) != 0) {
+ strlcat(filename, "/", sizeof(filename));
+ }
// printf("Fl_File_Browser::load() - adding \"%s\" to list...\n", filename);
add(filename, icon);
@@ -558,8 +659,13 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
}
fclose(mtab);
+ } else {
+ // Every Unix has a root filesystem '/'.
+ // This last stage fallback ensures that the user don't get an empty
+ // window after requesting filesystem list.
+ add("/", icon);
}
-#endif // WIN32 || __EMX__
+#endif // WIN32 || __EMX__ || __APPLE__ || _AIX || ...
}
else
{
@@ -630,5 +736,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string
//
-// End of "$Id: Fl_File_Browser.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: Fl_File_Browser.cxx 10145 2014-05-04 13:46:09Z manolo $".
//
diff --git a/src/Fl_File_Chooser.cxx b/src/Fl_File_Chooser.cxx
index 62ee256..935127e 100644
--- a/src/Fl_File_Chooser.cxx
+++ b/src/Fl_File_Chooser.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_File_Chooser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_File_Chooser.cxx 10358 2014-10-05 11:56:06Z AlbrechtS $"
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2011 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -15,8 +15,15 @@
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_File_Chooser.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "../FL/Fl_File_Chooser.H"
#include <FL/fl_draw.H>
@@ -53,7 +60,7 @@ void Fl_File_Chooser::cb_newButton(Fl_Button* o, void* v) {
}
#include <FL/Fl_Bitmap.H>
-static unsigned char idata_new[] =
+static const unsigned char idata_new[] =
{0,0,120,0,132,0,2,1,1,254,1,128,49,128,49,128,253,128,253,128,49,128,49,
128,1,128,1,128,255,255,0,0};
static Fl_Bitmap image_new(idata_new, 16, 16);
@@ -221,7 +228,7 @@ Fl_File_Chooser::Fl_File_Chooser(const char *d, const char *p, int t, const char
fileName->callback((Fl_Callback*)cb_fileName);
fileName->when(FL_WHEN_ENTER_KEY);
Fl_Group::current()->resizable(fileName);
- fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY);
+ fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);
} // Fl_File_Input* fileName
{ Fl_Box* o = new Fl_Box(10, 310, 105, 25, "Filename:");
o->labelfont(1);
@@ -462,5 +469,5 @@ Fl_Widget* Fl_File_Chooser::add_extra(Fl_Widget* gr) {
}
//
-// End of "$Id: Fl_File_Chooser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_File_Chooser.cxx 10358 2014-10-05 11:56:06Z AlbrechtS $".
//
diff --git a/src/Fl_File_Chooser.fl b/src/Fl_File_Chooser.fl
index d13d23e..b2a528b 100644
--- a/src/Fl_File_Chooser.fl
+++ b/src/Fl_File_Chooser.fl
@@ -1,13 +1,13 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {../FL/Fl_File_Chooser.H}
code_name {.cxx}
comment {//
-// "$Id: Fl_File_Chooser.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_File_Chooser.fl 10357 2014-10-05 11:28:29Z AlbrechtS $"
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2011 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -19,31 +19,55 @@ comment {//
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_File_Chooser.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
} {in_source in_header
}
-decl {\#include <FL/fl_draw.H>} {}
+decl {\#include <FL/fl_draw.H>} {private local
+}
class FL_EXPORT Fl_File_Chooser {open
} {
- decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public
- }
- decl {static Fl_Preferences prefs_;} {}
- decl {void (*callback_)(Fl_File_Chooser*, void *);} {}
- decl {void *data_;} {}
- decl {char directory_[FL_PATH_MAX];} {}
- decl {char pattern_[FL_PATH_MAX];} {}
- decl {char preview_text_[2048];} {}
- decl {int type_;} {}
- decl {void favoritesButtonCB();} {}
- decl {void favoritesCB(Fl_Widget *w);} {}
- decl {void fileListCB();} {}
- decl {void fileNameCB();} {}
- decl {void newdir();} {}
- decl {static void previewCB(Fl_File_Chooser *fc);} {}
- decl {void showChoiceCB();} {}
- decl {void update_favorites();} {}
- decl {void update_preview();} {}
+ decl {enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };} {public local
+ }
+ decl {static Fl_Preferences prefs_;} {private local
+ }
+ decl {void (*callback_)(Fl_File_Chooser*, void *);} {private local
+ }
+ decl {void *data_;} {private local
+ }
+ decl {char directory_[FL_PATH_MAX];} {private local
+ }
+ decl {char pattern_[FL_PATH_MAX];} {private local
+ }
+ decl {char preview_text_[2048];} {private local
+ }
+ decl {int type_;} {private local
+ }
+ decl {void favoritesButtonCB();} {private local
+ }
+ decl {void favoritesCB(Fl_Widget *w);} {private local
+ }
+ decl {void fileListCB();} {private local
+ }
+ decl {void fileNameCB();} {private local
+ }
+ decl {void newdir();} {private local
+ }
+ decl {static void previewCB(Fl_File_Chooser *fc);} {private local
+ }
+ decl {void showChoiceCB();} {private local
+ }
+ decl {void update_favorites();} {private local
+ }
+ decl {void update_preview();} {private local
+ }
Function {Fl_File_Chooser(const char *d, const char *p, int t, const char *title)} {} {
code {Fl_Group *prev_current = Fl_Group::current();} {}
Fl_Window window {
@@ -119,7 +143,7 @@ window->hide();} open
Fl_File_Input fileName {
callback {fileNameCB();}
private xywh {115 300 365 35} labelfont 1 when 8 resizable
- code0 {fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY);}
+ code0 {fileName->when(FL_WHEN_CHANGED | FL_WHEN_ENTER_KEY_ALWAYS);}
}
Fl_Box {} {
label {Filename:}
@@ -238,15 +262,15 @@ data_ = d;} {}
} {
code {return (fileList->color());} {}
}
- decl {int count();} {public
+ decl {int count();} {public local
}
- decl {void directory(const char *d);} {public
+ decl {void directory(const char *d);} {public local
}
Function {directory()} {return_type {char *}
} {
code {return directory_;} {}
}
- decl {void filter(const char *p);} {public
+ decl {void filter(const char *p);} {public local
}
Function {filter()} {return_type {const char *}
} {
@@ -294,19 +318,19 @@ okButton->parent()->init_sizes();} {}
} {
code {return (okButton->label());} {}
}
- decl {void preview(int e);} {public
+ decl {void preview(int e);} {public local
}
- decl {int preview() const { return previewButton->value(); }} {public
+ decl {int preview() const { return previewButton->value(); }} {public local
}
- decl {void showHidden(int e);} {private
+ decl {void showHidden(int e);} {private local
}
- decl {void remove_hidden_files();} {private
+ decl {void remove_hidden_files();} {private local
}
- decl {void rescan();} {public
+ decl {void rescan();} {public local
}
- decl {void rescan_keep_filename();} {public
+ decl {void rescan_keep_filename();} {public local
}
- decl {void show();} {public
+ decl {void show();} {public local
}
Function {shown()} {return_type int
} {
@@ -364,61 +388,62 @@ else
} {
code {data_ = d;} {}
}
- decl {const char *value(int f = 1);} {public
+ decl {const char *value(int f = 1);} {public local
}
- decl {void value(const char *filename);} {public
+ decl {void value(const char *filename);} {public local
}
Function {visible()} {return_type int
} {
code {return window->visible();} {}
}
decl {static const char *add_favorites_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *all_files_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *custom_filter_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *existing_file_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *favorites_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *filename_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *filesystems_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *manage_favorites_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *new_directory_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *new_directory_tooltip;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *preview_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *save_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *show_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static const char *hidden_label;} {
- comment {[standard text may be customized at run-time]} public
+ comment {[standard text may be customized at run-time]} public local
}
decl {static Fl_File_Sort_F *sort;} {
comment {the sort function that is used when loading
-the contents of a directory.} public
+the contents of a directory.} public local
+ }
+ decl {Fl_Widget* ext_group;} {private local
}
- decl {Fl_Widget* ext_group;} {}
Function {add_extra(Fl_Widget* gr)} {open return_type {Fl_Widget*}
} {
code {Fl_Widget* ret=ext_group;} {}
@@ -451,20 +476,20 @@ window->resizable(svres);} {}
}
}
-decl {FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);} {public
+decl {FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);} {public local
}
-decl {FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);} {public
+decl {FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);} {public local
}
-decl {FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));} {public
+decl {FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));} {public local
}
-decl {FL_EXPORT void fl_file_chooser_ok_label(const char*l);} {public
+decl {FL_EXPORT void fl_file_chooser_ok_label(const char*l);} {public local
}
comment {
//
-// End of "$Id: Fl_File_Chooser.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_File_Chooser.fl 10357 2014-10-05 11:28:29Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 72378d9..a1a0b9e 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Chooser2.cxx 9704 2012-10-19 11:23:51Z manolo $"
+// "$Id: Fl_File_Chooser2.cxx 10004 2013-10-21 04:58:43Z greg.ercolano $"
//
// More Fl_File_Chooser routines.
//
@@ -1423,6 +1423,15 @@ Fl_File_Chooser::update_preview()
previewBox->labelsize(size);
previewBox->labelfont(FL_COURIER);
}
+ } else if (image && ( (image->w() <= 0) ||
+ (image->h() <= 0) ||
+ (image->d() <= 0) )) {
+ // Image has errors? Show big 'X'
+ previewBox->label("X");
+ previewBox->align(FL_ALIGN_CLIP);
+ previewBox->labelsize(70);
+ previewBox->labelfont(FL_HELVETICA);
+ previewBox->redraw();
} else if (image) {
pbw = previewBox->w() - 20;
pbh = previewBox->h() - 20;
@@ -1696,5 +1705,5 @@ unquote_pathname(char *dst, // O - Destination string
//
-// End of "$Id: Fl_File_Chooser2.cxx 9704 2012-10-19 11:23:51Z manolo $".
+// End of "$Id: Fl_File_Chooser2.cxx 10004 2013-10-21 04:58:43Z greg.ercolano $".
//
diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx
index 1e31b13..89d7958 100644
--- a/src/Fl_File_Icon2.cxx
+++ b/src/Fl_File_Icon2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon2.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_File_Icon2.cxx 10140 2014-05-01 15:55:03Z manolo $"
//
// Fl_File_Icon system icon routines.
//
@@ -570,9 +570,14 @@ int Fl_File_Icon::load_image(const char *ifile) // I - File to read from
img->release();
#ifdef DEBUG
- printf("Icon File \"%s\":\n", xpm);
+{
+ int i;
+ printf("Icon File \"%s\":\n", ifile);
for (i = 0; i < num_data_; i ++)
+ {
printf(" %d,\n", data_[i]);
+ }
+}
#endif // DEBUG
return 0;
@@ -582,7 +587,7 @@ int Fl_File_Icon::load_image(const char *ifile) // I - File to read from
/**
Loads all system-defined icons. This call is useful when using the
FileChooser widget and should be used when the application starts:
-
+
\code
Fl_File_Icon::load_system_icons();
\endcode
@@ -616,7 +621,7 @@ Fl_File_Icon::load_system_icons(void) {
VERTEX, 7000, 5000, END, LINE, VERTEX, 3000, 4000,
VERTEX, 7000, 4000, END, LINE, VERTEX, 3000, 3000,
VERTEX, 7000, 3000, END, LINE, VERTEX, 3000, 2000,
- VERTEX, 7000, 2000, END,
+ VERTEX, 7000, 2000, END,
END
};
static short image[] = { // Image file icon
@@ -1009,5 +1014,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_File_Icon2.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_File_Icon2.cxx 10140 2014-05-01 15:55:03Z manolo $".
//
diff --git a/src/Fl_Font.H b/src/Fl_Font.H
index 3c6ddc8..6eb6743 100644
--- a/src/Fl_Font.H
+++ b/src/Fl_Font.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Font.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Font.H 10248 2014-08-23 08:41:58Z cand $"
//
// Font definitions for the Fast Light Tool Kit (FLTK).
//
@@ -29,7 +29,7 @@
# if USE_XFT
typedef struct _XftFont XftFont;
# elif !defined(WIN32) && !defined(__APPLE__)
-# include <FL/Xutf8.h>
+# include "Xutf8.h"
# endif // USE_XFT
/**
@@ -60,7 +60,6 @@ public:
# endif
ATSUStyle style;
short ascent, descent, q_width;
- char *q_name;
# elif USE_XFT
XftFont* font;
//const char* encoding;
@@ -105,5 +104,5 @@ FL_EXPORT char *fl_find_fontsize(char *name);
#endif
//
-// End of "$Id: Fl_Font.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Font.H 10248 2014-08-23 08:41:58Z cand $".
//
diff --git a/src/Fl_GDI_Printer.cxx b/src/Fl_GDI_Printer.cxx
index e07e5ec..ad1988b 100644
--- a/src/Fl_GDI_Printer.cxx
+++ b/src/Fl_GDI_Printer.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_GDI_Printer.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: Fl_GDI_Printer.cxx 10391 2014-10-23 11:33:43Z AlbrechtS $"
//
// Support for WIN32 printing for the Fast Light Tool Kit (FLTK).
//
@@ -132,8 +132,11 @@ void Fl_System_Printer::absolute_printable_rect(int *x, int *y, int *w, int *h)
{
POINT physPageSize;
POINT pixelsPerInch;
+ XFORM transform;
if (hPr == NULL) return;
+ GetWorldTransform(fl_gc, &transform);
+ ModifyWorldTransform(fl_gc, NULL, MWT_IDENTITY);
SetWindowOrgEx(fl_gc, 0, 0, NULL);
physPageSize.x = GetDeviceCaps(hPr, HORZRES);
@@ -152,11 +155,12 @@ void Fl_System_Printer::absolute_printable_rect(int *x, int *y, int *w, int *h)
*x = left_margin;
*y = top_margin;
origin(x_offset, y_offset);
+ SetWorldTransform(fl_gc, &transform);
}
void Fl_System_Printer::margins(int *left, int *top, int *right, int *bottom)
{
- int x, y, w, h;
+ int x = 0, y = 0, w = 0, h = 0;
absolute_printable_rect(&x, &y, &w, &h);
if (left) *left = x;
if (top) *top = y;
@@ -273,5 +277,5 @@ void Fl_System_Printer::untranslate (void)
#endif // WIN32
//
-// End of "$Id: Fl_GDI_Printer.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: Fl_GDI_Printer.cxx 10391 2014-10-23 11:33:43Z AlbrechtS $".
//
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index 53d2e1b..313cd8e 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Device_Plugin.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Gl_Device_Plugin.cxx 10051 2014-01-10 16:50:55Z manolo $"
//
// implementation of class Fl_Gl_Device_Plugin for the Fast Light Tool Kit (FLTK).
//
@@ -34,33 +34,12 @@ static void imgProviderReleaseData (void *info, const void *data, size_t size)
static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
{
-#ifdef WIN32
- HDC save_gc = fl_gc;
- const int bytesperpixel = 3;
-#elif defined(__APPLE__)
- CGContextRef save_gc = fl_gc;
+#if defined(__APPLE__)
const int bytesperpixel = 4;
#else
- _XGC *save_gc = fl_gc;
const int bytesperpixel = 3;
#endif
- Fl_Surface_Device *save_surface = Fl_Surface_Device::surface();
- fl_gc = NULL;
- Fl_Display_Device::display_device()->set_current();
-#ifdef WIN32
- Fl::check();
- Fl_Window *win = (Fl_Window*)glw;
- while( win->window() ) win = win->window();
- win->redraw();
- Fl::check();
- glw->make_current();
-#else
- glw->make_current();
- glw->redraw();
- glFlush();
- Fl::check();
- glFinish();
-#endif
+ glw->flush(); // forces a GL redraw necessary for the glpuzzle demo
// Read OpenGL context pixels directly.
// For extra safety, save & restore OpenGL states that are changed
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
@@ -73,17 +52,13 @@ static void print_gl_window(Fl_Gl_Window *glw, int x, int y, int height)
mByteWidth = (mByteWidth + 3) & ~3; // Align to 4 bytes
uchar *baseAddress = (uchar*)malloc(mByteWidth * glw->h());
glReadPixels(0, 0, glw->w(), glw->h(),
-#ifdef WIN32
- GL_RGB, GL_UNSIGNED_BYTE,
-#elif defined(__APPLE__)
+#if defined(__APPLE__)
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
-#else // FIXME Linux/Unix
+#else
GL_RGB, GL_UNSIGNED_BYTE,
#endif
baseAddress);
glPopClientAttrib();
- save_surface->set_current();
- fl_gc = save_gc;
#if defined(__APPLE__)
// kCGBitmapByteOrder32Host and CGBitmapInfo are supposed to arrive with 10.4
// but some 10.4 don't have kCGBitmapByteOrder32Host, so we play a little #define game
@@ -143,5 +118,5 @@ static Fl_Gl_Device_Plugin Gl_Device_Plugin;
FL_EXPORT int fl_gl_load_plugin = 0;
//
-// End of "$Id: Fl_Gl_Device_Plugin.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Gl_Device_Plugin.cxx 10051 2014-01-10 16:50:55Z manolo $".
//
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 36f3ddf..257085c 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.cxx 9264 2012-03-05 08:46:30Z manolo $"
+// "$Id: Fl_Gl_Window.cxx 10214 2014-06-30 10:30:58Z ossman $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -24,8 +24,6 @@ extern int fl_gl_load_plugin;
extern void gl_texture_reset();
#endif
-static int temp = fl_gl_load_plugin;
-
#include <FL/Fl.H>
#include <FL/x.H>
#ifdef __APPLE__
@@ -183,8 +181,10 @@ void Fl_Gl_Window::make_current() {
GLint xywh[4];
if (window()) {
- xywh[0] = x();
- xywh[1] = window()->h() - y() - h();
+ int xoff,yoff;
+ const Fl_Window *win = top_window_offset(xoff, yoff); // STR #2944 [2]
+ xywh[0] = xoff;
+ xywh[1] = win->h() - yoff - h();
} else {
xywh[0] = 0;
xywh[1] = 0;
@@ -249,10 +249,34 @@ void Fl_Gl_Window::swap_buffers() {
# endif
#elif defined(__APPLE_QUARTZ__)
if(overlay != NULL) {
- //aglSwapBuffers does not work well with overlays under cocoa
- glReadBuffer(GL_BACK);
- glDrawBuffer(GL_FRONT);
- glCopyPixels(0,0,w(),h(),GL_COLOR);
+ // STR# 2944 [1]
+ // Save matrixmode/proj/modelview/rasterpos before doing overlay.
+ //
+ int wo=w(), ho=h();
+ GLint matrixmode;
+ GLfloat pos[4];
+ glGetIntegerv(GL_MATRIX_MODE, &matrixmode);
+ glGetFloatv(GL_CURRENT_RASTER_POSITION, pos); // save original glRasterPos
+ glMatrixMode(GL_PROJECTION); // save proj/model matrices
+ glPushMatrix();
+ glLoadIdentity();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+ glScalef(2.0f/wo, 2.0f/ho, 1.0f);
+ glTranslatef(-wo/2.0f, -ho/2.0f, 0.0f); // set transform so 0,0 is bottom/left of Gl_Window
+ glRasterPos2i(0,0); // set glRasterPos to bottom left corner
+ {
+ // Emulate overlay by doing copypixels
+ glReadBuffer(GL_BACK);
+ glDrawBuffer(GL_FRONT);
+ glCopyPixels(0, 0, wo, ho, GL_COLOR); // copy GL_BACK to GL_FRONT
+ }
+ glPopMatrix(); // GL_MODELVIEW // restore model/proj matrices
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(matrixmode);
+ glRasterPos3f(pos[0], pos[1], pos[2]); // restore original glRasterPos
}
else
aglSwapBuffers((AGLContext)context_);
@@ -268,6 +292,7 @@ int fl_overlay_depth = 0;
void Fl_Gl_Window::flush() {
+ if (!shown()) return;
uchar save_valid = valid_f_ & 1;
#if HAVE_GL_OVERLAY && defined(WIN32)
uchar save_valid_f = valid_f_;
@@ -288,16 +313,9 @@ void Fl_Gl_Window::flush() {
#if HAVE_GL_OVERLAY && defined(WIN32)
- bool fixcursor = false; // for fixing the SGI 320 bug
-
// Draw into hardware overlay planes if they are damaged:
if (overlay && overlay != this
&& (damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE) || !save_valid)) {
- // SGI 320 messes up overlay with user-defined cursors:
- if (Fl_X::i(this)->cursor && Fl_X::i(this)->cursor != fl_default_cursor) {
- fixcursor = true; // make it restore cursor later
- SetCursor(0);
- }
fl_set_gl_context(this, (GLContext)overlay);
if (fl_overlay_depth)
wglRealizeLayerPalette(Fl_X::i(this)->private_dc, 1, TRUE);
@@ -310,7 +328,6 @@ void Fl_Gl_Window::flush() {
wglSwapLayerBuffers(Fl_X::i(this)->private_dc, WGL_SWAP_OVERLAY1);
// if only the overlay was damaged we are done, leave main layer alone:
if (damage() == FL_DAMAGE_OVERLAY) {
- if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
return;
}
}
@@ -406,9 +423,6 @@ void Fl_Gl_Window::flush() {
}
-#if HAVE_GL_OVERLAY && defined(WIN32)
- if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
-#endif
valid(1);
context_valid(1);
}
@@ -549,6 +563,11 @@ int Fl_Gl_Window::handle(int event)
return Fl_Window::handle(event);
}
+// don't remove me! this serves only to force linking of Fl_Gl_Device_Plugin.o
+int Fl_Gl_Window::gl_plugin_linkage() {
+ return fl_gl_load_plugin;
+}
+
//
-// End of "$Id: Fl_Gl_Window.cxx 9264 2012-03-05 08:46:30Z manolo $".
+// End of "$Id: Fl_Gl_Window.cxx 10214 2014-06-30 10:30:58Z ossman $".
//
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index 6584be7..3f9f8fc 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Group.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Group.cxx 10261 2014-08-29 12:10:11Z cand $"
//
// Group widget for the Fast Light Tool Kit (FLTK).
//
@@ -122,8 +122,10 @@ static int send(Fl_Widget* o, int event) {
}
// translate the current keystroke into up/down/left/right for navigation:
-#define ctrl(x) (x^0x40)
static int navkey() {
+ // The app may want these for hotkeys, check key state
+ if (Fl::event_state(FL_CTRL | FL_ALT | FL_META)) return 0;
+
switch (Fl::event_key()) {
case 0: // not an FL_KEYBOARD/FL_SHORTCUT event
break;
@@ -875,5 +877,5 @@ Fl_Spinner::Fl_Spinner(int X, int Y, int W, int H, const char *L)
//
-// End of "$Id: Fl_Group.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Group.cxx 10261 2014-08-29 12:10:11Z cand $".
//
diff --git a/src/Fl_Help_Dialog.cxx b/src/Fl_Help_Dialog.cxx
index ae8a36b..b608cbe 100644
--- a/src/Fl_Help_Dialog.cxx
+++ b/src/Fl_Help_Dialog.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Help_Dialog.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Help_Dialog.cxx 10357 2014-10-05 11:28:29Z AlbrechtS $"
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -15,8 +15,15 @@
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_Help_Dialog.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
-// generated by Fast Light User Interface Designer (fluid) version 1.0108
+// generated by Fast Light User Interface Designer (fluid) version 1.0303
#include "../FL/Fl_Help_Dialog.H"
#include "flstring.h"
@@ -192,13 +199,13 @@ Fl_Help_Dialog::Fl_Help_Dialog() {
window_->end();
} // Fl_Double_Window* window_
back_->deactivate();
-forward_->deactivate();
-
-index_ = -1;
-max_ = 0;
-find_pos_ = 0;
-
-fl_register_images();
+ forward_->deactivate();
+
+ index_ = -1;
+ max_ = 0;
+ find_pos_ = 0;
+
+ fl_register_images();
}
Fl_Help_Dialog::~Fl_Help_Dialog() {
@@ -215,8 +222,8 @@ void Fl_Help_Dialog::hide() {
void Fl_Help_Dialog::load(const char *f) {
view_->set_changed();
-view_->load(f);
-window_->label(view_->title());
+ view_->load(f);
+ window_->label(view_->title());
}
void Fl_Help_Dialog::position(int xx, int yy) {
@@ -237,16 +244,16 @@ void Fl_Help_Dialog::show(int argc, char **argv) {
void Fl_Help_Dialog::textsize(Fl_Fontsize s) {
view_->textsize(s);
-
-if (s <= 8)
- smaller_->deactivate();
-else
- smaller_->activate();
-
-if (s >= 18)
- larger_->deactivate();
-else
- larger_->activate();
+
+ if (s <= 8)
+ smaller_->deactivate();
+ else
+ smaller_->activate();
+
+ if (s >= 18)
+ larger_->deactivate();
+ else
+ larger_->activate();
}
Fl_Fontsize Fl_Help_Dialog::textsize() {
@@ -263,8 +270,8 @@ void Fl_Help_Dialog::topline(int n) {
void Fl_Help_Dialog::value(const char *f) {
view_->set_changed();
-view_->value(f);
-window_->label(view_->title());
+ view_->value(f);
+ window_->label(view_->title());
}
const char * Fl_Help_Dialog::value() const {
@@ -288,5 +295,5 @@ int Fl_Help_Dialog::y() {
}
//
-// End of "$Id: Fl_Help_Dialog.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Help_Dialog.cxx 10357 2014-10-05 11:28:29Z AlbrechtS $".
//
diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl
index 30e731b..42dc5d2 100644
--- a/src/Fl_Help_Dialog.fl
+++ b/src/Fl_Help_Dialog.fl
@@ -1,13 +1,13 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0108
+version 1.0303
header_name {../FL/Fl_Help_Dialog.H}
code_name {.cxx}
comment {//
-// "$Id: Fl_Help_Dialog.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Help_Dialog.fl 10357 2014-10-05 11:28:29Z AlbrechtS $"
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -19,20 +19,34 @@ comment {//
//
// http://www.fltk.org/str.php
//
+// ========================================================================
+// DO NOT EDIT FL/Fl_Help_Dialog.H and src/Fl_Help_Dialog.cxx !!!
+// ========================================================================
+// Please use fluid to change src/Fl_Help_Dialog.fl interactively
+// and then use fluid to "write code" or edit and use fluid -c .
+// ========================================================================
+//
} {in_source in_header
}
-decl {\#include "flstring.h"} {}
+decl {\#include "flstring.h"} {private local
+}
-decl {\#include <FL/fl_ask.H>} {}
+decl {\#include <FL/fl_ask.H>} {private local
+}
class FL_EXPORT Fl_Help_Dialog {open
} {
- decl {int index_;} {}
- decl {int max_;} {}
- decl {int line_[100];} {}
- decl {char file_[100][256];} {}
- decl {int find_pos_;} {}
+ decl {int index_;} {private local
+ }
+ decl {int max_;} {private local
+ }
+ decl {int line_[100]; // FIXME: we must remove those static numbers} {private local
+ }
+ decl {char file_[100][FL_PATH_MAX]; // FIXME: we must remove those static numbers} {private local
+ }
+ decl {int find_pos_;} {private local
+ }
Function {Fl_Help_Dialog()} {open
} {
Fl_Window window_ {
@@ -251,6 +265,6 @@ window_->label(view_->title());} {}
comment {
//
-// End of "$Id: Fl_Help_Dialog.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Help_Dialog.fl 10357 2014-10-05 11:28:29Z AlbrechtS $".
//} {in_source in_header
}
diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx
index 46d8090..f2e3fe0 100644
--- a/src/Fl_Help_View.cxx
+++ b/src/Fl_Help_View.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Help_View.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: Fl_Help_View.cxx 10234 2014-08-21 12:18:32Z cand $"
//
// Fl_Help_View widget routines.
//
@@ -97,7 +97,7 @@ static char initial_load = 0;
// Broken image...
//
-static const char *broken_xpm[] =
+static const char * const broken_xpm[] =
{
"16 24 4 1",
"@ c #000000",
@@ -3362,7 +3362,7 @@ Fl_Help_View::value(const char *val) // I - Text to view
static int // O - Code or -1 on error
quote_char(const char *p) { // I - Quoted string
int i; // Looping var
- static struct {
+ static const struct {
const char *name;
int namelen;
int code;
@@ -3505,5 +3505,5 @@ hscrollbar_callback(Fl_Widget *s, void *)
//
-// End of "$Id: Fl_Help_View.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: Fl_Help_View.cxx 10234 2014-08-21 12:18:32Z cand $".
//
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index 69c972b..da0bccf 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Image.cxx 9709 2012-11-09 16:02:08Z manolo $"
+// "$Id: Fl_Image.cxx 10377 2014-10-14 11:53:51Z AlbrechtS $"
//
// Image drawing code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2012 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -34,6 +34,8 @@ void fl_restore_clip(); // from fl_rect.cxx
// Base image class...
//
+Fl_RGB_Scaling Fl_Image::RGB_scaling_ = FL_RGB_SCALING_NEAREST;
+
/**
The destructor is a virtual method that frees all memory used
by the image.
@@ -159,13 +161,40 @@ Fl_Image::measure(const Fl_Label *lo, // I - Label
lh = img->h();
}
+/** Sets the RGB image scaling method used for copy(int, int).
+ Applies to all RGB images, defaults to FL_RGB_SCALING_NEAREST.
+*/
+void Fl_Image::RGB_scaling(Fl_RGB_Scaling method) {
+ RGB_scaling_ = method;
+}
+
+/** Returns the currently used RGB image scaling method. */
+Fl_RGB_Scaling Fl_Image::RGB_scaling() {
+ return RGB_scaling_;
+}
+
//
// RGB image class...
//
size_t Fl_RGB_Image::max_size_ = ~((size_t)0);
-/** The destructor free all memory and server resources that are used by the image. */
+int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg);
+
+/** The constructor creates a new RGBA image from the specified Fl_Pixmap.
+
+ The RGBA image is built fully opaque except for the transparent area
+ of the pixmap that is assigned the \par bg color with full transparency */
+Fl_RGB_Image::Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg):
+ Fl_Image(pxm->w(), pxm->h(), 4), id_(0), mask_(0)
+{
+ array = new uchar[w() * h() * d()];
+ alloc_array = 1;
+ fl_convert_pixmap(pxm->data(), (uchar*)array, bg);
+ data((const char **)&array, 1);
+}
+
+/** The destructor frees all memory and server resources that are used by the image. */
Fl_RGB_Image::~Fl_RGB_Image() {
uncache();
if (alloc_array) delete[] (uchar *)array;
@@ -245,25 +274,89 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) {
new_image = new Fl_RGB_Image(new_array, W, H, d());
new_image->alloc_array = 1;
- // Scale the image using a nearest-neighbor algorithm...
- for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) {
- for (dx = W, xerr = W, old_ptr = array + sy * line_d; dx > 0; dx --) {
- for (c = 0; c < d(); c ++) *new_ptr++ = old_ptr[c];
+ if (Fl_Image::RGB_scaling() == FL_RGB_SCALING_NEAREST) {
+ // Scale the image using a nearest-neighbor algorithm...
+ for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) {
+ for (dx = W, xerr = W, old_ptr = array + sy * line_d; dx > 0; dx --) {
+ for (c = 0; c < d(); c ++) *new_ptr++ = old_ptr[c];
+
+ old_ptr += xstep;
+ xerr -= xmod;
- old_ptr += xstep;
- xerr -= xmod;
+ if (xerr <= 0) {
+ xerr += W;
+ old_ptr += d();
+ }
+ }
- if (xerr <= 0) {
- xerr += W;
- old_ptr += d();
+ sy += ystep;
+ yerr -= ymod;
+ if (yerr <= 0) {
+ yerr += H;
+ sy ++;
}
}
+ } else {
+ // Bilinear scaling (FL_RGB_SCALING_BILINEAR)
+ const float xscale = (w() - 1) / (float) W;
+ const float yscale = (h() - 1) / (float) H;
+ for (dy = 0; dy < H; dy++) {
+ float oldy = dy * yscale;
+ if (oldy >= h())
+ oldy = h() - 1;
+ const float yfract = oldy - (unsigned) oldy;
+
+ for (dx = 0; dx < W; dx++) {
+ new_ptr = new_array + dy * W * d() + dx * d();
+
+ float oldx = dx * xscale;
+ if (oldx >= w())
+ oldx = w() - 1;
+ const float xfract = oldx - (unsigned) oldx;
+
+ const unsigned leftx = oldx;
+ const unsigned lefty = oldy;
+ const unsigned rightx = oldx + 1 >= w() ? oldx : oldx + 1;
+ const unsigned righty = oldy;
+ const unsigned dleftx = oldx;
+ const unsigned dlefty = oldy + 1 >= h() ? oldy : oldy + 1;
+ const unsigned drightx = rightx;
+ const unsigned drighty = dlefty;
+
+ uchar left[4], right[4], downleft[4], downright[4];
+ memcpy(left, array + lefty * line_d + leftx * d(), d());
+ memcpy(right, array + righty * line_d + rightx * d(), d());
+ memcpy(downleft, array + dlefty * line_d + dleftx * d(), d());
+ memcpy(downright, array + drighty * line_d + drightx * d(), d());
+
+ int i;
+ if (d() == 4) {
+ for (i = 0; i < 3; i++) {
+ left[i] *= left[3] / 255.0f;
+ right[i] *= right[3] / 255.0f;
+ downleft[i] *= downleft[3] / 255.0f;
+ downright[i] *= downright[3] / 255.0f;
+ }
+ }
+
+ const float leftf = 1 - xfract;
+ const float rightf = xfract;
+ const float upf = 1 - yfract;
+ const float downf = yfract;
+
+ for (i = 0; i < d(); i++) {
+ new_ptr[i] = (left[i] * leftf +
+ right[i] * rightf) * upf +
+ (downleft[i] * leftf +
+ downright[i] * rightf) * downf;
+ }
- sy += ystep;
- yerr -= ymod;
- if (yerr <= 0) {
- yerr += H;
- sy ++;
+ if (d() == 4 && new_ptr[3]) {
+ for (i = 0; i < 3; i++) {
+ new_ptr[i] /= new_ptr[3] / 255.0f;
+ }
+ }
+ }
}
}
@@ -453,6 +546,10 @@ static void imgProviderReleaseData (void *info, const void *data, size_t size)
delete[] (unsigned char *)data;
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+typedef void (*CGDataProviderReleaseDataCallback)(void *info, const void *data, size_t size);
+#endif
+
void Fl_Quartz_Graphics_Driver::draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy) {
int X, Y, W, H;
// Don't draw an empty image...
@@ -595,7 +692,6 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) {
m->label(_FL_IMAGE_LABEL, (const char*)this);
}
-
//
-// End of "$Id: Fl_Image.cxx 9709 2012-11-09 16:02:08Z manolo $".
+// End of "$Id: Fl_Image.cxx 10377 2014-10-14 11:53:51Z AlbrechtS $".
//
diff --git a/src/Fl_Image_Surface.cxx b/src/Fl_Image_Surface.cxx
new file mode 100644
index 0000000..b69b477
--- /dev/null
+++ b/src/Fl_Image_Surface.cxx
@@ -0,0 +1,157 @@
+//
+// "$Id: Fl_Image_Surface.cxx 10200 2014-06-18 01:22:16Z manolo $"
+//
+// Draw-to-image code for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Image_Surface.H>
+#include <FL/Fl_Printer.H>
+#include <FL/Fl.H>
+
+
+const char *Fl_Image_Surface::class_id = "Fl_Image_Surface";
+
+/** The constructor.
+ \param w and \param h give the size in pixels of the resulting image.
+ */
+Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) {
+ width = w;
+ height = h;
+#if !(defined(__APPLE__) || defined(WIN32))
+ gc = 0;
+ if (!fl_display) { // allows use of this class before any window is shown
+ fl_open_display();
+ gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0);
+ fl_gc = gc;
+ }
+#endif
+ offscreen = fl_create_offscreen(w, h);
+#ifdef __APPLE__
+ helper = new Fl_Quartz_Flipped_Surface_(width, height);
+ driver(helper->driver());
+#elif defined(WIN32)
+ helper = new Fl_GDI_Surface_();
+ driver(helper->driver());
+#else
+ helper = new Fl_Xlib_Surface_();
+ driver(helper->driver());
+#endif
+}
+
+/** The destructor.
+ */
+Fl_Image_Surface::~Fl_Image_Surface() {
+ fl_delete_offscreen(offscreen);
+#ifdef __APPLE__
+ delete (Fl_Quartz_Flipped_Surface_*)helper;
+#elif defined(WIN32)
+ delete (Fl_GDI_Surface_*)helper;
+#else
+ if (gc) { XFreeGC(fl_display, gc); fl_gc = 0; }
+ delete (Fl_Xlib_Surface_*)helper;
+#endif
+}
+
+/** Returns an image made of all drawings sent to the Fl_Image_Surface object.
+ The returned object contains its own copy of the RGB data.
+ */
+Fl_RGB_Image* Fl_Image_Surface::image()
+{
+ unsigned char *data;
+#ifdef __APPLE__
+ CGContextFlush(offscreen);
+ data = fl_read_image(NULL, 0, 0, width, height, 0);
+ fl_end_offscreen();
+#elif defined(WIN32)
+ fl_pop_clip();
+ data = fl_read_image(NULL, 0, 0, width, height, 0);
+ RestoreDC(fl_gc, _savedc);
+ DeleteDC(fl_gc);
+ _ss->set_current();
+ fl_window=_sw;
+ fl_gc = _sgc;
+#else
+ fl_pop_clip();
+ data = fl_read_image(NULL, 0, 0, width, height, 0);
+ fl_window = pre_window;
+ previous->set_current();
+#endif
+ Fl_RGB_Image *image = new Fl_RGB_Image(data, width, height);
+ image->alloc_array = 1;
+ return image;
+}
+
+/** Draws a widget in the image surface
+
+ \param widget any FLTK widget (e.g., standard, custom, window, GL view) to draw in the image
+ \param delta_x and \param delta_y give
+ the position in the image of the top-left corner of the widget
+ */
+void Fl_Image_Surface::draw(Fl_Widget *widget, int delta_x, int delta_y)
+{
+ helper->print_widget(widget, delta_x, delta_y);
+}
+
+
+void Fl_Image_Surface::set_current()
+{
+#if defined(__APPLE__)
+ fl_begin_offscreen(offscreen);
+ fl_pop_clip();
+ Fl_Surface_Device::set_current();
+ fl_push_no_clip();
+#elif defined(WIN32)
+ _sgc=fl_gc;
+ _sw=fl_window;
+ _ss = Fl_Surface_Device::surface();
+ Fl_Surface_Device::set_current();
+ fl_gc = fl_makeDC(offscreen);
+ _savedc = SaveDC(fl_gc);
+ fl_window=(HWND)offscreen;
+ fl_push_no_clip();
+#else
+ pre_window = fl_window;
+ fl_window = offscreen;
+ previous = Fl_Surface_Device::surface();
+ Fl_Surface_Device::set_current();
+ fl_push_no_clip();
+#endif
+}
+
+#if defined(__APPLE__)
+
+Fl_Quartz_Flipped_Surface_::Fl_Quartz_Flipped_Surface_(int w, int h) : Fl_Quartz_Surface_(w, h) {
+}
+
+void Fl_Quartz_Flipped_Surface_::translate(int x, int y) {
+ CGContextRestoreGState(fl_gc);
+ CGContextSaveGState(fl_gc);
+ CGContextTranslateCTM(fl_gc, x, -y);
+ CGContextSaveGState(fl_gc);
+ CGContextTranslateCTM(fl_gc, 0, height);
+ CGContextScaleCTM(fl_gc, 1.0f, -1.0f);
+}
+
+void Fl_Quartz_Flipped_Surface_::untranslate() {
+ CGContextRestoreGState(fl_gc);
+}
+
+const char *Fl_Quartz_Flipped_Surface_::class_id = "Fl_Quartz_Flipped_Surface_";
+
+#endif // __APPLE__
+
+//
+// End of "$Id: Fl_Image_Surface.cxx 10200 2014-06-18 01:22:16Z manolo $".
+//
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx
index f1e8e1c..623e87f 100644
--- a/src/Fl_Input.cxx
+++ b/src/Fl_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Input.cxx 10031 2013-12-13 16:28:38Z manolo $"
//
// Input widget for the Fast Light Tool Kit (FLTK).
//
@@ -358,6 +358,11 @@ int Fl_Input::handle_key() {
else replace(position(), del ? position()-del : mark(),
Fl::event_text(), Fl::event_length());
}
+#ifdef __APPLE__
+ if (Fl::compose_state) {
+ this->mark( this->position() - Fl::compose_state );
+ }
+#endif
return 1;
}
@@ -583,8 +588,16 @@ int Fl_Input::handle_key() {
int Fl_Input::handle(int event) {
static int dnd_save_position, dnd_save_mark, drag_start = -1, newpos;
- static Fl_Widget *dnd_save_focus;
+ static Fl_Widget *dnd_save_focus = NULL;
switch (event) {
+#ifdef __APPLE__
+ case FL_UNFOCUS:
+ if (Fl::compose_state) {
+ this->mark( this->position() );
+ Fl::reset_marked_text();
+ }
+ break;
+#endif
case FL_FOCUS:
switch (Fl::event_key()) {
case FL_Right:
@@ -617,7 +630,8 @@ int Fl_Input::handle(int event) {
&& !Fl::event_state(FL_SHIFT) // no shift?
&& !tab_nav() // with tab navigation disabled?
&& input_type() == FL_MULTILINE_INPUT // with a multiline input?
- && (mark()==0 && position()==size())) { // while entire field selected?
+ && size() > 0 // non-empty field?
+ && ((mark()==0 && position()==size()) || (position()==0 && mark()==size()))) {// while entire field selected?
// Set cursor to the end of the selection...
if (mark() > position())
position(mark());
@@ -662,6 +676,7 @@ int Fl_Input::handle(int event) {
// save the position because sometimes we don't get DND_ENTER:
dnd_save_position = position();
dnd_save_mark = mark();
+ dnd_save_focus = this;
// drag the data:
copy(0); Fl::dnd();
return 1;
@@ -693,10 +708,10 @@ int Fl_Input::handle(int event) {
case FL_DND_ENTER:
Fl::belowmouse(this); // send the leave events first
- dnd_save_position = position();
- dnd_save_mark = mark();
- dnd_save_focus = Fl::focus();
if (dnd_save_focus != this) {
+ dnd_save_position = position();
+ dnd_save_mark = mark();
+ dnd_save_focus = Fl::focus();
Fl::focus(this);
handle(FL_FOCUS);
}
@@ -722,16 +737,33 @@ int Fl_Input::handle(int event) {
#if DND_OUT_XXXX
if (!focused())
#endif
- if (dnd_save_focus != this) {
+ if (dnd_save_focus && dnd_save_focus != this) {
Fl::focus(dnd_save_focus);
handle(FL_UNFOCUS);
}
#if !(defined(__APPLE__) || defined(WIN32))
Fl::first_window()->cursor(FL_CURSOR_MOVE);
#endif
+ dnd_save_focus = NULL;
return 1;
case FL_DND_RELEASE:
+ if (dnd_save_focus == this) { // if the dragged text comes from the same widget
+ // remove the selected text
+ int old_position = position();
+ if (dnd_save_mark > dnd_save_position) {
+ int tmp = dnd_save_mark;
+ dnd_save_mark = dnd_save_position;
+ dnd_save_position = tmp;
+ }
+ replace(dnd_save_mark, dnd_save_position, NULL, 0);
+ if (old_position > dnd_save_position) position(old_position - (dnd_save_position - dnd_save_mark));
+ else position(old_position);
+ }
+ else if(dnd_save_focus) {
+ dnd_save_focus->handle(FL_UNFOCUS);
+ }
+ dnd_save_focus = NULL;
take_focus();
return 1;
@@ -766,12 +798,14 @@ Fl_Float_Input::Fl_Float_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l)
{
type(FL_FLOAT_INPUT);
+ clear_flag(MAC_USE_ACCENTS_MENU);
}
Fl_Int_Input::Fl_Int_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
type(FL_INT_INPUT);
+ clear_flag(MAC_USE_ACCENTS_MENU);
}
@@ -796,9 +830,19 @@ Fl_Multiline_Output::Fl_Multiline_Output(int X,int Y,int W,int H,const char *l)
Fl_Secret_Input::Fl_Secret_Input(int X,int Y,int W,int H,const char *l)
: Fl_Input(X,Y,W,H,l) {
type(FL_SECRET_INPUT);
+ clear_flag(MAC_USE_ACCENTS_MENU);
}
+int Fl_Secret_Input::handle(int event) {
+ int retval = Fl_Input::handle(event);
+#ifdef __APPLE__
+ if (event == FL_KEYBOARD && Fl::compose_state) {
+ this->mark( this->position() ); // don't underline marked text
+ }
+#endif
+ return retval;
+}
//
-// End of "$Id: Fl_Input.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Input.cxx 10031 2013-12-13 16:28:38Z manolo $".
//
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index ff29d2a..08b4222 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Input_.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $"
+// "$Id: Fl_Input_.cxx 10402 2014-10-28 15:33:17Z cand $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -339,10 +339,25 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
int offset2;
if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2);
else offset2 = (int) strlen(buf);
+#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
+ if (Fl::compose_state) {
+ fl_color(textcolor());
+ }
+ else
+#endif
+ {
fl_color(selection_color());
fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height);
fl_color(fl_contrast(textcolor(), selection_color()));
+ }
fl_draw(buf+offset1, offset2-offset1, x1, (float)(Y+ypos+desc));
+#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
+ if (Fl::compose_state) {
+ fl_color( fl_color_average(textcolor(), color(), 0.6) );
+ float width = fl_width(buf+offset1, offset2-offset1);
+ fl_line(x1, Y+ypos+height-1, x1+width, Y+ypos+height-1);
+ }
+#endif
if (pp < e) {
fl_color(tc);
fl_draw(buf+offset2, (int) strlen(buf+offset2), x2, (float)(Y+ypos+desc));
@@ -357,7 +372,11 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
CONTINUE2:
// draw the cursor:
- if (Fl::focus() == this && selstart == selend &&
+ if (Fl::focus() == this && (
+#ifdef __APPLE__
+ Fl::compose_state ||
+#endif
+ selstart == selend) &&
position() >= p-value() && position() <= e-value()) {
fl_color(cursor_color());
// cursor position may need to be recomputed (see STR #2486)
@@ -369,6 +388,9 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
} else {
fl_rectf((int)(xpos+curx+0.5), Y+ypos, 2, height);
}
+#ifdef __APPLE__
+ Fl::insertion_point_location(xpos+curx, Y+ypos+height, height);
+#endif
}
CONTINUE:
@@ -397,25 +419,27 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
/** \internal
Simple function that determines if a character could be part of a word.
- \todo This function is not ucs4-aware.
+ \todo This function is not UTF-8-aware.
*/
static int isword(char c) {
- return (c&128 || isalnum(c) || strchr("#%&-/@\\_~", c));
+ return (c&128 || isalnum(c) || strchr("#%-@_~", c));
}
/**
Finds the end of a word.
- This call calculates the end of a word based on the given
- index \p i. Calling this function repeatedly will move
- forwards to the end of the text.
-
+ Returns the index after the last byte of a word.
+ If the index is already at the end of a word, it will find the
+ end of the following word, so if you call it repeatedly you will
+ move forwards to the end of the text.
+
+ Note that this is inconsistent with line_end().
+
\param [in] i starting index for the search
\return end of the word
*/
int Fl_Input_::word_end(int i) const {
if (input_type() == FL_SECRET_INPUT) return size();
- //while (i < size() && !isword(index(i))) i++;
while (i < size() && !isword(index(i))) i++;
while (i < size() && isword(index(i))) i++;
return i;
@@ -424,17 +448,18 @@ int Fl_Input_::word_end(int i) const {
/**
Finds the start of a word.
- This call calculates the start of a word based on the given
- index \p i. Calling this function repeatedly will move
- backwards to the beginning of the text.
-
+ Returns the index of the first byte of a word.
+ If the index is already at the beginning of a word, it will find the
+ beginning of the previous word, so if you call it repeatedly you will
+ move backwards to the beginning of the text.
+
+ Note that this is inconsistent with line_start().
+
\param [in] i starting index for the search
- \return start of the word
+ \return start of the word, or previous word
*/
int Fl_Input_::word_start(int i) const {
if (input_type() == FL_SECRET_INPUT) return 0;
-// if (i >= size() || !isword(index(i)))
-// while (i > 0 && !isword(index(i-1))) i--;
while (i > 0 && !isword(index(i-1))) i--;
while (i > 0 && isword(index(i-1))) i--;
return i;
@@ -496,6 +521,20 @@ int Fl_Input_::line_start(int i) const {
} else return j;
}
+static int strict_word_start(const char *s, int i, int itype) {
+ if (itype == FL_SECRET_INPUT) return 0;
+ while (i > 0 && !isspace(s[i-1]))
+ i--;
+ return i;
+}
+
+static int strict_word_end(const char *s, int len, int i, int itype) {
+ if (itype == FL_SECRET_INPUT) return len;
+ while (i < len && !isspace(s[i]))
+ i++;
+ return i;
+}
+
/**
Handles mouse clicks and mouse moves.
\todo Add comment and parameters
@@ -549,16 +588,16 @@ void Fl_Input_::handle_mouse(int X, int Y, int /*W*/, int /*H*/, int drag) {
newpos = line_end(newpos);
newmark = line_start(newmark);
} else {
- newpos = word_end(newpos);
- newmark = word_start(newmark);
+ newpos = strict_word_end(value(), size(), newpos, input_type());
+ newmark = strict_word_start(value(), newmark, input_type());
}
} else {
if (Fl::event_clicks() > 1) {
newpos = line_start(newpos);
newmark = line_end(newmark);
} else {
- newpos = word_start(newpos);
- newmark = word_end(newmark);
+ newpos = strict_word_start(value(), newpos, input_type());
+ newmark = strict_word_end(value(), size(), newmark, input_type());
}
}
// if the multiple click does not increase the selection, revert
@@ -1100,6 +1139,7 @@ Fl_Input_::Fl_Input_(int X, int Y, int W, int H, const char* l)
maximum_size_ = 32767;
shortcut_ = 0;
set_flag(SHORTCUT_LABEL);
+ set_flag(MAC_USE_ACCENTS_MENU);
tab_nav(1);
}
@@ -1298,5 +1338,5 @@ unsigned int Fl_Input_::index(int i) const
}
//
-// End of "$Id: Fl_Input_.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $".
+// End of "$Id: Fl_Input_.cxx 10402 2014-10-28 15:33:17Z cand $".
//
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx
index e62768f..179ade6 100644
--- a/src/Fl_JPEG_Image.cxx
+++ b/src/Fl_JPEG_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_JPEG_Image.cxx 9709 2012-11-09 16:02:08Z manolo $"
+// "$Id: Fl_JPEG_Image.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Fl_JPEG_Image routines.
//
@@ -212,35 +212,39 @@ typedef struct {
typedef my_source_mgr *my_src_ptr;
-void init_source (j_decompress_ptr cinfo) {
- my_src_ptr src = (my_src_ptr)cinfo->src;
- src->s = src->data;
-}
+extern "C" {
-boolean fill_input_buffer(j_decompress_ptr cinfo) {
- my_src_ptr src = (my_src_ptr)cinfo->src;
- size_t nbytes = 4096;
- src->pub.next_input_byte = src->s;
- src->pub.bytes_in_buffer = nbytes;
- src->s += nbytes;
- return TRUE;
-}
+ static void init_source(j_decompress_ptr cinfo) {
+ my_src_ptr src = (my_src_ptr)cinfo->src;
+ src->s = src->data;
+ }
-void term_source(j_decompress_ptr cinfo)
-{
-}
+ static boolean fill_input_buffer(j_decompress_ptr cinfo) {
+ my_src_ptr src = (my_src_ptr)cinfo->src;
+ size_t nbytes = 4096;
+ src->pub.next_input_byte = src->s;
+ src->pub.bytes_in_buffer = nbytes;
+ src->s += nbytes;
+ return TRUE;
+ }
+
+ static void term_source(j_decompress_ptr cinfo)
+ {
+ }
-void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
- my_src_ptr src = (my_src_ptr)cinfo->src;
- if (num_bytes > 0) {
- while (num_bytes > (long)src->pub.bytes_in_buffer) {
- num_bytes -= (long)src->pub.bytes_in_buffer;
- fill_input_buffer(cinfo);
+ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
+ my_src_ptr src = (my_src_ptr)cinfo->src;
+ if (num_bytes > 0) {
+ while (num_bytes > (long)src->pub.bytes_in_buffer) {
+ num_bytes -= (long)src->pub.bytes_in_buffer;
+ fill_input_buffer(cinfo);
+ }
+ src->pub.next_input_byte += (size_t) num_bytes;
+ src->pub.bytes_in_buffer -= (size_t) num_bytes;
}
- src->pub.next_input_byte += (size_t) num_bytes;
- src->pub.bytes_in_buffer -= (size_t) num_bytes;
}
-}
+
+} // extern "C"
static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data)
{
@@ -373,5 +377,5 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *name, const unsigned char *data)
}
//
-// End of "$Id: Fl_JPEG_Image.cxx 9709 2012-11-09 16:02:08Z manolo $".
+// End of "$Id: Fl_JPEG_Image.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index 4e07383..20c9eed 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu.cxx 9738 2012-12-07 16:29:49Z AlbrechtS $"
+// "$Id: Fl_Menu.cxx 10211 2014-06-28 12:29:51Z manolo $"
//
// Menu code for the Fast Light Tool Kit (FLTK).
//
@@ -353,7 +353,11 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
if (Wp > W) W = Wp;
if (Wtitle > W) W = Wtitle;
- if (X < scr_x) X = scr_x; if (X > scr_x+scr_w-W) X = right_edge-W;
+ if (X < scr_x) X = scr_x;
+ // this change improves popup submenu positioning at right screen edge,
+ // but it makes right_edge argument useless
+ //if (X > scr_x+scr_w-W) X = right_edge-W;
+ if (X > scr_x+scr_w-W) X = scr_x+scr_w-W;
x(X); w(W);
h((numitems ? itemheight*numitems-LEADING : 0)+2*BW+3);
if (selected >= 0) {
@@ -916,10 +920,12 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown(
if (n->selected>=0) {
int dy = n->y()-nY;
int dx = n->x()-nX;
+ int waX, waY, waW, waH;
+ Fl::screen_work_area(waX, waY, waW, waH, X, Y);
for (int menu = 0; menu <= pp.menu_number; menu++) {
menuwindow* tt = pp.p[menu];
- int nx = tt->x()+dx; if (nx < 0) {nx = 0; dx = -tt->x();}
- int ny = tt->y()+dy; if (ny < 0) {ny = 0; dy = -tt->y();}
+ int nx = tt->x()+dx; if (nx < waX) {nx = waX; dx = -tt->x() + waX;}
+ int ny = tt->y()+dy; if (ny < waY) {ny = waY; dy = -tt->y() + waY;}
tt->position(nx, ny);
}
setitem(pp.nummenus-1, n->selected);
@@ -1046,5 +1052,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
}
//
-// End of "$Id: Fl_Menu.cxx 9738 2012-12-07 16:29:49Z AlbrechtS $".
+// End of "$Id: Fl_Menu.cxx 10211 2014-06-28 12:29:51Z manolo $".
//
diff --git a/src/Fl_Menu_Window.cxx b/src/Fl_Menu_Window.cxx
index f49d74d..6380572 100644
--- a/src/Fl_Menu_Window.cxx
+++ b/src/Fl_Menu_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_Window.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Menu_Window.cxx 10095 2014-02-07 00:09:52Z AlbrechtS $"
//
// Menu window code for the Fast Light Tool Kit (FLTK).
//
@@ -54,6 +54,7 @@ void Fl_Menu_Window::show() {
}
void Fl_Menu_Window::flush() {
+ if (!shown()) return;
#if HAVE_OVERLAY
if (!fl_overlay_visual || !overlay()) {Fl_Single_Window::flush(); return;}
Fl_X *myi = Fl_X::i(this);
@@ -111,5 +112,5 @@ Fl_Menu_Window::Fl_Menu_Window(int X, int Y, int W, int H, const char *l)
//
-// End of "$Id: Fl_Menu_Window.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Menu_Window.cxx 10095 2014-02-07 00:09:52Z AlbrechtS $".
//
diff --git a/src/Fl_Native_File_Chooser_FLTK.cxx b/src/Fl_Native_File_Chooser_FLTK.cxx
index e3160b5..bedd7c7 100644
--- a/src/Fl_Native_File_Chooser_FLTK.cxx
+++ b/src/Fl_Native_File_Chooser_FLTK.cxx
@@ -1,10 +1,9 @@
-// "$Id: Fl_Native_File_Chooser_FLTK.cxx 9547 2012-05-25 14:46:02Z manolo $"
+// "$Id: Fl_Native_File_Chooser_FLTK.cxx 10349 2014-10-01 17:24:55Z manolo $"
//
-// FLTK native OS file chooser widget
+// FLTK native file chooser widget wrapper for GTK's GtkFileChooserDialog
//
-// Copyright 1998-2010 by Bill Spitzak and others.
-// Copyright 2004 Greg Ercolano.
-// API changes + filter improvements by Nathan Vander Wilt 2005
+// Copyright 1998-2014 by Bill Spitzak and others.
+// Copyright 2012 IMM
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -17,6 +16,7 @@
// http://www.fltk.org/str.php
//
+#include <config.h>
#include <FL/Fl_Native_File_Chooser.H>
#include <FL/Fl_File_Icon.H>
#define FLTK_CHOOSER_SINGLE Fl_File_Chooser::SINGLE
@@ -25,24 +25,20 @@
#define FLTK_CHOOSER_CREATE Fl_File_Chooser::CREATE
#include "Fl_Native_File_Chooser_common.cxx"
+#include "Fl_Native_File_Chooser_GTK.cxx"
+
#include <sys/stat.h>
#include <string.h>
+int Fl_Native_File_Chooser::have_looked_for_GTK_libs = 0;
+
/**
- The constructor. Internally allocates the native widgets.
- Optional \p val presets the type of browser this will be,
- which can also be changed with type().
-*/
+ The constructor. Internally allocates the native widgets.
+ Optional \p val presets the type of browser this will be,
+ which can also be changed with type().
+ */
Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
- //// CANT USE THIS -- MESSES UP LINKING/CREATES DEPENDENCY ON fltk_images.
- //// Have app call this from main() instead.
- ////
- //// static int init = 0; // 'first time' initialize flag
- //// if ( init == 0 ) {
- //// // Initialize when instanced for first time
- //// Fl_File_Icon::load_system_icons();
- //// init = 1;
- //// }
+#if FLTK_ABI_VERSION <= 10302
_btype = val;
_options = NO_OPTIONS;
_filter = NULL;
@@ -52,17 +48,203 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
_prevvalue = NULL;
_directory = NULL;
_errmsg = NULL;
- _file_chooser = new Fl_File_Chooser(NULL, NULL, 0, NULL);
- type(val); // do this after _file_chooser created
- _nfilters = 0;
-}
+#endif // FLTK_ABI_VERSION
+ if (have_looked_for_GTK_libs == 0) {
+ // First Time here, try to find the GTK libs if they are installed
+#if HAVE_DLSYM && HAVE_DLFCN_H
+ if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) {
+ Fl_GTK_File_Chooser::probe_for_GTK_libs();
+ }
+#endif
+ have_looked_for_GTK_libs = -1;
+ }
+ // if we found all the GTK functions we need, we will use the GtkFileChooserDialog
+ if (Fl_GTK_File_Chooser::did_find_GTK_libs) _gtk_file_chooser = new Fl_GTK_File_Chooser(val);
+ else _x11_file_chooser = new Fl_FLTK_File_Chooser(val);
+}
/**
- Destructor.
- Deallocates any resources allocated to this widget.
-*/
+ Destructor.
+ Deallocates any resources allocated to this widget.
+ */
Fl_Native_File_Chooser::~Fl_Native_File_Chooser() {
+ delete _x11_file_chooser;
+}
+
+/**
+ Sets the current Fl_Native_File_Chooser::Type of browser.
+ */
+void Fl_Native_File_Chooser::type(int t) { return _x11_file_chooser->type(t); }
+/**
+ Gets the current Fl_Native_File_Chooser::Type of browser.
+ */
+int Fl_Native_File_Chooser::type() const { return _x11_file_chooser->type(); }
+/**
+ Sets the platform specific chooser options to \p val.
+ \p val is expected to be one or more Fl_Native_File_Chooser::Option flags ORed together.
+ Some platforms have OS-specific functions that can be enabled/disabled via this method.
+ <P>
+ \code
+ Flag Description Win Mac Other
+ -------------- ----------------------------------------------- ------- ------- -------
+ NEW_FOLDER Shows the 'New Folder' button. Ignored Used Used
+ PREVIEW Enables the 'Preview' mode by default. Ignored Ignored Used
+ SAVEAS_CONFIRM Confirm dialog if BROWSE_SAVE_FILE file exists. Used Used Used
+ USE_FILTER_EXT Chooser filter pilots the output file extension. Ignored Used Ignored
+\endcode
+ */
+void Fl_Native_File_Chooser::options(int o) { _x11_file_chooser->options(o); }
+/**
+ Gets the platform specific Fl_Native_File_Chooser::Option flags.
+ */
+int Fl_Native_File_Chooser::options() const { return _x11_file_chooser->options(); }
+
+/**
+ Returns the number of filenames (or directory names) the user selected.
+ <P>
+ \b Example:
+ \code
+ if ( fnfc->show() == 0 ) {
+ // Print all filenames user selected
+ for (int n=0; n<fnfc->count(); n++ ) {
+ printf("%d) '%s'\n", n, fnfc->filename(n));
+ }
+ }
+ \endcode
+ */
+int Fl_Native_File_Chooser::count() const { return _x11_file_chooser->count(); }
+/**
+ Return the filename the user chose.
+ Use this if only expecting a single filename.
+ If more than one filename is expected, use filename(int) instead.
+ Return value may be "" if no filename was chosen (eg. user cancelled).
+ */
+const char *Fl_Native_File_Chooser::filename() const { return _x11_file_chooser->filename(); }
+/**
+ Return one of the filenames the user selected.
+ Use count() to determine how many filenames the user selected.
+ <P>
+ \b Example:
+ \code
+ if ( fnfc->show() == 0 ) {
+ // Print all filenames user selected
+ for (int n=0; n<fnfc->count(); n++ ) {
+ printf("%d) '%s'\n", n, fnfc->filename(n));
+ }
+ }
+ \endcode
+ */
+const char *Fl_Native_File_Chooser::filename(int i) const { return _x11_file_chooser->filename(i); }
+/**
+ Preset the directory the browser will show when opened.
+ If \p val is NULL, or no directory is specified, the chooser will attempt
+ to use the last non-cancelled folder.
+ */
+void Fl_Native_File_Chooser::directory(const char *val) { _x11_file_chooser->directory(val); }
+/**
+ Returns the current preset directory() value.
+ */
+const char *Fl_Native_File_Chooser::directory() const { return _x11_file_chooser->directory(); }
+/**
+ Set the title of the file chooser's dialog window.
+ Can be NULL if no title desired.
+ The default title varies according to the platform, so you are advised to set the title explicitly.
+ */
+void Fl_Native_File_Chooser::title(const char *t) { _x11_file_chooser->title(t); }
+/**
+ Get the title of the file chooser's dialog window.
+ Return value may be NULL if no title was set.
+ */
+const char* Fl_Native_File_Chooser::title() const { return _x11_file_chooser->title(); }
+/**
+ Returns the filter string last set.
+ Can be NULL if no filter was set.
+ */
+const char *Fl_Native_File_Chooser::filter() const { return _x11_file_chooser->filter(); }
+/**
+ Sets the filename filters used for browsing.
+ The default is NULL, which browses all files.
+ <P>
+ The filter string can be any of:
+ <P>
+ - A single wildcard (eg. "*.txt")
+ - Multiple wildcards (eg. "*.{cxx,h,H}")
+ - A descriptive name followed by a "\t" and a wildcard (eg. "Text Files\t*.txt")
+ - A list of separate wildcards with a "\n" between each (eg. "*.{cxx,H}\n*.txt")
+ - A list of descriptive names and wildcards (eg. "C++ Files\t*.{cxx,H}\nTxt Files\t*.txt")
+ <P>
+ The format of each filter is a wildcard, or an optional user description
+ followed by '\\t' and the wildcard.
+ <P>
+ On most platforms, each filter is available to the user via a pulldown menu
+ in the file chooser. The 'All Files' option is always available to the user.
+ */
+void Fl_Native_File_Chooser::filter(const char *f) { _x11_file_chooser->filter(f); }
+/**
+ Gets how many filters were available, not including "All Files"
+ */
+int Fl_Native_File_Chooser::filters() const { return _x11_file_chooser->filters(); }
+/**
+ Sets which filter will be initially selected.
+
+ The first filter is indexed as 0.
+ If filter_value()==filters(), then "All Files" was chosen.
+ If filter_value() > filters(), then a custom filter was set.
+ */
+void Fl_Native_File_Chooser::filter_value(int i) { _x11_file_chooser->filter_value(i); }
+/**
+ Returns which filter value was last selected by the user.
+ This is only valid if the chooser returns success.
+ */
+int Fl_Native_File_Chooser::filter_value() const { return _x11_file_chooser->filter_value(); }
+/**
+ Sets the default filename for the chooser.
+ Use directory() to set the default directory.
+ Mainly used to preset the filename for save dialogs,
+ and on most platforms can be used for opening files as well.
+ */
+void Fl_Native_File_Chooser::preset_file(const char* f) { _x11_file_chooser->preset_file(f); }
+/**
+ Get the preset filename.
+ */
+const char* Fl_Native_File_Chooser::preset_file() const { return _x11_file_chooser->preset_file(); }
+/**
+ Returns a system dependent error message for the last method that failed.
+ This message should at least be flagged to the user in a dialog box, or to some kind of error log.
+ Contents will be valid only for methods that document errmsg() will have info on failures.
+ */
+const char *Fl_Native_File_Chooser::errmsg() const { return _x11_file_chooser->errmsg(); }
+/**
+ Post the chooser's dialog. Blocks until dialog has been completed or cancelled.
+ \returns
+ - 0 -- user picked a file
+ - 1 -- user cancelled
+ - -1 -- failed; errmsg() has reason
+ */
+int Fl_Native_File_Chooser::show() { return _x11_file_chooser->show(); }
+
+
+Fl_FLTK_File_Chooser::Fl_FLTK_File_Chooser(int val) {
+ _btype = 0;
+ _options = 0;
+ _filter = NULL;
+ _filtvalue = 0;
+ _parsedfilt = NULL;
+ _preset_file = NULL;
+ _prevvalue = NULL;
+ _directory = NULL;
+ _errmsg = NULL;
+ _file_chooser= NULL;
+ if (val >= 0) {
+ _file_chooser = new Fl_File_Chooser(NULL, NULL, 0, NULL);
+ type(val); // do this after _file_chooser created
+ }
+ _nfilters = 0;
+}
+
+Fl_FLTK_File_Chooser::~Fl_FLTK_File_Chooser() {
delete _file_chooser;
+ _file_chooser = NULL;
_filter = strfree(_filter);
_parsedfilt = strfree(_parsedfilt);
_preset_file = strfree(_preset_file);
@@ -71,285 +253,169 @@ Fl_Native_File_Chooser::~Fl_Native_File_Chooser() {
_errmsg = strfree(_errmsg);
}
+
// PRIVATE: SET ERROR MESSAGE
-void Fl_Native_File_Chooser::errmsg(const char *msg) {
+void Fl_FLTK_File_Chooser::errmsg(const char *msg) {
_errmsg = strfree(_errmsg);
_errmsg = strnew(msg);
}
// PRIVATE: translate Native types to Fl_File_Chooser types
-int Fl_Native_File_Chooser::type_fl_file(int val) {
+int Fl_FLTK_File_Chooser::type_fl_file(int val) {
switch (val) {
- case BROWSE_FILE:
- return(FLTK_CHOOSER_SINGLE);
- case BROWSE_DIRECTORY:
- return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_DIRECTORY);
- case BROWSE_MULTI_FILE:
- return(FLTK_CHOOSER_MULTI);
- case BROWSE_MULTI_DIRECTORY:
- return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI);
- case BROWSE_SAVE_FILE:
- return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_CREATE);
- case BROWSE_SAVE_DIRECTORY:
- return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI | FLTK_CHOOSER_CREATE);
+ case Fl_Native_File_Chooser::BROWSE_FILE:
+ return(Fl_File_Chooser::SINGLE);
+ case Fl_Native_File_Chooser::BROWSE_DIRECTORY:
+ return(Fl_File_Chooser::SINGLE | Fl_File_Chooser::DIRECTORY);
+ case Fl_Native_File_Chooser::BROWSE_MULTI_FILE:
+ return(Fl_File_Chooser::MULTI);
+ case Fl_Native_File_Chooser::BROWSE_MULTI_DIRECTORY:
+ return(Fl_File_Chooser::DIRECTORY | Fl_File_Chooser::MULTI);
+ case Fl_Native_File_Chooser::BROWSE_SAVE_FILE:
+ return(Fl_File_Chooser::SINGLE | Fl_File_Chooser::CREATE);
+ case Fl_Native_File_Chooser::BROWSE_SAVE_DIRECTORY:
+ return(Fl_File_Chooser::DIRECTORY | Fl_File_Chooser::MULTI | Fl_File_Chooser::CREATE);
default:
- return(FLTK_CHOOSER_SINGLE);
+ return(Fl_File_Chooser::SINGLE);
}
}
-/**
- Sets the current Fl_Native_File_Chooser::Type of browser.
- */
-void Fl_Native_File_Chooser::type(int val) {
+void Fl_FLTK_File_Chooser::type(int val) {
_btype = val;
_file_chooser->type(type_fl_file(val));
}
-/**
- Gets the current Fl_Native_File_Chooser::Type of browser.
- */
-int Fl_Native_File_Chooser::type() const {
+int Fl_FLTK_File_Chooser::type() const {
return(_btype);
}
-/**
- Sets the platform specific chooser options to \p val.
- \p val is expected to be one or more Fl_Native_File_Chooser::Option flags ORed together.
- Some platforms have OS-specific functions that can be enabled/disabled via this method.
- <P>
- \code
- Flag Description Win Mac Other
- -------------- ----------------------------------------------- ------- ------- -------
- NEW_FOLDER Shows the 'New Folder' button. Ignored Used Used
- PREVIEW Enables the 'Preview' mode by default. Ignored Ignored Used
- SAVEAS_CONFIRM Confirm dialog if BROWSE_SAVE_FILE file exists. Used Used Used
- \endcode
-*/
-void Fl_Native_File_Chooser::options(int val) {
+void Fl_FLTK_File_Chooser::options(int val) {
_options = val;
}
-/**
- Gets the platform specific Fl_Native_File_Chooser::Option flags.
-*/
-int Fl_Native_File_Chooser::options() const {
+int Fl_FLTK_File_Chooser::options() const {
return(_options);
}
-/**
- Post the chooser's dialog. Blocks until dialog has been completed or cancelled.
- \returns
- - 0 -- user picked a file
- - 1 -- user cancelled
- - -1 -- failed; errmsg() has reason
-*/
-int Fl_Native_File_Chooser::show() {
- // FILTER
- if ( _parsedfilt ) {
- _file_chooser->filter(_parsedfilt);
- }
+int Fl_FLTK_File_Chooser::show() {
- // FILTER VALUE
- // Set this /after/ setting the filter
- //
- _file_chooser->filter_value(_filtvalue);
+ // FILTER
+ if ( _parsedfilt ) {
+ _file_chooser->filter(_parsedfilt);
+ }
- // DIRECTORY
- if ( _directory && _directory[0] ) {
- _file_chooser->directory(_directory);
- } else {
- _file_chooser->directory(_prevvalue);
- }
+ // FILTER VALUE
+ // Set this /after/ setting the filter
+ //
+ _file_chooser->filter_value(_filtvalue);
- // PRESET FILE
- if ( _preset_file ) {
- _file_chooser->value(_preset_file);
- }
+ // DIRECTORY
+ if ( _directory && _directory[0] ) {
+ _file_chooser->directory(_directory);
+ } else {
+ _file_chooser->directory(_prevvalue);
+ }
- // OPTIONS: PREVIEW
- _file_chooser->preview( (options() & PREVIEW) ? 1 : 0);
+ // PRESET FILE
+ if ( _preset_file ) {
+ _file_chooser->value(_preset_file);
+ }
- // OPTIONS: NEW FOLDER
- if ( options() & NEW_FOLDER )
- _file_chooser->type(_file_chooser->type() | FLTK_CHOOSER_CREATE); // on
+ // OPTIONS: PREVIEW
+ _file_chooser->preview( (options() & Fl_Native_File_Chooser::PREVIEW) ? 1 : 0);
- // SHOW
- _file_chooser->show();
+ // OPTIONS: NEW FOLDER
+ if ( options() & Fl_Native_File_Chooser::NEW_FOLDER )
+ _file_chooser->type(_file_chooser->type() | Fl_File_Chooser::CREATE); // on
+
+ // SHOW
+ _file_chooser->show();
- // BLOCK WHILE BROWSER SHOWN
- while ( _file_chooser->shown() ) {
- Fl::wait();
- }
+ // BLOCK WHILE BROWSER SHOWN
+ while ( _file_chooser->shown() ) {
+ Fl::wait();
+ }
- if ( _file_chooser->value() && _file_chooser->value()[0] ) {
- _prevvalue = strfree(_prevvalue);
- _prevvalue = strnew(_file_chooser->value());
- _filtvalue = _file_chooser->filter_value(); // update filter value
-
- // HANDLE SHOWING 'SaveAs' CONFIRM
- if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
- struct stat buf;
- if ( stat(_file_chooser->value(), &buf) != -1 ) {
- if ( buf.st_mode & S_IFREG ) { // Regular file + exists?
- if ( exist_dialog() == 0 ) {
- return(1);
- }
- }
+ if ( _file_chooser->value() && _file_chooser->value()[0] ) {
+ _prevvalue = strfree(_prevvalue);
+ _prevvalue = strnew(_file_chooser->value());
+ _filtvalue = _file_chooser->filter_value(); // update filter value
+
+ // HANDLE SHOWING 'SaveAs' CONFIRM
+ if ( options() & Fl_Native_File_Chooser::SAVEAS_CONFIRM && type() == Fl_Native_File_Chooser::BROWSE_SAVE_FILE ) {
+ struct stat buf;
+ if ( stat(_file_chooser->value(), &buf) != -1 ) {
+ if ( buf.st_mode & S_IFREG ) { // Regular file + exists?
+ if ( exist_dialog() == 0 ) {
+ return(1);
+ }
+ }
+ }
}
}
- }
- if ( _file_chooser->count() ) return(0);
- else return(1);
+ if ( _file_chooser->count() ) return(0);
+ else return(1);
}
-/**
- Returns a system dependent error message for the last method that failed.
- This message should at least be flagged to the user in a dialog box, or to some kind of error log.
- Contents will be valid only for methods that document errmsg() will have info on failures.
- */
-const char *Fl_Native_File_Chooser::errmsg() const {
+const char *Fl_FLTK_File_Chooser::errmsg() const {
return(_errmsg ? _errmsg : "No error");
}
-/**
- Return the filename the user choose.
- Use this if only expecting a single filename.
- If more than one filename is expected, use filename(int) instead.
- Return value may be "" if no filename was chosen (eg. user cancelled).
- */
-const char* Fl_Native_File_Chooser::filename() const {
- if ( _file_chooser->count() > 0 ) return(_file_chooser->value());
+const char* Fl_FLTK_File_Chooser::filename() const {
+ if ( _file_chooser->count() > 0 ) {
+ return(_file_chooser->value());
+ }
return("");
}
-/**
- Return one of the filenames the user selected.
- Use count() to determine how many filenames the user selected.
- <P>
- \b Example:
- \code
- if ( fnfc->show() == 0 ) {
- // Print all filenames user selected
- for (int n=0; n<fnfc->count(); n++ ) {
- printf("%d) '%s'\n", n, fnfc->filename(n));
- }
- }
- \endcode
- */
-const char* Fl_Native_File_Chooser::filename(int i) const {
- if ( i < _file_chooser->count() )
- return(_file_chooser->value(i+1)); // convert fltk 1 based to our 0 based
+const char* Fl_FLTK_File_Chooser::filename(int i) const {
+ if ( i < _file_chooser->count() )
+ return(_file_chooser->value(i+1)); // convert fltk 1 based to our 0 based
return("");
}
-/**
- Set the title of the file chooser's dialog window.
- Can be NULL if no title desired.
- The default title varies according to the platform, so you are advised to set the title explicitly.
-*/
-void Fl_Native_File_Chooser::title(const char *val) {
+void Fl_FLTK_File_Chooser::title(const char *val) {
_file_chooser->label(val);
}
-/**
- Get the title of the file chooser's dialog window.
- Return value may be NULL if no title was set.
-*/
-const char *Fl_Native_File_Chooser::title() const {
- return(_file_chooser->label());
+const char *Fl_FLTK_File_Chooser::title() const {
+ return(_file_chooser->label());
}
-/**
- Sets the filename filters used for browsing.
- The default is NULL, which browses all files.
- <P>
- The filter string can be any of:
- <P>
- - A single wildcard (eg. "*.txt")
- - Multiple wildcards (eg. "*.{cxx,h,H}")
- - A descriptive name followed by a "\t" and a wildcard (eg. "Text Files\t*.txt")
- - A list of separate wildcards with a "\n" between each (eg. "*.{cxx,H}\n*.txt")
- - A list of descriptive names and wildcards (eg. "C++ Files\t*.{cxx,H}\nTxt Files\t*.txt")
- <P>
- The format of each filter is a wildcard, or an optional user description
- followed by '\\t' and the wildcard.
- <P>
- On most platforms, each filter is available to the user via a pulldown menu
- in the file chooser. The 'All Files' option is always available to the user.
-*/
-void Fl_Native_File_Chooser::filter(const char *val) {
+void Fl_FLTK_File_Chooser::filter(const char *val) {
_filter = strfree(_filter);
_filter = strnew(val);
parse_filter();
}
-/**
- Returns the filter string last set.
- Can be NULL if no filter was set.
- */
-const char *Fl_Native_File_Chooser::filter() const {
+const char *Fl_FLTK_File_Chooser::filter() const {
return(_filter);
}
-/**
-Gets how many filters were available, not including "All Files"
-*/
-int Fl_Native_File_Chooser::filters() const {
+int Fl_FLTK_File_Chooser::filters() const {
return(_nfilters);
}
-/**
- Sets which filter will be initially selected.
-
- The first filter is indexed as 0.
- If filter_value()==filters(), then "All Files" was chosen.
- If filter_value() > filters(), then a custom filter was set.
- */
-void Fl_Native_File_Chooser::filter_value(int val) {
+void Fl_FLTK_File_Chooser::filter_value(int val) {
_filtvalue = val;
}
-/**
- Returns which filter value was last selected by the user.
- This is only valid if the chooser returns success.
- */
-int Fl_Native_File_Chooser::filter_value() const {
- return(_filtvalue);
+int Fl_FLTK_File_Chooser::filter_value() const {
+ return _filtvalue;
}
-/**
- Returns the number of filenames (or directory names) the user selected.
- <P>
- \b Example:
- \code
- if ( fnfc->show() == 0 ) {
- // Print all filenames user selected
- for (int n=0; n<fnfc->count(); n++ ) {
- printf("%d) '%s'\n", n, fnfc->filename(n));
- }
- }
- \endcode
-*/
-int Fl_Native_File_Chooser::count() const {
- return(_file_chooser->count());
+int Fl_FLTK_File_Chooser::count() const {
+ return _file_chooser->count();
}
-/**
- Preset the directory the browser will show when opened.
- If \p val is NULL, or no directory is specified, the chooser will attempt
- to use the last non-cancelled folder.
-*/
-void Fl_Native_File_Chooser::directory(const char *val) {
+void Fl_FLTK_File_Chooser::directory(const char *val) {
_directory = strfree(_directory);
_directory = strnew(val);
}
-/**
- Returns the current preset directory() value.
-*/
-const char *Fl_Native_File_Chooser::directory() const {
- return(_directory);
+const char *Fl_FLTK_File_Chooser::directory() const {
+ return _directory;
}
// PRIVATE: Convert our filter format to fltk's chooser format
@@ -362,7 +428,7 @@ const char *Fl_Native_File_Chooser::directory() const {
// Returns a modified version of the filter that the caller is responsible
// for freeing with strfree().
//
-void Fl_Native_File_Chooser::parse_filter() {
+void Fl_FLTK_File_Chooser::parse_filter() {
_parsedfilt = strfree(_parsedfilt); // clear previous parsed filter (if any)
_nfilters = 0;
char *in = _filter;
@@ -425,29 +491,19 @@ void Fl_Native_File_Chooser::parse_filter() {
//NOTREACHED
}
-/**
- Sets the default filename for the chooser.
- Use directory() to set the default directory.
- Mainly used to preset the filename for save dialogs,
- and on most platforms can be used for opening files as well.
- */
-void Fl_Native_File_Chooser::preset_file(const char* val) {
+void Fl_FLTK_File_Chooser::preset_file(const char* val) {
_preset_file = strfree(_preset_file);
_preset_file = strnew(val);
}
-/**
- Get the preset filename.
- */
-const char* Fl_Native_File_Chooser::preset_file() const {
- return(_preset_file);
+const char* Fl_FLTK_File_Chooser::preset_file() const {
+ return _preset_file;
}
-
-int Fl_Native_File_Chooser::exist_dialog() {
- return(fl_choice("%s", fl_cancel, fl_ok, NULL, file_exists_message));
+int Fl_FLTK_File_Chooser::exist_dialog() {
+ return fl_choice("%s", fl_cancel, fl_ok, NULL, Fl_Native_File_Chooser::file_exists_message);
}
//
-// End of "$Id: Fl_Native_File_Chooser_FLTK.cxx 9547 2012-05-25 14:46:02Z manolo $".
+// End of "$Id: Fl_Native_File_Chooser_FLTK.cxx 10349 2014-10-01 17:24:55Z manolo $".
//
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
new file mode 100644
index 0000000..1b47511
--- /dev/null
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -0,0 +1,732 @@
+// "$Id$"
+//
+// FLTK native file chooser widget wrapper for GTK's GtkFileChooserDialog
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+// Copyright 2012 IMM
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems to:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/x.H>
+#if HAVE_DLSYM && HAVE_DLFCN_H
+#include <dlfcn.h> // for dlopen et al
+#endif
+#include <locale.h> // for setlocale
+
+/* --------------------- Type definitions from GLIB and GTK --------------------- */
+/* all of this is from the public gnome API, so unlikely to change */
+#ifndef FALSE
+#define FALSE (0)
+#endif
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+typedef void* gpointer;
+typedef int gint;
+typedef unsigned int guint;
+typedef unsigned long gulong;
+typedef gint gboolean;
+typedef char gchar;
+typedef struct _GSList GSList;
+struct _GSList
+{
+ gpointer data;
+ GSList *next;
+};
+#define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL)
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkFileChooser GtkFileChooser;
+typedef struct _GtkDialog GtkDialog;
+typedef struct _GtkWindow GtkWindow;
+typedef struct _GdkDrawable GdkWindow;
+typedef struct _GtkFileFilter GtkFileFilter;
+typedef struct _GtkToggleButton GtkToggleButton;
+typedef enum {
+ GTK_FILE_FILTER_FILENAME = 1 << 0,
+ GTK_FILE_FILTER_URI = 1 << 1,
+ GTK_FILE_FILTER_DISPLAY_NAME = 1 << 2,
+ GTK_FILE_FILTER_MIME_TYPE = 1 << 3
+} GtkFileFilterFlags;
+struct _GtkFileFilterInfo
+{
+ GtkFileFilterFlags contains;
+
+ const gchar *filename;
+ const gchar *uri;
+ const gchar *display_name;
+ const gchar *mime_type;
+};
+typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
+typedef gboolean (*GtkFileFilterFunc) (const GtkFileFilterInfo *filter_info, gpointer data);
+typedef void (*GDestroyNotify)(gpointer data);
+typedef enum
+{
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
+} GtkFileChooserAction;
+#define GTK_STOCK_CANCEL "gtk-cancel"
+#define GTK_STOCK_SAVE "gtk-save"
+#define GTK_STOCK_OPEN "gtk-open"
+const int GTK_RESPONSE_NONE = -1;
+const int GTK_RESPONSE_ACCEPT = -3;
+const int GTK_RESPONSE_DELETE_EVENT = -4;
+const int GTK_RESPONSE_CANCEL = -6;
+typedef void (*GCallback)(void);
+#define G_CALLBACK(f) ((GCallback) (f))
+typedef int GConnectFlags;
+typedef struct _GClosure GClosure;
+typedef void (*GClosureNotify)(gpointer data, GClosure *closure);
+
+/* --------------------- End of Type definitions from GLIB and GTK --------------------- */
+
+int Fl_GTK_File_Chooser::did_find_GTK_libs = 0;
+
+/* These are the GTK/GLib methods we want to load, but not call by name...! */
+
+// void g_free (gpointer mem);
+typedef void (*XX_g_free)(gpointer);
+static XX_g_free fl_g_free = NULL;
+
+// gpointer g_slist_nth_data (GSList *list, guint n);
+typedef gpointer (*XX_g_slist_nth_data) (GSList *, guint);
+static XX_g_slist_nth_data fl_g_slist_nth_data = NULL;
+
+// guint g_slist_length (GSList *list);
+typedef guint (*XX_g_slist_length) (GSList *);
+static XX_g_slist_length fl_g_slist_length = NULL;
+
+// void g_slist_free (GSList *list);
+typedef void (*XX_g_slist_free) (GSList *);
+static XX_g_slist_free fl_g_slist_free = NULL;
+
+// gboolean gtk_init_check (int *argc, char ***argv);
+typedef gboolean (*XX_gtk_init_check)(int *, char ***);
+static XX_gtk_init_check fl_gtk_init_check = NULL;
+
+// void gtk_widget_destroy (GtkWidget *widget);
+typedef void (*XX_gtk_widget_destroy) (GtkWidget *);
+static XX_gtk_widget_destroy fl_gtk_widget_destroy = NULL;
+
+// void gtk_file_chooser_set_select_multiple(GtkFileChooser *chooser, gboolean select_multiple);
+typedef void (*XX_gtk_file_chooser_set_select_multiple)(GtkFileChooser *, gboolean);
+static XX_gtk_file_chooser_set_select_multiple fl_gtk_file_chooser_set_select_multiple = NULL;
+
+// void gtk_file_chooser_set_do_overwrite_confirmation(GtkFileChooser *chooser, gboolean do_overwrite_confirmation);
+typedef void (*XX_gtk_file_chooser_set_do_overwrite_confirmation)(GtkFileChooser *, gboolean);
+static XX_gtk_file_chooser_set_do_overwrite_confirmation fl_gtk_file_chooser_set_do_overwrite_confirmation = NULL;
+
+// void gtk_file_chooser_set_current_name (GtkFileChooser *chooser, const gchar *name);
+typedef void (*XX_gtk_file_chooser_set_current_name)(GtkFileChooser *, const gchar *);
+static XX_gtk_file_chooser_set_current_name fl_gtk_file_chooser_set_current_name = NULL;
+
+// void gtk_file_chooser_set_current_folder (GtkFileChooser *chooser, const gchar *name);
+typedef void (*XX_gtk_file_chooser_set_current_folder)(GtkFileChooser *, const gchar *);
+static XX_gtk_file_chooser_set_current_folder fl_gtk_file_chooser_set_current_folder = NULL;
+
+// void gtk_file_chooser_set_create_folders (GtkFileChooser *chooser, gboolean create_folders);
+typedef void (*XX_gtk_file_chooser_set_create_folders) (GtkFileChooser *, gboolean);
+static XX_gtk_file_chooser_set_create_folders fl_gtk_file_chooser_set_create_folders = NULL;
+
+// gboolean gtk_file_chooser_get_select_multiple(GtkFileChooser *chooser);
+typedef gboolean (*XX_gtk_file_chooser_get_select_multiple)(GtkFileChooser *);
+static XX_gtk_file_chooser_get_select_multiple fl_gtk_file_chooser_get_select_multiple = NULL;
+
+// void gtk_widget_hide(GtkWidget *widget);
+typedef void (*XX_gtk_widget_hide)(GtkWidget *);
+static XX_gtk_widget_hide fl_gtk_widget_hide = NULL;
+
+// gchar * gtk_file_chooser_get_filename(GtkFileChooser *chooser);
+typedef gchar* (*XX_gtk_file_chooser_get_filename)(GtkFileChooser *);
+static XX_gtk_file_chooser_get_filename fl_gtk_file_chooser_get_filename = NULL;
+
+// GSList * gtk_file_chooser_get_filenames(GtkFileChooser *chooser);
+typedef GSList* (*XX_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
+static XX_gtk_file_chooser_get_filenames fl_gtk_file_chooser_get_filenames = NULL;
+
+// gboolean gtk_main_iteration(void);
+typedef gboolean (*XX_gtk_main_iteration)(void);
+static XX_gtk_main_iteration fl_gtk_main_iteration = NULL;
+
+// gboolean gtk_events_pending(void);
+typedef gboolean (*XX_gtk_events_pending)(void);
+static XX_gtk_events_pending fl_gtk_events_pending = NULL;
+
+// GtkWidget * gtk_file_chooser_dialog_new(const gchar *title, GtkWindow *parent, GtkFileChooserAction action, const gchar *first_button_text, ...);
+typedef GtkWidget* (*XX_gtk_file_chooser_dialog_new)(const gchar *, GtkWindow *, GtkFileChooserAction, const gchar *, ...);
+static XX_gtk_file_chooser_dialog_new fl_gtk_file_chooser_dialog_new = NULL;
+
+// void gtk_file_chooser_add_filter(GtkFileChooser*, GtkFileFilter*);
+typedef void (*XX_gtk_file_chooser_add_filter)(GtkFileChooser*, GtkFileFilter*);
+static XX_gtk_file_chooser_add_filter fl_gtk_file_chooser_add_filter = NULL;
+
+// GtkFileFilter* gtk_file_chooser_get_filter(GtkFileChooser*);
+typedef GtkFileFilter* (*XX_gtk_file_chooser_get_filter)(GtkFileChooser*);
+static XX_gtk_file_chooser_get_filter fl_gtk_file_chooser_get_filter = NULL;
+
+// void gtk_file_chooser_set_filter(GtkFileChooser*, GtkFileFilter*);
+typedef void (*XX_gtk_file_chooser_set_filter)(GtkFileChooser*, GtkFileFilter*);
+static XX_gtk_file_chooser_set_filter fl_gtk_file_chooser_set_filter = NULL;
+
+// GtkFileFilter * gtk_file_filter_new();
+typedef GtkFileFilter* (*XX_gtk_file_filter_new)(void);
+static XX_gtk_file_filter_new fl_gtk_file_filter_new = NULL;
+
+// void gtk_file_filter_add_pattern(GtkFileFilter*, const gchar*);
+typedef void (*XX_gtk_file_filter_add_pattern)(GtkFileFilter*, const gchar*);
+static XX_gtk_file_filter_add_pattern fl_gtk_file_filter_add_pattern = NULL;
+
+// void gtk_file_filter_add_custom(GtkFileFilter *filter, GtkFileFilterFlags needed,
+// GtkFileFilterFunc func, gpointer data, GDestroyNotify notify);
+typedef void (*XX_gtk_file_filter_add_custom)(GtkFileFilter *filter, GtkFileFilterFlags needed,
+ GtkFileFilterFunc func, gpointer data,
+ GDestroyNotify notify);
+static XX_gtk_file_filter_add_custom fl_gtk_file_filter_add_custom = NULL;
+
+// void gtk_file_filter_set_name(GtkFileFilter*, const gchar*);
+typedef void (*XX_gtk_file_filter_set_name)(GtkFileFilter*, const gchar*);
+static XX_gtk_file_filter_set_name fl_gtk_file_filter_set_name = NULL;
+
+// const gchar* gtk_file_filter_get_name(GtkFileFilter*);
+typedef const gchar* (*XX_gtk_file_filter_get_name)(GtkFileFilter*);
+static XX_gtk_file_filter_get_name fl_gtk_file_filter_get_name = NULL;
+
+// void gtk_file_chooser_set_extra_widget(GtkFileChooser *, GtkWidget *);
+typedef void (*XX_gtk_file_chooser_set_extra_widget)(GtkFileChooser *, GtkWidget *);
+static XX_gtk_file_chooser_set_extra_widget fl_gtk_file_chooser_set_extra_widget = NULL;
+
+// void gtk_widget_show_now(GtkWidget *);
+typedef void (*XX_gtk_widget_show_now)(GtkWidget *);
+static XX_gtk_widget_show_now fl_gtk_widget_show_now = NULL;
+
+// GdkWindow* gtk_widget_get_window(GtkWidget *);
+typedef GdkWindow* (*XX_gtk_widget_get_window)(GtkWidget *);
+static XX_gtk_widget_get_window fl_gtk_widget_get_window = NULL;
+
+// Window gdk_x11_drawable_get_xid(GdkWindow *);
+typedef Window (*XX_gdk_x11_drawable_get_xid)(GdkWindow *);
+static XX_gdk_x11_drawable_get_xid fl_gdk_x11_drawable_get_xid = NULL;
+
+// GtkWidget *gtk_check_button_new_with_label(const gchar *);
+typedef GtkWidget* (*XX_gtk_check_button_new_with_label)(const gchar *);
+static XX_gtk_check_button_new_with_label fl_gtk_check_button_new_with_label = NULL;
+
+// gulong g_signal_connect_data(gpointer, const gchar *, GCallback, gpointer, GClosureNotify, GConnectFlags);
+typedef gulong (*XX_g_signal_connect_data)(gpointer, const gchar *, GCallback, gpointer, GClosureNotify, GConnectFlags);
+static XX_g_signal_connect_data fl_g_signal_connect_data = NULL;
+
+// gboolean gtk_toggle_button_get_active(GtkToggleButton *);
+typedef gboolean (*XX_gtk_toggle_button_get_active)(GtkToggleButton*);
+static XX_gtk_toggle_button_get_active fl_gtk_toggle_button_get_active = NULL;
+
+// void gtk_file_chooser_set_show_hidden(GtkFileChooser *, gboolean);
+typedef void (*XX_gtk_file_chooser_set_show_hidden)(GtkFileChooser *, gboolean);
+static XX_gtk_file_chooser_set_show_hidden fl_gtk_file_chooser_set_show_hidden = NULL;
+
+// gboolean gtk_file_chooser_get_show_hidden(GtkFileChooser *);
+typedef gboolean (*XX_gtk_file_chooser_get_show_hidden)(GtkFileChooser *);
+static XX_gtk_file_chooser_get_show_hidden fl_gtk_file_chooser_get_show_hidden = NULL;
+
+// void gtk_toggle_button_set_active(GtkToggleButton *, gboolean);
+typedef void (*XX_gtk_toggle_button_set_active)(GtkToggleButton *, gboolean);
+static XX_gtk_toggle_button_set_active fl_gtk_toggle_button_set_active = NULL;
+
+
+Fl_GTK_File_Chooser::Fl_GTK_File_Chooser(int val) : Fl_FLTK_File_Chooser(-1)
+{
+ gtkw_ptr = NULL; // used to hold a GtkWidget*
+ gtkw_slist = NULL; // will hold the returned file names in a multi-selection...
+ gtkw_count = 0; // How many items were selected?
+ gtkw_filename = NULL; // holds the last name we read back in a single file selection...
+ gtkw_title = NULL; // dialog title
+ _btype = val;
+ previous_filter = NULL;
+}
+
+Fl_GTK_File_Chooser::~Fl_GTK_File_Chooser()
+{
+ // Should free up resources taken for...
+ if(gtkw_ptr) {
+ fl_gtk_widget_destroy (gtkw_ptr);
+ gtkw_ptr = NULL;
+ }
+ if(gtkw_filename) {
+ fl_g_free(gtkw_filename);
+ gtkw_filename = NULL;
+ }
+ if(gtkw_slist) {
+ GSList *iter = (GSList *)gtkw_slist;
+ while(iter) {
+ if(iter->data) fl_g_free(iter->data);
+ iter = g_slist_next(iter);
+ }
+ fl_g_slist_free((GSList *)gtkw_slist);
+ gtkw_slist = NULL;
+ }
+ gtkw_count = 0; // assume we have no files selected now
+ gtkw_title = strfree(gtkw_title);
+}
+
+void Fl_GTK_File_Chooser::type(int val) {
+ _btype = val;
+}
+
+int Fl_GTK_File_Chooser::count() const {
+ return gtkw_count;
+}
+
+const char *Fl_GTK_File_Chooser::filename() const
+{
+ if(gtkw_ptr) {
+ if(fl_gtk_file_chooser_get_select_multiple((GtkFileChooser *)gtkw_ptr) == FALSE) {
+ return gtkw_filename;
+ }
+ else {
+ GSList *iter = (GSList *)gtkw_slist;
+ char *nm = (char *)iter->data;
+ return nm;
+ }
+ }
+ return("");
+}
+
+const char *Fl_GTK_File_Chooser::filename(int i) const
+{
+ if(fl_gtk_file_chooser_get_select_multiple((GtkFileChooser *)gtkw_ptr) == FALSE) {
+ return gtkw_filename;
+ }
+ else {
+ if ((unsigned)i < gtkw_count) {
+ GSList *iter = (GSList *)gtkw_slist;
+ char *nm = (char *)fl_g_slist_nth_data(iter, i);
+ return nm;
+ }
+ }
+ return("");
+}
+
+void Fl_GTK_File_Chooser::title(const char *val)
+{
+ strfree(gtkw_title);
+ gtkw_title = strnew(val);
+}
+
+const char* Fl_GTK_File_Chooser::title() const
+{
+ return gtkw_title;
+}
+
+/* changes the extension of the outfile in the chooser according to newly selected filter */
+void Fl_GTK_File_Chooser::changed_output_type(const char *filter)
+{
+ if ( !(options()&Fl_Native_File_Chooser::USE_FILTER_EXT) ) return;
+ if (strchr(filter, '(') || strchr(filter, '{') || strchr(filter+1, '*') || strncmp(filter, "*.", 2)) return;
+ const char *p = fl_gtk_file_chooser_get_filename((GtkFileChooser*)gtkw_ptr);
+ if (!p) return;
+ p = fl_filename_name(p);
+ const char *q = strrchr(p, '.');
+ if (!q) q = p + strlen(p);
+ char *r = new char[strlen(p) + strlen(filter)];
+ strcpy(r, p);
+ strcpy(r + (q - p), filter + 1);
+ fl_gtk_file_chooser_set_current_name((GtkFileChooser*)gtkw_ptr, r);
+ delete[] r;
+}
+
+/* Filters files before display in chooser.
+ Also used to detect when the filter just changed */
+gboolean Fl_GTK_File_Chooser::custom_gtk_filter_function(const GtkFileFilterInfo *info, Fl_GTK_File_Chooser::pair* p)
+{
+ if (p->running->previous_filter != p->filter) {
+ p->running->changed_output_type(p->filter);
+ p->running->previous_filter = p->filter;
+ }
+ return (gboolean)fl_filename_match(info->filename, p->filter);
+}
+
+void Fl_GTK_File_Chooser::free_pair(Fl_GTK_File_Chooser::pair *p)
+{
+ delete p;
+}
+
+static void hidden_files_cb(GtkToggleButton *togglebutton, gpointer user_data)
+{
+ gboolean state = fl_gtk_toggle_button_get_active(togglebutton);
+ fl_gtk_file_chooser_set_show_hidden((GtkFileChooser*)user_data, state);
+}
+
+int Fl_GTK_File_Chooser::show()
+{
+ // The point here is that after running a GTK dialog, the calling program's current locale is modified.
+ // To avoid that, we memorize the calling program's current locale, and the locale as modified
+ // by GTK after the first dialog use. We restore the calling program's current locale
+ // before returning, and we set the locale as modified by GTK before subsequent GTK dialog uses.
+ static bool first = true;
+ char *p;
+ char *before = NULL;
+ static char *gtk_wants = NULL;
+ // record in before the calling program's current locale
+ p = setlocale(LC_ALL, NULL);
+ if (p) before = strdup(p);
+ if (gtk_wants) { // set the locale as GTK 'wants it'
+ setlocale(LC_ALL, gtk_wants);
+ }
+ int retval = fl_gtk_chooser_wrapper(); // may change the locale
+ if (first) {
+ first = false;
+ // record in gtk_wants the locale as modified by the GTK dialog
+ p = setlocale(LC_ALL, NULL);
+ if (p) gtk_wants = strdup(p);
+ }
+ if (before) {
+ setlocale(LC_ALL, before); // restore calling program's current locale
+ free(before);
+ }
+ return retval;
+}
+
+static char *extract_dir_from_path(const char *path)
+{
+ static char *dir = NULL;
+ if (fl_filename_isdir(path)) {
+ return (char*)path;
+ }
+ if (*path != '/') return NULL;
+ if (dir) free(dir);
+ dir = strdup(path);
+ do {
+ char *p = strrchr(dir, '/');
+ if (p == dir) p++;
+ *p = 0;
+ }
+ while (!fl_filename_isdir(dir));
+ return dir;
+}
+
+static void run_response_handler(GtkDialog *dialog, gint response_id, gpointer data)
+{
+ gint *ri = (gint *)data;
+ *ri = response_id;
+}
+
+
+int Fl_GTK_File_Chooser::fl_gtk_chooser_wrapper()
+{
+ int result = 1;
+ static int have_gtk_init = 0;
+ char *p;
+
+ if(!have_gtk_init) {
+ have_gtk_init = -1;
+ int ac = 0;
+ fl_gtk_init_check(&ac, NULL);
+ }
+
+ if(gtkw_ptr) { // discard the previous dialog widget
+ fl_gtk_widget_destroy (gtkw_ptr);
+ gtkw_ptr = NULL;
+ }
+
+ // set the dialog action type
+ GtkFileChooserAction gtw_action_type;
+ switch (_btype) {
+ case Fl_Native_File_Chooser::BROWSE_DIRECTORY:
+ case Fl_Native_File_Chooser::BROWSE_MULTI_DIRECTORY:
+ gtw_action_type = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
+ break;
+
+ case Fl_Native_File_Chooser::BROWSE_SAVE_FILE:
+ gtw_action_type = GTK_FILE_CHOOSER_ACTION_SAVE;
+ break;
+
+ case Fl_Native_File_Chooser::BROWSE_SAVE_DIRECTORY:
+ gtw_action_type = GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER;
+ break;
+
+ case Fl_Native_File_Chooser::BROWSE_MULTI_FILE:
+ case Fl_Native_File_Chooser::BROWSE_FILE:
+ default:
+ gtw_action_type = GTK_FILE_CHOOSER_ACTION_OPEN;
+ break;
+ }
+ // create a new dialog
+ gtkw_ptr = fl_gtk_file_chooser_dialog_new (gtkw_title,
+ NULL, /* parent_window */
+ gtw_action_type,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ gtw_action_type == GTK_FILE_CHOOSER_ACTION_SAVE || gtw_action_type == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER ?
+ GTK_STOCK_SAVE : GTK_STOCK_OPEN,
+ GTK_RESPONSE_ACCEPT,
+ NULL);
+ // did we create a valid dialog widget?
+ if(!gtkw_ptr) {
+ // fail
+ return -1;
+ }
+
+ // set the dialog properties
+ switch (_btype) {
+ case Fl_Native_File_Chooser::BROWSE_MULTI_DIRECTORY:
+ case Fl_Native_File_Chooser::BROWSE_MULTI_FILE:
+ fl_gtk_file_chooser_set_select_multiple((GtkFileChooser *)gtkw_ptr, TRUE);
+ break;
+
+ case Fl_Native_File_Chooser::BROWSE_SAVE_FILE:
+ if (_preset_file)fl_gtk_file_chooser_set_current_name ((GtkFileChooser *)gtkw_ptr, fl_filename_name(_preset_file));
+ /* FALLTHROUGH */
+ case Fl_Native_File_Chooser::BROWSE_SAVE_DIRECTORY:
+ fl_gtk_file_chooser_set_create_folders((GtkFileChooser *)gtkw_ptr, TRUE);
+ fl_gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser *)gtkw_ptr, (_options & Fl_Native_File_Chooser::SAVEAS_CONFIRM)?TRUE:FALSE);
+ break;
+
+ case Fl_Native_File_Chooser::BROWSE_DIRECTORY:
+ case Fl_Native_File_Chooser::BROWSE_FILE:
+ default:
+ break;
+ }
+
+ if (_directory && _directory[0]) {
+ p = extract_dir_from_path(_directory);
+ if (p) fl_gtk_file_chooser_set_current_folder((GtkFileChooser *)gtkw_ptr, p);
+ }
+ else if (_preset_file) {
+ p = extract_dir_from_path(_preset_file);
+ if (p) fl_gtk_file_chooser_set_current_folder((GtkFileChooser *)gtkw_ptr, p);
+ }
+
+ GtkFileFilter **filter_tab = NULL;
+ if (_parsedfilt) {
+ filter_tab = new GtkFileFilter*[_nfilters];
+ char *filter = strdup(_parsedfilt);
+ p = strtok(filter, "\t");
+ int count = 0;
+ while (p) {
+ filter_tab[count] = fl_gtk_file_filter_new();
+ fl_gtk_file_filter_set_name(filter_tab[count], p);
+ p = strchr(p, '(') + 1;
+ char *q = strchr(p, ')'); *q = 0;
+ fl_gtk_file_filter_add_custom(filter_tab[count],
+ GTK_FILE_FILTER_FILENAME,
+ (GtkFileFilterFunc)Fl_GTK_File_Chooser::custom_gtk_filter_function,
+ new Fl_GTK_File_Chooser::pair(this, p),
+ (GDestroyNotify)Fl_GTK_File_Chooser::free_pair);
+ fl_gtk_file_chooser_add_filter((GtkFileChooser *)gtkw_ptr, filter_tab[count]);
+ p = strtok(NULL, "\t");
+ count++;
+ }
+ free(filter);
+ fl_gtk_file_chooser_set_filter((GtkFileChooser *)gtkw_ptr, filter_tab[_filtvalue < _nfilters?_filtvalue:0]);
+ previous_filter = NULL;
+ if (gtw_action_type == GTK_FILE_CHOOSER_ACTION_OPEN) {
+ GtkFileFilter* gfilter = fl_gtk_file_filter_new();
+ fl_gtk_file_filter_set_name(gfilter, Fl_File_Chooser::all_files_label);
+ fl_gtk_file_filter_add_pattern(gfilter, "*");
+ fl_gtk_file_chooser_add_filter((GtkFileChooser *)gtkw_ptr, gfilter);
+ }
+ }
+
+ GtkWidget *toggle = fl_gtk_check_button_new_with_label(Fl_File_Chooser::hidden_label);
+ fl_gtk_file_chooser_set_extra_widget((GtkFileChooser *)gtkw_ptr, toggle);
+ fl_g_signal_connect_data(toggle, "toggled", G_CALLBACK(hidden_files_cb), gtkw_ptr, NULL, (GConnectFlags) 0);
+ Fl_Window* firstw = Fl::first_window();
+ fl_gtk_widget_show_now(gtkw_ptr); // map the GTK window on screen
+ if (firstw) {
+ GdkWindow* gdkw = fl_gtk_widget_get_window(gtkw_ptr);
+ Window xw = fl_gdk_x11_drawable_get_xid(gdkw); // get the X11 ref of the GTK window
+ XSetTransientForHint(fl_display, xw, fl_xid(firstw)); // set the GTK window transient for the last FLTK win
+ }
+ gboolean state = fl_gtk_file_chooser_get_show_hidden((GtkFileChooser *)gtkw_ptr);
+ fl_gtk_toggle_button_set_active((GtkToggleButton *)toggle, state);
+
+ gint response_id = GTK_RESPONSE_NONE;
+ fl_g_signal_connect_data(gtkw_ptr, "response", G_CALLBACK(run_response_handler), &response_id, NULL, (GConnectFlags) 0);
+ while (response_id == GTK_RESPONSE_NONE) { // loop that shows the GTK dialog window
+ fl_gtk_main_iteration(); // one iteration of the GTK event loop
+ while (XEventsQueued(fl_display, QueuedAfterReading)) { // emulate modal dialog
+ XEvent xevent;
+ XNextEvent(fl_display, &xevent);
+ Window xid = xevent.xany.window;
+ if (xevent.type == ConfigureNotify) xid = xevent.xmaprequest.window;
+ if (!fl_find(xid)) continue; // skip events to non-FLTK windows
+ // process Expose and ConfigureNotify events
+ if ( xevent.type == Expose || xevent.type == ConfigureNotify ) fl_handle(xevent);
+ }
+ Fl::flush(); // do the drawings needed after Expose events
+ }
+
+ if (response_id == GTK_RESPONSE_ACCEPT) {
+ if (_parsedfilt) {
+ GtkFileFilter *gfilter = fl_gtk_file_chooser_get_filter((GtkFileChooser *)gtkw_ptr);
+ for (_filtvalue = 0; _filtvalue < _nfilters; _filtvalue++) {
+ if (filter_tab[_filtvalue] == gfilter) break;
+ }
+ }
+
+ // discard any filenames or lists from previous calls
+ if(gtkw_filename) {
+ fl_g_free(gtkw_filename);
+ gtkw_filename = NULL;
+ }
+ if(gtkw_slist) {
+ GSList *iter = (GSList *)gtkw_slist;
+ while(iter) {
+ if(iter->data) fl_g_free(iter->data);
+ iter = g_slist_next(iter);
+ }
+ fl_g_slist_free((GSList *)gtkw_slist);
+ gtkw_slist = NULL;
+ }
+ gtkw_count = 0; // assume we have no files selected now
+
+ if(fl_gtk_file_chooser_get_select_multiple((GtkFileChooser *)gtkw_ptr) == FALSE) {
+ gtkw_filename = fl_gtk_file_chooser_get_filename ((GtkFileChooser *)gtkw_ptr);
+ if (gtkw_filename) {
+ gtkw_count = 1;
+ result = 0;
+ //printf("single: %s\n", gtkw_filename);
+ }
+ }
+ else {
+ gtkw_slist = fl_gtk_file_chooser_get_filenames((GtkFileChooser *)gtkw_ptr);
+ gtkw_count = fl_g_slist_length((GSList *)gtkw_slist);
+ if(gtkw_count) result = 0;
+
+ // puts("multiple");
+ // GSList *iter = (GSList *)gtkw_slist;
+ // printf ("Selected %d files\n", gtkw_count);
+ // while(iter) {
+ // char *nm = (char *)iter->data;
+ // printf("%s\n", nm);
+ // iter = g_slist_next(iter);
+ // }
+ }
+ }
+ delete[] filter_tab;
+ if ( response_id == GTK_RESPONSE_DELETE_EVENT) gtkw_ptr = NULL;
+ else fl_gtk_widget_hide (gtkw_ptr);
+
+ // I think this is analogus to doing an Fl::check() - we need this here to make sure
+ // the GtkFileChooserDialog is removed from the display correctly
+ while (fl_gtk_events_pending ()) fl_gtk_main_iteration ();
+
+ return result;
+} // fl_gtk_chooser_wrapper
+
+#if HAVE_DLSYM && HAVE_DLFCN_H
+// macro to help with the symbol loading boilerplate...
+# define GET_SYM(SSS, LLL) \
+dlerror(); /* Clear any existing error */ \
+fl_##SSS = (XX_##SSS)dlsym(LLL, #SSS); \
+if ((pc_dl_error = dlerror()) != NULL) { \
+fprintf(stderr, "%s\n", pc_dl_error); \
+did_find_GTK_libs = 0; \
+return; }
+
+static void* fl_dlopen(const char *filename1, const char *filename2)
+{
+ void *ptr = dlopen(filename1, RTLD_LAZY | RTLD_GLOBAL);
+ if (!ptr) ptr = dlopen(filename2, RTLD_LAZY | RTLD_GLOBAL);
+ return ptr;
+}
+#endif
+
+/*
+ * Use dlopen to see if we can load the gtk dynamic libraries that
+ * will allow us to create a GtkFileChooserDialog() on the fly,
+ * without linking to the GTK libs at compile time.
+ */
+void Fl_GTK_File_Chooser::probe_for_GTK_libs(void) {
+#if HAVE_DLSYM && HAVE_DLFCN_H
+ void *ptr_glib = NULL;
+ void *ptr_gtk = NULL;
+
+# ifdef __APPLE_CC__ // allows testing on Darwin + X11
+ ptr_glib = dlopen("/sw/lib/libglib-2.0.dylib", RTLD_LAZY | RTLD_GLOBAL);
+# else
+ ptr_glib = fl_dlopen("libglib-2.0.so", "libglib-2.0.so.0");
+# endif
+ // Try first with GTK2
+# ifdef __APPLE_CC__ // allows testing on Darwin + X11
+ ptr_gtk = dlopen("/sw/lib/libgtk-x11-2.0.dylib", RTLD_LAZY | RTLD_GLOBAL);
+#else
+ ptr_gtk = fl_dlopen("libgtk-x11-2.0.so", "libgtk-x11-2.0.so.0");
+#endif
+ if (ptr_gtk && ptr_glib) {
+#ifdef DEBUG
+ puts("selected GTK-2\n");
+#endif
+ }
+ else {// Try then with GTK3
+ ptr_gtk = fl_dlopen("libgtk-3.so", "libgtk-3.so.0");
+#ifdef DEBUG
+ if (ptr_gtk && ptr_glib) {
+ puts("selected GTK-3\n");
+ }
+#endif
+ }
+
+ if((!ptr_glib) || (!ptr_gtk)) {
+#ifdef DEBUG
+ puts("Failure to load libglib or libgtk");
+#endif
+ did_find_GTK_libs = 0;
+ return;
+ }
+
+ char *pc_dl_error; // used to report errors by the GET_SYM macro...
+ // items we need from GLib
+ GET_SYM(g_free, ptr_glib);
+ GET_SYM(g_slist_nth_data, ptr_glib);
+ GET_SYM(g_slist_length, ptr_glib);
+ GET_SYM(g_slist_free, ptr_glib);
+ // items we need from GTK
+ GET_SYM(gtk_init_check, ptr_gtk);
+ GET_SYM(gtk_widget_destroy, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_select_multiple, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_do_overwrite_confirmation, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_current_name, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_current_folder, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_create_folders, ptr_gtk);
+ GET_SYM(gtk_file_chooser_get_select_multiple, ptr_gtk);
+ GET_SYM(gtk_widget_hide, ptr_gtk);
+ GET_SYM(gtk_file_chooser_get_filename, ptr_gtk);
+ GET_SYM(gtk_file_chooser_get_filenames, ptr_gtk);
+ GET_SYM(gtk_main_iteration, ptr_gtk);
+ GET_SYM(gtk_events_pending, ptr_gtk);
+ GET_SYM(gtk_file_chooser_dialog_new, ptr_gtk);
+ GET_SYM(gtk_file_chooser_add_filter, ptr_gtk);
+ GET_SYM(gtk_file_chooser_get_filter, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_filter, ptr_gtk);
+ GET_SYM(gtk_file_filter_new, ptr_gtk);
+ GET_SYM(gtk_file_filter_add_pattern, ptr_gtk);
+ GET_SYM(gtk_file_filter_add_custom, ptr_gtk);
+ GET_SYM(gtk_file_filter_set_name, ptr_gtk);
+ GET_SYM(gtk_file_filter_get_name, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_extra_widget, ptr_gtk);
+ GET_SYM(gtk_widget_show_now, ptr_gtk);
+ GET_SYM(gtk_widget_get_window, ptr_gtk);
+ GET_SYM(gdk_x11_drawable_get_xid, ptr_gtk);
+ GET_SYM(gtk_check_button_new_with_label, ptr_gtk);
+ GET_SYM(g_signal_connect_data, ptr_gtk);
+ GET_SYM(gtk_toggle_button_get_active, ptr_gtk);
+ GET_SYM(gtk_file_chooser_set_show_hidden, ptr_gtk);
+ GET_SYM(gtk_file_chooser_get_show_hidden, ptr_gtk);
+ GET_SYM(gtk_toggle_button_set_active, ptr_gtk);
+
+ did_find_GTK_libs = 1;
+#endif
+} // probe_for_GTK_libs
+
+//
+// End of "$Id$".
+//
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm
index 6fc9c82..518ae02 100644
--- a/src/Fl_Native_File_Chooser_MAC.mm
+++ b/src/Fl_Native_File_Chooser_MAC.mm
@@ -1,4 +1,4 @@
-// "$Id: Fl_Native_File_Chooser_MAC.mm 9685 2012-09-27 12:49:39Z manolo $"
+// "$Id: Fl_Native_File_Chooser_MAC.mm 10317 2014-09-16 17:34:29Z manolo $"
//
// FLTK native OS file chooser widget
//
@@ -344,8 +344,7 @@ int Fl_Native_File_Chooser::filters() const {
int Fl_Native_File_Chooser::get_saveas_basename(void) {
char *q = strdup( [[[(NSSavePanel*)_panel URL] path] UTF8String] );
- id delegate = [(NSSavePanel*)_panel delegate];
- if (delegate != nil) {
+ if ( !(_options & SAVEAS_CONFIRM) ) {
const char *d = [[[[(NSSavePanel*)_panel URL] path] stringByDeletingLastPathComponent] UTF8String];
int l = strlen(d) + 1;
if (strcmp(d, "/") == 0) l = 1;
@@ -412,6 +411,7 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) {
}
- (FLopenDelegate*)setPopup:(NSPopUpButton*)popup filter_pattern:(char**)pattern;
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;
+- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url;
@end
@implementation FLopenDelegate
- (FLopenDelegate*)setPopup:(NSPopUpButton*)popup filter_pattern:(char**)pattern
@@ -423,11 +423,16 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) {
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
{
if ( [nspopup indexOfSelectedItem] == [nspopup numberOfItems] - 1) return YES;
- const char *pathname = [filename fileSystemRepresentation];
- if ( fl_filename_isdir(pathname) ) return YES;
- if ( fl_filename_match(pathname, filter_pattern[ [nspopup indexOfSelectedItem] ]) ) return YES;
+ BOOL isdir = NO;
+ [[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isdir];
+ if (isdir) return YES;
+ if ( fl_filename_match([filename fileSystemRepresentation], filter_pattern[ [nspopup indexOfSelectedItem] ]) ) return YES;
return NO;
}
+- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url
+{
+ return [self panel:sender shouldShowFilename:[url path]];
+}
@end
@interface FLsaveDelegate : NSObject
@@ -435,17 +440,53 @@ static char *prepareMacFilter(int count, const char *filter, char **patterns) {
<NSOpenSavePanelDelegate>
#endif
{
+ NSSavePanel *dialog;
+ BOOL saveas_confirm;
}
- (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag;
+- (void)changedPopup:(id)sender;
+- (void)panel:(NSSavePanel*)p;
+- (void)option:(BOOL)o;
@end
@implementation FLsaveDelegate
- (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag
{
- if (! okFlag) return filename;
+ if ( !okFlag || saveas_confirm ) return filename;
// User has clicked save, and no overwrite confirmation should occur.
// To get the latter, we need to change the name we return (hence the prefix):
return [@ UNLIKELYPREFIX stringByAppendingString:filename];
}
+- (void)changedPopup:(id)sender
+// runs when the save panel popup menu changes output file type
+// correspondingly changes the extension of the output file name
+{
+ if (fl_mac_os_version < 100600) return; // because of setNameFieldStringValue and nameFieldStringValue
+ char *s = strdup([[(NSPopUpButton*)sender titleOfSelectedItem] UTF8String]);
+ if (!s) return;
+ char *p = strchr(s, '(');
+ if (!p) p = s;
+ p = strchr(p, '.');
+ if (!p) {free(s); return;}
+ p++;
+ while (*p == ' ') p++;
+ if (!p || *p == '{') {free(s); return;}
+ char *q = p+1;
+ while (*q != ' ' && *q != ')' && *q != 0) q++;
+ *q = 0;
+ NSString *ns = [NSString stringWithFormat:@"%@.%@",
+ [[dialog performSelector:@selector(nameFieldStringValue)] stringByDeletingPathExtension],
+ [NSString stringWithUTF8String:p]];
+ free(s);
+ [dialog performSelector:@selector(setNameFieldStringValue:) withObject:ns];
+}
+- (void)panel:(NSSavePanel*)p
+{
+ dialog = p;
+}
+- (void) option:(BOOL)o
+{
+ saveas_confirm = o;
+}
@end
static NSPopUpButton *createPopupAccessory(NSSavePanel *panel, const char *filter, const char *title, int rank)
@@ -501,8 +542,8 @@ int Fl_Native_File_Chooser::runmodal()
}
if (_directory && !dir) dir = [[NSString alloc] initWithUTF8String:_directory];
if (fl_mac_os_version >= 100600) {
- if (dir) [(NSSavePanel*)_panel setDirectoryURL:[NSURL fileURLWithPath:dir]];
- if (fname) [(NSSavePanel*)_panel setNameFieldStringValue:fname];
+ if (dir) [(NSSavePanel*)_panel performSelector:@selector(setDirectoryURL:) withObject:[NSURL fileURLWithPath:dir]];
+ if (fname) [(NSSavePanel*)_panel performSelector:@selector(setNameFieldStringValue:) withObject:fname];
retval = [(NSSavePanel*)_panel runModal];
}
else {
@@ -541,7 +582,6 @@ int Fl_Native_File_Chooser::post() {
_panel = [NSSavePanel savePanel];
break;
}
- int retval;
NSString *nstitle = [NSString stringWithUTF8String: (_title ? _title : "No Title")];
[(NSSavePanel*)_panel setTitle:nstitle];
switch (_btype) {
@@ -561,8 +601,9 @@ int Fl_Native_File_Chooser::post() {
// SHOW THE DIALOG
NSWindow *key = [NSApp keyWindow];
- if ( [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]] ) {
- NSPopUpButton *popup = nil;
+ BOOL is_open_panel = [(NSSavePanel*)_panel isKindOfClass:[NSOpenPanel class]];
+ NSPopUpButton *popup = nil;
+ if ( is_open_panel ) {
if (_filt_total) {
char *t = prepareMacFilter(_filt_total, _filter, _filt_patt);
popup = createPopupAccessory((NSSavePanel*)_panel, t, Fl_File_Chooser::show_label, 0);
@@ -571,47 +612,44 @@ int Fl_Native_File_Chooser::post() {
[popup addItemWithTitle:[[NSString alloc] initWithUTF8String:Fl_File_Chooser::all_files_label]];
[popup setAction:@selector(validateVisibleColumns)];
[popup setTarget:(NSObject*)_panel];
- static FLopenDelegate *openDelegate = nil;
- if (openDelegate == nil) {
- // not to be ever freed
- openDelegate = [[FLopenDelegate alloc] init];
- }
+ FLopenDelegate *openDelegate = [[[FLopenDelegate alloc] init] autorelease];
[openDelegate setPopup:popup filter_pattern:_filt_patt];
[(NSOpenPanel*)_panel setDelegate:openDelegate];
}
- retval = runmodal();
- if (_filt_total) {
- _filt_value = [popup indexOfSelectedItem];
- }
- if ( retval == NSOKButton ) {
- clear_pathnames();
- NSArray *array = [(NSOpenPanel*)_panel URLs];
- _tpathnames = [array count];
- _pathnames = new char*[_tpathnames];
- for(int i = 0; i < _tpathnames; i++) {
- _pathnames[i] = strnew([[(NSURL*)[array objectAtIndex:i] path] UTF8String]);
- }
- }
}
else {
- NSPopUpButton *popup = nil;
+ FLsaveDelegate *saveDelegate = [[[FLsaveDelegate alloc] init] autorelease];
[(NSSavePanel*)_panel setAllowsOtherFileTypes:YES];
- if ( !(_options & SAVEAS_CONFIRM) ) {
- static FLsaveDelegate *saveDelegate = nil;
- if (saveDelegate == nil)saveDelegate = [[FLsaveDelegate alloc] init]; // not to be ever freed
- [(NSSavePanel*)_panel setDelegate:saveDelegate];
- }
+ [(NSSavePanel*)_panel setDelegate:saveDelegate];
+ [saveDelegate option:(_options & SAVEAS_CONFIRM)];
if (_filt_total) {
if (_filt_value >= _filt_total) _filt_value = _filt_total - 1;
char *t = prepareMacFilter(_filt_total, _filter, _filt_patt);
popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value);
delete[] t;
+ if (_options & USE_FILTER_EXT) {
+ [popup setAction:@selector(changedPopup:)];
+ [popup setTarget:saveDelegate];
+ [saveDelegate panel:(NSSavePanel*)_panel];
+ }
+ [(NSSavePanel*)_panel setCanSelectHiddenExtension:YES];
}
- retval = runmodal();
- if (_filt_total) {
- _filt_value = [popup indexOfSelectedItem];
+ }
+ int retval = runmodal();
+ if (_filt_total) {
+ _filt_value = [popup indexOfSelectedItem];
+ }
+ if ( retval == NSOKButton ) {
+ if (is_open_panel) {
+ clear_pathnames();
+ NSArray *array = [(NSOpenPanel*)_panel URLs];
+ _tpathnames = [array count];
+ _pathnames = new char*[_tpathnames];
+ for(int i = 0; i < _tpathnames; i++) {
+ _pathnames[i] = strnew([[(NSURL*)[array objectAtIndex:i] path] UTF8String]);
+ }
}
- if ( retval == NSOKButton ) get_saveas_basename();
+ else get_saveas_basename();
}
[key makeKeyWindow];
[localPool release];
@@ -621,5 +659,5 @@ int Fl_Native_File_Chooser::post() {
#endif // __APPLE__
//
-// End of "$Id: Fl_Native_File_Chooser_MAC.mm 9685 2012-09-27 12:49:39Z manolo $".
+// End of "$Id: Fl_Native_File_Chooser_MAC.mm 10317 2014-09-16 17:34:29Z manolo $".
//
diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx
index 0c8e0a9..094ea9f 100644
--- a/src/Fl_Native_File_Chooser_WIN32.cxx
+++ b/src/Fl_Native_File_Chooser_WIN32.cxx
@@ -1,4 +1,4 @@
-// "$Id: Fl_Native_File_Chooser_WIN32.cxx 9629 2012-06-26 07:03:46Z greg.ercolano $"
+// "$Id: Fl_Native_File_Chooser_WIN32.cxx 10312 2014-09-15 09:35:05Z ossman $"
//
// FLTK native OS file chooser widget
//
@@ -34,14 +34,12 @@ LPCWSTR utf8towchar(const char *in); //MG
char *wchartoutf8(LPCWSTR in); //MG
#include <FL/Fl_Native_File_Chooser.H>
+#include <FL/x.H>
#define LCURLY_CHR '{'
#define RCURLY_CHR '}'
#define LBRACKET_CHR '['
#define RBRACKET_CHR ']'
-#define MAXFILTERS 80
-
-void fl_OleInitialize(); // in Fl.cxx (Windows only)
// STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG)
#ifdef DEBUG
@@ -54,7 +52,7 @@ static void dnullprint(char *wp) {
return;
} else if ( wp[t] == '\0' ) {
printf("\\0");
- } else {
+ } else {
printf("%c",wp[t]);
}
}
@@ -96,7 +94,7 @@ static void dnullcat(char*&wp, const char *string, int n = -1 ) {
// Make copy of wp into larger buffer
char *tmp = new char[wplen + inlen + 4];
memcpy(tmp, wp, wplen+2); // copy of wp plus doublenull
- delete [] wp; // delete old wp
+ delete[] wp; // delete old wp
wp = tmp; // use new copy
//DEBUG printf("DEBUG: dnullcat COPY: <"); dnullprint(wp); printf("> (wplen=%d)\n", wplen);
}
@@ -191,7 +189,7 @@ void Fl_Native_File_Chooser::clear_pathnames() {
while ( --_tpathnames >= 0 ) {
_pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]);
}
- delete [] _pathnames;
+ delete[] _pathnames;
_pathnames = NULL;
}
_tpathnames = 0;
@@ -214,9 +212,9 @@ void Fl_Native_File_Chooser::add_pathname(const char *s) {
} else {
// Grow array by 1
char **tmp = new char*[_tpathnames+1]; // create new buffer
- memcpy((void*)tmp, (void*)_pathnames,
+ memcpy((void*)tmp, (void*)_pathnames,
sizeof(char*)*_tpathnames); // copy old
- delete [] _pathnames; // delete old
+ delete[] _pathnames; // delete old
_pathnames = tmp; // use new
++_tpathnames;
}
@@ -237,11 +235,11 @@ void Fl_Native_File_Chooser::FreePIDL(LPITEMIDLIST pidl) {
void Fl_Native_File_Chooser::ClearOFN() {
// Free any previously allocated lpstrFile before zeroing out _ofn
if ( _ofn.lpstrFile ) {
- delete [] _ofn.lpstrFile;
+ delete[] _ofn.lpstrFile;
_ofn.lpstrFile = NULL;
}
if ( _ofn.lpstrInitialDir ) {
- delete [] (TCHAR*) _ofn.lpstrInitialDir; //msvc6 compilation fix
+ delete[] (TCHAR*) _ofn.lpstrInitialDir; //msvc6 compilation fix
_ofn.lpstrInitialDir = NULL;
}
_ofn.lpstrFilter = NULL; // (deleted elsewhere)
@@ -364,7 +362,7 @@ int Fl_Native_File_Chooser::showfile() {
char *oldcwd = 0;
DWORD oldcwdsz = GetCurrentDirectory(0,0);
if ( oldcwdsz > 0 ) {
- oldcwd = (char*)malloc(oldcwdsz);
+ oldcwd = (char*)malloc(oldcwdsz);
if (GetCurrentDirectory(oldcwdsz, oldcwd) == 0 ) {
free(oldcwd); oldcwd = 0;
}
@@ -376,30 +374,25 @@ int Fl_Native_File_Chooser::showfile() {
} else {
err = GetOpenFileNameW(&_ofn);
}
+ // GET EXTENDED ERROR
+ int exterr = CommDlgExtendedError();
+ // XXX: RESTORE CWD
+ if ( oldcwd ) {
+ SetCurrentDirectory(oldcwd);
+ free(oldcwd); oldcwd = 0;
+ }
+ // ERROR OR CANCEL?
if ( err == 0 ) {
- // EXTENDED ERROR CHECK
- int err = CommDlgExtendedError();
- // CANCEL?
- if ( err == 0 ) return(1); // user hit 'cancel'
- // AN ERROR OCCURRED
+ if ( exterr == 0 ) return(1); // user hit cancel
+ // Otherwise, an error occurred..
char msg[80];
sprintf(msg, "CommDlgExtendedError() code=%d", err);
errmsg(msg);
- // XXX: RESTORE CWD
- if ( oldcwd ) {
- SetCurrentDirectory(oldcwd);
- free(oldcwd); oldcwd = 0;
- }
return(-1);
}
- // XXX: RESTORE CWD
- if ( oldcwd ) {
- SetCurrentDirectory(oldcwd);
- free(oldcwd); oldcwd = 0;
- }
// PREPARE PATHNAMES FOR RETURN
switch ( _btype ) {
- case BROWSE_FILE:
+ case BROWSE_FILE:
case BROWSE_SAVE_FILE:
set_single_pathname(wchartoutf8(_ofn.lpstrFile));
// Win2Unix(_pathnames[_tpathnames-1]);
@@ -412,8 +405,8 @@ int Fl_Native_File_Chooser::showfile() {
// WALK STRING SEARCHING FOR 'DOUBLE-NULL'
// eg. "/dir/name\0foo1\0foo2\0foo3\0\0"
//
- char pathname[FNFC_MAX_PATH];
- for ( const WCHAR *s = dirname + dirlen + 1;
+ char pathname[FNFC_MAX_PATH];
+ for ( const WCHAR *s = dirname + dirlen + 1;
*s; s+= (wcslen(s)+1)) {
strcpy(pathname, wchartoutf8(dirname));
strcat(pathname, "\\");
@@ -427,7 +420,7 @@ int Fl_Native_File_Chooser::showfile() {
// not to grok forward slashes, passing back as a 'filename'..!
//
if ( _tpathnames == 0 ) {
- add_pathname(wchartoutf8(dirname));
+ add_pathname(wchartoutf8(dirname));
// Win2Unix(_pathnames[_tpathnames-1]);
}
break;
@@ -447,7 +440,7 @@ int Fl_Native_File_Chooser::showfile() {
int CALLBACK Fl_Native_File_Chooser::Dir_CB(HWND win, UINT msg, LPARAM param, LPARAM data) {
switch (msg) {
case BFFM_INITIALIZED:
- if (data) ::SendMessage(win, BFFM_SETSELECTION, TRUE, data);
+ if (data) ::SendMessageW(win, BFFM_SETSELECTIONW, TRUE, data);
break;
case BFFM_SELCHANGED:
TCHAR path[FNFC_MAX_PATH];
@@ -459,7 +452,7 @@ int CALLBACK Fl_Native_File_Chooser::Dir_CB(HWND win, UINT msg, LPARAM param, LP
}
break;
case BFFM_VALIDATEFAILED:
- // we could pop up an annoying message here.
+ // we could pop up an annoying message here.
// also needs set ulFlags |= BIF_VALIDATE
break;
default:
@@ -471,13 +464,22 @@ int CALLBACK Fl_Native_File_Chooser::Dir_CB(HWND win, UINT msg, LPARAM param, LP
// SHOW DIRECTORY BROWSER
int Fl_Native_File_Chooser::showdir() {
// initialize OLE only once
- fl_OleInitialize(); // init needed by BIF_USENEWUI
+ fl_open_display(); // init needed by BIF_USENEWUI
ClearBINF();
clear_pathnames();
// PARENT WINDOW
_binf.hwndOwner = GetForegroundWindow();
// DIALOG TITLE
- _binf.lpszTitle = _title ? _title : NULL;
+ //_binf.lpszTitle = _title ? _title : NULL;
+ if (_title) {
+ static WCHAR wtitle[256];
+ wcsncpy(wtitle, utf8towchar(_title), 256);
+ wtitle[255] = 0;
+ _binf.lpszTitle = wtitle;
+ } else {
+ _binf.lpszTitle = NULL;
+ }
+
// FLAGS
_binf.ulFlags = 0; // initialize
@@ -510,19 +512,22 @@ int Fl_Native_File_Chooser::showdir() {
#endif
// BUFFER
- char displayname[FNFC_MAX_PATH];
+ //char displayname[FNFC_MAX_PATH];
+ WCHAR displayname[FNFC_MAX_PATH];
_binf.pszDisplayName = displayname;
+
// PRESET DIR
- char presetname[FNFC_MAX_PATH];
+ WCHAR presetname[FNFC_MAX_PATH];
if ( _directory ) {
- strcpy(presetname, _directory);
// Unix2Win(presetname);
+ wcsncpy(presetname, utf8towchar(_directory), FNFC_MAX_PATH);
+ presetname[FNFC_MAX_PATH-1] = 0;
_binf.lParam = (LPARAM)presetname;
}
else _binf.lParam = 0;
_binf.lpfn = Dir_CB;
// OPEN BROWSER
- LPITEMIDLIST pidl = SHBrowseForFolder(&_binf);
+ LPITEMIDLIST pidl = SHBrowseForFolderW(&_binf);
// CANCEL?
if ( pidl == NULL ) return(1);
@@ -530,13 +535,14 @@ int Fl_Native_File_Chooser::showdir() {
// TBD: expand NetHood shortcuts from this PIDL??
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp
- TCHAR path[FNFC_MAX_PATH];
- if ( SHGetPathFromIDList(pidl, path) ) {
+ WCHAR path[FNFC_MAX_PATH];
+ if ( SHGetPathFromIDListW(pidl, path) ) {
// Win2Unix(path);
- add_pathname(path);
+ //add_pathname(path);
+ add_pathname(wchartoutf8(path));
}
FreePIDL(pidl);
- if ( !strlen(path) ) return(1); // don't return empty pathnames
+ if ( !wcslen(path) ) return(1); // don't return empty pathnames
return(0);
}
@@ -546,8 +552,8 @@ int Fl_Native_File_Chooser::showdir() {
// -1 - failed; errmsg() has reason
//
int Fl_Native_File_Chooser::show() {
- if ( _btype == BROWSE_DIRECTORY ||
- _btype == BROWSE_MULTI_DIRECTORY ||
+ if ( _btype == BROWSE_DIRECTORY ||
+ _btype == BROWSE_MULTI_DIRECTORY ||
_btype == BROWSE_SAVE_DIRECTORY ) {
return(showdir());
} else {
@@ -620,7 +626,7 @@ void Fl_Native_File_Chooser::filter(const char *val) {
add_filter("All Files", "*.*"); // always include 'all files' option
#ifdef DEBUG
- nullprint(_parsedfilt);
+ dnullprint(_parsedfilt);
#endif /*DEBUG*/
}
@@ -657,7 +663,55 @@ void Fl_Native_File_Chooser::add_filter(const char *name_in, // name of filter (
//DEBUG printf("DEBUG: ADD FILTER name=<%s> winfilter=<%s>\n", name, winfilter);
}
+// RETURN HOW MANY DIFFERENT FILTERS WERE SPECIFIED
+// In: "foo.[CH]" or "foo.{C,H}"
+// Out: 2
+//
+static int count_filters(const char *filter) {
+ int count = 0;
+ char mode = 0;
+ const char *in = filter;
+ while (*in) {
+ switch(*in) {
+ case '\\': // escape next character
+ ++in; if ( *in == 0 ) continue; // skip escape. EOL? done
+ ++in; // skip escaped char
+ continue;
+ case LCURLY_CHR: // start "{aaa,bbb}"
+ mode = *in; // set mode, parse over curly
+ ++count; // at least +1 wildcard
+ break;
+ case RCURLY_CHR: // end "{aaa,bbb}"
+ if ( mode == LCURLY_CHR ) // disable curly mode (if on)
+ mode = 0;
+ break;
+ case LBRACKET_CHR: // start "[xyz]"
+ mode = *in; // set mode, parse over bracket
+ break;
+ case RBRACKET_CHR: // end "[xyz]"
+ if ( mode == LBRACKET_CHR ) // disable bracket mode (if on)
+ mode = 0;
+ break;
+ default: // any other char
+ switch (mode) { // handle {} or [] modes
+ case LCURLY_CHR: // handle "{aaa,bbb}"
+ if (*in==',' || *in=='|') // ',' and '|' adds filters
+ ++count;
+ break;
+ case LBRACKET_CHR: // handle "[xyz]"
+ ++count; // all chars in []'s add new filter
+ break;
+ }
+ break;
+ }
+ ++in; // parse past char
+ }
+ return count > 0 ? count : 1; // return at least 1
+}
+
// CONVERT FLTK STYLE PATTERN MATCHES TO WINDOWS 'DOUBLENULL' PATTERN
+// Returns with the parsed double-null result in '_parsedfilt'.
+//
// Handles:
// IN OUT
// ----------- -----------------------------
@@ -685,16 +739,22 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
if ( ! in ) return;
int has_name = strchr(in, '\t') ? 1 : 0;
+ char mode = has_name ? 'n' : 'w'; // parse mode: n=name, w=wildcard
- char mode = has_name ? 'n' : 'w'; // parse mode: n=name, w=wildcard
- int nwildcards = 0;
- char wildcards[MAXFILTERS][1024]; // parsed wildcards (can be several)
- char wildprefix[512] = "";
- char name[512] = "";
+ // whatever input string is, our output won't be much longer in length..
+ // use double length just for safety.
+ size_t slen = strlen(in);
+ char *wildprefix = new char[slen*2]; wildprefix[0] = 0;
+ char *comp = new char[slen*2]; comp[0] = 0;
+ char *name = new char[slen*2]; name[0] = 0;
// Init
+ int nwildcards = 0;
+ int maxfilters = count_filters(in) + 1; // count wildcard seps
+ char **wildcards = new char*[maxfilters]; // parsed wildcards (can be several)
int t;
- for ( t=0; t<MAXFILTERS; t++ ) {
+ for ( t=0; t<maxfilters; t++ ) {
+ wildcards[t] = new char[slen];
wildcards[t][0] = '\0';
}
@@ -739,7 +799,7 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
strcpy(wildcards[nwildcards++], wildprefix);
}
// Append wildcards in Microsoft's "*.one;*.two" format
- char comp[4096] = "";
+ comp[0] = 0;
for ( t=0; t<nwildcards; t++ ) {
if ( t != 0 ) strcat(comp, ";");
strcat(comp, wildcards[t]);
@@ -750,14 +810,22 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
}
}
// RESET
- for ( t=0; t<MAXFILTERS; t++ ) {
+ for ( t=0; t<maxfilters; t++ ) {
wildcards[t][0] = '\0';
}
nwildcards = 0;
wildprefix[0] = name[0] = '\0';
mode = strchr(in,'\t') ? 'n' : 'w';
// DONE?
- if ( *in == '\0' ) return; // done
+ if ( *in == '\0' ) { // done
+ // Free everything
+ delete[] wildprefix;
+ delete[] comp;
+ delete[] name;
+ for ( t=0; t<maxfilters; t++ ) delete[] wildcards[t];
+ delete[] wildcards;
+ return;
+ }
continue; // not done yet, more filters
}
@@ -781,7 +849,7 @@ void Fl_Native_File_Chooser::parse_filter(const char *in) {
default:
regchar: // handle regular char
switch ( mode ) {
- case LBRACKET_CHR:
+ case LBRACKET_CHR:
// create new wildcard
++nwildcards;
// copy in prefix
@@ -868,5 +936,5 @@ LPCWSTR utf8towchar(const char *in)
#endif /*!FL_DOXYGEN*/
//
-// End of "$Id: Fl_Native_File_Chooser_WIN32.cxx 9629 2012-06-26 07:03:46Z greg.ercolano $".
+// End of "$Id: Fl_Native_File_Chooser_WIN32.cxx 10312 2014-09-15 09:35:05Z ossman $".
//
diff --git a/src/Fl_Native_File_Chooser_common.cxx b/src/Fl_Native_File_Chooser_common.cxx
index 5e8aa98..70e2ca4 100644
--- a/src/Fl_Native_File_Chooser_common.cxx
+++ b/src/Fl_Native_File_Chooser_common.cxx
@@ -1,4 +1,4 @@
-// "$Id: Fl_Native_File_Chooser_common.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Native_File_Chooser_common.cxx 10064 2014-01-16 16:10:19Z manolo $"
//
// FLTK native OS file chooser widget
//
@@ -71,6 +71,7 @@ static void chrcat(char *s, char c) {
strcat(s, tmp);
}
+
//
-// End of "$Id: Fl_Native_File_Chooser_common.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Native_File_Chooser_common.cxx 10064 2014-01-16 16:10:19Z manolo $".
//
diff --git a/src/Fl_PNG_Image.cxx b/src/Fl_PNG_Image.cxx
index 30ea565..67eb3df 100644
--- a/src/Fl_PNG_Image.cxx
+++ b/src/Fl_PNG_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_PNG_Image.cxx 9713 2012-11-10 09:01:16Z manolo $"
+// "$Id: Fl_PNG_Image.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Fl_PNG_Image routines.
//
@@ -51,20 +51,22 @@ typedef struct {
const unsigned char *last;
} fl_png_memory;
-static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data
- png_bytep data, // where to copy the image data for libpng computing
- png_size_t length) // length of data to copy
-{
- fl_png_memory *png_mem_data = (fl_png_memory*)png_get_io_ptr(png_ptr); // get the pointer to our struct
- if (png_mem_data->current + length > png_mem_data->last) {
- png_error(png_mem_data->pp, "Invalid attempt to read row data");
- return;
+extern "C" {
+ static void png_read_data_from_mem( png_structp png_ptr, //pointer to our data
+ png_bytep data, // where to copy the image data for libpng computing
+ png_size_t length) // length of data to copy
+ {
+ fl_png_memory *png_mem_data = (fl_png_memory*)png_get_io_ptr(png_ptr); // get the pointer to our struct
+ if (png_mem_data->current + length > png_mem_data->last) {
+ png_error(png_mem_data->pp, "Invalid attempt to read row data");
+ return;
+ }
+ /* copy data from image buffer */
+ memcpy (data, png_mem_data->current, length);
+ /* advance in the memory data */
+ png_mem_data->current += length;
}
- /* copy data from image buffer */
- memcpy (data, png_mem_data->current, length);
- /* advance in the memory data */
- png_mem_data->current += length;
-}
+} // extern "C"
#endif // HAVE_LIBPNG && HAVE_LIBZ
@@ -221,5 +223,5 @@ void Fl_PNG_Image::load_png_(const char *name_png, const unsigned char *buffer_p
//
-// End of "$Id: Fl_PNG_Image.cxx 9713 2012-11-10 09:01:16Z manolo $".
+// End of "$Id: Fl_PNG_Image.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/src/Fl_Paged_Device.cxx b/src/Fl_Paged_Device.cxx
index a5f4b94..8cd4cc7 100644
--- a/src/Fl_Paged_Device.cxx
+++ b/src/Fl_Paged_Device.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Paged_Device.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Paged_Device.cxx 10116 2014-03-05 12:55:34Z manolo $"
//
// implementation of Fl_Paged_Device class for the Fast Light Tool Kit (FLTK).
//
@@ -42,6 +42,7 @@ void Fl_Paged_Device::print_widget(Fl_Widget* widget, int delta_x, int delta_y)
int old_x, old_y, new_x, new_y, is_window;
if ( ! widget->visible() ) return;
is_window = (widget->as_window() != NULL);
+ uchar old_damage = widget->damage();
widget->damage(FL_DAMAGE_ALL);
// set origin to the desired top-left position of the widget
origin(&old_x, &old_y);
@@ -54,29 +55,34 @@ void Fl_Paged_Device::print_widget(Fl_Widget* widget, int delta_x, int delta_y)
if (new_x != old_x || new_y != old_y) {
translate(new_x - old_x, new_y - old_y );
}
- // if widget is a window, clip all drawings to the window area
- if (is_window) fl_push_clip(0, 0, widget->w(), widget->h() );
+ // if widget is a main window, clip all drawings to the window area
+ if (is_window && !widget->window()) fl_push_clip(0, 0, widget->w(), widget->h() );
// we do some trickery to recognize OpenGL windows and draw them via a plugin
int drawn_by_plugin = 0;
if (widget->as_gl_window()) {
Fl_Plugin_Manager pm("fltk:device");
Fl_Device_Plugin *pi = (Fl_Device_Plugin*)pm.plugin("opengl.device.fltk.org");
if (pi) {
- int width, height;
+ int height = 0;
+#ifdef __APPLE__
+ int width;
this->printable_rect(&width, &height);
+#endif
drawn_by_plugin = pi->print(widget, 0, 0, height);
}
}
if (!drawn_by_plugin) {
widget->draw();
}
- if (is_window) fl_pop_clip();
+ if (is_window && !widget->window()) fl_pop_clip();
// find subwindows of widget and print them
traverse(widget);
// reset origin to where it was
if (new_x != old_x || new_y != old_y) {
untranslate();
}
+ if ((old_damage & FL_DAMAGE_CHILD) == 0) widget->clear_damage(old_damage);
+ else widget->damage(FL_DAMAGE_ALL);
}
@@ -284,5 +290,5 @@ const Fl_Paged_Device::page_format Fl_Paged_Device::page_formats[NO_PAGE_FORMATS
};
//
-// End of "$Id: Fl_Paged_Device.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Paged_Device.cxx 10116 2014-03-05 12:55:34Z manolo $".
//
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx
index b7b72e6..bff175e 100644
--- a/src/Fl_PostScript.cxx
+++ b/src/Fl_PostScript.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_PostScript.cxx 9630 2012-06-28 08:38:14Z manolo $"
+// "$Id: Fl_PostScript.cxx 10308 2014-09-13 17:51:20Z manolo $"
//
// PostScript device support for the Fast Light Tool Kit (FLTK).
//
@@ -16,6 +16,7 @@
// http://www.fltk.org/str.php
//
+#include <FL/Fl_Printer.H>
#include <config.h>
#include <FL/Fl.H>
#include <FL/fl_ask.H>
@@ -23,6 +24,7 @@
#include <stdio.h>
#include <FL/Fl_PostScript.H>
#include <FL/Fl_Native_File_Chooser.H>
+#include <stdarg.h>
#if defined(USE_X11)
#include "Fl_Font.H"
#if USE_XFT
@@ -94,7 +96,7 @@ int Fl_PostScript_File_Device::start_job (int pagecount, enum Fl_Paged_Device::P
// Show native chooser
if ( fnfc.show() ) return 1;
Fl_PostScript_Graphics_Driver *ps = driver();
- ps->output = fopen(fnfc.filename(), "w");
+ ps->output = fl_fopen(fnfc.filename(), "w");
if(ps->output == NULL) return 2;
ps->ps_filename_ = strdup(fnfc.filename());
ps->start_postscript(pagecount, format, layout);
@@ -102,9 +104,11 @@ int Fl_PostScript_File_Device::start_job (int pagecount, enum Fl_Paged_Device::P
return 0;
}
-static int dont_close(FILE *f)
-{
- return 0;
+extern "C" {
+ static int dont_close(FILE *f)
+ {
+ return 0;
+ }
}
/**
@@ -129,6 +133,12 @@ int Fl_PostScript_File_Device::start_job (FILE *ps_output, int pagecount,
return 0;
}
+/** Don't use with this class. */
+int Fl_PostScript_File_Device::start_job(int pagecount, int* from, int* to)
+{
+ return 1;
+}
+
/**
@brief The destructor.
*/
@@ -137,6 +147,24 @@ Fl_PostScript_File_Device::~Fl_PostScript_File_Device() {
if (ps) delete ps;
}
+/** Shields output PostScript data from modifications of the current locale.
+ It typically avoids PostScript errors caused if the current locale uses comma instead of dot
+ as "decimal point".
+ \param format directives controlling output PostScript data
+ \return value returned by vfprintf() call
+ */
+int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...)
+{
+ char *saved_locale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
+ va_list args;
+ va_start(args, format);
+ int retval = vfprintf(output, format, args);
+ va_end(args);
+ setlocale(LC_NUMERIC, saved_locale);
+ return retval;
+}
+
#ifndef FL_DOXYGEN
#if ! (defined(__APPLE__) || defined(WIN32) )
@@ -652,7 +680,7 @@ void Fl_PostScript_Graphics_Driver::page(double pw, double ph, int media) {
fprintf(output, "save\n");
fprintf(output, "GS\n");
- fprintf(output, "%g %g TR\n", (double)0 /*lm_*/ , ph_ /* - tm_*/);
+ clocale_printf( "%g %g TR\n", (double)0 /*lm_*/ , ph_ /* - tm_*/);
fprintf(output, "1 -1 SC\n");
line_style(0);
fprintf(output, "GS\n");
@@ -701,7 +729,7 @@ void Fl_PostScript_Graphics_Driver::rect(int x, int y, int w, int h) {
}
void Fl_PostScript_Graphics_Driver::rectf(int x, int y, int w, int h) {
- fprintf(output, "%g %g %i %i FR\n", x-0.5, y-0.5, w, h);
+ clocale_printf( "%g %g %i %i FR\n", x-0.5, y-0.5, w, h);
}
void Fl_PostScript_Graphics_Driver::line(int x1, int y1, int x2, int y2) {
@@ -831,7 +859,7 @@ void Fl_PostScript_Graphics_Driver::point(int x, int y){
rectf(x,y,1,1);
}
-static int dashes_flat[5][7]={
+static const int dashes_flat[5][7]={
{-1,0,0,0,0,0,0},
{3,1,-1,0,0,0,0},
{1,1,-1,0,0,0,0},
@@ -841,7 +869,7 @@ static int dashes_flat[5][7]={
//yeah, hack...
-static double dashes_cap[5][7]={
+static const double dashes_cap[5][7]={
{-1,0,0,0,0,0,0},
{2,2,-1,0,0,0,0},
{0.01,1.99,-1,0,0,0,0},
@@ -890,16 +918,15 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
dashes++;
}
}else{
- int * ds;
if(style & 0x200){ // round and square caps, dash length need to be adjusted
- double *dt = dashes_cap[style & 0xff];
+ const double *dt = dashes_cap[style & 0xff];
while (*dt >= 0){
- fprintf(output, "%g ",width * (*dt));
- dt++;
+ clocale_printf("%g ",width * (*dt));
+ dt++;
}
}else{
- ds = dashes_flat[style & 0xff];
+ const int *ds = dashes_flat[style & 0xff];
while (*ds >= 0){
fprintf(output, "%i ",width * (*ds));
ds++;
@@ -954,7 +981,7 @@ void Fl_PostScript_Graphics_Driver::font(int f, int s) {
}
#endif // USE_XFT
#endif // USE_X11
- fprintf(output,"%.1f FS\n", ps_size);
+ clocale_printf("%.1f FS\n", ps_size);
}
}
@@ -962,6 +989,10 @@ double Fl_PostScript_Graphics_Driver::width(const char *s, int n) {
return Fl_Display_Device::display_device()->driver()->width(s, n);
}
+double Fl_PostScript_Graphics_Driver::width(unsigned u) {
+ return Fl_Display_Device::display_device()->driver()->width(u);
+}
+
int Fl_PostScript_Graphics_Driver::height() {
return Fl_Display_Device::display_device()->driver()->height();
}
@@ -985,13 +1016,13 @@ void Fl_PostScript_Graphics_Driver::color(unsigned char r, unsigned char g, unsi
cr_ = r; cg_ = g; cb_ = b;
if (r == g && g == b) {
double gray = r/255.0;
- fprintf(output, "%g GL\n", gray);
+ clocale_printf("%g GL\n", gray);
} else {
double fr, fg, fb;
fr = r/255.0;
fg = g/255.0;
fb = b/255.0;
- fprintf(output, "%g %g %g SRGB\n", fr , fg , fb);
+ clocale_printf("%g %g %g SRGB\n", fr , fg , fb);
}
}
@@ -1035,7 +1066,7 @@ static uchar *calc_mask(uchar *img, int w, int h, Fl_Color bg)
// write to PostScript a bitmap image of a UTF8 string
static void transformed_draw_extra(const char* str, int n, double x, double y, int w,
- FILE *output, Fl_Graphics_Driver *driver, bool rtl) {
+ FILE *output, Fl_PostScript_Graphics_Driver *driver, bool rtl) {
// scale for bitmask computation
#if defined(USE_X11) && !USE_XFT
float scale = 1; // don't scale because we can't expect to have scalable fonts
@@ -1043,11 +1074,11 @@ static void transformed_draw_extra(const char* str, int n, double x, double y, i
float scale = 2;
#endif
Fl_Fontsize old_size = driver->size();
- Fl_Font fontnum = driver->font();
+ Fl_Font fontnum = driver->Fl_Graphics_Driver::font();
int w_scaled = (int)(w * (scale + 0.5));
int h = (int)(driver->height() * scale);
// create an offscreen image of the string
- Fl_Color text_color = driver->color();
+ Fl_Color text_color = driver->Fl_Graphics_Driver::color();
Fl_Color bg_color = fl_contrast(FL_WHITE, text_color);
Fl_Offscreen off = fl_create_offscreen(w_scaled, (int)(h+3*scale) );
fl_begin_offscreen(off);
@@ -1075,7 +1106,7 @@ static void transformed_draw_extra(const char* str, int n, double x, double y, i
delete[] img;
// write the string image to PostScript as a scaled bitmask
scale = w2 / float(w);
- fprintf(output, "%g %g %g %g %d %d MI\n", x, y - h*0.77/scale, w2/scale, h/scale, w2, h);
+ driver->clocale_printf("%g %g %g %g %d %d MI\n", x, y - h*0.77/scale, w2/scale, h/scale, w2, h);
uchar *di;
int wmask = (w2+7)/8;
for (int j = h - 1; j >= 0; j--){
@@ -1151,7 +1182,7 @@ void Fl_PostScript_Graphics_Driver::transformed_draw(const char* str, int n, dou
}
fprintf(output, "%4.4X", utf);
}
- fprintf(output, "> %g %g show_pos_width\n", x, y);
+ clocale_printf("> %g %g show_pos_width\n", x, y);
}
void Fl_PostScript_Graphics_Driver::rtl_draw(const char* str, int n, int x, int y) {
@@ -1160,11 +1191,11 @@ void Fl_PostScript_Graphics_Driver::rtl_draw(const char* str, int n, int x, int
}
void Fl_PostScript_Graphics_Driver::concat(){
- fprintf(output,"[%g %g %g %g %g %g] CT\n", fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
+ clocale_printf("[%g %g %g %g %g %g] CT\n", fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
}
void Fl_PostScript_Graphics_Driver::reconcat(){
- fprintf(output, "[%g %g %g %g %g %g] RCT\n" , fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
+ clocale_printf("[%g %g %g %g %g %g] RCT\n" , fl_matrix->a , fl_matrix->b , fl_matrix->c , fl_matrix->d , fl_matrix->x , fl_matrix->y);
}
///////////////// transformed (double) drawings ////////////////////////////////
@@ -1205,26 +1236,26 @@ void Fl_PostScript_Graphics_Driver::begin_polygon(){
void Fl_PostScript_Graphics_Driver::vertex(double x, double y){
if(shape_==POINTS){
- fprintf(output,"%g %g MT\n", x , y);
+ clocale_printf("%g %g MT\n", x , y);
gap_=1;
return;
}
if(gap_){
- fprintf(output,"%g %g MT\n", x , y);
+ clocale_printf("%g %g MT\n", x , y);
gap_=0;
}else
- fprintf(output, "%g %g LT\n", x , y);
+ clocale_printf("%g %g LT\n", x , y);
}
void Fl_PostScript_Graphics_Driver::curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3){
if(shape_==NONE) return;
if(gap_)
- fprintf(output,"%g %g MT\n", x , y);
+ clocale_printf("%g %g MT\n", x , y);
else
- fprintf(output, "%g %g LT\n", x , y);
+ clocale_printf("%g %g LT\n", x , y);
gap_=0;
- fprintf(output, "%g %g %g %g %g %g curveto \n", x1 , y1 , x2 , y2 , x3 , y3);
+ clocale_printf("%g %g %g %g %g %g curveto \n", x1 , y1 , x2 , y2 , x3 , y3);
}
@@ -1233,13 +1264,13 @@ void Fl_PostScript_Graphics_Driver::circle(double x, double y, double r){
fprintf(output, "GS\n");
concat();
// fprintf(output, "BP\n");
- fprintf(output,"%g %g %g 0 360 arc\n", x , y , r);
+ clocale_printf("%g %g %g 0 360 arc\n", x , y , r);
reconcat();
// fprintf(output, "ELP\n");
fprintf(output, "GR\n");
}else
- fprintf(output, "%g %g %g 0 360 arc\n", x , y , r);
+ clocale_printf("%g %g %g 0 360 arc\n", x , y , r);
}
@@ -1247,22 +1278,23 @@ void Fl_PostScript_Graphics_Driver::arc(double x, double y, double r, double sta
if(shape_==NONE) return;
gap_=0;
if(start>a)
- fprintf(output, "%g %g %g %g %g arc\n", x , y , r , -start, -a);
+ clocale_printf("%g %g %g %g %g arc\n", x , y , r , -start, -a);
else
- fprintf(output, "%g %g %g %g %g arcn\n", x , y , r , -start, -a);
+ clocale_printf("%g %g %g %g %g arcn\n", x , y , r , -start, -a);
}
void Fl_PostScript_Graphics_Driver::arc(int x, int y, int w, int h, double a1, double a2) {
+ if (w <= 1 || h <= 1) return;
fprintf(output, "GS\n");
//fprintf(output, "BP\n");
begin_line();
- fprintf(output, "%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
- fprintf(output, "%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
+ clocale_printf("%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
+ clocale_printf("%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
arc(0,0,1,a2,a1);
// fprintf(output, "0 0 1 %g %g arc\n" , -a1 , -a2);
- fprintf(output, "%g %g SC\n", 2.0/(w-1) , 2.0/(h-1) );
- fprintf(output, "%g %g TR\n", -x - w/2.0 +0.5 , -y - h/2.0 +0.5);
+ clocale_printf("%g %g SC\n", 2.0/(w-1) , 2.0/(h-1) );
+ clocale_printf("%g %g TR\n", -x - w/2.0 +0.5 , -y - h/2.0 +0.5);
end_line();
// fprintf(output, "%g setlinewidth\n", 2/sqrt(w*h));
@@ -1275,8 +1307,8 @@ void Fl_PostScript_Graphics_Driver::arc(int x, int y, int w, int h, double a1, d
void Fl_PostScript_Graphics_Driver::pie(int x, int y, int w, int h, double a1, double a2) {
fprintf(output, "GS\n");
begin_polygon();
- fprintf(output, "%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
- fprintf(output, "%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
+ clocale_printf("%g %g TR\n", x + w/2.0 -0.5 , y + h/2.0 - 0.5);
+ clocale_printf("%g %g SC\n", (w-1)/2.0 , (h-1)/2.0 );
vertex(0,0);
arc(0.0,0.0, 1, a2, a1);
end_polygon();
@@ -1318,10 +1350,10 @@ void Fl_PostScript_Graphics_Driver::end_polygon(){
void Fl_PostScript_Graphics_Driver::transformed_vertex(double x, double y){
reconcat();
if(gap_){
- fprintf(output, "%g %g MT\n", x , y);
+ clocale_printf("%g %g MT\n", x , y);
gap_=0;
}else
- fprintf(output, "%g %g LT\n", x , y);
+ clocale_printf("%g %g LT\n", x , y);
concat();
}
@@ -1335,7 +1367,7 @@ void Fl_PostScript_Graphics_Driver::push_clip(int x, int y, int w, int h) {
fprintf(output, "CR\nCS\n");
if(lang_level_<3)
recover();
- fprintf(output, "%g %g %i %i CL\n", clip_->x-0.5 , clip_->y-0.5 , clip_->w , clip_->h);
+ clocale_printf("%g %g %i %i CL\n", clip_->x-0.5 , clip_->y-0.5 , clip_->w , clip_->h);
}
@@ -1356,7 +1388,7 @@ void Fl_PostScript_Graphics_Driver::pop_clip() {
delete c;
fprintf(output, "CR\nCS\n");
if(clip_ && clip_->w >0)
- fprintf(output, "%g %g %i %i CL\n", clip_->x - 0.5, clip_->y - 0.5, clip_->w , clip_->h);
+ clocale_printf("%g %g %i %i CL\n", clip_->x - 0.5, clip_->y - 0.5, clip_->w , clip_->h);
// uh, -0.5 is to match screen clipping, for floats there should be something beter
if(lang_level_<3)
recover();
@@ -1407,7 +1439,6 @@ int Fl_PostScript_Graphics_Driver::not_clipped(int x, int y, int w, int h){
return 0;
}
-
void Fl_PostScript_File_Device::margins(int *left, int *top, int *right, int *bottom) // to implement
{
Fl_PostScript_Graphics_Driver *ps = driver();
@@ -1436,7 +1467,7 @@ void Fl_PostScript_File_Device::origin(int x, int y)
x_offset = x;
y_offset = y;
Fl_PostScript_Graphics_Driver *ps = driver();
- fprintf(ps->output, "GR GR GS %d %d TR %f %f SC %d %d TR %f rotate GS\n",
+ ps->clocale_printf("GR GR GS %d %d TR %f %f SC %d %d TR %f rotate GS\n",
ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, x, y, ps->angle);
}
@@ -1446,7 +1477,7 @@ void Fl_PostScript_File_Device::scale (float s_x, float s_y)
Fl_PostScript_Graphics_Driver *ps = driver();
ps->scale_x = s_x;
ps->scale_y = s_y;
- fprintf(ps->output, "GR GR GS %d %d TR %f %f SC %f rotate GS\n",
+ ps->clocale_printf("GR GR GS %d %d TR %f %f SC %f rotate GS\n",
ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, ps->angle);
}
@@ -1454,7 +1485,7 @@ void Fl_PostScript_File_Device::rotate (float rot_angle)
{
Fl_PostScript_Graphics_Driver *ps = driver();
ps->angle = - rot_angle;
- fprintf(ps->output, "GR GR GS %d %d TR %f %f SC %d %d TR %f rotate GS\n",
+ ps->clocale_printf("GR GR GS %d %d TR %f %f SC %d %d TR %f rotate GS\n",
ps->left_margin, ps->top_margin, ps->scale_x, ps->scale_y, x_offset, y_offset, ps->angle);
}
@@ -1577,7 +1608,7 @@ int Fl_PostScript_Printer::start_job(int pages, int *firstpage, int *lastpage) {
if (to < from) to = from;
if (firstpage) *firstpage = from;
if (lastpage) *lastpage = to;
- pages = to - from + 1;
+ if (pages > 0) pages = to - from + 1;
}
if (print_output_mode[0]->value()) layout = Fl_Paged_Device::PORTRAIT;
@@ -1617,5 +1648,5 @@ int Fl_PostScript_Printer::start_job(int pages, int *firstpage, int *lastpage) {
#endif // FL_DOXYGEN
//
-// End of "$Id: Fl_PostScript.cxx 9630 2012-06-28 08:38:14Z manolo $".
+// End of "$Id: Fl_PostScript.cxx 10308 2014-09-13 17:51:20Z manolo $".
//
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index ada52a6..3cf501b 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Preferences.cxx 9334 2012-04-09 12:36:23Z AlbrechtS $"
+// "$Id: Fl_Preferences.cxx 10378 2014-10-14 12:10:18Z ianmacarthur $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@@ -40,10 +40,14 @@
#elif defined (__APPLE__)
# include <ApplicationServices/ApplicationServices.h>
# include <unistd.h>
+# include <config.h>
# include <dlfcn.h>
#else
# include <unistd.h>
-# include <dlfcn.h>
+# include <config.h>
+# if HAVE_DLFCN_H
+# include <dlfcn.h>
+# endif
#endif
#ifdef WIN32
@@ -1212,7 +1216,7 @@ int Fl_Preferences::RootNode::write() {
// get the path to the preferences directory
char Fl_Preferences::RootNode::getPath( char *path, int pathlen ) {
if (!filename_) // RUNTIME preferences
- return -1;
+ return 1; // return 1 (not -1) to be consistent with fl_make_path()
strlcpy( path, filename_, pathlen);
char *s;
@@ -1766,7 +1770,10 @@ int Fl_Plugin_Manager::load(const char *filename) {
#if defined(WIN32) && !defined(__CYGWIN__)
HMODULE dl = LoadLibrary(filename);
#else
- void * dl = dlopen(filename, RTLD_LAZY);
+ void * dl = NULL;
+# if HAVE_DLSYM
+ dl = dlopen(filename, RTLD_LAZY);
+# endif
#endif
// There is no way of unloading a plugin!
return (dl!=0) ? 0 : -1;
@@ -1790,5 +1797,5 @@ int Fl_Plugin_Manager::loadAll(const char *filepath, const char *pattern) {
}
//
-// End of "$Id: Fl_Preferences.cxx 9334 2012-04-09 12:36:23Z AlbrechtS $".
+// End of "$Id: Fl_Preferences.cxx 10378 2014-10-14 12:10:18Z ianmacarthur $".
//
diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx
index a953c9c..3518d23 100644
--- a/src/Fl_Printer.cxx
+++ b/src/Fl_Printer.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Printer.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Printer.cxx 10291 2014-09-08 16:03:52Z manolo $"
//
// Encompasses platform-specific printing-support code and
// PostScript output code for the Fast Light Tool Kit (FLTK).
@@ -19,14 +19,10 @@
#include <FL/Fl_Printer.H>
-#ifdef __APPLE__
-//#include "Fl_Quartz_Printer.mm"
-#elif defined(WIN32)
+#if defined(WIN32)
#include "Fl_GDI_Printer.cxx"
#endif
-#include "Fl_PostScript.cxx"
-
// print dialog customization strings
/** [this text may be customized at run-time] */
const char *Fl_Printer::dialog_title = "Print";
@@ -189,5 +185,5 @@ Fl_Printer::~Fl_Printer(void)
//
-// End of "$Id: Fl_Printer.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Printer.cxx 10291 2014-09-08 16:03:52Z manolo $".
//
diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm
index 71646f5..a7cf38e 100644
--- a/src/Fl_Quartz_Printer.mm
+++ b/src/Fl_Quartz_Printer.mm
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_Quartz_Printer.mm 9276 2012-03-12 09:39:17Z manolo $"
+// "$Id: Fl_Quartz_Printer.mm 10393 2014-10-26 15:23:03Z manolo $"
//
// Mac OS X-specific printing support (objective-c++) for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2012 by Bill Spitzak and others.
+// Copyright 2010-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -24,6 +24,21 @@
#include <FL/fl_draw.H>
#import <Cocoa/Cocoa.h>
+typedef OSStatus (*PMSessionSetDocumentFormatGeneration_type)(
+ PMPrintSession printSession,
+ CFStringRef docFormat,
+ CFArrayRef graphicsContextTypes,
+ CFTypeRef options);
+typedef OSStatus (*PMSessionBeginDocumentNoDialog_type)(
+ PMPrintSession printSession,
+ PMPrintSettings printSettings,
+ PMPageFormat pageFormat);
+typedef OSStatus
+(*PMSessionGetGraphicsContext_type)(
+ PMPrintSession printSession,
+ CFStringRef graphicsContextType,
+ void ** graphicsContext);
+
extern void fl_quartz_restore_line_style_();
Fl_System_Printer::Fl_System_Printer(void)
@@ -69,9 +84,9 @@ int Fl_System_Printer::start_job (int pagecount, int *frompage, int *topage)
if(topage && *topage > pagecount) *topage = pagecount;
status = PMSessionBeginCGDocumentNoDialog(printSession, printSettings, pageFormat);//from 10.4
}
- else {
+ else
#endif
-
+ {
#if !__LP64__
Boolean accepted;
status = PMCreateSession(&printSession);
@@ -112,14 +127,16 @@ int Fl_System_Printer::start_job (int pagecount, int *frompage, int *topage)
CFStringRef mystring[1];
mystring[0] = kPMGraphicsContextCoreGraphics;
CFArrayRef array = CFArrayCreate(NULL, (const void **)mystring, 1, &kCFTypeArrayCallBacks);
+ PMSessionSetDocumentFormatGeneration_type PMSessionSetDocumentFormatGeneration =
+ (PMSessionSetDocumentFormatGeneration_type)Fl_X::get_carbon_function("PMSessionSetDocumentFormatGeneration");
status = PMSessionSetDocumentFormatGeneration(printSession, kPMDocumentFormatDefault, array, NULL);
CFRelease(array);
+ PMSessionBeginDocumentNoDialog_type PMSessionBeginDocumentNoDialog =
+ (PMSessionBeginDocumentNoDialog_type)Fl_X::get_carbon_function("PMSessionBeginDocumentNoDialog");
status = PMSessionBeginDocumentNoDialog(printSession, printSettings, pageFormat);
#endif //__LP64__
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
}
-#endif
+
if (status != noErr) return 1;
y_offset = x_offset = 0;
this->set_current();
@@ -224,14 +241,15 @@ int Fl_System_Printer::start_page (void)
if ( PMSessionGetCGGraphicsContext != NULL ) {
status = PMSessionGetCGGraphicsContext(printSession, &fl_gc);
}
- else {
+ else
#endif
-#if ! __LP64__
- status = PMSessionGetGraphicsContext(printSession,NULL,(void **)&fl_gc);
+ {
+#if ! __LP64_
+ PMSessionGetGraphicsContext_type PMSessionGetGraphicsContext =
+ (PMSessionGetGraphicsContext_type)Fl_X::get_carbon_function("PMSessionGetGraphicsContext");
+ status = PMSessionGetGraphicsContext(printSession, NULL, (void **)&fl_gc);
#endif
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
}
-#endif
PMRect pmRect;
float win_scale_x, win_scale_y;
@@ -284,14 +302,41 @@ void Fl_System_Printer::end_job (void)
fl_alert ("PM Session error %d", (int)status);
}
PMSessionEndDocumentNoDialog(printSession);
+#if !__LP64__
+ if (fl_mac_os_version < 100500) {
+ PMRelease(printSettings);
+ PMRelease(pageFormat);
+ PMRelease(printSession);
+ }
+#endif
Fl_Display_Device::display_device()->set_current();
fl_gc = 0;
Fl_Window *w = Fl::first_window();
if (w) w->show();
}
+// version that prints at high res if using a retina display
+void Fl_System_Printer::print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y)
+{
+ Fl_Surface_Device *current = Fl_Surface_Device::surface();
+ Fl_Display_Device::display_device()->set_current();
+ Fl_Window *save_front = Fl::first_window();
+ win->show();
+ fl_gc = NULL;
+ Fl::check();
+ win->make_current();
+ CGImageRef img = Fl_X::CGImage_from_window_rect(win, x, y, w, h);
+ if (save_front != win) save_front->show();
+ current->set_current();
+ CGRect rect = { { delta_x, delta_y }, { w, h } };
+ Fl_X::q_begin_image(rect, 0, 0, w, h);
+ CGContextDrawImage(fl_gc, rect, img);
+ Fl_X::q_end_image();
+ CFRelease(img);
+}
+
#endif // __APPLE__
//
-// End of "$Id: Fl_Quartz_Printer.mm 9276 2012-03-12 09:39:17Z manolo $".
+// End of "$Id: Fl_Quartz_Printer.mm 10393 2014-10-26 15:23:03Z manolo $".
//
diff --git a/src/Fl_Round_Button.cxx b/src/Fl_Round_Button.cxx
index c2edc4e..c2f24ce 100644
--- a/src/Fl_Round_Button.cxx
+++ b/src/Fl_Round_Button.cxx
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Round_Button.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Round_Button.cxx 10386 2014-10-19 20:17:17Z AlbrechtS $"
//
// Round button for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -25,24 +25,49 @@
#include <FL/Fl_Radio_Round_Button.H>
/**
- Creates a new Fl_Round_Button widget using the given
- position, size, and label string.
+ Creates a new Fl_Round_Button widget using the given position, size, and label string.
+
+ \image html Fl_Round_Button.png
+ \image latex Fl_Round_Button.png " Fl_Round_Button" width=4cm
+
+ The Fl_Round_Button subclass displays the "ON" state by
+ turning on a light, rather than drawing pushed in.
+
+ The default box type is FL_NO_BOX, which draws the label w/o a box
+ right of the checkmark.
+
+ The shape of the "light" is set with down_box() and its default
+ value is FL_ROUND_DOWN_BOX.
+
+ The color of the light when on is controlled with selection_color(),
+ which defaults to FL_FOREGROUND_COLOR (usually black).
+
+ \param[in] X, Y, W, H position and size of the widget
+ \param[in] L widget label, default is no label
*/
-Fl_Round_Button::Fl_Round_Button(int X,int Y,int W,int H, const char *l)
-: Fl_Light_Button(X,Y,W,H,l) {
+Fl_Round_Button::Fl_Round_Button(int X,int Y,int W,int H, const char *L)
+: Fl_Light_Button(X,Y,W,H,L) {
box(FL_NO_BOX);
down_box(FL_ROUND_DOWN_BOX);
selection_color(FL_FOREGROUND_COLOR);
}
+/**
+ Creates a new Fl_Radio_Button widget using the given position, size, and label string.
+
+ The button type() is set to FL_RADIO_BUTTON.
+
+ \param[in] X, Y, W, H position and size of the widget
+ \param[in] L widget label, default is no label
+*/
Fl_Radio_Round_Button::Fl_Radio_Round_Button(int X,int Y,int W,int H,const char *L)
-: Fl_Round_Button(X,Y,W,H,L)
+: Fl_Round_Button(X,Y,W,H,L)
{
type(FL_RADIO_BUTTON);
}
//
-// End of "$Id: Fl_Round_Button.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Round_Button.cxx 10386 2014-10-19 20:17:17Z AlbrechtS $".
//
diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx
index a93cde1..9317a11 100644
--- a/src/Fl_Scroll.cxx
+++ b/src/Fl_Scroll.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Scroll.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Scroll.cxx 10221 2014-07-16 18:51:56Z greg.ercolano $"
//
// Scroll widget for the Fast Light Tool Kit (FLTK).
//
@@ -100,60 +100,61 @@ void Fl_Scroll::draw_clip(void* v,int X, int Y, int W, int H) {
void Fl_Scroll::recalc_scrollbars(ScrollInfo &si) {
// inner box of widget (excluding scrollbars)
- si.innerbox_x = x()+Fl::box_dx(box());
- si.innerbox_y = y()+Fl::box_dy(box());
- si.innerbox_w = w()-Fl::box_dw(box());
- si.innerbox_h = h()-Fl::box_dh(box());
+ si.innerbox.x = x()+Fl::box_dx(box());
+ si.innerbox.y = y()+Fl::box_dy(box());
+ si.innerbox.w = w()-Fl::box_dw(box());
+ si.innerbox.h = h()-Fl::box_dh(box());
// accumulate a bounding box for all the children
- si.child_l = si.innerbox_x;
- si.child_r = si.innerbox_x;
- si.child_b = si.innerbox_y;
- si.child_t = si.innerbox_y;
+ si.child.l = si.innerbox.x;
+ si.child.r = si.innerbox.x;
+ si.child.b = si.innerbox.y;
+ si.child.t = si.innerbox.y;
int first = 1;
Fl_Widget*const* a = array();
- for (int i=children()-2; i--;) {
+ for (int i=children(); i--;) {
Fl_Widget* o = *a++;
+ if ( o==&scrollbar || o==&hscrollbar ) continue;
if ( first ) {
first = 0;
- si.child_l = o->x();
- si.child_r = o->x()+o->w();
- si.child_b = o->y()+o->h();
- si.child_t = o->y();
+ si.child.l = o->x();
+ si.child.r = o->x()+o->w();
+ si.child.b = o->y()+o->h();
+ si.child.t = o->y();
} else {
- if (o->x() < si.child_l) si.child_l = o->x();
- if (o->y() < si.child_t) si.child_t = o->y();
- if (o->x()+o->w() > si.child_r) si.child_r = o->x()+o->w();
- if (o->y()+o->h() > si.child_b) si.child_b = o->y()+o->h();
+ if (o->x() < si.child.l) si.child.l = o->x();
+ if (o->y() < si.child.t) si.child.t = o->y();
+ if (o->x()+o->w() > si.child.r) si.child.r = o->x()+o->w();
+ if (o->y()+o->h() > si.child.b) si.child.b = o->y()+o->h();
}
}
// Turn the scrollbars on and off as necessary.
// See if children would fit if we had no scrollbars...
{
- int X = si.innerbox_x;
- int Y = si.innerbox_y;
- int W = si.innerbox_w;
- int H = si.innerbox_h;
+ int X = si.innerbox.x;
+ int Y = si.innerbox.y;
+ int W = si.innerbox.w;
+ int H = si.innerbox.h;
si.scrollsize = scrollbar_size_ ? scrollbar_size_ : Fl::scrollbar_size();
si.vneeded = 0;
si.hneeded = 0;
if (type() & VERTICAL) {
- if ((type() & ALWAYS_ON) || si.child_t < Y || si.child_b > Y+H) {
+ if ((type() & ALWAYS_ON) || si.child.t < Y || si.child.b > Y+H) {
si.vneeded = 1;
W -= si.scrollsize;
if (scrollbar.align() & FL_ALIGN_LEFT) X += si.scrollsize;
}
}
if (type() & HORIZONTAL) {
- if ((type() & ALWAYS_ON) || si.child_l < X || si.child_r > X+W) {
+ if ((type() & ALWAYS_ON) || si.child.l < X || si.child.r > X+W) {
si.hneeded = 1;
H -= si.scrollsize;
if (scrollbar.align() & FL_ALIGN_TOP) Y += si.scrollsize;
// recheck vertical since we added a horizontal scrollbar
if (!si.vneeded && (type() & VERTICAL)) {
- if ((type() & ALWAYS_ON) || si.child_t < Y || si.child_b > Y+H) {
+ if ((type() & ALWAYS_ON) || si.child.t < Y || si.child.b > Y+H) {
si.vneeded = 1;
W -= si.scrollsize;
if (scrollbar.align() & FL_ALIGN_LEFT) X += si.scrollsize;
@@ -161,51 +162,51 @@ void Fl_Scroll::recalc_scrollbars(ScrollInfo &si) {
}
}
}
- si.innerchild_x = X;
- si.innerchild_y = Y;
- si.innerchild_w = W;
- si.innerchild_h = H;
+ si.innerchild.x = X;
+ si.innerchild.y = Y;
+ si.innerchild.w = W;
+ si.innerchild.h = H;
}
// calculate hor scrollbar position
- si.hscroll_x = si.innerchild_x;
- si.hscroll_y = (scrollbar.align() & FL_ALIGN_TOP)
- ? si.innerbox_y
- : si.innerbox_y + si.innerbox_h - si.scrollsize;
- si.hscroll_w = si.innerchild_w;
- si.hscroll_h = si.scrollsize;
+ si.hscroll.x = si.innerchild.x;
+ si.hscroll.y = (scrollbar.align() & FL_ALIGN_TOP)
+ ? si.innerbox.y
+ : si.innerbox.y + si.innerbox.h - si.scrollsize;
+ si.hscroll.w = si.innerchild.w;
+ si.hscroll.h = si.scrollsize;
// calculate ver scrollbar position
- si.vscroll_x = (scrollbar.align() & FL_ALIGN_LEFT)
- ? si.innerbox_x
- : si.innerbox_x + si.innerbox_w - si.scrollsize;
- si.vscroll_y = si.innerchild_y;
- si.vscroll_w = si.scrollsize;
- si.vscroll_h = si.innerchild_h;
+ si.vscroll.x = (scrollbar.align() & FL_ALIGN_LEFT)
+ ? si.innerbox.x
+ : si.innerbox.x + si.innerbox.w - si.scrollsize;
+ si.vscroll.y = si.innerchild.y;
+ si.vscroll.w = si.scrollsize;
+ si.vscroll.h = si.innerchild.h;
// calculate h/v scrollbar values (pos/size/first/total)
- si.hpos = si.innerchild_x - si.child_l;
- si.hsize = si.innerchild_w;
- si.hfirst = 0;
- si.htotal = si.child_r - si.child_l;
- if ( si.hpos < 0 ) { si.htotal += (-si.hpos); si.hfirst = si.hpos; }
-
- si.vpos = si.innerchild_y - si.child_t;
- si.vsize = si.innerchild_h;
- si.vfirst = 0;
- si.vtotal = si.child_b - si.child_t;
- if ( si.vpos < 0 ) { si.vtotal += (-si.vpos); si.vfirst = si.vpos; }
+ si.hscroll.pos = si.innerchild.x - si.child.l;
+ si.hscroll.size = si.innerchild.w;
+ si.hscroll.first = 0;
+ si.hscroll.total = si.child.r - si.child.l;
+ if ( si.hscroll.pos < 0 ) { si.hscroll.total += (-si.hscroll.pos); si.hscroll.first = si.hscroll.pos; }
+
+ si.vscroll.pos = si.innerchild.y - si.child.t;
+ si.vscroll.size = si.innerchild.h;
+ si.vscroll.first = 0;
+ si.vscroll.total = si.child.b - si.child.t;
+ if ( si.vscroll.pos < 0 ) { si.vscroll.total += (-si.vscroll.pos); si.vscroll.first = si.vscroll.pos; }
// printf("DEBUG --- ScrollInfo ---\n");
// printf("DEBUG scrollsize: %d\n", si.scrollsize);
// printf("DEBUG hneeded, vneeded: %d %d\n", si.hneeded, si.vneeded);
-// printf("DEBUG innerbox xywh: %d %d %d %d\n", si.innerbox_x, si.innerbox_y, si.innerbox_w, si.innerbox_h);
-// printf("DEBUG innerchild xywh: %d %d %d %d\n", si.innerchild_x, si.innerchild_y, si.innerchild_w, si.innerchild_h);
-// printf("DEBUG child lrbt: %d %d %d %d\n", si.child_l, si.child_r, si.child_b, si.child_t);
-// printf("DEBUG hscroll xywh: %d %d %d %d\n", si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
-// printf("DEBUG vscroll xywh: %d %d %d %d\n", si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
-// printf("DEBUG horz scroll vals: %d %d %d %d\n", si.hpos, si.hsize, si.hfirst, si.htotal);
-// printf("DEBUG vert scroll vals: %d %d %d %d\n", si.vpos, si.vsize, si.vfirst, si.vtotal);
+// printf("DEBUG innerbox.x, si.innerbox.y, si.innerbox.w,si.innerbox.h);
+// printf("DEBUG innerchild.xywh: %d %d %d %d\n", si.innerchild.x, si.innerchild.y, si.innerchild.w, si.innerchild.h);
+// printf("DEBUG child lrbt: %d %d %d %d\n", si.child.l, si.child.r, si.child.b, si.child.t);
+// printf("DEBUG hscroll xywh: %d %d %d %d\n", si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
+// printf("DEBUG vscroll xywh: %d %d %d %d\n", si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
+// printf("DEBUG horz scroll vals: %d %d %d %d\n", si.hscroll.pos, si.hscroll.size, si.hscroll.first, si.hscroll.total);
+// printf("DEBUG vert scroll vals: %d %d %d %d\n", si.vscroll.pos, si.vscroll.size, si.vscroll.first, si.vscroll.total);
// printf("DEBUG \n");
}
@@ -286,7 +287,7 @@ void Fl_Scroll::draw() {
}
else if (!si.vneeded && scrollbar.visible()) {
scrollbar.clear_visible();
- draw_clip(this, si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
+ draw_clip(this, si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
d = FL_DAMAGE_ALL;
}
if (si.hneeded && !hscrollbar.visible()) {
@@ -295,7 +296,7 @@ void Fl_Scroll::draw() {
}
else if (!si.hneeded && hscrollbar.visible()) {
hscrollbar.clear_visible();
- draw_clip(this, si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
+ draw_clip(this, si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
d = FL_DAMAGE_ALL;
}
else if ( hscrollbar.h() != si.scrollsize || scrollbar.w() != si.scrollsize ) {
@@ -303,13 +304,13 @@ void Fl_Scroll::draw() {
d = FL_DAMAGE_ALL;
}
- scrollbar.resize(si.vscroll_x, si.vscroll_y, si.vscroll_w, si.vscroll_h);
- oldy = yposition_ = si.vpos; // si.innerchild_y - si.child_t;
- scrollbar.value(si.vpos, si.vsize, si.vfirst, si.vtotal);
+ scrollbar.resize(si.vscroll.x, si.vscroll.y, si.vscroll.w, si.vscroll.h);
+ oldy = yposition_ = si.vscroll.pos; // si.innerchild.y - si.child.t;
+ scrollbar.value(si.vscroll.pos, si.vscroll.size, si.vscroll.first, si.vscroll.total);
- hscrollbar.resize(si.hscroll_x, si.hscroll_y, si.hscroll_w, si.hscroll_h);
- oldx = xposition_ = si.hpos; // si.innerchild_x - si.child_l;
- hscrollbar.value(si.hpos, si.hsize, si.hfirst, si.htotal);
+ hscrollbar.resize(si.hscroll.x, si.hscroll.y, si.hscroll.w, si.hscroll.h);
+ oldx = xposition_ = si.hscroll.pos; // si.innerchild.x - si.child.l;
+ hscrollbar.value(si.hscroll.pos, si.hscroll.size, si.hscroll.first, si.hscroll.total);
}
// draw the scrollbars:
@@ -383,7 +384,7 @@ void Fl_Scroll::scrollbar_cb(Fl_Widget* o, void*) {
whole tree to be deleted at once, without having to keep a pointer to
all the children in the user code. A kludge has been done so the
Fl_Scroll and all of its children can be automatic (local)
- variables, but you must declare the Fl_Scroll<I>first</I>, so
+ variables, but you must declare the Fl_Scroll <I>first</I>, so
that it is destroyed last.
*/
Fl_Scroll::Fl_Scroll(int X,int Y,int W,int H,const char* L)
@@ -407,5 +408,5 @@ int Fl_Scroll::handle(int event) {
}
//
-// End of "$Id: Fl_Scroll.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Scroll.cxx 10221 2014-07-16 18:51:56Z greg.ercolano $".
//
diff --git a/src/Fl_Sys_Menu_Bar.cxx b/src/Fl_Sys_Menu_Bar.cxx
deleted file mode 100644
index 698d562..0000000
--- a/src/Fl_Sys_Menu_Bar.cxx
+++ /dev/null
@@ -1,289 +0,0 @@
-//
-// "$Id: Fl_Sys_Menu_Bar.cxx 9637 2012-07-24 04:37:22Z matt $"
-//
-// MacOS system menu bar widget for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 1998-2010 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// http://www.fltk.org/COPYING.php
-//
-// Please report all bugs and problems on the following page:
-//
-// http://www.fltk.org/str.php
-//
-
-/**
- * This code is a quick hack! It was written as a proof of concept.
- * It has been tested on the "menubar" sample program and provides
- * basic functionality.
- *
- * To use the System Menu Bar, simply replace the main Fl_Menu_Bar
- * in an application with Fl_Sys_Menu_Bar.
- *
- * FLTK features not supported by the Mac System menu
- *
- * - no invisible menu items
- * - no symbolic labels
- * - embossed labels will be underlined instead
- * - no font sizes
- * - Shortcut Characters should be English alphanumeric only, no modifiers yet
- * - no disable main menus
- * - changes to menubar in run-time don't update!
- * (disable, etc. - toggle and radio button do!)
- *
- * No care was taken to clean up the menu bar after destruction!
- * ::menu(bar) should only be called once!
- * Many other calls of the parent class don't work.
- * Changing the menu items has no effect on the menu bar.
- * Starting with OS X 10.5, FLTK applications must be created as
- * a bundle for the System Menu Bar (and maybe other features) to work!
- */
-
-#if defined(__APPLE__) || defined(FL_DOXYGEN)
-
-#include <FL/x.H>
-#include <FL/Fl.H>
-#include <FL/Fl_Sys_Menu_Bar.H>
-
-#include "flstring.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <stdarg.h>
-
-#define MenuHandle void *
-
-typedef const Fl_Menu_Item *pFl_Menu_Item;
-
-
-/*
- * Set a shortcut for an Apple menu item using the FLTK shortcut descriptor.
- */
-static void setMenuShortcut( MenuHandle mh, int miCnt, const Fl_Menu_Item *m )
-{
- if ( !m->shortcut_ )
- return;
- if ( m->flags & FL_SUBMENU )
- return;
- if ( m->flags & FL_SUBMENU_POINTER )
- return;
- char key = m->shortcut_ & 0xff;
- if ( !isalnum( key ) )
- return;
-
- void *menuItem = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::itemAtIndex, mh, miCnt);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setKeyEquivalent, menuItem, m->shortcut_ & 0xff );
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setKeyEquivalentModifierMask, menuItem, m->shortcut_ );
-}
-
-
-/*
- * Set the Toggle and Radio flag based on FLTK flags
- */
-static void setMenuFlags( MenuHandle mh, int miCnt, const Fl_Menu_Item *m )
-{
- if ( m->flags & FL_MENU_TOGGLE )
- {
- void *menuItem = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::itemAtIndex, mh, miCnt);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setState, menuItem, m->flags & FL_MENU_VALUE );
- }
- else if ( m->flags & FL_MENU_RADIO ) {
- void *menuItem = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::itemAtIndex, mh, miCnt);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setState, menuItem, m->flags & FL_MENU_VALUE );
- }
-}
-
-
-/*
- * create a sub menu for a specific menu handle
- */
-static void createSubMenu( void * mh, pFl_Menu_Item &mm, const Fl_Menu_Item *mitem)
-{
- void *submenu;
- int miCnt, flags;
-
- void *menuItem;
- submenu = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::initWithTitle, mitem->text);
- int cnt;
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::numberOfItems, mh, &cnt);
- cnt--;
- menuItem = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::itemAtIndex, mh, cnt);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setSubmenu, menuItem, submenu);
-
- while ( mm->text )
- {
- char visible = mm->visible() ? 1 : 0;
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::addNewItem, submenu, mm, &miCnt);
- setMenuFlags( submenu, miCnt, mm );
- setMenuShortcut( submenu, miCnt, mm );
- if ( mm->flags & FL_MENU_INACTIVE || mitem->flags & FL_MENU_INACTIVE) {
- void *item = Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::itemAtIndex, submenu, miCnt);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setEnabled, item, 0);
- }
- flags = mm->flags;
- if ( mm->flags & FL_SUBMENU )
- {
- mm++;
- createSubMenu( submenu, mm, mm - 1 );
- }
- else if ( mm->flags & FL_SUBMENU_POINTER )
- {
- const Fl_Menu_Item *smm = (Fl_Menu_Item*)mm->user_data_;
- createSubMenu( submenu, smm, mm );
- }
- if ( flags & FL_MENU_DIVIDER ) {
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::addSeparatorItem, submenu);
- }
- if ( !visible ) {
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::removeItem, submenu, miCnt);
- }
- mm++;
- }
-}
-
-
-/*
- * convert a complete Fl_Menu_Item array into a series of menus in the top menu bar
- * ALL PREVIOUS SYSTEM MENUS, EXCEPT THE APPLICATION MENU, ARE REPLACED BY THE NEW DATA
- */
-static void convertToMenuBar(const Fl_Menu_Item *mm)
-{
- int rank;
- int count;//first, delete all existing system menus
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::numberOfItems, fl_system_menu, &count);
- for(int i = count - 1; i > 0; i--) {
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::removeItem, fl_system_menu, i);
- }
- //now convert FLTK stuff into MacOS menus
- for (;;)
- {
- if ( !mm || !mm->text )
- break;
- char visible = mm->visible() ? 1 : 0;
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::addNewItem, fl_system_menu, mm, &rank);
-
- if ( mm->flags & FL_SUBMENU ) {
- mm++;
- createSubMenu( fl_system_menu, mm, mm - 1);
- }
- else if ( mm->flags & FL_SUBMENU_POINTER ) {
- const Fl_Menu_Item *smm = (Fl_Menu_Item*)mm->user_data_;
- createSubMenu( fl_system_menu, smm, mm);
- }
- if ( !visible ) {
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::removeItem, fl_system_menu, rank);
- }
- mm++;
- }
-}
-
-
-/**
- * @brief create a system menu bar using the given list of menu structs
- *
- * \author Matthias Melcher
- *
- * @param m list of Fl_Menu_Item
- */
-void Fl_Sys_Menu_Bar::menu(const Fl_Menu_Item *m)
-{
- fl_open_display();
- Fl_Menu_Bar::menu( m );
- convertToMenuBar(m);
-}
-
-
-/**
- * @brief add to the system menu bar a new menu item
- *
- * add to the system menu bar a new menu item, with a title string, shortcut int,
- * callback, argument to the callback, and flags.
- *
- * @see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
- */
-int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
-{
- fl_open_display();
- int rank = Fl_Menu_::add(label, shortcut, cb, user_data, flags);
- convertToMenuBar(Fl_Menu_::menu());
- return rank;
-}
-
-/**
- * @brief insert in the system menu bar a new menu item
- *
- * insert in the system menu bar a new menu item, with a title string, shortcut int,
- * callback, argument to the callback, and flags.
- *
- * @see Fl_Menu_::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
- */
-int Fl_Sys_Menu_Bar::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
-{
- fl_open_display();
- int rank = Fl_Menu_::insert(index, label, shortcut, cb, user_data, flags);
- convertToMenuBar(Fl_Menu_::menu());
- return rank;
-}
-
-void Fl_Sys_Menu_Bar::clear()
-{
- Fl_Menu_::clear();
- convertToMenuBar(NULL);
-}
-
-int Fl_Sys_Menu_Bar::clear_submenu(int index)
-{
- int retval = Fl_Menu_::clear_submenu(index);
- if (retval != -1) convertToMenuBar(Fl_Menu_::menu());
- return retval;
-}
-
-/**
- * @brief remove an item from the system menu bar
- *
- * @param rank the rank of the item to remove
- */
-void Fl_Sys_Menu_Bar::remove(int rank)
-{
- Fl_Menu_::remove(rank);
- convertToMenuBar(Fl_Menu_::menu());
-}
-
-
-/**
- * @brief rename an item from the system menu bar
- *
- * @param rank the rank of the item to rename
- * @param name the new item name as a UTF8 string
- */
-void Fl_Sys_Menu_Bar::replace(int rank, const char *name)
-{
- Fl_Menu_::replace(rank, name);
- convertToMenuBar(Fl_Menu_::menu());
-}
-
-
-/*
- * Draw the menu bar.
- * Nothing here because the OS does this for us.
- */
-void Fl_Sys_Menu_Bar::draw() {
-}
-
-
-Fl_Sys_Menu_Bar::Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l)
-: Fl_Menu_Bar(x,y,w,h,l)
-{
- deactivate(); // don't let the old area take events
- fl_sys_menu_bar = this;
-}
-
-
-#endif /* __APPLE__ */
-
-//
-// End of "$Id: Fl_Sys_Menu_Bar.cxx 9637 2012-07-24 04:37:22Z matt $".
-//
diff --git a/src/Fl_Sys_Menu_Bar.mm b/src/Fl_Sys_Menu_Bar.mm
new file mode 100644
index 0000000..0b62fa5
--- /dev/null
+++ b/src/Fl_Sys_Menu_Bar.mm
@@ -0,0 +1,508 @@
+//
+// "$Id: Fl_Sys_Menu_Bar.mm 10106 2014-02-19 16:02:56Z manolo $"
+//
+// MacOS system menu bar widget for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2013 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+/*
+ * This code has been tested on the "menubar" sample program and provides
+ * basic functionality.
+ *
+ * To use the System Menu Bar, simply replace the main Fl_Menu_Bar
+ * in an application with Fl_Sys_Menu_Bar.
+ *
+ * FLTK features not supported by the Mac System menu
+ *
+ * - no symbolic labels
+ * - no embossed labels
+ * - no font sizes
+ *
+ * Many other calls of the parent class don't work.
+ */
+
+#if defined(__APPLE__) || defined(FL_DOXYGEN)
+#include <FL/Fl_Menu_Item.H>
+#include <FL/Fl_Sys_Menu_Bar.H>
+#include <FL/x.H>
+#include <FL/Fl.H>
+
+#import <Cocoa/Cocoa.h>
+
+#ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
+#if defined(__LP64__) && __LP64__
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef long NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+#endif
+
+#include "flstring.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <stdarg.h>
+
+typedef const Fl_Menu_Item *pFl_Menu_Item;
+
+Fl_Sys_Menu_Bar *fl_sys_menu_bar = 0;
+
+static char *remove_ampersand(const char *s);
+extern void (*fl_lock_function)();
+extern void (*fl_unlock_function)();
+
+/* Each MacOS system menu item contains a pointer to a record of type sys_menu_item defined below.
+ The purpose of these records is to associate each MacOS system menu item with a relevant Fl_Menu_Item.
+ If use_rank is YES, the "rank" field is used, and fl_sys_menu_bar->menu() + rank is the address
+ of the relevant Fl_Menu_Item;
+ Otherwise, the "item" field points to the relevant Fl_Menu_Item.
+ This allows the MacOS system menu to use the same Fl_Menu_Item's as those used by FLTK menus,
+ the address of which can be relocated by the FLTK menu logic.
+ The "item" field is used for non-relocatable Fl_Menu_Item's associated to FL_SUBMENU_POINTER.
+ Sending the getFlItem message to a MacOS system menu item (of class FLMenuItem) returns the address
+ of the relevant Fl_Menu_Item.
+*/
+typedef struct {
+ union {
+ int rank;
+ const Fl_Menu_Item *item;
+ };
+ BOOL use_rank;
+} sys_menu_item;
+
+
+@interface FLMenuItem : NSMenuItem {
+}
+- (void) doCallback:(id)unused;
+- (void) directCallback:(id)unused;
+- (const Fl_Menu_Item*) getFlItem;
+- (void) setKeyEquivalentModifierMask:(int)value;
+- (void) setFltkShortcut:(int)key;
++ (int) addNewItem:(const Fl_Menu_Item*)mitem menu:(NSMenu*)menu;
+@end
+
+@implementation FLMenuItem
+- (const Fl_Menu_Item*) getFlItem
+// returns the Fl_Menu_Item corresponding to this system menu item
+{
+ sys_menu_item *smi = (sys_menu_item*)[(NSData*)[self representedObject] bytes];
+ if (smi->use_rank) return fl_sys_menu_bar->menu() + smi->rank;
+ return smi->item;
+}
+- (void) doCallback:(id)unused
+{
+ fl_lock_function();
+ const Fl_Menu_Item *item = [self getFlItem];
+ fl_sys_menu_bar->picked(item);
+ if ( item->flags & FL_MENU_TOGGLE ) { // update the menu toggle symbol
+ [self setState:(item->value() ? NSOnState : NSOffState)];
+ }
+ else if ( item->flags & FL_MENU_RADIO ) { // update the menu radio symbols
+ NSMenu* menu = [self menu];
+ NSInteger flRank = [menu indexOfItem:self];
+ NSInteger last = [menu numberOfItems] - 1;
+ int from = flRank;
+ while(from > 0) {
+ if ([[menu itemAtIndex:from-1] isSeparatorItem]) break;
+ item = [(FLMenuItem*)[menu itemAtIndex:from-1] getFlItem];
+ if ( !(item->flags & FL_MENU_RADIO) ) break;
+ from--;
+ }
+ int to = flRank;
+ while (to < last) {
+ if ([[menu itemAtIndex:to+1] isSeparatorItem]) break;
+ item = [(FLMenuItem*)[menu itemAtIndex:to+1] getFlItem];
+ if (!(item->flags & FL_MENU_RADIO)) break;
+ to++;
+ }
+ for(int i = from; i <= to; i++) {
+ NSMenuItem *nsitem = [menu itemAtIndex:i];
+ [nsitem setState:(nsitem != self ? NSOffState : NSOnState)];
+ }
+ }
+ fl_unlock_function();
+}
+- (void) directCallback:(id)unused
+{
+ fl_lock_function();
+ Fl_Menu_Item *item = (Fl_Menu_Item *)[(NSData*)[self representedObject] bytes];
+ if ( item && item->callback() ) item->do_callback(NULL);
+ fl_unlock_function();
+}
+- (void) setKeyEquivalentModifierMask:(int)value
+{
+ NSUInteger macMod = 0;
+ if ( value & FL_META ) macMod = NSCommandKeyMask;
+ if ( value & FL_SHIFT || isupper(value) ) macMod |= NSShiftKeyMask;
+ if ( value & FL_ALT ) macMod |= NSAlternateKeyMask;
+ if ( value & FL_CTRL ) macMod |= NSControlKeyMask;
+ [super setKeyEquivalentModifierMask:macMod];
+}
+- (void) setFltkShortcut:(int)key
+{
+ // Separate key and modifier
+ int mod = key;
+ mod &= ~FL_KEY_MASK; // modifier(s)
+ key &= FL_KEY_MASK; // key
+ unichar mac_key = (unichar)key;
+ if ( (key >= (FL_F+1)) && (key <= FL_F_Last) ) { // Handle function keys
+ int fkey_num = (key - FL_F); // 1,2..
+ mac_key = NSF1FunctionKey + fkey_num - 1;
+ }
+ [self setKeyEquivalent:[NSString stringWithCharacters:&mac_key length:1]];
+ [self setKeyEquivalentModifierMask:mod];
+}
++ (int) addNewItem:(const Fl_Menu_Item*)mitem menu:(NSMenu*)menu
+{
+ char *name = remove_ampersand(mitem->label());
+ CFStringRef cfname = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
+ free(name);
+ FLMenuItem *item = [[FLMenuItem alloc] initWithTitle:(NSString*)cfname
+ action:@selector(doCallback:)
+ keyEquivalent:@""];
+ sys_menu_item smi;
+ smi.rank = fl_sys_menu_bar->find_index(mitem); // ≥ 0 if mitem is in the menu items of fl_sys_menu_bar, -1 if not
+ smi.use_rank = (smi.rank >= 0);
+ if (!smi.use_rank) smi.item = mitem;
+ NSData *pointer = [NSData dataWithBytes:&smi length:sizeof(smi)];
+ [item setRepresentedObject:pointer];
+ [menu addItem:item];
+ CFRelease(cfname);
+ [item setTarget:item];
+ int retval = [menu indexOfItem:item];
+ [item release];
+ return retval;
+}
+@end
+
+
+void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut)
+{
+ fl_open_display();
+ Fl_Menu_Item aboutItem;
+ memset(&aboutItem, 0, sizeof(Fl_Menu_Item));
+ aboutItem.callback(cb);
+ aboutItem.user_data(user_data);
+ aboutItem.shortcut(shortcut);
+ NSMenu *appleMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
+ CFStringRef cfname = CFStringCreateCopy(NULL, (CFStringRef)[[appleMenu itemAtIndex:0] title]);
+ [appleMenu removeItemAtIndex:0];
+ FLMenuItem *item = [[[FLMenuItem alloc] initWithTitle:(NSString*)cfname
+ action:@selector(directCallback:)
+ keyEquivalent:@""] autorelease];
+ if (aboutItem.shortcut())
+ [item setFltkShortcut:aboutItem.shortcut()];
+ NSData *pointer = [NSData dataWithBytes:&aboutItem length:sizeof(Fl_Menu_Item)];
+ [item setRepresentedObject:pointer];
+ [appleMenu insertItem:item atIndex:0];
+ CFRelease(cfname);
+ [item setTarget:item];
+}
+
+/*
+ * Set a shortcut for an Apple menu item using the FLTK shortcut descriptor.
+ */
+static void setMenuShortcut( NSMenu* mh, int miCnt, const Fl_Menu_Item *m )
+{
+ if ( !m->shortcut_ )
+ return;
+ if ( m->flags & FL_SUBMENU )
+ return;
+ if ( m->flags & FL_SUBMENU_POINTER )
+ return;
+ FLMenuItem* menuItem = (FLMenuItem*)[mh itemAtIndex:miCnt];
+ [menuItem setFltkShortcut:(m->shortcut_)];
+}
+
+
+/*
+ * Set the Toggle and Radio flag based on FLTK flags
+ */
+static void setMenuFlags( NSMenu* mh, int miCnt, const Fl_Menu_Item *m )
+{
+ if ( m->flags & FL_MENU_TOGGLE )
+ {
+ NSMenuItem *menuItem = [mh itemAtIndex:miCnt];
+ [menuItem setState:(m->flags & FL_MENU_VALUE ? NSOnState : NSOffState)];
+ }
+ else if ( m->flags & FL_MENU_RADIO ) {
+ NSMenuItem *menuItem = [mh itemAtIndex:miCnt];
+ [menuItem setState:(m->flags & FL_MENU_VALUE ? NSOnState : NSOffState)];
+ }
+}
+
+static char *remove_ampersand(const char *s)
+{
+ char *ret = strdup(s);
+ const char *p = s;
+ char *q = ret;
+ while(*p != 0) {
+ if (p[0]=='&') {
+ if (p[1]=='&') {
+ *q++ = '&'; p+=2;
+ } else {
+ p++;
+ }
+ } else {
+ *q++ = *p++;
+ }
+ }
+ *q = 0;
+ return ret;
+}
+
+
+/*
+ * create a sub menu for a specific menu handle
+ */
+static void createSubMenu( NSMenu *mh, pFl_Menu_Item &mm, const Fl_Menu_Item *mitem)
+{
+ NSMenu *submenu;
+ int miCnt, flags;
+
+ NSMenuItem *menuItem;
+ char *ts = remove_ampersand(mitem->text);
+ CFStringRef title = CFStringCreateWithCString(NULL, ts, kCFStringEncodingUTF8);
+ free(ts);
+ submenu = [[NSMenu alloc] initWithTitle:(NSString*)title];
+ CFRelease(title);
+ [submenu setAutoenablesItems:NO];
+
+ int cnt;
+ cnt = [mh numberOfItems];
+ cnt--;
+ menuItem = [mh itemAtIndex:cnt];
+ [menuItem setSubmenu:submenu];
+ [submenu release];
+
+ while ( mm->text )
+ {
+ if (!mm->visible() ) { // skip invisible items and submenus
+ mm = mm->next(0);
+ continue;
+ }
+ miCnt = [FLMenuItem addNewItem:mm menu:submenu];
+ setMenuFlags( submenu, miCnt, mm );
+ setMenuShortcut( submenu, miCnt, mm );
+ if ( mm->flags & FL_MENU_INACTIVE || mitem->flags & FL_MENU_INACTIVE) {
+ NSMenuItem *item = [submenu itemAtIndex:miCnt];
+ [item setEnabled:NO];
+ }
+ flags = mm->flags;
+ if ( mm->flags & FL_SUBMENU )
+ {
+ mm++;
+ createSubMenu( submenu, mm, mm - 1 );
+ }
+ else if ( mm->flags & FL_SUBMENU_POINTER )
+ {
+ const Fl_Menu_Item *smm = (Fl_Menu_Item*)mm->user_data_;
+ createSubMenu( submenu, smm, mm);
+ }
+ if ( flags & FL_MENU_DIVIDER ) {
+ [submenu addItem:[NSMenuItem separatorItem]];
+ }
+ mm++;
+ }
+}
+
+
+/*
+ * convert a complete Fl_Menu_Item array into a series of menus in the top menu bar
+ * ALL PREVIOUS SYSTEM MENUS, EXCEPT THE APPLICATION MENU, ARE REPLACED BY THE NEW DATA
+ */
+static void convertToMenuBar(const Fl_Menu_Item *mm)
+{
+ NSMenu *fl_system_menu = [NSApp mainMenu];
+ int rank;
+ int count;//first, delete all existing system menus
+ count = [fl_system_menu numberOfItems];
+ for(int i = count - 1; i > 0; i--) {
+ [fl_system_menu removeItem:[fl_system_menu itemAtIndex:i]];
+ }
+ //now convert FLTK stuff into MacOS menus
+ for (;;)
+ {
+ if ( !mm || !mm->text )
+ break;
+ if (!mm->visible() ) { // skip invisible menus
+ mm = mm->next(0);
+ continue;
+ }
+ rank = [FLMenuItem addNewItem:mm menu:fl_system_menu];
+
+ if ( mm->flags & FL_SUBMENU ) {
+ mm++;
+ createSubMenu(fl_system_menu, mm, mm - 1);
+ }
+ else if ( mm->flags & FL_SUBMENU_POINTER ) {
+ const Fl_Menu_Item *smm = (Fl_Menu_Item*)mm->user_data_;
+ createSubMenu(fl_system_menu, smm, mm);
+ }
+ mm++;
+ }
+}
+
+
+/**
+ * @brief create a system menu bar using the given list of menu structs
+ *
+ * \author Matthias Melcher
+ *
+ * @param m list of Fl_Menu_Item
+ */
+void Fl_Sys_Menu_Bar::menu(const Fl_Menu_Item *m)
+{
+ fl_open_display();
+ Fl_Menu_Bar::menu( m );
+ convertToMenuBar(m);
+}
+
+
+/**
+ * @brief add to the system menu bar a new menu item
+ *
+ * add to the system menu bar a new menu item, with a title string, shortcut int,
+ * callback, argument to the callback, and flags.
+ *
+ * @see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
+ */
+int Fl_Sys_Menu_Bar::add(const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
+{
+ fl_open_display();
+ int rank = Fl_Menu_::add(label, shortcut, cb, user_data, flags);
+ update();
+ return rank;
+}
+
+/**
+ * Forms-compatible procedure to add items to the system menu bar
+*
+ * @see Fl_Menu_::add(const char* str)
+ */
+int Fl_Sys_Menu_Bar::add(const char* str)
+{
+ fl_open_display();
+ int rank = Fl_Menu_::add(str);
+ update();
+ return rank;
+}
+
+/**
+ * @brief insert in the system menu bar a new menu item
+ *
+ * insert in the system menu bar a new menu item, with a title string, shortcut int,
+ * callback, argument to the callback, and flags.
+ *
+ * @see Fl_Menu_::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
+ */
+int Fl_Sys_Menu_Bar::insert(int index, const char* label, int shortcut, Fl_Callback *cb, void *user_data, int flags)
+{
+ fl_open_display();
+ int rank = Fl_Menu_::insert(index, label, shortcut, cb, user_data, flags);
+ update();
+ return rank;
+}
+
+void Fl_Sys_Menu_Bar::clear()
+{
+ Fl_Menu_::clear();
+ convertToMenuBar(NULL);
+}
+
+int Fl_Sys_Menu_Bar::clear_submenu(int index)
+{
+ int retval = Fl_Menu_::clear_submenu(index);
+ if (retval != -1) update();
+ return retval;
+}
+
+/**
+ * @brief remove an item from the system menu bar
+ *
+ * @param rank the rank of the item to remove
+ */
+void Fl_Sys_Menu_Bar::remove(int rank)
+{
+ Fl_Menu_::remove(rank);
+ update();
+}
+
+
+/**
+ * @brief rename an item from the system menu bar
+ *
+ * @param rank the rank of the item to rename
+ * @param name the new item name as a UTF8 string
+ */
+void Fl_Sys_Menu_Bar::replace(int rank, const char *name)
+{
+ Fl_Menu_::replace(rank, name);
+ update();
+}
+
+/** Updates the system menu after any change to its items.
+ */
+void Fl_Sys_Menu_Bar::update()
+{
+ convertToMenuBar(Fl_Menu_::menu());
+}
+
+/*
+ * Draw the menu bar.
+ * Nothing here because the OS does this for us.
+ */
+void Fl_Sys_Menu_Bar::draw() {
+}
+
+static int process_sys_menu_shortcuts(int event)
+{
+ if (event != FL_SHORTCUT || !fl_sys_menu_bar || Fl::modal()) return 0;
+ // is the last event the shortcut of an item of the fl_sys_menu_bar menu ?
+ const Fl_Menu_Item *item = fl_sys_menu_bar->menu()->test_shortcut();
+ if (!item) return 0;
+ if (item->visible()) // have the system menu process the shortcut, highlighting the corresponding menu
+ [[NSApp mainMenu] performKeyEquivalent:[NSApp currentEvent]];
+ else // have FLTK process the shortcut associated to an invisible Fl_Menu_Item
+ fl_sys_menu_bar->picked(item);
+ return 1;
+}
+
+
+/**
+ The constructor.
+ On Mac OS X, all arguments are unused. On other platforms they are used as by Fl_Menu_Bar::Fl_Menu_Bar().
+ */
+Fl_Sys_Menu_Bar::Fl_Sys_Menu_Bar(int x,int y,int w,int h,const char *l)
+: Fl_Menu_Bar(x,y,w,h,l)
+{
+ deactivate(); // don't let the old area take events
+ fl_sys_menu_bar = this;
+ Fl::add_handler(process_sys_menu_shortcuts);
+}
+
+/** The destructor */
+Fl_Sys_Menu_Bar::~Fl_Sys_Menu_Bar()
+{
+ fl_sys_menu_bar = 0;
+ clear();
+ Fl::remove_handler(process_sys_menu_shortcuts);
+}
+
+#endif /* __APPLE__ */
+
+//
+// End of "$Id: Fl_Sys_Menu_Bar.mm 10106 2014-02-19 16:02:56Z manolo $".
+//
diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx
index 98b67bd..7e42b2e 100644
--- a/src/Fl_Table.cxx
+++ b/src/Fl_Table.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Table.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Table.cxx 10225 2014-08-03 16:40:58Z greg.ercolano $"
//
// Fl_Table -- A table widget
//
@@ -131,6 +131,9 @@ Fl_Table::Fl_Table(int X, int Y, int W, int H, const char *l) : Fl_Group(X,Y,W,H
#if FLTK_ABI_VERSION >= 10301
_scrollbar_size = 0;
#endif
+#if FLTK_ABI_VERSION >= 10303
+ flags_ = 0; // TABCELLNAV off
+#endif
box(FL_THIN_DOWN_FRAME);
vscrollbar = new Fl_Scrollbar(x()+w()-Fl::scrollbar_size(), y(),
@@ -196,7 +199,7 @@ void Fl_Table::col_width(int col, int width)
// Add column widths, even if none yet
int now_size = (int)_colwidths.size();
if ( col >= now_size ) {
- _colwidths.size(col);
+ _colwidths.size(col+1);
while (now_size < col) {
_colwidths[now_size++] = width;
}
@@ -674,7 +677,7 @@ void Fl_Table::damage_zone(int r1, int c1, int r2, int c2, int r3, int c3) {
redraw_range(R1, R2, C1, C2);
}
-int Fl_Table::move_cursor(int R, int C) {
+int Fl_Table::move_cursor(int R, int C, int shiftselect) {
if (select_row == -1) R++;
if (select_col == -1) C++;
R += select_row;
@@ -687,7 +690,7 @@ int Fl_Table::move_cursor(int R, int C) {
damage_zone(current_row, current_col, select_row, select_col, R, C);
select_row = R;
select_col = C;
- if (!Fl::event_state(FL_SHIFT)) {
+ if (!shiftselect || !Fl::event_state(FL_SHIFT)) {
current_row = R;
current_col = C;
}
@@ -696,7 +699,11 @@ int Fl_Table::move_cursor(int R, int C) {
return 1;
}
-// #define DEBUG 1
+int Fl_Table::move_cursor(int R, int C) {
+ return move_cursor(R,C,1);
+}
+
+//#define DEBUG 1
#ifdef DEBUG
#include <FL/names.h>
#define PRINTEVENT \
@@ -729,7 +736,9 @@ int Fl_Table::handle(int event) {
int _event_x = Fl::event_x();
int _event_y = Fl::event_y();
int _event_key = Fl::event_key();
+#if FLTK_ABI_VERSION >= 10303
int _event_state = Fl::event_state();
+#endif
Fl_Widget *_focus = Fl::focus();
switch ( event ) {
case FL_PUSH:
@@ -746,8 +755,11 @@ int Fl_Table::handle(int event) {
current_col = select_col = C;
_selecting = CONTEXT_CELL;
} else {
- current_row = select_row = -1;
- current_col = select_col = -1;
+ // Clear selection if not resizing row/col
+ if ( !resizeflag ) {
+ current_row = select_row = -1;
+ current_col = select_col = -1;
+ }
}
}
// A click on table with user's callback defined?
@@ -796,6 +808,7 @@ int Fl_Table::handle(int event) {
ret = 1;
} else {
// Not resizing? Select the column
+ if ( Fl::focus() != this && contains(Fl::focus()) ) return 0; // STR #3018 - item 1
current_col = select_col = C;
current_row = 0;
select_row = rows() - 1;
@@ -822,6 +835,7 @@ int Fl_Table::handle(int event) {
ret = 1;
} else {
// Not resizing? Select the row
+ if ( Fl::focus() != this && contains(Fl::focus()) ) return 0; // STR #3018 - item 1
current_row = select_row = R;
current_col = 0;
select_col = cols() - 1;
@@ -887,6 +901,8 @@ int Fl_Table::handle(int event) {
if (_event_button == 1 &&
_selecting == CONTEXT_CELL &&
context == CONTEXT_CELL) {
+ // Dragging a cell selection?
+ if ( _event_clicks ) break; // STR #3018 - item 2
if (select_row != R || select_col != C) {
damage_zone(current_row, current_col, select_row, select_col, R, C);
}
@@ -1020,12 +1036,17 @@ int Fl_Table::handle(int event) {
ret = move_cursor(1, 0);
break;
case FL_Tab:
+#if FLTK_ABI_VERSION >= 10303
+ if ( !tab_cell_nav() ) break; // not navigating cells? let fltk handle it (STR#2862)
if ( _event_state & FL_SHIFT ) {
- ret = move_cursor(0, -1); // shift-tab -> left
+ ret = move_cursor(0, -1, 0); // shift-tab -> left
} else {
- ret = move_cursor(0, 1); // tab -> right
+ ret = move_cursor(0, 1, 0); // tab -> right
}
break;
+#else
+ break; // without tab_cell_nav(), Fl_Table should default to navigating widgets, not cells
+#endif
}
if (ret && Fl::focus() != this) {
do_callback(CONTEXT_TABLE, -1, -1);
@@ -1293,5 +1314,5 @@ void Fl_Table::draw() {
}
//
-// End of "$Id: Fl_Table.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Table.cxx 10225 2014-08-03 16:40:58Z greg.ercolano $".
//
diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx
index 8302afb..75d4458 100644
--- a/src/Fl_Tabs.cxx
+++ b/src/Fl_Tabs.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tabs.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Tabs.cxx 10122 2014-03-24 18:24:59Z greg.ercolano $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -114,8 +114,13 @@ int Fl_Tabs::tab_height() {
else return (H <= 0) ? 0 : H;
}
-// This is used for event handling (clicks) and by fluid to pick tabs.
-// Returns 0, if children() = 0, or if the event is outside of the tabs area.
+/**
+ Return the widget of the tab the user clicked on at \p event_x / \p event_y.
+ This is used for event handling (clicks) and by fluid to pick tabs.
+
+ \returns The child widget of the tab the user clicked on, or<br>
+ 0 if there are no children or if the event is outside of the tabs area.
+*/
Fl_Widget *Fl_Tabs::which(int event_x, int event_y) {
if (children() == 0) return 0;
int H = tab_height();
@@ -173,7 +178,11 @@ int Fl_Tabs::handle(int event) {
Fl::focus(this);
redraw_tabs();
}
- if (o && value(o)) {
+ if (o && // Released on a tab and..
+ (value(o) || // tab changed value or..
+ (when()&(FL_WHEN_NOT_CHANGED)) // ..no change but WHEN_NOT_CHANGED set,
+ ) // handles FL_WHEN_RELEASE_ALWAYS too.
+ ) {
Fl_Widget_Tracker wp(o);
set_changed();
do_callback();
@@ -257,6 +266,17 @@ int Fl_Tabs::handle(int event) {
}
}
+/**
+ This is called by the tab widget's handle() method to set the
+ tab group widget the user last FL_PUSH'ed on. Set back to zero
+ on FL_RELEASE.
+
+ As of this writing, the value is mainly used by draw_tab()
+ to determine whether or not to draw a 'down' box for the tab
+ when it's clicked, and to turn it off if the user drags off it.
+
+ \see push().
+*/
int Fl_Tabs::push(Fl_Widget *o) {
if (push_ == o) return 0;
if ( (push_ && !push_->visible()) || (o && !o->visible()) )
@@ -288,6 +308,8 @@ Fl_Widget* Fl_Tabs::value() {
Sets the widget to become the current visible widget/tab.
Setting the value hides all other children, and makes this one
visible, if it is really a child.
+ \returns 1 if there was a change (new value different from previous),<BR>
+ 0 if there was no change (new value already set)
*/
int Fl_Tabs::value(Fl_Widget *newvalue) {
Fl_Widget*const* a = array();
@@ -518,5 +540,5 @@ void Fl_Tabs::clear_tab_positions() {
}
//
-// End of "$Id: Fl_Tabs.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Tabs.cxx 10122 2014-03-24 18:24:59Z greg.ercolano $".
//
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index e7c9e99..d4350d8 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Buffer.cxx 9366 2012-04-21 15:05:00Z fabien $"
+// "$Id: Fl_Text_Buffer.cxx 10083 2014-01-25 23:47:44Z AlbrechtS $"
//
// Copyright 2001-2010 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -139,9 +139,9 @@ Fl_Text_Buffer::~Fl_Text_Buffer()
delete[]mModifyProcs;
delete[]mCbArgs;
}
- if (mNPredeleteProcs != 0) {
- delete[]mPredeleteProcs;
- delete[]mPredeleteCbArgs;
+ if (mNPredeleteProcs > 0) {
+ delete[] mPredeleteProcs;
+ delete[] mPredeleteCbArgs;
}
}
@@ -735,9 +735,9 @@ void Fl_Text_Buffer::add_predelete_callback(Fl_Text_Predelete_Cb bufPreDeleteCB,
newPreDeleteProcs[i + 1] = mPredeleteProcs[i];
newCBArgs[i + 1] = mPredeleteCbArgs[i];
}
- if (!mNPredeleteProcs != 0) {
- delete[]mPredeleteProcs;
- delete[]mPredeleteCbArgs;
+ if (mNPredeleteProcs > 0) {
+ delete[] mPredeleteProcs;
+ delete[] mPredeleteCbArgs;
}
newPreDeleteProcs[0] = bufPreDeleteCB;
newCBArgs[0] = cbArg;
@@ -767,19 +767,16 @@ void Fl_Text_Buffer::remove_predelete_callback(Fl_Text_Predelete_Cb bufPreDelete
return;
}
- /* Allocate new lists for remaining callback procs and args (if
- any are left) */
+ /* Allocate new lists for remaining callback procs and args (if any are left) */
mNPredeleteProcs--;
if (mNPredeleteProcs == 0) {
- mNPredeleteProcs = 0;
delete[]mPredeleteProcs;
mPredeleteProcs = NULL;
delete[]mPredeleteCbArgs;
mPredeleteCbArgs = NULL;
return;
}
- Fl_Text_Predelete_Cb *newPreDeleteProcs =
- new Fl_Text_Predelete_Cb[mNPredeleteProcs];
+ Fl_Text_Predelete_Cb *newPreDeleteProcs = new Fl_Text_Predelete_Cb[mNPredeleteProcs];
void **newCBArgs = new void *[mNPredeleteProcs];
/* copy out the remaining members and free the old lists */
@@ -791,8 +788,8 @@ void Fl_Text_Buffer::remove_predelete_callback(Fl_Text_Predelete_Cb bufPreDelete
newPreDeleteProcs[i] = mPredeleteProcs[i + 1];
newCBArgs[i] = mPredeleteCbArgs[i + 1];
}
- delete[]mPredeleteProcs;
- delete[]mPredeleteCbArgs;
+ delete[] mPredeleteProcs;
+ delete[] mPredeleteCbArgs;
mPredeleteProcs = newPreDeleteProcs;
mPredeleteCbArgs = newCBArgs;
}
@@ -1805,5 +1802,5 @@ int Fl_Text_Buffer::utf8_align(int pos) const
}
//
-// End of "$Id: Fl_Text_Buffer.cxx 9366 2012-04-21 15:05:00Z fabien $".
+// End of "$Id: Fl_Text_Buffer.cxx 10083 2014-01-25 23:47:44Z AlbrechtS $".
//
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index d418df7..0255fe8 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Text_Display.cxx 9362 2012-04-21 03:02:25Z fabien $"
+// "$Id: Fl_Text_Display.cxx 10416 2014-10-30 12:35:36Z AlbrechtS $"
//
-// Copyright 2001-2010 by Bill Spitzak and others.
+// Copyright 2001-2014 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. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -17,7 +17,7 @@
//
// TODO: rendering of the "optional hyphen"
-// TODO: make line numbering work again
+// TODO: font background color control via style buffer
#include <stdio.h>
#include <stdlib.h>
@@ -25,6 +25,7 @@
#include "flstring.h"
#include <limits.h>
#include <ctype.h>
+#include <string.h> // strdup()
#include <FL/Fl.H>
#include <FL/Fl_Text_Buffer.H>
#include <FL/Fl_Text_Display.H>
@@ -152,6 +153,14 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
mContinuousWrap = 0;
mWrapMarginPix = 0;
mSuppressResync = mNLinesDeleted = mModifyingTabDistance = 0;
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_font_ = FL_HELVETICA;
+ linenumber_size_ = FL_NORMAL_SIZE;
+ linenumber_fgcolor_ = FL_INACTIVE_COLOR;
+ linenumber_bgcolor_ = 53; // ~90% gray
+ linenumber_align_ = FL_ALIGN_RIGHT;
+ linenumber_format_ = strdup("%d");
+#endif
}
@@ -172,9 +181,189 @@ Fl_Text_Display::~Fl_Text_Display() {
mBuffer->remove_predelete_callback(buffer_predelete_cb, this);
}
if (mLineStarts) delete[] mLineStarts;
+#if FLTK_ABI_VERSION >= 10303
+ if (linenumber_format_) {
+ free((void*)linenumber_format_);
+ linenumber_format_ = 0;
+ }
+#endif
+}
+
+
+/**
+ Set width of screen area for line numbers.
+ Use to also enable/disable line numbers.
+ A value of 0 disables line numbering, values >0 enables them.
+ \param width The new width of the area for line numbers to appear, in pixels.
+ 0 disables line numbers (default)
+*/
+void Fl_Text_Display::linenumber_width(int width) {
+ if (width < 0) return;
+ mLineNumWidth = width;
+ resize(x(), y(), w(), h()); // triggers code to recalculate line#s
+}
+
+/**
+ Return the screen area width provided for line numbers.
+*/
+int Fl_Text_Display::linenumber_width() const {
+ return mLineNumWidth;
+}
+
+/**
+ Set the font used for line numbers (if enabled).
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_font(Fl_Font val) {
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_font_ = val;
+#else
+ // do nothing
+#endif
+}
+
+/**
+ Return the font used for line numbers (if enabled).
+*/
+Fl_Font Fl_Text_Display::linenumber_font() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_font_;
+#else
+ return FL_HELVETICA;
+#endif
+}
+
+/**
+ Set the font size used for line numbers (if enabled).
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_size(Fl_Fontsize val) {
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_size_ = val;
+#else
+ // do nothing
+#endif
+}
+
+/**
+ Return the font size used for line numbers (if enabled).
+*/
+Fl_Fontsize Fl_Text_Display::linenumber_size() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_size_;
+#else
+ return FL_NORMAL_SIZE;
+#endif
+}
+
+/**
+ Set the foreground color used for line numbers (if enabled).
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_fgcolor(Fl_Color val) {
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_fgcolor_ = val;
+#else
+ // do nothing
+#endif
+}
+
+/**
+ Return the foreground color used for line numbers (if enabled).
+*/
+Fl_Color Fl_Text_Display::linenumber_fgcolor() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_fgcolor_;
+#else
+ return FL_INACTIVE_COLOR;
+#endif
}
+/**
+ Set the background color used for line numbers (if enabled).
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_bgcolor(Fl_Color val) {
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_bgcolor_ = val;
+#else
+ // do nothing
+#endif
+}
+/**
+ Returns the background color used for line numbers (if enabled).
+*/
+Fl_Color Fl_Text_Display::linenumber_bgcolor() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_bgcolor_;
+#else
+ return 53; // hard coded ~90% gray
+#endif
+}
+
+/**
+ Set alignment for line numbers (if enabled).
+ Valid values are FL_ALIGN_LEFT, FL_ALIGN_CENTER or FL_ALIGN_RIGHT.
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_align(Fl_Align val) {
+#if FLTK_ABI_VERSION >= 10303
+ linenumber_align_ = val;
+#else
+ // do nothing
+#endif
+}
+
+/**
+ Returns the alignment used for line numbers (if enabled).
+*/
+Fl_Align Fl_Text_Display::linenumber_align() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_align_;
+#else
+ return FL_ALIGN_RIGHT;
+#endif
+}
+
+/**
+ Sets the printf() style format string used for line numbers.
+ Default is "%d" for normal unpadded decimal integers.
+
+ An internal copy of \p val is allocated and managed;
+ it is automatically freed whenever a new value is assigned,
+ or when the widget is destroyed.
+
+ The value of \p val must \a not be NULL.
+
+ Example values:
+
+ - "%d" -- For normal line numbers without padding (Default)
+ - "%03d" -- For 000 padding
+ - "%x" -- For hexadecimal line numbers
+ - "%o" -- For octal line numbers
+
+ \version 1.3.3 ABI feature (ignored in 1.3.x unless FLTK_ABI_VERSION is 10303 or higher)
+*/
+void Fl_Text_Display::linenumber_format(const char* val) {
+#if FLTK_ABI_VERSION >= 10303
+ if ( linenumber_format_ ) free((void*)linenumber_format_);
+ linenumber_format_ = val ? strdup(val) : 0;
+#else
+ // do nothing
+#endif
+}
+
+/**
+ Returns the line number printf() format string.
+*/
+const char* Fl_Text_Display::linenumber_format() const {
+#if FLTK_ABI_VERSION >= 10303
+ return linenumber_format_;
+#else
+ return "%d";
+#endif
+}
/**
Attach a text buffer to display, replacing the current buffer (if any)
@@ -406,6 +595,12 @@ void Fl_Text_Display::resize(int X, int Y, int W, int H) {
}
}
+ // add linenum width to the text area - LZA / STR#2621
+ if (mLineNumWidth > 0) {
+ text_area.x += mLineNumWidth;
+ text_area.w -= mLineNumWidth;
+ }
+
// user request to change viewport
if (mTopLineNumHint != mTopLineNum || mHorizOffsetHint != mHorizOffset)
scroll_(mTopLineNumHint, mHorizOffsetHint);
@@ -465,10 +660,6 @@ void Fl_Text_Display::draw_text( int left, int top, int width, int height ) {
for ( line = firstLine; line <= lastLine; line++ )
draw_vline( line, left, left + width, 0, INT_MAX );
- /* draw the line numbers if exposed area includes them */
- if (mLineNumWidth != 0 && left <= mLineNumLeft + mLineNumWidth)
- draw_line_numbers(false);
-
fl_pop_clip();
}
@@ -700,7 +891,7 @@ void Fl_Text_Display::wrap_mode(int wrap, int wrapMargin) {
mNBufferLines = 0;
mFirstChar = 0;
mTopLineNum = 1;
- mAbsTopLineNum = 0;
+ mAbsTopLineNum = 1; // changed from 0 to 1 -- LZA / STR#2621
}
resize(x(), y(), w(), h());
@@ -1514,8 +1705,10 @@ void Fl_Text_Display::buffer_modified_cb( int pos, int nInserted, int nDeleted,
// CET - FIXME if ( origCursorPos >= startDispPos &&
// ( origCursorPos <= endDispPos || endDispPos == buf->length() ) )
}
-
- if (linesInserted > 1) textD->draw_line_numbers(false);
+ if (linesInserted > 1) {
+ // textD->draw_line_numbers(false); // can't do this b/c not called from virtual draw();
+ textD->damage(::FL_DAMAGE_EXPOSE);
+ }
} else {
endDispPos = buf->next_char(textD->mLastChar);
// CET - FIXME if ( origCursorPos >= pos )
@@ -1524,7 +1717,11 @@ void Fl_Text_Display::buffer_modified_cb( int pos, int nInserted, int nDeleted,
have changed. If only one line is altered, line numbers cannot
be affected (the insertion or removal of a line break always
results in at least two lines being redrawn). */
- textD->draw_line_numbers(false);
+
+ // Call draw_line_numbers() here to ensure line# is drawn
+ // when hitting enter for new line -- LZA / STR #2621
+ //textD->draw_line_numbers(true); // no, can't call this here, not in draw() context -- ERCO / STR#2621
+ //textD->damage(::FL_DAMAGE_EXPOSE);
}
IS_UTF8_ALIGNED2(buf, startDispPos)
IS_UTF8_ALIGNED2(buf, endDispPos)
@@ -1543,6 +1740,7 @@ void Fl_Text_Display::buffer_modified_cb( int pos, int nInserted, int nDeleted,
}
+/* Line Numbering Methods */
/**
\brief Line numbering stuff, currently unused.
@@ -1940,7 +2138,13 @@ void Fl_Text_Display::draw_string(int style,
fsize = styleRec->size;
if (style & PRIMARY_MASK) {
- if (Fl::focus() == (Fl_Widget*)this) background = selection_color();
+ if (Fl::focus() == (Fl_Widget*)this) {
+#ifdef __APPLE__
+ if (Fl::compose_state) background = color();// Mac OS: underline marked text
+ else
+#endif
+ background = selection_color();
+ }
else background = fl_color_average(color(), selection_color(), 0.4f);
} else if (style & HIGHLIGHT_MASK) {
if (Fl::focus() == (Fl_Widget*)this) background = fl_color_average(color(), selection_color(), 0.5f);
@@ -1972,6 +2176,12 @@ void Fl_Text_Display::draw_string(int style,
fl_push_clip(X, Y, toX - X, mMaxsize);
#endif
fl_draw( string, nChars, X, Y + mMaxsize - fl_descent());
+#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::compose_state != 0) text
+ if (Fl::compose_state && (style & PRIMARY_MASK)) {
+ fl_color( fl_color_average(foreground, background, 0.6) );
+ fl_line(X, Y + mMaxsize - 1, X + fl_width(string, nChars), Y + mMaxsize - 1);
+ }
+#endif
#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT
fl_pop_clip();
#endif
@@ -2055,6 +2265,9 @@ void Fl_Text_Display::draw_cursor( int X, int Y ) {
if ( X < text_area.x - 1 || X > text_area.x + text_area.w )
return;
+#ifdef __APPLE__
+ Fl::insertion_point_location(X, bot, fontHeight);
+#endif
/* For cursors other than the block, make them around 2/3 of a character
width, rounded to an even number of pixels so that X will draw an
odd number centered on the stem at x. */
@@ -2630,63 +2843,71 @@ void Fl_Text_Display::h_scrollbar_cb(Fl_Scrollbar* b, Fl_Text_Display* textD) {
/**
\brief Refresh the line number area.
-
- If clearAll is False, writes only over the character cell areas. Setting
- clearAll to True will clear out any stray marks outside of the character cell
- area, which might have been left from before a resize or font change.
-
- This function is not used.
+ \param clearAll -- (currently unused) If False, only draws the line number text,
+ does not clear the area behind it. If True, clears the area
+ and redraws the text. Use False to avoid a 'flash' for
+ single buffered windows.
*/
+
+// This draw_line_numbers() method based on patch from
+// http://www.mail-archive.com/fltk-dev@easysw.com/msg06376.html
+// altered to support line numbers right alignment. -LZA / STR #2621
+//
void Fl_Text_Display::draw_line_numbers(bool /*clearAll*/) {
-#if 0
- int y, line, visLine, nCols, lineStart;
- char lineNumString[12];
- int lineHeight = mMaxsize ? mMaxsize : textsize_;
- int charWidth = TMPFONTWIDTH; //mFontStruct->max_bounds.width;
-
- /* Don't draw if mLineNumWidth == 0 (line numbers are hidden), or widget is
- not yet realized */
- if (mLineNumWidth == 0 || visible_r())
+ int Y, line, visLine, lineStart;
+ char lineNumString[16];
+ int lineHeight = mMaxsize;
+
+ // Don't draw if lineNumWidth == 0 (line numbers are hidden),
+ // or widget is not yet realized
+ if (mLineNumWidth <= 0 || !visible_r())
return;
- /* GC is allocated on demand, since not everyone will use line numbering */
- if (textD->lineNumGC == NULL) {
- XGCValues values;
- values.foreground = textD->lineNumFGPixel;
- values.background = textD->bgPixel;
- values.font = textD->fontStruct->fid;
- textD->lineNumGC = XtGetGC(textD->w,
- GCFont| GCForeground | GCBackground, &values);
- }
-
- /* Erase the previous contents of the line number area, if requested */
- if (clearAll)
- XClearArea(XtDisplay(textD->w), XtWindow(textD->w), textD->lineNumLeft,
- textD->top, textD->lineNumWidth, textD->height, False);
-
- /* Draw the line numbers, aligned to the text */
- nCols = min(11, textD->lineNumWidth / charWidth);
- y = textD->top;
- line = getAbsTopLineNum(textD);
- for (visLine=0; visLine < textD->nVisibleLines; visLine++) {
- lineStart = textD->lineStarts[visLine];
- if (lineStart != -1 && (lineStart==0 ||
- BufGetCharacter(textD->buffer, lineStart-1)=='\n')) {
- sprintf(lineNumString, "%*d", nCols, line);
- XDrawImageString(XtDisplay(textD->w), XtWindow(textD->w),
- textD->lineNumGC, textD->lineNumLeft, y + textD->ascent,
- lineNumString, strlen(lineNumString));
- line++;
- } else {
- XClearArea(XtDisplay(textD->w), XtWindow(textD->w),
- textD->lineNumLeft, y, textD->lineNumWidth,
- textD->ascent + textD->descent, False);
- if (visLine == 0)
- line++;
+ // Make sure we reset clipping range for line number's GC;
+ // it may be shared (e.g. if line numbers and text have same color)
+ // and therefore clipping ranges may be invalid.
+ int xoff = Fl::box_dx(box());
+ int hscroll_h = mHScrollBar->visible() ? mHScrollBar->h() : 0;
+ fl_push_clip(x() + xoff,
+ y() + Fl::box_dy(box()),
+ mLineNumWidth - xoff,
+ h() - Fl::box_dh(box()) - hscroll_h);
+ {
+ // Set background color for line number area -- LZA / STR# 2621
+ // Erase background
+ fl_color(linenumber_bgcolor());
+ fl_rectf(x(), y(), mLineNumWidth, h());
+
+ // Draw separator line
+ //fl_color(180,180,180);
+ //fl_line(x()+mLineNumWidth-1, y(), x()+mLineNumWidth-1, y()+h());
+
+ // Draw line number text
+ fl_font(linenumber_font(), linenumber_size());
+
+ Y = y();
+ line = get_absolute_top_line_number();
+
+ // set font color for line numbers
+ fl_color(linenumber_fgcolor());
+ for (visLine=0; visLine < mNVisibleLines; visLine++) {
+ lineStart = mLineStarts[visLine];
+ if (lineStart != -1 && (lineStart==0 || buffer()->char_at(lineStart-1)=='\n')) {
+ sprintf(lineNumString, linenumber_format(), line);
+ int xx = x() + xoff + 3,
+ yy = Y + 3,
+ ww = mLineNumWidth - xoff - (3*2),
+ hh = lineHeight;
+ fl_draw(lineNumString, xx, yy, ww, hh, linenumber_align(), 0, 0);
+ //DEBUG fl_rect(xx, yy, ww, hh);
+ line++;
+ } else {
+ if (visLine == 0) line++;
+ }
+ Y += lineHeight;
}
- y += lineHeight;
- }
-#endif
+ }
+ fl_pop_clip();
}
static int max( int i1, int i2 ) {
@@ -3042,12 +3263,13 @@ void Fl_Text_Display::measure_deleted_lines(int pos, int nDeleted) {
and the styleBufOffset argument must indicate the starting position of the
copy, to take into account the correct style information.
- \param buf
- \param startPos
- \param maxPos
- \param maxLines
- \param startPosIsLineStart
- \param styleBufOffset
+ \param[in] buf The text buffer to operate on
+ \param[in] startPos Starting index position into the buffer
+ \param[in] maxPos Maximum index position into the buffer we'll reach
+ \param[in] maxLines Maximum number of lines we'll reach
+ \param[in] startPosIsLineStart Flag indicating if startPos is start of line.
+ (If set, prevents our having to find the line start)
+ \param[in] styleBufOffset Offset index position into style buffer.
\param[out] retPos Position where counting ended. When counting lines, the
position returned is the start of the line "maxLines" lines
@@ -3147,9 +3369,13 @@ void Fl_Text_Display::wrapped_line_counter(Fl_Text_Buffer *buf, int startPos,
if (b<lineStart) b = lineStart;
if (!foundBreak) { /* no whitespace, just break at margin */
newLineStart = max(p, buf->next_char(lineStart));
- const char *s = buf->address(b);
colNum++;
- width = measure_proportional_character(s, 0, p+styleBufOffset);
+ if (b >= buf->length()) { // STR #2730
+ width = 0;
+ } else {
+ const char *s = buf->address(b);
+ width = measure_proportional_character(s, 0, p+styleBufOffset);
+ }
}
if (p >= maxPos) {
*retPos = maxPos;
@@ -3401,8 +3627,7 @@ void Fl_Text_Display::draw(void) {
fl_rectf(mVScrollBar->x(), mHScrollBar->y(),
mVScrollBar->w(), mHScrollBar->h(),
FL_GRAY);
-
- // blank the previous cursor protrusions
+ //draw_line_numbers(true); // commented out STR# 2621 / LZA
}
else if (damage() & (FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)) {
// printf("blanking previous cursor extrusions at Y: %d\n", mCursorOldY);
@@ -3456,8 +3681,14 @@ void Fl_Text_Display::draw(void) {
}
// draw the text cursor
+ int start, end;
+ int has_selection = buffer()->selection_position(&start, &end);
if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)
- && !buffer()->primary_selection()->selected() &&
+ && (
+#ifdef __APPLE__
+ Fl::compose_state ||
+#endif
+ !has_selection || mCursorPos < start || mCursorPos > end) &&
mCursorOn && Fl::focus() == (Fl_Widget*)this ) {
fl_push_clip(text_area.x-LEFT_MARGIN,
text_area.y,
@@ -3473,6 +3704,11 @@ void Fl_Text_Display::draw(void) {
//printf("drew cursor at pos: %d (%d,%d)\n", mCursorPos, X, Y);
fl_pop_clip();
}
+
+ // Important to do this at end of this method, otherwise line numbers
+ // will not scroll with the text edit area
+ draw_line_numbers(true);
+
fl_pop_clip();
}
@@ -3797,5 +4033,5 @@ double Fl_Text_Display::col_to_x(double col) const
//
-// End of "$Id: Fl_Text_Display.cxx 9362 2012-04-21 03:02:25Z fabien $".
+// End of "$Id: Fl_Text_Display.cxx 10416 2014-10-30 12:35:36Z AlbrechtS $".
//
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx
index 0ec6544..721b31a 100644
--- a/src/Fl_Text_Editor.cxx
+++ b/src/Fl_Text_Editor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Text_Editor.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: Fl_Text_Editor.cxx 10031 2013-12-13 16:28:38Z manolo $"
//
// Copyright 2001-2010 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -73,6 +73,7 @@ Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l)
mCursorOn = 1;
insert_mode_ = 1;
key_bindings = 0;
+ set_flag(MAC_USE_ACCENTS_MENU);
// handle the default key bindings
add_default_key_bindings(&key_bindings);
@@ -514,8 +515,9 @@ int Fl_Text_Editor::handle_key() {
int del = 0;
if (Fl::compose(del)) {
if (del) {
- int dp = insert_position(), di = del;
- while (di--) dp = buffer()->prev_char_clipped(dp);
+ // del is a number of bytes
+ int dp = insert_position() - del;
+ if ( dp < 0 ) dp = 0;
buffer()->select(dp, insert_position());
}
kill_selection(this);
@@ -523,6 +525,12 @@ int Fl_Text_Editor::handle_key() {
if (insert_mode()) insert(Fl::event_text());
else overstrike(Fl::event_text());
}
+#ifdef __APPLE__
+ if (Fl::compose_state) {
+ int pos = this->insert_position();
+ this->buffer()->select(pos - Fl::compose_state, pos);
+ }
+#endif
show_insert_position();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
@@ -560,6 +568,13 @@ int Fl_Text_Editor::handle(int event) {
case FL_UNFOCUS:
show_cursor(mCursorOn); // redraws the cursor
+#ifdef __APPLE__
+ if (buffer()->selected() && Fl::compose_state) {
+ int pos = insert_position();
+ buffer()->select(pos, pos);
+ Fl::reset_marked_text();
+ }
+#endif
if (buffer()->selected()) redraw(); // Redraw selections...
case FL_HIDE:
if (when() & FL_WHEN_RELEASE) maybe_do_callback();
@@ -631,7 +646,7 @@ int Fl_Text_Editor::handle(int event) {
insert_position(dndCursorPos);
return 1;
case FL_DND_RELEASE: // keep insertion cursor and wait for the FL_PASTE event
- buffer()->unselect(); // FL_PASTE must not destroy current selection!
+ if (!dragging) buffer()->unselect(); // FL_PASTE must not destroy current selection if drag comes from outside
return 1;
}
@@ -639,5 +654,5 @@ int Fl_Text_Editor::handle(int event) {
}
//
-// End of "$Id: Fl_Text_Editor.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: Fl_Text_Editor.cxx 10031 2013-12-13 16:28:38Z manolo $".
//
diff --git a/src/Fl_Tile.cxx b/src/Fl_Tile.cxx
index e800110..dfe215f 100644
--- a/src/Fl_Tile.cxx
+++ b/src/Fl_Tile.cxx
@@ -1,12 +1,12 @@
//
-// "$Id: Fl_Tile.cxx 9637 2012-07-24 04:37:22Z matt $"
+// "$Id: Fl_Tile.cxx 10385 2014-10-19 14:17:47Z AlbrechtS $"
//
// Tile widget for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
+// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
@@ -16,23 +16,81 @@
// http://www.fltk.org/str.php
//
+/**
+ \class Fl_Tile
-// Group of 2 or 4 "tiles" that can be resized by dragging border
-// The size of the first child determines where the resize border is.
-// The resizebox is used to limit where the border can be dragged to.
+ The Fl_Tile class lets you resize its children by dragging
+ the border between them.
+
+ \image html Fl_Tile.png
+ \image latex Fl_Tile.png "Fl_Tile" width=5cm
+
+ For the tiling to work correctly, the children of an Fl_Tile must
+ cover the entire area of the widget, but not overlap.
+ This means that all children must touch each other at their edges,
+ and no gaps can be left inside the Fl_Tile.
+
+ Fl_Tile does not normally draw any graphics of its own.
+ The "borders" which can be seen in the snapshot above are actually
+ part of the children. Their boxtypes have been set to FL_DOWN_BOX
+ creating the impression of "ridges" where the boxes touch. What
+ you see are actually two adjacent FL_DOWN_BOX's drawn next to each
+ other. All neighboring widgets share the same edge - the widget's
+ thick borders make it appear as though the widgets aren't actually
+ touching, but they are. If the edges of adjacent widgets do not
+ touch, then it will be impossible to drag the corresponding edges.
+
+ Fl_Tile allows objects to be resized to zero dimensions.
+ To prevent this you can use the resizable() to limit where
+ corners can be dragged to. For more information see note below.
+
+ Even though objects can be resized to zero sizes, they must initially
+ have non-zero sizes so the Fl_Tile can figure out their layout.
+ If desired, call position() after creating the children but before
+ displaying the window to set the borders where you want.
+
+ <b>Note on resizable(Fl_Widget &w):</b>
+ The "resizable" child widget (which should be invisible) limits where
+ the borders can be dragged to. All dragging will be limited inside the
+ resizable widget's borders. If you don't set it, it will be possible
+ to drag the borders right to the edges of the Fl_Tile widget, and thus
+ resize objects on the edges to zero width or height. When the entire
+ Fl_Tile widget is resized, the resizable() widget will keep its border
+ distance to all borders the same (this is normal resize behavior), so
+ that you can effectively set a border width that will never change.
+
+ <b>Note:</b>
+ You can still resize widgets \b inside the resizable() to zero width and/or
+ height, i.e. box \b 2b above to zero width and box \b 3a to zero height.
+
+ \see void Fl_Group::resizable(Fl_Widget &w)
+
+ Example for resizable with 20 pixel border distance:
+ \code
+ int dx = 20, dy = dx;
+ Fl_Tile tile(50,50,300,300);
+ // ... create widgets inside tile (see test/tile.cxx) ...
+ // create resizable() box
+ Fl_Box r(tile.x()+dx,tile.y()+dy,tile.w()-2*dx,tile.h()-2*dy);
+ tile.resizable(r);
+ tile.end();
+ \endcode
+
+ See also the complete example program in test/tile.cxx.
+*/
#include <FL/Fl.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_Window.H>
#include <stdlib.h>
-// Drag the edges that were initially at oldx,oldy to newx,newy:
-// pass zero as oldx or oldy to disable drag in that direction:
-/**
- Drag the intersection at from_x,from_y to to_x,to_y.
+/**
+ Drags the intersection at (\p oldx,\p oldy) to (\p newx,\p newy).
This redraws all the necessary children.
+
+ Pass zero as \p oldx or \p oldy to disable drag in that direction.
*/
-void Fl_Tile::position(int oix, int oiy, int newx, int newy) {
+void Fl_Tile::position(int oldx, int oldy, int newx, int newy) {
Fl_Widget*const* a = array();
int *p = sizes();
p += 8; // skip group & resizable's saved size
@@ -41,28 +99,43 @@ void Fl_Tile::position(int oix, int oiy, int newx, int newy) {
if (o == resizable()) continue;
int X = o->x();
int R = X+o->w();
- if (oix) {
+ if (oldx) {
int t = p[0];
- if (t == oix || (t>oix && X<newx) || (t<oix && X>newx) ) X = newx;
+ if (t == oldx || (t>oldx && X<newx) || (t<oldx && X>newx) ) X = newx;
t = p[1];
- if (t == oix || (t>oix && R<newx) || (t<oix && R>newx) ) R = newx;
+ if (t == oldx || (t>oldx && R<newx) || (t<oldx && R>newx) ) R = newx;
}
int Y = o->y();
int B = Y+o->h();
- if (oiy) {
+ if (oldy) {
int t = p[2];
- if (t == oiy || (t>oiy && Y<newy) || (t<oiy && Y>newy) ) Y = newy;
+ if (t == oldy || (t>oldy && Y<newy) || (t<oldy && Y>newy) ) Y = newy;
t = p[3];
- if (t == oiy || (t>oiy && B<newy) || (t<oiy && B>newy) ) B = newy;
+ if (t == oldy || (t>oldy && B<newy) || (t<oldy && B>newy) ) B = newy;
}
o->damage_resize(X,Y,R-X,B-Y);
}
}
-// move the lower-right corner (sort of):
+/**
+ Resizes the Fl_Tile widget and its children.
+
+ Fl_Tile implements its own resize() method. It does not use
+ Fl_Group::resize() to resize itself and its children.
+
+ Enlarging works by just moving the lower-right corner and resizing
+ the bottom and right border widgets accordingly.
+
+ Shrinking the Fl_Tile works in the opposite way by shrinking
+ the bottom and right border widgets, unless they are reduced to zero
+ width or height, resp. or to their minimal sizes defined by the
+ resizable() widget. In this case other widgets will be shrunk as well.
+
+ See the Fl_Tile class documentation about how the resizable() works.
+*/
+
void Fl_Tile::resize(int X,int Y,int W,int H) {
- //Fl_Group::resize(X, Y, W, H);
- //return;
+
// remember how much to move the child widgets:
int dx = X-x();
int dy = Y-y();
@@ -71,11 +144,13 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
int *p = sizes();
// resize this (skip the Fl_Group resize):
Fl_Widget::resize(X,Y,W,H);
- // find bottom-right of resiable:
- int OR = p[5];
- int NR = X+W-(p[1]-OR);
- int OB = p[7];
- int NB = Y+H-(p[3]-OB);
+
+ // find bottom-right corner of resizable:
+ int OR = p[5]; // old right border
+ int NR = X+W-(p[1]-OR); // new right border
+ int OB = p[7]; // old bottom border
+ int NB = Y+H-(p[3]-OB); // new bottom border
+
// move everything to be on correct side of new resizable:
Fl_Widget*const* a = array();
p += 8;
@@ -90,7 +165,7 @@ void Fl_Tile::resize(int X,int Y,int W,int H) {
if (*p++ >= OB) yy += dh; else if (yy > NB) yy = NB;
if (*p++ >= OB) B += dh; else if (B > NB) B = NB;
o->resize(xx,yy,R-xx,B-yy);
- // do *not* call o->redraw() here! If you do, and the tile is inside a
+ // do *not* call o->redraw() here! If you do, and the tile is inside a
// scroll, it'll set the damage areas wrong for all children!
}
}
@@ -200,13 +275,26 @@ int Fl_Tile::handle(int event) {
return Fl_Group::handle(event);
}
+/**
+ Creates a new Fl_Tile widget using the given position, size,
+ and label string. The default boxtype is FL_NO_BOX.
+
+ The destructor <I>also deletes all the children</I>. This allows a
+ whole tree to be deleted at once, without having to keep a pointer to
+ all the children in the user code. A kludge has been done so the
+ Fl_Tile and all of its children can be automatic (local)
+ variables, but you must declare the Fl_Tile <I>first</I>, so
+ that it is destroyed last.
+
+ \see class Fl_Group
+*/
-Fl_Tile::Fl_Tile(int X,int Y,int W,int H,const char*l)
-: Fl_Group(X,Y,W,H,l)
+Fl_Tile::Fl_Tile(int X,int Y,int W,int H,const char*l)
+: Fl_Group(X,Y,W,H,l)
{
}
//
-// End of "$Id: Fl_Tile.cxx 9637 2012-07-24 04:37:22Z matt $".
+// End of "$Id: Fl_Tile.cxx 10385 2014-10-19 14:17:47Z AlbrechtS $".
//
diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx
index d708742..2f459ea 100644
--- a/src/Fl_Tiled_Image.cxx
+++ b/src/Fl_Tiled_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tiled_Image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_Tiled_Image.cxx 10218 2014-07-10 12:28:00Z manolo $"
//
// Tiled image code for the Fast Light Tool Kit (FLTK).
//
@@ -19,6 +19,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Tiled_Image.H>
+#include <FL/Fl_Window.H>
#include <FL/fl_draw.H>
/**
@@ -31,9 +32,10 @@ Fl_Tiled_Image::Fl_Tiled_Image(Fl_Image *i, // I - Image to tile
Fl_Image(W,H,0) {
image_ = i;
alloc_image_ = 0;
-
- if (W == 0) w(Fl::w());
- if (H == 0) h(Fl::h());
+ // giving to the tiled image the screen size may fail with multiscreen configurations
+ // so we leave it with w = h = 0 (STR #3106)
+ /* if (W == 0) w(Fl::w());
+ if (H == 0) h(Fl::h());*/
}
/**
The destructor frees all memory and server resources that are used by
@@ -99,8 +101,11 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
int cx, // I - "Source" X position
int cy) { // I - "Source" Y position
if (!image_->w() || !image_->h()) return;
- if (W == 0) W = Fl::w();
- if (H == 0) H = Fl::h();
+ if (W == 0 && H == 0 && Fl_Window::current()) { // W and H null means the image is potentially as large as the current window
+ W = Fl_Window::current()->w();
+ H = Fl_Window::current()->h();
+ X = Y = 0;
+ }
fl_push_clip(X, Y, W, H);
@@ -122,5 +127,5 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
//
-// End of "$Id: Fl_Tiled_Image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: Fl_Tiled_Image.cxx 10218 2014-07-10 12:28:00Z manolo $".
//
diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx
index f0c6f72..1a513d1 100644
--- a/src/Fl_Tree.cxx
+++ b/src/Fl_Tree.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree.cxx 10275 2014-09-05 12:04:28Z cand $"
//
#include <stdio.h>
@@ -27,60 +27,44 @@
// http://www.fltk.org/str.php
//
-// INTERNAL: scroller callback
+// INTERNAL: scroller callback (hor+vert scroll)
static void scroll_cb(Fl_Widget*,void *data) {
((Fl_Tree*)data)->redraw();
}
-// INTERNAL: Parse elements from path into an array of null terminated strings
-// Handles escape characters.
-// Path="/aa/bb"
-// Return: arr[0]="aa", arr[1]="bb", arr[2]=0
+// INTERNAL: Parse elements from 'path' into an array of null terminated strings
+// Handles escape characters, ignores multiple /'s.
+// Path="/aa/bb", returns arr[0]="aa", arr[1]="bb", arr[2]=0.
// Caller must call free_path(arr).
//
static char **parse_path(const char *path) {
- while ( *path == '/' ) path++; // skip leading '/'
- // First pass: identify, null terminate, and count separators
- int seps = 1; // separator count (1: first item)
- int arrsize = 1; // array size (1: first item)
- char *save = strdup(path); // make copy we can modify
- char *sin = save, *sout = save;
- while ( *sin ) {
- if ( *sin == '\\' ) { // handle escape character
- *sout++ = *++sin;
- if ( *sin ) ++sin;
- } else if ( *sin == '/' ) { // handle submenu
- *sout++ = 0;
- sin++;
- seps++;
- arrsize++;
- } else { // all other chars
- *sout++ = *sin++;
- }
- }
- *sout = 0;
- arrsize++; // (room for terminating NULL)
- // Second pass: create array, save nonblank elements
- char **arr = (char**)malloc(sizeof(char*) * arrsize);
- int t = 0;
- sin = save;
- while ( seps-- > 0 ) {
- if ( *sin ) { arr[t++] = sin; } // skips empty fields, e.g. '//'
- sin += (strlen(sin) + 1);
+ size_t len = strlen(path);
+ char *cp = new char[(len+1)], *word = cp, *s = cp; // freed below or in free_path()
+ char **ap = new char*[(len+1)], **arr = ap; // overallocates arr[]
+ while (1) {
+ if (*path =='/' || *path == 0) { // handle path sep or eos
+ if (word != s) { *s++ = 0; *arr++= word; word = s; }
+ if ( !*path++) break; else continue; // eos? done, else cont
+ } else if ( *path == '\\' ) { // handle escape
+ if ( *(++path) ) { *s++ = *path++; } else continue;
+ } else { *s++ = *path++; } // handle normal char
}
- arr[t] = 0;
- return(arr);
+ *arr = 0;
+ if ( arr == ap ) delete[] cp; // empty arr[]? delete since free_path() can't
+ return ap;
}
-// INTERNAL: Free the array returned by parse_path()
+// INTERNAL: Free an array 'arr' returned by parse_path()
static void free_path(char **arr) {
if ( arr ) {
- if ( arr[0] ) { free((void*)arr[0]); }
- free((void*)arr);
+ if ( arr[0] ) { delete[] arr[0]; } // deletes cp in parse_path
+ delete[] arr; // deletes ptr array
}
}
-// INTERNAL: Recursively descend tree hierarchy, accumulating total child count
+// INTERNAL: Recursively descend 'item's tree hierarchy
+// accumulating total child 'count'
+//
static int find_total_children(Fl_Tree_Item *item, int count=0) {
count++;
for ( int t=0; t<item->children(); t++ ) {
@@ -91,7 +75,11 @@ static int find_total_children(Fl_Tree_Item *item, int count=0) {
/// Constructor.
Fl_Tree::Fl_Tree(int X, int Y, int W, int H, const char *L) : Fl_Group(X,Y,W,H,L) {
+#if FLTK_ABI_VERSION >= 10303
+ _root = new Fl_Tree_Item(this);
+#else
_root = new Fl_Tree_Item(_prefs);
+#endif
_root->parent(0); // we are root of tree
_root->label("ROOT");
_item_focus = 0;
@@ -109,11 +97,25 @@ Fl_Tree::Fl_Tree(int X, int Y, int W, int H, const char *L) : Fl_Group(X,Y,W,H,L
box(FL_DOWN_BOX);
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
when(FL_WHEN_CHANGED);
- _vscroll = new Fl_Scrollbar(0,0,0,0); // will be resized by draw()
+ int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
+ _vscroll = new Fl_Scrollbar(X+W-scrollsize,Y,scrollsize,H);
_vscroll->hide();
_vscroll->type(FL_VERTICAL);
_vscroll->step(1);
_vscroll->callback(scroll_cb, (void*)this);
+#if FLTK_ABI_VERSION >= 10303
+ _hscroll = new Fl_Scrollbar(X,Y+H-scrollsize,W,scrollsize);
+ _hscroll->hide();
+ _hscroll->type(FL_HORIZONTAL);
+ _hscroll->step(1);
+ _hscroll->callback(scroll_cb, (void*)this);
+ _tox = _tix = X + Fl::box_dx(box());
+ _toy = _tiy = Y + Fl::box_dy(box());
+ _tow = _tiw = W - Fl::box_dw(box());
+ _toh = _tih = H - Fl::box_dh(box());
+ _tree_w = -1;
+ _tree_h = -1;
+#endif
end();
}
@@ -122,26 +124,137 @@ Fl_Tree::~Fl_Tree() {
if ( _root ) { delete _root; _root = 0; }
}
-/// Extend a selection between 'from' and 'to'.
-/// Used by SHIFT-click to extend a selection between two items inclusive.
+/// Extend the selection between and including \p 'from' and \p 'to'
+/// depending on direction \p 'dir', \p 'val', and \p 'visible'.
///
-void Fl_Tree::extend_selection(Fl_Tree_Item *from, Fl_Tree_Item *to) {
- char on = 0;
+/// Efficient: does not walk entire tree; starts with \p 'from' and stops
+/// at \p 'to' while moving in direction \p 'dir'. Dir must be specified though.
+#if FLTK_ABI_VERSION >= 10303
+///
+/// If dir cannot be known in advance, such as during SHIFT-click operations,
+/// the method extend_selection(Fl_Tree_Item*,Fl_Tree_Item*,int,bool)
+/// should be used.
+#endif
+///
+/// Handles calling redraw() if anything changed.
+///
+/// \param[in] from Starting item
+/// \param[in] to Ending item
+/// \param[in] dir Direction to extend selection (FL_Up or FL_Down)
+/// \param[in] val 0=deselect, 1=select, 2=toggle
+/// \param[in] visible true=affect only open(), visible items,<br>
+/// false=affect open or closed items (default)
+/// \returns The number of items whose selection states were changed, if any.
+/// \version 1.3.3
+///
+int Fl_Tree::extend_selection_dir(Fl_Tree_Item *from, Fl_Tree_Item *to,
+ int dir, int val, bool visible ) {
+ int changed = 0;
+ for (Fl_Tree_Item *item=from; item; item = next_item(item, dir, visible) ) {
+ switch (val) {
+ case 0:
+ if ( deselect(item, when()) ) ++changed;
+ break;
+ case 1:
+ if ( select(item, when()) ) ++changed;
+ break;
+ case 2:
+ select_toggle(item, when());
+ ++changed; // toggle always involves a change
+ break;
+ }
+ if ( item==to ) break;
+ }
+ return(changed);
+}
+
+/// Extend a selection between \p 'from' and \p 'to' depending on \p 'visible'.
+///
+/// Similar to the more efficient
+/// extend_selection_dir(Fl_Tree_Item*,Fl_Tree_Item*,int dir,int val,bool vis)
+/// method, but direction (up or down) doesn't need to be known.<br>
+/// We're less efficient because we search the tree for to/from, then operate
+/// on items in between. The more efficient method avoids the "search",
+/// but necessitates a direction to be specified to find \p 'to'.<br>
+/// Used by SHIFT-click to extend a selection between two items inclusive.<br>
+/// Handles calling redraw() if anything changed.
+///
+/// \param[in] from Starting item
+/// \param[in] to Ending item
+/// \param[in] val Select or deselect items (0=deselect, 1=select, 2=toggle)
+/// \param[in] visible true=affect only open(), visible items,<br>
+/// false=affect open or closed items (default)
+/// \returns The number of items whose selection states were changed, if any.
+#if FLTK_ABI_VERSION >= 10303
+/// \version 1.3.3 ABI feature
+int Fl_Tree::extend_selection(Fl_Tree_Item *from, Fl_Tree_Item *to,
+ int val, bool visible) {
+#else
+/// \notes Made public in 1.3.3 ABI
+// Adding overload if not at least one overload breaks ABI, so avoid
+// by making a private function until ABI can change..
+int Fl_Tree::extend_selection__(Fl_Tree_Item *from, Fl_Tree_Item *to,
+ int val, bool visible) {
+#endif
+ int changed = 0;
if ( from == to ) {
- from->select();
- return;
+ if ( visible && !from->is_visible() ) return(0); // do nothing
+ switch (val) {
+ case 0:
+ if ( deselect(from, when()) ) ++changed;
+ break;
+ case 1:
+ if ( select(from, when()) ) ++changed;
+ break;
+ case 2:
+ select_toggle(from, when());
+ ++changed; // always changed
+ break;
+ }
+ return(changed);
}
- for ( Fl_Tree_Item *item = first(); item; item = next(item) ) {
- if ( (item == from) || (item == to) ) {
- item->select(); // inclusive
- on ^= 1;
- } else if ( on ) {
- item->select();
+ char on = 0;
+ for ( Fl_Tree_Item *item = first(); item; item = item->next_visible(_prefs) ) {
+ if ( visible && !item->is_visible() ) continue;
+ if ( on || (item == from) || (item == to) ) {
+ switch (val) {
+ case 0:
+ if ( deselect(item, when()) ) ++changed;
+ break;
+ case 1:
+ if ( select(item, when()) ) ++changed;
+ break;
+ case 2:
+ select_toggle(item, when());
+ ++changed; // toggle always involves a change
+ break;
+ }
+ if ( (item == from) || (item == to) ) {
+ on ^= 1;
+ if ( !on ) break; // done
+ }
}
}
+ return(changed);
}
+#if FLTK_ABI_VERSION >= 10303
+// not needed, above overload handles this
+#else
+/// Extend a selection between \p 'from' and \p 'to'.
+/// Extends selection for items and all children, visible ('open') or not.
+/// Walks entire tree from top to bottom looking for \p 'from' and \p 'to'.
+/// \version 1.3.0
+///
+void Fl_Tree::extend_selection(Fl_Tree_Item *from, Fl_Tree_Item *to) {
+ const int val = 1; // 0=clr, 1=set, 2=toggle
+ const bool visible = false; // true=only 'open' items, false='open' or 'closed'
+ extend_selection__(from, to, val, visible); // use private method until we can release it
+}
+#endif
+
/// Standard FLTK event handler for this widget.
+/// \todo add Fl_Widget_Tracker (see Fl_Browser_.cxx::handle())
int Fl_Tree::handle(int e) {
if (e == FL_NO_EVENT) return(0); // XXX: optimize to prevent slow resizes on large trees!
int ret = 0;
@@ -157,6 +270,7 @@ int Fl_Tree::handle(int e) {
// Developer note: Fl_Browser_::handle() used for reference here..
// #include <FL/names.h> // for event debugging
// fprintf(stderr, "DEBUG: %s (%d)\n", fl_eventnames[e], e);
+
if (e == FL_ENTER || e == FL_LEAVE) return(1);
switch (e) {
case FL_FOCUS: {
@@ -164,10 +278,10 @@ int Fl_Tree::handle(int e) {
// If a nav key was used to give us focus, and we've got no saved
// focus widget, determine which item gets focus depending on nav key.
//
- if ( ! _item_focus ) { // no focus established yet?
- switch (Fl::event_key()) { // determine if focus was navigated..
- case FL_Tab: { // received focus via TAB?
- int updown = is_shift ? FL_Up : FL_Down; // SHIFT-TAB similar to Up, TAB similar to Down
+ if ( ! _item_focus ) { // no focus established yet?
+ switch (Fl::event_key()) { // determine if focus was navigated..
+ case FL_Tab: { // received focus via TAB?
+ int updown = is_shift ? FL_Up : FL_Down; // SHIFT-TAB similar to Up, TAB similar to Down
set_item_focus(next_visible_item(0, updown));
break;
}
@@ -196,7 +310,7 @@ int Fl_Tree::handle(int e) {
if ( (Fl::focus() == this) && // tree has focus?
_prefs.selectmode() > FL_TREE_SELECT_NONE ) { // select mode that supports kb events?
if ( !_item_focus ) { // no current focus item?
- set_item_focus(first_visible()); // use first vis item
+ set_item_focus(first_visible_item()); // use first vis item
if ( Fl::event_key() == FL_Up || // Up or down?
Fl::event_key() == FL_Down ) // ..if so, already did 'motion'
return(1); // ..so just return.
@@ -214,6 +328,7 @@ int Fl_Tree::handle(int e) {
case FL_TREE_SELECT_NONE:
break; // ignore, let group have shot at event
case FL_TREE_SELECT_SINGLE:
+ case FL_TREE_SELECT_SINGLE_DRAGGABLE:
if ( is_ctrl ) { // CTRL-SPACE: (single mode) toggle
if ( ! _item_focus->is_selected() ) {
select_only(_item_focus, when());
@@ -239,14 +354,10 @@ int Fl_Tree::handle(int e) {
case FL_Left: { // LEFT: close children (if any)
if ( _item_focus ) {
if ( ekey == FL_Right && _item_focus->is_close() ) {
- // Open closed item
- open(_item_focus);
- redraw();
+ open(_item_focus); // open closed item
ret = 1;
} else if ( ekey == FL_Left && _item_focus->is_open() ) {
- // Close open item
- close(_item_focus);
- redraw();
+ close(_item_focus); // close open item
ret = 1;
}
return(1);
@@ -279,11 +390,12 @@ int Fl_Tree::handle(int e) {
switch ( _prefs.selectmode() ) {
case FL_TREE_SELECT_NONE:
case FL_TREE_SELECT_SINGLE:
+ case FL_TREE_SELECT_SINGLE_DRAGGABLE:
break;
case FL_TREE_SELECT_MULTI:
// Do a 'select all'
select_all();
- _lastselect = first_visible();
+ _lastselect = first_visible_item();
take_focus();
return(1);
}
@@ -306,44 +418,54 @@ int Fl_Tree::handle(int e) {
// fprintf(stderr, "Fl_Tree::handle(): Event was %s (%d)\n", fl_eventnames[e], e); // DEBUGGING
if ( ! _root ) return(ret);
+ static int last_my = 0;
switch ( e ) {
case FL_PUSH: { // clicked on tree
- if (Fl::visible_focus() && handle(FL_FOCUS)) {
- Fl::focus(this);
- }
- // Not extending a selection? zero lastselect
+ last_my = Fl::event_y(); // save for dragging direction..
+ if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *item = _root->find_clicked(_prefs, 0);
+#else
Fl_Tree_Item *item = _root->find_clicked(_prefs);
+#endif
if ( !item ) { // clicked, but not on an item?
+ _lastselect = 0;
switch ( _prefs.selectmode() ) {
case FL_TREE_SELECT_NONE:
break;
case FL_TREE_SELECT_SINGLE:
+ case FL_TREE_SELECT_SINGLE_DRAGGABLE:
case FL_TREE_SELECT_MULTI:
deselect_all();
break;
}
break;
}
- set_item_focus(item); // becomes new focus widget
- redraw();
- ret |= 1; // handled
+ set_item_focus(item); // becomes new focus widget, calls redraw() if needed
+ ret |= 1; // handled
if ( Fl::event_button() == FL_LEFT_MOUSE ) {
if ( item->event_on_collapse_icon(_prefs) ) { // collapse icon clicked?
- open_toggle(item);
+ open_toggle(item); // toggle open (handles redraw)
} else if ( item->event_on_label(_prefs) && // label clicked?
- (!item->widget() || !Fl::event_inside(item->widget())) && // not inside widget
- (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) { // not on scroller
+ (!item->widget() || !Fl::event_inside(item->widget())) ) { // not inside widget
switch ( _prefs.selectmode() ) {
case FL_TREE_SELECT_NONE:
break;
case FL_TREE_SELECT_SINGLE:
- select_only(item, when());
+ case FL_TREE_SELECT_SINGLE_DRAGGABLE:
+ select_only(item, when()); // select only this item (handles redraw)
_lastselect = item;
break;
case FL_TREE_SELECT_MULTI: {
if ( is_shift ) { // SHIFT+PUSH?
if ( _lastselect ) {
- extend_selection(_lastselect, item);
+ int val = is_ctrl ? 2 : 1;
+ bool visible = true;
+#if FLTK_ABI_VERSION >= 10303
+ extend_selection(_lastselect, item, val, visible);
+#else
+ extend_selection__(_lastselect, item, val, visible);
+#endif
} else {
select(item); // add to selection
}
@@ -361,61 +483,363 @@ int Fl_Tree::handle(int e) {
break;
}
case FL_DRAG: {
- // do the scrolling first:
+ // Do scrolling first..
+
+ // Detect up/down dragging
int my = Fl::event_y();
- if ( my < y() ) { // above top?
- int p = vposition()-(y()-my);
- if ( p < 0 ) p = 0;
- vposition(p);
- } else if ( my > (y()+h()) ) { // below bottom?
- int p = vposition()+(my-y()-h());
- if ( p > (int)_vscroll->maximum() ) p = (int)_vscroll->maximum();
- vposition(p);
+ int dir = (my>last_my) ? FL_Down : FL_Up;
+ last_my = my;
+
+ // Handle autoscrolling
+ if ( my < y() ) { // Above top?
+ dir = FL_Up; // ..going up
+ int p = vposition()-(y()-my); // ..position above us
+ if ( p < 0 ) p = 0; // ..don't go above 0
+ vposition(p); // ..scroll to new position
+ } else if ( my > (y()+h()) ) { // Below bottom?
+ dir = FL_Down; // ..going down
+ int p = vposition()+(my-y()-h()); // ..position below us
+ if ( p > (int)_vscroll->maximum() ) // ..don't go below bottom
+ p = (int)_vscroll->maximum();
+ vposition(p); // ..scroll to new position
}
+
+ // Now handle the event..
+ // During drag, only interested in left-mouse operations.
+ //
if ( Fl::event_button() != FL_LEFT_MOUSE ) break;
- Fl_Tree_Item *item = _root->find_clicked(_prefs);
- if ( ! item ) break;
- set_item_focus(item); // becomes new focus widget
- redraw();
- ret |= 1;
- // Item's label clicked?
- if ( item->event_on_label(_prefs) &&
- (!item->widget() || !Fl::event_inside(item->widget())) &&
- (!_vscroll->visible() || !Fl::event_inside(_vscroll)) ) {
- // Handle selection behavior
- switch ( _prefs.selectmode() ) {
- case FL_TREE_SELECT_NONE:
- break; // no selection changes
- case FL_TREE_SELECT_SINGLE:
- select_only(item, when());
- _lastselect = item;
- break;
- case FL_TREE_SELECT_MULTI:
- if ( is_ctrl ) { // CTRL-DRAG: toggle?
- if ( _lastselect != item ) { // not already toggled from last microdrag?
- select_toggle(item, when()); // toggle selection
- }
- } else {
- select(item); // select this
- }
- _lastselect = item;
- break;
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *item = _root->find_clicked(_prefs, 1); // item we're on, vertically
+#else
+ Fl_Tree_Item *item = _root->find_clicked(_prefs); // item we're on, vertically
+#endif
+ if ( !item ) break; // not near item? ignore drag event
+ ret |= 1; // acknowledge event
+ if (_prefs.selectmode() != FL_TREE_SELECT_SINGLE_DRAGGABLE)
+ set_item_focus(item); // becomes new focus item
+ if (item==_lastselect) break; // same item as before? avoid reselect
+
+ // Handle selection behavior
+ switch ( _prefs.selectmode() ) {
+ case FL_TREE_SELECT_NONE:
+ break; // no selection changes
+ case FL_TREE_SELECT_SINGLE: {
+ select_only(item, when()); // select only this item (handles redraw)
+ break;
+ }
+ case FL_TREE_SELECT_SINGLE_DRAGGABLE: {
+ item = _lastselect; // Keep the source intact
+ redraw();
+ break;
+ }
+ case FL_TREE_SELECT_MULTI: {
+ Fl_Tree_Item *from = next_visible_item(_lastselect, dir); // avoid reselecting item
+ Fl_Tree_Item *to = item;
+ int val = is_ctrl ? 2 : 1; // toggle_select() or just select()?
+ bool visible = true;
+ extend_selection_dir(from, to, dir, val, visible);
+ break;
}
}
+ _lastselect = item; // save current item for later
break;
}
+ case FL_RELEASE:
+ if (_prefs.selectmode() == FL_TREE_SELECT_SINGLE_DRAGGABLE &&
+ Fl::event_button() == FL_LEFT_MOUSE) {
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *item = _root->find_clicked(_prefs, 1); // item we're on, vertically
+#else
+ Fl_Tree_Item *item = _root->find_clicked(_prefs); // item we're on, vertically
+#endif
+
+ if (item && _lastselect && item != _lastselect &&
+ Fl::event_x() >= item->label_x()) {
+ //printf("Would drag '%s' to '%s'\n", _lastselect->label(), item->label());
+ // Are we dropping above or below the target item?
+ const int h = Fl::event_y() - item->y();
+ const int mid = item->h() / 2;
+ const bool before = h < mid;
+ //printf("Dropping %s it\n", before ? "before" : "after");
+
+ // Do nothing if it would be a no-op
+ if ((before && prev(item) != _lastselect) ||
+ (!before && next(item) != _lastselect)) {
+ Fl_Tree_Item *parent = item->parent();
+
+ if (parent) {
+ int pos = parent->find_child(item);
+ if (!before)
+ pos++;
+
+ // Special case: trying to drop right before a folder
+ if (item->children() && item->is_open() && !before) {
+ parent = item;
+ pos = 0;
+ }
+
+ // If we're moving inside the same parent, use the below/above methods
+ if (_lastselect->parent() == parent) {
+ if (before) {
+ _lastselect->move_above(item);
+ } else {
+ _lastselect->move_below(item);
+ }
+ } else {
+ _lastselect->move_into(parent, pos);
+ }
+
+ redraw();
+ do_callback_for_item(_lastselect, FL_TREE_REASON_DRAGGED);
+ }
+ }
+ }
+ redraw();
+ } // End single-drag check
+ ret |= 1;
+ break;
}
return(ret);
}
+#if FLTK_ABI_VERSION >= 10303
+// nothing
+#else
+// Redraw timeout callback
+// (Only need this hack for old ABI 10302 and older)
+//
static void redraw_soon(void *data) {
((Fl_Tree*)data)->redraw();
Fl::remove_timeout(redraw_soon, data);
}
+#endif
+
+#if FLTK_ABI_VERSION >= 10303
+/// Recalculate widget dimensions and scrollbar visibility,
+/// normally managed automatically.
+///
+/// Low overhead way to update the tree widget's outer/inner dimensions
+/// and re-determine scrollbar visibility based on these changes without
+/// recalculating the entire size of the tree data.
+///
+/// Assumes that either the tree's size in _tree_w/_tree_h are correct
+/// so that scrollbar visibility can be calculated easily, or are both
+/// zero indicating scrollbar visibility can't be calculated yet.
+///
+/// This method is called when the widget is resize()ed or if the
+/// scrollbar's sizes are changed (affects tree widget's inner dimensions
+/// tix/y/w/h), and also used by calc_tree().
+/// \version 1.3.3 ABI feature
+///
+void Fl_Tree::calc_dimensions() {
+ // Calc tree outer xywh
+ // Area of the tree widget /outside/ scrollbars
+ //
+ _tox = x() + Fl::box_dx(box());
+ _toy = y() + Fl::box_dy(box());
+ _tow = w() - Fl::box_dw(box());
+ _toh = h() - Fl::box_dh(box());
+
+ // Scrollbar visiblity + positions
+ // Calc this ONLY if tree_h and tree_w have been calculated.
+ // Zero values for these indicate calc in progress, but not done yet.
+ //
+ if ( _tree_h >= 0 && _tree_w >= 0 ) {
+ int scrollsize = _scrollbar_size ? _scrollbar_size : Fl::scrollbar_size();
+ int vshow = _tree_h > _toh ? 1 : 0;
+ int hshow = _tree_w > _tow ? 1 : 0;
+ // See if one scroller's appearance affects the other's visibility
+ if ( hshow && !vshow && (_tree_h > (_toh-scrollsize)) ) vshow = 1;
+ if ( vshow && !hshow && (_tree_w > (_tow-scrollsize)) ) hshow = 1;
+ // vertical scrollbar visibility
+ if ( vshow ) {
+ _vscroll->show();
+ _vscroll->resize(_tox+_tow-scrollsize, _toy,
+ scrollsize, h()-Fl::box_dh(box()) - (hshow ? scrollsize : 0));
+ } else {
+ _vscroll->hide();
+ _vscroll->value(0);
+ }
+ // horizontal scrollbar visibility
+ if ( hshow ) {
+ _hscroll->show();
+ _hscroll->resize(_tox, _toy+_toh-scrollsize,
+ _tow - (vshow ? scrollsize : 0), scrollsize);
+ } else {
+ _hscroll->hide();
+ _hscroll->value(0);
+ }
+
+ // Calculate inner dimensions
+ // The area the tree occupies inside the scrollbars and margins
+ //
+ _tix = _tox;
+ _tiy = _toy;
+ _tiw = _tow - (_vscroll->visible() ? _vscroll->w() : 0);
+ _tih = _toh - (_hscroll->visible() ? _hscroll->h() : 0);
+
+ // Scrollbar tab sizes
+ _vscroll->slider_size(float(_tih) / float(_tree_h));
+ _vscroll->range(0.0, _tree_h - _tih);
+
+ _hscroll->slider_size(float(_tiw) / float(_tree_w));
+ _hscroll->range(0.0, _tree_w - _tiw);
+ } else {
+ // Best we can do without knowing tree_h/tree_w
+ _tix = _tox;
+ _tiy = _toy;
+ _tiw = _tow;
+ _tih = _toh;
+ }
+}
+
+/// Recalculuates the tree's sizes and scrollbar visibility,
+/// normally managed automatically.
+///
+/// On return:
+///
+/// - _tree_w will be the overall pixel width of the entire viewable tree
+/// - _tree_h will be the overall pixel height ""
+/// - scrollbar visibility and pan sizes are updated
+/// - internal _tix/_tiy/_tiw/_tih dimensions are updated
+///
+/// _tree_w/_tree_h include the tree's margins (e.g. marginleft()),
+/// whether items are open or closed, label contents and font sizes, etc.
+///
+/// The tree hierarchy's size is managed separately from the widget's
+/// size as an optimization; this way resize() on the widget doesn't
+/// involve recalculating the tree's hierarchy needlessly, as widget
+/// size has no bearing on the tree hierarchy.
+///
+/// The tree hierarchy's size only changes when items are added/removed,
+/// open/closed, label contents or font sizes changed, margins changed, etc.
+///
+/// This calculation involves walking the *entire* tree from top to bottom,
+/// a potentially a slow calculation if the tree has many items (potentially
+/// hundreds of thousands), and should therefore be called sparingly.
+///
+/// For this reason, recalc_tree() is used as a way to /schedule/
+/// calculation when changes affect the tree hierarchy's size.
+///
+/// Apps may want to call this method directly if the app makes changes
+/// to the tree's geometry, then immediately needs to work with the tree's
+/// new dimensions before an actual redraw (and recalc) occurs. (This
+/// use by an app should only rarely be needed)
+///
+void Fl_Tree::calc_tree() {
+ // Set tree width and height to zero, and recalc just _tox/_toy/_tow/_toh for now.
+ _tree_w = _tree_h = -1;
+ calc_dimensions();
+ if ( !_root ) return;
+ // Walk the tree to determine its width and height.
+ // We need this to compute scrollbars..
+ // By the end, 'Y' will be the lowest point on the tree
+ //
+ int X = _tix + _prefs.marginleft() + _hscroll->value();
+ int Y = _tiy + _prefs.margintop() - _vscroll->value();
+ int W = _tiw;
+ // Adjust root's X/W if connectors off
+ if (_prefs.connectorstyle() == FL_TREE_CONNECTOR_NONE) {
+ X -= _prefs.openicon()->w();
+ W += _prefs.openicon()->w();
+ }
+ int xmax = 0, render = 0, ytop = Y;
+ fl_font(_prefs.labelfont(), _prefs.labelsize());
+ _root->draw(X, Y, W, 0, xmax, 1, render); // descend into tree without drawing (render=0)
+ // Save computed tree width and height
+ _tree_w = _prefs.marginleft() + xmax - X; // include margin in tree's width
+ _tree_h = _prefs.margintop() + Y - ytop; // include margin in tree's height
+ // Calc tree dims again; now that tree_w/tree_h are known, scrollbars are calculated.
+ calc_dimensions();
+}
+#endif
+
+void Fl_Tree::resize(int X,int Y,int W, int H) {
+ fix_scrollbar_order();
+ Fl_Group::resize(X,Y,W,H);
+#if FLTK_ABI_VERSION >= 10303
+ calc_dimensions();
+#endif
+ init_sizes();
+}
+
+#if FLTK_ABI_VERSION >= 10303
+/// Standard FLTK draw() method, handles drawing the tree widget.
+void Fl_Tree::draw() {
+ fix_scrollbar_order();
+ // Has tree recalc been scheduled? If so, do it
+ if ( _tree_w == -1 ) calc_tree();
+ else calc_dimensions();
+ // Let group draw box+label but *NOT* children.
+ // We handle drawing children ourselves by calling each item's draw()
+ {
+ // Draw group's bg + label
+ if ( damage() & ~FL_DAMAGE_CHILD) { // redraw entire widget?
+ Fl_Group::draw_box();
+ Fl_Group::draw_label();
+ }
+ if ( ! _root ) return;
+ // These values are changed during drawing
+ // By end, 'Y' will be the lowest point on the tree
+ int X = _tix + _prefs.marginleft() - _hscroll->value();
+ int Y = _tiy + _prefs.margintop() - _vscroll->value();
+ int W = _tiw - X + _tix;
+ // Adjust root's X/W if connectors off
+ if (_prefs.connectorstyle() == FL_TREE_CONNECTOR_NONE) {
+ X -= _prefs.openicon()->w();
+ W += _prefs.openicon()->w();
+ }
+ // Draw entire tree, starting with root
+ fl_push_clip(_tix,_tiy,_tiw,_tih);
+ {
+ int xmax = 0;
+ fl_font(_prefs.labelfont(), _prefs.labelsize());
+ _root->draw(X, Y, W, // descend into tree here to draw it
+ (Fl::focus()==this)?_item_focus:0, // show focus item ONLY if Fl_Tree has focus
+ xmax, 1, 1);
+ }
+ fl_pop_clip();
+ }
+ // Draw scrollbars last
+ draw_child(*_vscroll);
+ draw_child(*_hscroll);
+ // That little tile between the scrollbars
+ if ( _vscroll->visible() && _hscroll->visible() ) {
+ fl_color(_vscroll->color());
+ fl_rectf(_hscroll->x()+_hscroll->w(),
+ _vscroll->y()+_vscroll->h(),
+ _vscroll->w(),
+ _hscroll->h());
+ }
+
+ // Draw dragging line
+ if (_prefs.selectmode() == FL_TREE_SELECT_SINGLE_DRAGGABLE &&
+ Fl::pushed() == this) {
+
+ Fl_Tree_Item *item = _root->find_clicked(_prefs, 1); // item we're on, vertically
+ if (item && item != _item_focus) {
+ // Are we dropping above or before the target item?
+ const int h = Fl::event_y() - item->y();
+ const int mid = item->h() / 2;
+ const bool before = h < mid;
+
+ fl_color(FL_BLACK);
+ int tgt;
+ if (before) {
+ tgt = item->y();
+ } else {
+ tgt = item->y() + item->h();
+ }
+ fl_line(item->x(), tgt, item->x() + item->w(), tgt);
+ }
+ }
+}
+#else
/// Standard FLTK draw() method, handles drawing the tree widget.
void Fl_Tree::draw() {
int ytoofar = draw_tree();
+
// See if we're scrolled below bottom of tree
// This can happen if someone just closed a large item.
// If so, change scroller as needed.
@@ -435,8 +859,32 @@ void Fl_Tree::draw() {
}
Fl::add_timeout(.10, redraw_soon, (void*)this); // use timer to trigger redraw; we can't
}
+
+ // Draw dragging line
+ if (_prefs.selectmode() == FL_TREE_SELECT_SINGLE_DRAGGABLE &&
+ Fl::pushed() == this) {
+
+ Fl_Tree_Item *item = _root->find_clicked(_prefs); // item we're on, vertically
+ if (item && item != _item_focus) {
+ // Are we dropping above or before the target item?
+ const int h = Fl::event_y() - item->y();
+ const int mid = item->h() / 2;
+ const bool before = h < mid;
+
+ fl_color(FL_BLACK);
+
+ int tgt;
+ if (before) {
+ tgt = item->y();
+ } else {
+ tgt = item->y() + item->h();
+ }
+ fl_line(item->x(), tgt, item->x() + item->w(), tgt);
+ }
+ }
}
+// This method is undocumented, and has been removed in ABI 1.3.3
int Fl_Tree::draw_tree() {
int ret = 0;
fix_scrollbar_order();
@@ -465,7 +913,6 @@ int Fl_Tree::draw_tree() {
W += _prefs.openicon()->w();
}
int Ysave = Y;
-
fl_push_clip(cx,cy,cw,ch);
{
fl_font(_prefs.labelfont(), _prefs.labelsize());
@@ -509,16 +956,19 @@ int Fl_Tree::draw_tree() {
draw_child(*_vscroll); // draw scroll last
return(ret);
}
+#endif
/// Print the tree as 'ascii art' to stdout.
/// Used mainly for debugging.
+/// \todo should be const
+/// \version 1.3.0
///
void Fl_Tree::show_self() {
if ( ! _root ) return;
_root->show_self();
}
-/// Set the label for the root item.
+/// Set the label for the root item to \p 'new_label'.
///
/// Makes an internally managed copy of 'new_label'.
///
@@ -532,63 +982,132 @@ Fl_Tree_Item* Fl_Tree::root() {
return(_root);
}
-/// Adds a new item, given a 'menu style' path, eg: "/Parent/Child/item".
+/// Sets the root item to \p 'newitem'.
+///
+/// If a root item already exists, clear() is first to clear it
+/// before replacing it with newitem.
+///
+#if FLTK_ABI_VERSION >= 10303
+/// Use this to install a custom item (derived from Fl_Tree_Item) as the root
+/// of the tree. This allows the derived class to implement custom drawing
+/// by overriding Fl_Tree_Item::draw_item_content().
+///
+#endif
+/// \version 1.3.3
+///
+void Fl_Tree::root(Fl_Tree_Item *newitem) {
+ if ( _root ) clear();
+ _root = newitem;
+}
+
+/// Adds a new item, given a menu style \p 'path'.
/// Any parent nodes that don't already exist are created automatically.
/// Adds the item based on the value of sortorder().
+/// If \p 'item' is NULL, a new item is created.
///
/// To specify items or submenus that contain slashes ('/' or '\')
/// use an escape character to protect them, e.g.
-///
/// \code
/// tree->add("/Holidays/Photos/12\\/25\\2010"); // Adds item "12/25/2010"
/// tree->add("/Pathnames/c:\\\\Program Files\\\\MyApp"); // Adds item "c:\Program Files\MyApp"
/// \endcode
-///
-/// \returns the child item created, or 0 on error.
-///
-Fl_Tree_Item* Fl_Tree::add(const char *path) {
- if ( ! _root ) { // Create root if none
+/// \param[in] path The path to the item, e.g. "Flintsone/Fred".
+/// \param[in] item The new item to be added.
+/// If NULL, a new item is created with
+/// a name that is the last element in \p 'path'.
+/// \returns The new item added, or 0 on error.
+/// \version 1.3.3
+///
+Fl_Tree_Item* Fl_Tree::add(const char *path, Fl_Tree_Item *item) {
+ // Tree has no root? make one
+ if ( ! _root ) {
+#if FLTK_ABI_VERSION >= 10303
+ _root = new Fl_Tree_Item(this);
+#else
_root = new Fl_Tree_Item(_prefs);
+#endif
_root->parent(0);
_root->label("ROOT");
- }
+ }
+ // Find parent item via path
char **arr = parse_path(path);
- Fl_Tree_Item *item = _root->add(_prefs, arr);
+ item = _root->add(_prefs, arr, item);
free_path(arr);
return(item);
}
-/// Add a new child to a specific item in the tree.
+#if FLTK_ABI_VERSION >= 10303
+// do nothing here: add(path,item) where item defaults to 0 takes its place
+#else
+/// Adds a new item given a menu style \p 'path'.
+/// Same as calling add(path, NULL);
+/// \param[in] path The path to the item to be created, e.g. "Flintsone/Fred".
+/// \returns The new item added, or 0 on error.
+/// \see add(const char*,Fl_Tree_Item*)
+/// \version 1.3.0 release
+///
+Fl_Tree_Item* Fl_Tree::add(const char *path) {
+ return add(path, 0);
+}
+#endif
+
+/// Add a new child item labeled \p 'name' to the specified \p 'parent_item'.
///
-/// \param[in] item The existing item to add new child to. Must not be NULL.
+/// \param[in] parent_item The parent item the new child item will be added to.
+/// Must not be NULL.
/// \param[in] name The label for the new item
-/// \returns the item that was added.
+/// \returns The new item added.
+/// \version 1.3.0 release
///
-Fl_Tree_Item* Fl_Tree::add(Fl_Tree_Item *item, const char *name) {
- return(item->add(_prefs, name));
+Fl_Tree_Item* Fl_Tree::add(Fl_Tree_Item *parent_item, const char *name) {
+ return(parent_item->add(_prefs, name));
}
-/// Inserts a new item above the specified Fl_Tree_Item, with the label set to 'name'.
+/// Inserts a new item \p 'name' above the specified Fl_Tree_Item \p 'above'.
+/// Example:
+/// \code
+/// tree->add("Aaa/000"); // "000" is index 0 in Aaa's children
+/// tree->add("Aaa/111"); // "111" is index 1 in Aaa's children
+/// tree->add("Aaa/222"); // "222" is index 2 in Aaa's children
+/// ..
+/// // How to use insert_above() to insert a new item above Aaa/222
+/// Fl_Tree_Item *item = tree->find_item("Aaa/222"); // get item Aaa/222
+/// if (item) tree->insert_above(item, "New item"); // insert new item above it
+/// \endcode
+///
/// \param[in] above -- the item above which to insert the new item. Must not be NULL.
/// \param[in] name -- the name of the new item
-/// \returns the item that was added, or 0 if 'above' could not be found.
+/// \returns The new item added, or 0 if 'above' could not be found.
+/// \see insert()
///
Fl_Tree_Item* Fl_Tree::insert_above(Fl_Tree_Item *above, const char *name) {
return(above->insert_above(_prefs, name));
}
-/// Insert a new item into a tree-item's children at a specified position.
+/// Insert a new item \p 'name' into \p 'item's children at position \p 'pos'.
+///
+/// Example:
+/// \code
+/// tree->add("Aaa/000"); // "000" is index 0 in Aaa's children
+/// tree->add("Aaa/111"); // "111" is index 1 in Aaa's children
+/// tree->add("Aaa/222"); // "222" is index 2 in Aaa's children
+/// ..
+/// // How to use insert() to insert a new item between Aaa/111 + Aaa/222
+/// Fl_Tree_Item *item = tree->find_item("Aaa"); // get parent item Aaa
+/// if (item) tree->insert(item, "New item", 2); // insert as a child of Aaa at index #2
+/// \endcode
///
/// \param[in] item The existing item to insert new child into. Must not be NULL.
/// \param[in] name The label for the new item
/// \param[in] pos The position of the new item in the child list
-/// \returns the item that was added.
+/// \returns The new item added.
+/// \see insert_above()
///
Fl_Tree_Item* Fl_Tree::insert(Fl_Tree_Item *item, const char *name, int pos) {
return(item->insert(_prefs, name, pos));
}
-/// Remove the specified \p item from the tree.
+/// Remove the specified \p 'item' from the tree.
/// \p item may not be NULL.
/// If it has children, all those are removed too.
/// If item being removed has focus, no item will have focus.
@@ -607,7 +1126,7 @@ int Fl_Tree::remove(Fl_Tree_Item *item) {
return(0);
}
-/// Clear all children from the tree.
+/// Clear the entire tree's children, including the root.
/// The tree will be left completely empty.
///
void Fl_Tree::clear() {
@@ -615,7 +1134,8 @@ void Fl_Tree::clear() {
_root->clear_children();
delete _root; _root = 0;
}
-/// Clear all the children of a particular node in the tree specified by \p item.
+
+/// Clear all the children for \p 'item'.
/// Item may not be NULL.
///
void Fl_Tree::clear_children(Fl_Tree_Item *item) {
@@ -625,7 +1145,7 @@ void Fl_Tree::clear_children(Fl_Tree_Item *item) {
}
}
-/// Find the item, given a menu style path, eg: "/Parent/Child/item".
+/// Find the item, given a menu style path, e.g. "/Parent/Child/item".
/// There is both a const and non-const version of this method.
/// Const version allows pure const methods to use this method
/// to do lookups without causing compiler errors.
@@ -639,19 +1159,9 @@ void Fl_Tree::clear_children(Fl_Tree_Item *item) {
/// \endcode
///
/// \param[in] path -- the tree item's pathname to be found (e.g. "Flintstones/Fred")
-/// \returns the item, or NULL if not found.
-///
+/// \returns The item, or NULL if not found.
/// \see item_pathname()
///
-Fl_Tree_Item *Fl_Tree::find_item(const char *path) {
- if ( ! _root ) return(NULL);
- char **arr = parse_path(path);
- Fl_Tree_Item *item = _root->find_item(arr);
- free_path(arr);
- return(item);
-}
-
-/// A const version of Fl_Tree::find_item(const char *path)
const Fl_Tree_Item *Fl_Tree::find_item(const char *path) const {
if ( ! _root ) return(NULL);
char **arr = parse_path(path);
@@ -660,6 +1170,13 @@ const Fl_Tree_Item *Fl_Tree::find_item(const char *path) const {
return(item);
}
+/// Non-const version of Fl_Tree::find_item(const char *path) const
+Fl_Tree_Item *Fl_Tree::find_item(const char *path) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree&>(*this).find_item(path)));
+}
+
// Handle safe 'reverse string concatenation'.
// In the following we build the pathname from right-to-left,
// since we start at the child and work our way up to the root.
@@ -669,13 +1186,15 @@ const Fl_Tree_Item *Fl_Tree::find_item(const char *path) const {
*s-- = c; \
}
-/// Find the pathname for the specified \p item.
-/// If \p item is NULL, root() is used.
-/// The tree's root will be included in the pathname of showroot() is on.
+/// Return \p 'pathname' of size \p 'pathnamelen' for the specified \p 'item'.
+///
+/// If \p 'item' is NULL, root() is used.<br>
+/// The tree's root will be included in the pathname of showroot() is on.<br>
/// Menu items or submenus that contain slashes ('/' or '\') in their names
/// will be escaped with a backslash. This is symmetrical with the add()
/// function which uses the same escape pattern to set names.
-/// \param[in] pathname The string to use to return the pathname
+///
+/// \param[out] pathname The string to use to return the pathname
/// \param[in] pathnamelen The maximum length of the string (including NULL). Must not be zero.
/// \param[in] item The item whose pathname is to be returned.
/// \returns
@@ -712,88 +1231,137 @@ int Fl_Tree::item_pathname(char *pathname, int pathnamelen, const Fl_Tree_Item *
return(0);
}
-/// Find the item that was clicked.
+#if FLTK_ABI_VERSION >= 10303
+/// Find the item that was last clicked on.
/// You should use callback_item() instead, which is fast,
/// and is meant to be used within a callback to determine the item clicked.
///
/// This method walks the entire tree looking for the first item that is
-/// under the mouse (ie. at Fl::event_x()/Fl:event_y().
+/// under the mouse. (The value of the \p 'yonly' flag affects whether
+/// both x and y events are checked, or just y)
///
/// Use this method /only/ if you've subclassed Fl_Tree, and are receiving
/// events before Fl_Tree has been able to process and update callback_item().
///
-/// \returns the item clicked, or 0 if no item was under the current event.
+/// \param[in] yonly -- 0: check both event's X and Y values.
+/// -- 1: only check event's Y value, don't care about X.
+/// \returns The item clicked, or NULL if no item was under the current event.
+/// \version 1.3.0
+/// \version 1.3.3 ABI feature: added yonly parameter
+///
+const Fl_Tree_Item* Fl_Tree::find_clicked(int yonly) const {
+ if ( ! _root ) return(NULL);
+ return(_root->find_clicked(_prefs, yonly));
+}
+
+/// Non-const version of Fl_Tree::find_clicked(int yonly) const.
+Fl_Tree_Item *Fl_Tree::find_clicked(int yonly) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree&>(*this).find_clicked(yonly)));
+}
+#else
+/// Find the item that was last clicked on.
+/// You should use callback_item() instead, which is fast,
+/// and is meant to be used within a callback to determine the item clicked.
+///
+/// This method walks the entire tree looking for the first item that is
+/// under the mouse, i.e. at Fl::event_x() / Fl::event_y().
+///
+/// Use this method /only/ if you've subclassed Fl_Tree, and are receiving
+/// events before Fl_Tree has been able to process and update callback_item().
+///
+/// \returns The item clicked, or NULL if no item was under the current event.
+/// \version 1.3.0
///
const Fl_Tree_Item* Fl_Tree::find_clicked() const {
if ( ! _root ) return(NULL);
return(_root->find_clicked(_prefs));
}
+/// Non-const version of Fl_Tree::find_clicked() const.
+/// \version 1.3.0
+Fl_Tree_Item *Fl_Tree::find_clicked() {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree&>(*this).find_clicked()));
+}
+#endif
+
/// Set the item that was last clicked.
/// Should only be used by subclasses needing to change this value.
/// Normally Fl_Tree manages this value.
///
-/// Deprecated: use callback_item() instead.
+/// \deprecated in 1.3.3 ABI -- use callback_item() instead.
///
-void Fl_Tree::item_clicked(Fl_Tree_Item* val) {
- _callback_item = val;
+void Fl_Tree::item_clicked(Fl_Tree_Item* item) {
+ _callback_item = item;
}
/// Return the item that was last clicked.
///
/// Valid only from within the callback().
///
-/// Deprecated: use callback_item() instead.
-///
-/// \returns the item clicked, or 0 if none.
+/// \returns The item clicked, or 0 if none.
/// 0 may also be used to indicate several items were clicked/changed.
+/// \deprecated in 1.3.3 ABI -- use callback_item() instead.
///
Fl_Tree_Item* Fl_Tree::item_clicked() {
return(_callback_item);
}
-/// Returns next visible item above (dir==Fl_Up) or below (dir==Fl_Down) the specified \p item.
-/// If \p item is 0, returns first() if \p dir is Fl_Up, or last() if \p dir is FL_Down.
+/// Returns next open(), visible item above (\p dir==FL_Up)
+/// or below (\p dir==FL_Down) the specified \p 'item', or 0 if no more items.
+///
+/// If \p 'item' is 0, returns first() if \p 'dir' is FL_Up,
+/// or last() if \p dir is FL_Down.
+///
+/// \code
+/// // Walk down the tree (forwards)
+/// for ( Fl_Tree_Item *i=tree->first_visible_item(); i; i=tree->next_visible_item(i, FL_Down) )
+/// printf("Item: %s\n", i->label());
///
+/// // Walk up the tree (backwards)
+/// for ( Fl_Tree_Item *i=tree->last_visible_item(); i; i=tree->next_visible_item(i, FL_Up) )
+/// printf("Item: %s\n", i->label());
+/// \endcode
/// \param[in] item The item above/below which we'll find the next visible item
-/// \param[in] dir The direction to search. Can be FL_Up or FL_Down.
+/// \param[in] dir The direction to search. Can be FL_Up or FL_Down.
/// \returns The item found, or 0 if there's no visible items above/below the specified \p item.
+/// \version 1.3.3
///
Fl_Tree_Item *Fl_Tree::next_visible_item(Fl_Tree_Item *item, int dir) {
- if ( ! item ) { // no start item?
- item = ( dir == FL_Up ) ? last_visible() : // wrap to bottom
- first_visible(); // wrap to top
- if ( ! item ) return(0);
- if ( item->visible_r() ) return(item); // return first/last visible item
- }
- switch ( dir ) {
- case FL_Up: return(item->prev_displayed(_prefs));
- case FL_Down: return(item->next_displayed(_prefs));
- default: return(item->next_displayed(_prefs));
- }
+ return next_item(item, dir, true);
}
-/// Returns the first item in the tree.
+/// Returns the first item in the tree, or 0 if none.
///
-/// Use this to walk the tree in the forward direction, eg:
+/// Use this to walk the tree in the forward direction, e.g.
/// \code
-/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) ) {
+/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) )
/// printf("Item: %s\n", item->label());
-/// }
/// \endcode
///
-/// \returns first item in tree, or 0 if none (tree empty).
-/// \see first(),next(),last(),prev()
+/// \returns First item in tree, or 0 if none (tree empty).
+/// \see first(), next(), last(), prev()
///
Fl_Tree_Item* Fl_Tree::first() {
- return(_root); // first item always root
+ return(_root); // first item always root
}
-/// Returns the first visible item in the tree.
-/// \returns first visible item in tree, or 0 if none.
-/// \see first_visible(), last_visible()
+/// Returns the first open(), visible item in the tree, or 0 if none.
+/// \deprecated in 1.3.3 ABI -- use first_visible_item() instead.
///
Fl_Tree_Item* Fl_Tree::first_visible() {
+ return(first_visible_item());
+}
+
+/// Returns the first open(), visible item in the tree, or 0 if none.
+/// \returns First visible item in tree, or 0 if none.
+/// \see first_visible_item(), last_visible_item(), next_visible_item()
+/// \version 1.3.3
+///
+Fl_Tree_Item* Fl_Tree::first_visible_item() {
Fl_Tree_Item *i = showroot() ? first() : next(first());
while ( i ) {
if ( i->visible() ) return(i);
@@ -802,39 +1370,36 @@ Fl_Tree_Item* Fl_Tree::first_visible() {
return(0);
}
-/// Return the next item after \p item, or 0 if no more items.
+/// Return the next item after \p 'item', or 0 if no more items.
///
/// Use this code to walk the entire tree:
/// \code
-/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->next(item) ) {
-/// printf("Item: %s\n", item->label());
-/// }
+/// for ( Fl_Tree_Item *i = tree->first(); i; i = tree->next(i) )
+/// printf("Item: %s\n", i->label());
/// \endcode
///
/// \param[in] item The item to use to find the next item. If NULL, returns 0.
/// \returns Next item in tree, or 0 if at last item.
///
-/// \see first(),next(),last(),prev()
+/// \see first(), next(), last(), prev()
///
Fl_Tree_Item *Fl_Tree::next(Fl_Tree_Item *item) {
if ( ! item ) return(0);
return(item->next());
}
-/// Return the previous item before \p item, or 0 if no more items.
-///
-/// This can be used to walk the tree in reverse, eg:
+/// Return the previous item before \p 'item', or 0 if no more items.
///
+/// This can be used to walk the tree in reverse, e.g.
/// \code
-/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->prev(item) ) {
+/// for ( Fl_Tree_Item *item = tree->first(); item; item = tree->prev(item) )
/// printf("Item: %s\n", item->label());
-/// }
/// \endcode
///
/// \param[in] item The item to use to find the previous item. If NULL, returns 0.
/// \returns Previous item in tree, or 0 if at first item.
///
-/// \see first(),next(),last(),prev()
+/// \see first(), next(), last(), prev()
///
Fl_Tree_Item *Fl_Tree::prev(Fl_Tree_Item *item) {
if ( ! item ) return(0);
@@ -843,17 +1408,15 @@ Fl_Tree_Item *Fl_Tree::prev(Fl_Tree_Item *item) {
/// Returns the last item in the tree.
///
-/// This can be used to walk the tree in reverse, eg:
+/// This can be used to walk the tree in reverse, e.g.
///
/// \code
-/// for ( Fl_Tree_Item *item = tree->last(); item; item = tree->prev() ) {
+/// for ( Fl_Tree_Item *item = tree->last(); item; item = tree->prev() )
/// printf("Item: %s\n", item->label());
-/// }
/// \endcode
///
-/// \returns last item in the tree, or 0 if none (tree empty).
-///
-/// \see first(),next(),last(),prev()
+/// \returns Last item in the tree, or 0 if none (tree empty).
+/// \see first(), next(), last(), prev()
///
Fl_Tree_Item* Fl_Tree::last() {
if ( ! _root ) return(0);
@@ -864,12 +1427,19 @@ Fl_Tree_Item* Fl_Tree::last() {
return(item);
}
-/// Returns the last visible item in the tree.
-/// \returns last visible item in the tree, or 0 if none.
-///
-/// \see first_visible(), last_visible()
+/// Returns the last open(), visible item in the tree.
+/// \deprecated in 1.3.3 -- use last_visible_item() instead.
///
Fl_Tree_Item* Fl_Tree::last_visible() {
+ return(last_visible_item());
+}
+
+/// Returns the last open(), visible item in the tree.
+/// \returns Last visible item in the tree, or 0 if none.
+/// \see first_visible_item(), last_visible_item(), next_visible_item()
+/// \version 1.3.3
+///
+Fl_Tree_Item* Fl_Tree::last_visible_item() {
Fl_Tree_Item *item = last();
while ( item ) {
if ( item->visible() ) {
@@ -886,48 +1456,216 @@ Fl_Tree_Item* Fl_Tree::last_visible() {
/// Returns the first selected item in the tree.
///
-/// Use this to walk the tree looking for all the selected items, eg:
+/// Use this to walk the tree from top to bottom
+/// looking for all the selected items, e.g.
///
/// \code
-/// for ( Fl_Tree_Item *item = tree->first_selected_item(); item; item = tree->next_selected_item(item) ) {
-/// printf("Item: %s\n", item->label());
-/// }
+/// // Walk tree forward, from top to bottom
+/// for ( Fl_Tree_Item *i=tree->first_selected_item(); i; i=tree->next_selected_item(i) )
+/// printf("Selected item: %s\n", i->label());
/// \endcode
///
-/// \returns The next selected item, or 0 if there are no more selected items.
+/// \returns The first selected item, or 0 if none.
+/// \see first_selected_item(), last_selected_item(), next_selected_item()
///
Fl_Tree_Item *Fl_Tree::first_selected_item() {
return(next_selected_item(0));
}
-/// Returns the next selected item after \p item.
+#if FLTK_ABI_VERSION >= 10303
+// nothing
+#else
+/// Returns the next selected item after \p 'item'.
/// If \p item is 0, search starts at the first item (root).
///
-/// Use this to walk the tree looking for all the selected items, eg:
+/// This is a convenience method; equivalent to next_selected_item(item, FL_Down);
+///
+/// Use this to walk the tree forward (downward) looking for all the selected items, e.g.
/// \code
-/// for ( Fl_Tree_Item *item = tree->first_selected_item(); item; item = tree->next_selected_item(item) ) {
-/// printf("Item: %s\n", item->label());
-/// }
+/// for ( Fl_Tree_Item *i = tree->first_selected_item(); i; i = tree->next_selected_item(i) )
+/// printf("Selected item: %s\n", i->label());
/// \endcode
///
/// \param[in] item The item to use to find the next selected item. If NULL, first() is used.
/// \returns The next selected item, or 0 if there are no more selected items.
+/// \see first_selected_item(), last_selected_item(), next_selected_item()
///
Fl_Tree_Item *Fl_Tree::next_selected_item(Fl_Tree_Item *item) {
- if ( ! item ) {
- if ( ! (item = first()) ) return(0);
- if ( item->is_selected() ) return(item);
+ return(next_selected_item(item, FL_Down));
+}
+#endif
+
+/// Returns the last selected item in the tree.
+///
+/// Use this to walk the tree in reverse from bottom to top
+/// looking for all the selected items, e.g.
+///
+/// \code
+/// // Walk tree in reverse, from bottom to top
+/// for ( Fl_Tree_Item *i=tree->last_selected_item(); i; i=tree->next_selected_item(i, FL_Up) )
+/// printf("Selected item: %s\n", i->label());
+/// \endcode
+///
+/// \returns The last selected item, or 0 if none.
+/// \see first_selected_item(), last_selected_item(), next_selected_item()
+/// \version 1.3.3
+///
+Fl_Tree_Item *Fl_Tree::last_selected_item() {
+ return(next_selected_item(0, FL_Up));
+}
+
+/// Returns next item after \p 'item' in direction \p 'dir'
+/// depending on \p 'visible'.
+///
+/// Next item will be above (if dir==FL_Up) or below (if dir==FL_Down).
+/// If \p 'visible' is true, only items whose parents are open() will be returned.
+/// If \p 'visible' is false, even items whose parents are close()ed will be returned.
+///
+/// If \p item is 0, the return value will be the result of this truth table:
+/// <PRE>
+/// visible=true visible=false
+/// ------------------- -------------
+/// dir=Fl_Up: last_visible_item() last()
+/// dir=Fl_Down: first_visible_item() first()
+/// </PRE>
+///
+/// \par Example use:
+/// \code
+/// // Walk down the tree showing open(), visible items
+/// for ( Fl_Tree_Item *i=tree->first_visible_item(); i; i=tree->next_item(i, FL_Down, true) )
+/// printf("Item: %s\n", i->label());
+///
+/// // Walk up the tree showing open(), visible items
+/// for ( Fl_Tree_Item *i=tree->last_visible_item(); i; i=tree->next_item(i, FL_Up, true) )
+/// printf("Item: %s\n", i->label());
+///
+/// // Walk down the tree showing all items (open or closed)
+/// for ( Fl_Tree_Item *i=tree->first(); i; i=tree->next_item(i, FL_Down, false) )
+/// printf("Item: %s\n", i->label());
+///
+/// // Walk up the tree showing all items (open or closed)
+/// for ( Fl_Tree_Item *i=tree->last(); i; i=tree->next_item(i, FL_Up, false) )
+/// printf("Item: %s\n", i->label());
+/// \endcode
+///
+/// \param[in] item The item to use to find the next item. If NULL, returns 0.
+/// \param[in] dir Can be FL_Up or FL_Down (default=FL_Down or 'next')
+/// \param[in] visible true=return only open(), visible items,<br>
+/// false=return open or closed items (default)
+/// \returns Next item in tree in the direction and visibility specified,
+/// or 0 if no more items of specified visibility in that direction.
+/// \see first(), last(), next(),<BR>
+/// first_visible_item(), last_visible_item(), next_visible_item(),<BR>
+/// first_selected_item(), last_selected_item(), next_selected_item()
+/// \version 1.3.3
+///
+Fl_Tree_Item *Fl_Tree::next_item(Fl_Tree_Item *item, int dir, bool visible) {
+ if ( ! item ) { // no start item?
+ if ( visible ) {
+ item = ( dir == FL_Up ) ? last_visible_item() : // wrap to bottom
+ first_visible_item(); // wrap to top
+ } else {
+ item = ( dir == FL_Up ) ? last() : // wrap to bottom
+ first(); // wrap to top
+ }
+ if ( ! item ) return(0);
+ if ( item->visible_r() ) return(item); // return first/last visible item
+ }
+ switch (dir) {
+ case FL_Up:
+ if ( visible ) return(item->prev_visible(_prefs));
+ else return(item->prev());
+ case FL_Down:
+ if ( visible ) return(item->next_visible(_prefs));
+ else return(item->next());
+ }
+ return(0); // unknown dir
+}
+
+/// Returns the next selected item above or below \p 'item', depending on \p 'dir'.
+/// If \p 'item' is 0, search starts at either first() or last(), depending on \p 'dir':
+/// first() if \p 'dir' is FL_Down (default), last() if \p 'dir' is FL_Up.
+///
+/// Use this to walk the tree looking for all the selected items, e.g.
+/// \code
+/// // Walk down the tree (forwards)
+/// for ( Fl_Tree_Item *i=tree->first_selected_item(); i; i=tree->next_selected_item(i, FL_Down) )
+/// printf("Item: %s\n", i->label());
+///
+/// // Walk up the tree (backwards)
+/// for ( Fl_Tree_Item *i=tree->last_selected_item(); i; i=tree->next_selected_item(i, FL_Up) )
+/// printf("Item: %s\n", i->label());
+/// \endcode
+///
+/// \param[in] item The item above or below which we'll find the next selected item.
+/// If NULL, first() is used if FL_Down, last() if FL_Up.
+/// (default=NULL)
+/// \param[in] dir The direction to go.
+/// FL_Up for moving up the tree,
+/// FL_Down for down the tree (default)
+/// \returns The next selected item, or 0 if there are no more selected items.
+/// \see first_selected_item(), last_selected_item(), next_selected_item()
+/// \version 1.3.3
+///
+Fl_Tree_Item *Fl_Tree::next_selected_item(Fl_Tree_Item *item, int dir) {
+ switch (dir) {
+ case FL_Down:
+ if ( ! item ) {
+ if ( ! (item = first()) ) return(0);
+ if ( item->is_selected() ) return(item);
+ }
+ while ( (item = item->next()) )
+ if ( item->is_selected() )
+ return(item);
+ return(0);
+ case FL_Up:
+ if ( ! item ) {
+ if ( ! (item = last()) ) return(0);
+ if ( item->is_selected() ) return(item);
+ }
+ while ( (item = item->prev()) )
+ if ( item->is_selected() )
+ return(item);
+ return(0);
}
- while ( (item = item->next()) )
- if ( item->is_selected() )
- return(item);
return(0);
}
-/// Open the specified 'item'.
-/// This causes the item's children (if any) to be shown.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+#if FLTK_ABI_VERSION >= 10303 /* reason for this: Fl_Tree_Item_Array::manage_item_destroy() */
+/// Returns the currently selected items as an array of \p 'ret_items'.
+///
+/// Example:
+/// \code
+/// // Get selected items as an array
+/// Fl_Tree_Item_Array items;
+/// tree->get_selected_items(items);
+/// // Manipulate the returned array
+/// for ( int t=0; t<items.total(); t++ ) {
+/// Fl_Tree_Item &item = items[t];
+/// ..do stuff with each selected item..
+/// }
+/// \endcode
+///
+/// \param[out] ret_items The returned array of selected items.
+/// \returns The number of items in the returned array.
+/// \see first_selected_item(), next_selected_item()
+/// \version 1.3.3 ABI feature
+///
+int Fl_Tree::get_selected_items(Fl_Tree_Item_Array &ret_items) {
+ ret_items.clear();
+ for ( Fl_Tree_Item *i=first_selected_item(); i; i=next_selected_item(i) ) {
+ ret_items.add(i);
+ }
+ return ret_items.total();
+}
+#endif
+
+/// Open the specified \p 'item'.
+///
+/// This causes the item's children (if any) to be shown.<br>
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -935,7 +1673,7 @@ Fl_Tree_Item *Fl_Tree::next_selected_item(Fl_Tree_Item *item) {
/// \param[in] item -- the item to be opened. Must not be NULL.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - callback() is not invoked
-/// - 1 - callback() is invoked if item changed,
+/// - 1 - callback() is invoked if item changed, (default)
/// callback_reason() will be FL_TREE_REASON_OPENED
/// \returns
/// - 1 -- item was opened
@@ -945,7 +1683,7 @@ Fl_Tree_Item *Fl_Tree::next_selected_item(Fl_Tree_Item *item) {
///
int Fl_Tree::open(Fl_Tree_Item *item, int docallback) {
if ( item->is_open() ) return(0);
- item->open();
+ item->open(); // handles recalc_tree()
redraw();
if ( docallback ) {
do_callback_for_item(item, FL_TREE_REASON_OPENED);
@@ -953,10 +1691,12 @@ int Fl_Tree::open(Fl_Tree_Item *item, int docallback) {
return(1);
}
-/// Opens the item specified by \p path (eg: "Parent/child/item").
-/// This causes the item's children (if any) to be shown.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Opens the item specified by \p 'path'.
+///
+/// This causes the item's children (if any) to be shown.<br>
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. open("Holidays/12\\/25\//2010").
@@ -967,24 +1707,25 @@ int Fl_Tree::open(Fl_Tree_Item *item, int docallback) {
/// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - callback() is not invoked
-/// - 1 - callback() is invoked if item changed,
+/// - 1 - callback() is invoked if item changed (default),
/// callback_reason() will be FL_TREE_REASON_OPENED
/// \returns
/// - 1 -- OK: item opened
/// - 0 -- OK: item was already open, no change
/// - -1 -- ERROR: item was not found
-///
/// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
///
int Fl_Tree::open(const char *path, int docallback) {
Fl_Tree_Item *item = find_item(path);
if ( ! item ) return(-1);
- return(open(item, docallback));
+ return(open(item, docallback)); // handles recalc_tree()
}
-/// Toggle the open state of \p item.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Toggle the open state of \p 'item'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -992,22 +1733,24 @@ int Fl_Tree::open(const char *path, int docallback) {
/// \param[in] item -- the item whose open state is to be toggled. Must not be NULL.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - callback() is not invoked
-/// - 1 - callback() is invoked, callback_reason() will be either
+/// - 1 - callback() is invoked (default), callback_reason() will be either
/// FL_TREE_REASON_OPENED or FL_TREE_REASON_CLOSED
///
/// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
///
void Fl_Tree::open_toggle(Fl_Tree_Item *item, int docallback) {
if ( item->is_open() ) {
- close(item, docallback);
+ close(item, docallback); // handles recalc_tree()
} else {
- open(item, docallback);
+ open(item, docallback); // handles recalc_tree()
}
}
-/// Closes the specified \p item.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Closes the specified \p 'item'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1015,17 +1758,16 @@ void Fl_Tree::open_toggle(Fl_Tree_Item *item, int docallback) {
/// \param[in] item -- the item to be closed. Must not be NULL.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - callback() is not invoked
-/// - 1 - callback() is invoked if item changed,
+/// - 1 - callback() is invoked if item changed (default),
/// callback_reason() will be FL_TREE_REASON_CLOSED
/// \returns
/// - 1 -- item was closed
/// - 0 -- item was already closed, no change
-///
/// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
///
int Fl_Tree::close(Fl_Tree_Item *item, int docallback) {
if ( item->is_close() ) return(0);
- item->close();
+ item->close(); // handles recalc_tree()
redraw();
if ( docallback ) {
do_callback_for_item(item, FL_TREE_REASON_CLOSED);
@@ -1033,9 +1775,11 @@ int Fl_Tree::close(Fl_Tree_Item *item, int docallback) {
return(1);
}
-/// Closes the item specified by \p path, eg: "Parent/child/item".
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Closes the item specified by \p 'path'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. close("Holidays/12\\/25\//2010").
@@ -1046,22 +1790,21 @@ int Fl_Tree::close(Fl_Tree_Item *item, int docallback) {
/// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - callback() is not invoked
-/// - 1 - callback() is invoked if item changed,
+/// - 1 - callback() is invoked if item changed (default),
/// callback_reason() will be FL_TREE_REASON_CLOSED
/// \returns
/// - 1 -- OK: item closed
/// - 0 -- OK: item was already closed, no change
/// - -1 -- ERROR: item was not found
-///
/// \see open(), close(), is_open(), is_close(), callback_item(), callback_reason()
///
int Fl_Tree::close(const char *path, int docallback) {
Fl_Tree_Item *item = find_item(path);
if ( ! item ) return(-1);
- return(close(item, docallback));
+ return(close(item, docallback)); // handles recalc_tree()
}
-/// See if \p item is open.
+/// See if \p 'item' is open.
///
/// Items that are 'open' are themselves not necessarily visible;
/// one of the item's parents might be closed.
@@ -1075,7 +1818,7 @@ int Fl_Tree::is_open(Fl_Tree_Item *item) const {
return(item->is_open()?1:0);
}
-/// See if item specified by \p path (eg: "Parent/child/item") is open.
+/// See if item specified by \p 'path' is open.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. is_open("Holidays/12\\/25\//2010").
@@ -1088,6 +1831,7 @@ int Fl_Tree::is_open(Fl_Tree_Item *item) const {
/// - 1 - OK: item is open
/// - 0 - OK: item is closed
/// - -1 - ERROR: item was not found
+/// \see Fl_Tree_Item::visible_r()
///
int Fl_Tree::is_open(const char *path) const {
const Fl_Tree_Item *item = find_item(path);
@@ -1095,7 +1839,7 @@ int Fl_Tree::is_open(const char *path) const {
return(item->is_open()?1:0);
}
-/// See if the specified \p item is closed.
+/// See if the specified \p 'item' is closed.
///
/// \param[in] item -- the item to be tested. Must not be NULL.
/// \returns
@@ -1106,7 +1850,7 @@ int Fl_Tree::is_close(Fl_Tree_Item *item) const {
return(item->is_close());
}
-/// See if item specified by \p path (eg: "Parent/child/item") is closed.
+/// See if item specified by \p 'path' is closed.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. is_close("Holidays/12\\/25\//2010").
@@ -1123,9 +1867,10 @@ int Fl_Tree::is_close(const char *path) const {
return(item->is_close()?1:0);
}
-/// Select the specified \p item. Use 'deselect()' to de-select it.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Select the specified \p 'item'. Use 'deselect()' to de-select it.
+///
+/// Invokes the callback depending on the value of optional parameter \p docallback.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1161,9 +1906,11 @@ int Fl_Tree::select(Fl_Tree_Item *item, int docallback) {
return(0);
}
-/// Select the item specified by \p path (eg: "Parent/child/item").
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Select the item specified by \p 'path'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. select("Holidays/12\\/25\//2010").
@@ -1174,7 +1921,7 @@ int Fl_Tree::select(Fl_Tree_Item *item, int docallback) {
/// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked if item changed state,
+/// - 1 - the callback() is invoked if item changed state (default),
/// callback_reason() will be FL_TREE_REASON_SELECTED
/// \returns
/// - 1 : OK: item's state was changed
@@ -1187,9 +1934,11 @@ int Fl_Tree::select(const char *path, int docallback) {
return(select(item, docallback));
}
-/// Toggle the select state of the specified \p item.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Toggle the select state of the specified \p 'item'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1197,7 +1946,7 @@ int Fl_Tree::select(const char *path, int docallback) {
/// \param[in] item -- the item to be selected. Must not be NULL.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked, callback_reason() will be
+/// - 1 - the callback() is invoked (default), callback_reason() will be
/// either FL_TREE_REASON_SELECTED or FL_TREE_REASON_DESELECTED
///
void Fl_Tree::select_toggle(Fl_Tree_Item *item, int docallback) {
@@ -1211,8 +1960,10 @@ void Fl_Tree::select_toggle(Fl_Tree_Item *item, int docallback) {
}
/// De-select the specified \p item.
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1220,7 +1971,7 @@ void Fl_Tree::select_toggle(Fl_Tree_Item *item, int docallback) {
/// \param[in] item -- the item to be selected. Must not be NULL.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked if item changed state,
+/// - 1 - the callback() is invoked if item changed state (default),
/// callback_reason() will be FL_TREE_REASON_DESELECTED
/// \returns
/// - 0 - item was already deselected, no change was made
@@ -1239,9 +1990,11 @@ int Fl_Tree::deselect(Fl_Tree_Item *item, int docallback) {
return(0);
}
-/// Deselect an item specified by \p path (eg: "Parent/child/item").
-/// Handles redrawing if anything was actually changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Deselect an item specified by \p 'path'.
+///
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. deselect("Holidays/12\\/25\//2010").
@@ -1252,7 +2005,7 @@ int Fl_Tree::deselect(Fl_Tree_Item *item, int docallback) {
/// \param[in] path -- the tree item's pathname (e.g. "Flintstones/Fred")
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked if item changed state,
+/// - 1 - the callback() is invoked if item changed state (default),
/// callback_reason() will be FL_TREE_REASON_DESELECTED
/// \returns
/// - 1 - OK: item's state was changed
@@ -1265,10 +2018,12 @@ int Fl_Tree::deselect(const char *path, int docallback) {
return(deselect(item, docallback));
}
-/// Deselect \p item and all its children.
-/// If item is NULL, first() is used.
-/// Handles calling redraw() if anything was changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Deselect \p 'item' and all its children.
+///
+/// If item is NULL, first() is used.<br>
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1277,10 +2032,9 @@ int Fl_Tree::deselect(const char *path, int docallback) {
/// If NULL, first() is used.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked for each item that changed state,
+/// - 1 - the callback() is invoked for each item that changed state (default),
/// callback_reason() will be FL_TREE_REASON_DESELECTED
-///
-/// \returns count of how many items were actually changed to the deselected state.
+/// \returns Count of how many items were actually changed to the deselected state.
///
int Fl_Tree::deselect_all(Fl_Tree_Item *item, int docallback) {
item = item ? item : first(); // NULL? use first()
@@ -1297,10 +2051,12 @@ int Fl_Tree::deselect_all(Fl_Tree_Item *item, int docallback) {
return(count);
}
-/// Select only the specified \p item, deselecting all others that might be selected.
-/// If item is 0, first() is used.
-/// Handles calling redraw() if anything was changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Select only the specified \p 'item', deselecting all others that might be selected.
+///
+/// If item is 0, first() is used.<br>
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1308,45 +2064,51 @@ int Fl_Tree::deselect_all(Fl_Tree_Item *item, int docallback) {
/// \param[in] selitem The item to be selected. If NULL, first() is used.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked for each item that changed state,
+/// - 1 - the callback() is invoked for each item that changed state (default),
/// callback_reason() will be either FL_TREE_REASON_SELECTED or
/// FL_TREE_REASON_DESELECTED
-/// \returns the number of items whose selection states were changed, if any.
+/// \returns The number of items whose selection states were changed, if any.
///
int Fl_Tree::select_only(Fl_Tree_Item *selitem, int docallback) {
selitem = selitem ? selitem : first(); // NULL? use first()
if ( ! selitem ) return(0);
int changed = 0;
+ // Deselect everything first.
+ // Prevents callbacks from seeing more than one item selected.
+ //
for ( Fl_Tree_Item *item = first(); item; item = item->next() ) {
- if ( item == selitem ) {
-#if FLTK_ABI_VERSION >= 10301
- // NEW
- if ( item->is_selected() ) { // already selected?
- if ( item_reselect_mode() == FL_TREE_SELECTABLE_ALWAYS ) {
- select(item, docallback); // handles callback with reason==reselect
- }
- continue; // leave 'changed' unmodified (nothing changed)
- }
-#else
- // OLD
- if ( item->is_selected() ) continue; // don't count if already selected
-#endif
- select(item, docallback);
+ if ( item == selitem ) continue; // don't do anything to selitem yet..
+ if ( item->is_selected() ) {
+ deselect(item, docallback);
++changed;
- } else {
- if ( item->is_selected() ) {
- deselect(item, docallback);
- ++changed;
- }
}
}
+#if FLTK_ABI_VERSION >= 10301
+ // Should we 'reselect' item if already selected?
+ if ( selitem->is_selected() && (item_reselect_mode()==FL_TREE_SELECTABLE_ALWAYS) ) {
+ // Selection unchanged, so no ++change
+ select(selitem, docallback); // do callback with reason=reselect
+ } else if ( !selitem->is_selected() ) {
+ // Item was not already selected, select and indicate changed
+ select(selitem, docallback);
+ ++changed;
+ }
+#else
+ if ( !selitem->is_selected() ) {
+ // All items deselected, now select the one we want
+ select(selitem, docallback);
+ ++changed;
+ }
+#endif
return(changed);
}
-/// Select \p item and all its children.
-/// If item is NULL, first() is used.
-/// Handles calling redraw() if anything was changed.
-/// Invokes the callback depending on the value of optional parameter \p docallback.
+/// Select \p 'item' and all its children.
+///
+/// If item is NULL, first() is used.<br>
+/// Invokes the callback depending on the value of optional
+/// parameter \p 'docallback'.<br>
+/// Handles calling redraw() if anything changed.
///
/// The callback can use callback_item() and callback_reason() respectively to determine
/// the item changed and the reason the callback was called.
@@ -1355,9 +2117,9 @@ int Fl_Tree::select_only(Fl_Tree_Item *selitem, int docallback) {
/// If NULL, first() is used.
/// \param[in] docallback -- A flag that determines if the callback() is invoked or not:
/// - 0 - the callback() is not invoked
-/// - 1 - the callback() is invoked for each item that changed state,
+/// - 1 - the callback() is invoked for each item that changed state (default),
/// callback_reason() will be FL_TREE_REASON_SELECTED
-/// \returns count of how many items were actually changed to the selected state.
+/// \returns Count of how many items were actually changed to the selected state.
///
int Fl_Tree::select_all(Fl_Tree_Item *item, int docallback) {
item = item ? item : first(); // NULL? use first()
@@ -1380,6 +2142,7 @@ Fl_Tree_Item* Fl_Tree::get_item_focus() const {
}
/// Set the item that currently should have keyboard focus.
+///
/// Handles calling redraw() to update the focus box (if it is visible).
///
/// \param[in] item The item that should take focus. If NULL, none will have focus.
@@ -1391,7 +2154,7 @@ void Fl_Tree::set_item_focus(Fl_Tree_Item *item) {
}
}
-/// See if the specified \p item is selected.
+/// See if the specified \p 'item' is selected.
///
/// \param[in] item -- the item to be tested. Must not be NULL.
///
@@ -1403,7 +2166,7 @@ int Fl_Tree::is_selected(Fl_Tree_Item *item) const {
return(item->is_selected()?1:0);
}
-/// See if item specified by \p path (eg: "Parent/child/item") is selected.
+/// See if item specified by \p 'path' is selected.
///
/// Items or submenus that themselves contain slashes ('/' or '\')
/// should be escaped, e.g. is_selected("Holidays/12\\/25\//2010").
@@ -1493,6 +2256,7 @@ int Fl_Tree::marginleft() const {
void Fl_Tree::marginleft(int val) {
_prefs.marginleft(val);
redraw();
+ recalc_tree();
}
/// Get the amount of white space (in pixels) that should appear
@@ -1508,6 +2272,7 @@ int Fl_Tree::margintop() const {
void Fl_Tree::margintop(int val) {
_prefs.margintop(val);
redraw();
+ recalc_tree();
}
#if FLTK_ABI_VERSION >= 10301
@@ -1524,6 +2289,7 @@ int Fl_Tree::marginbottom() const {
void Fl_Tree::marginbottom(int val) {
_prefs.marginbottom(val);
redraw();
+ recalc_tree();
}
#endif /*FLTK_ABI_VERSION*/
@@ -1540,6 +2306,7 @@ int Fl_Tree::linespacing() const {
void Fl_Tree::linespacing(int val) {
_prefs.linespacing(val);
redraw();
+ recalc_tree();
}
/// Get the amount of white space (in pixels) that should appear
@@ -1555,40 +2322,50 @@ int Fl_Tree::openchild_marginbottom() const {
void Fl_Tree::openchild_marginbottom(int val) {
_prefs.openchild_marginbottom(val);
redraw();
+ recalc_tree();
}
+
/// Get the amount of white space (in pixels) that should appear
/// to the left of the usericon.
int Fl_Tree::usericonmarginleft() const {
return(_prefs.usericonmarginleft());
}
+
/// Set the amount of white space (in pixels) that should appear
/// to the left of the usericon.
void Fl_Tree::usericonmarginleft(int val) {
_prefs.usericonmarginleft(val);
redraw();
+ recalc_tree();
}
+
/// Get the amount of white space (in pixels) that should appear
/// to the left of the label text.
int Fl_Tree::labelmarginleft() const {
return(_prefs.labelmarginleft());
}
+
/// Set the amount of white space (in pixels) that should appear
/// to the left of the label text.
void Fl_Tree::labelmarginleft(int val) {
_prefs.labelmarginleft(val);
redraw();
+ recalc_tree();
}
+
#if FLTK_ABI_VERSION >= 10301
/// Get the amount of white space (in pixels) that should appear
/// to the left of the child fltk widget (if any).
int Fl_Tree::widgetmarginleft() const {
return(_prefs.widgetmarginleft());
}
+
/// Set the amount of white space (in pixels) that should appear
/// to the left of the child fltk widget (if any).
void Fl_Tree::widgetmarginleft(int val) {
_prefs.widgetmarginleft(val);
redraw();
+ recalc_tree();
}
#endif /*FLTK_ABI_VERSION*/
@@ -1605,6 +2382,7 @@ int Fl_Tree::connectorwidth() const {
void Fl_Tree::connectorwidth(int val) {
_prefs.connectorwidth(val);
redraw();
+ recalc_tree();
}
/// Returns the Fl_Image being used as the default user icon for all
@@ -1627,6 +2405,7 @@ Fl_Image* Fl_Tree::usericon() const {
void Fl_Tree::usericon(Fl_Image *val) {
_prefs.usericon(val);
redraw();
+ recalc_tree();
}
/// Returns the icon to be used as the 'open' icon.
@@ -1645,6 +2424,7 @@ Fl_Image* Fl_Tree::openicon() const {
void Fl_Tree::openicon(Fl_Image *val) {
_prefs.openicon(val);
redraw();
+ recalc_tree();
}
/// Returns the icon to be used as the 'close' icon.
@@ -1663,6 +2443,7 @@ Fl_Image* Fl_Tree::closeicon() const {
void Fl_Tree::closeicon(Fl_Image *val) {
_prefs.closeicon(val);
redraw();
+ recalc_tree();
}
/// Returns 1 if the collapse icon is enabled, 0 if not.
@@ -1681,6 +2462,7 @@ int Fl_Tree::showcollapse() const {
void Fl_Tree::showcollapse(int val) {
_prefs.showcollapse(val);
redraw();
+ recalc_tree();
}
/// Returns 1 if the root item is to be shown, or 0 if not.
@@ -1695,6 +2477,7 @@ int Fl_Tree::showroot() const {
void Fl_Tree::showroot(int val) {
_prefs.showroot(val);
redraw();
+ recalc_tree();
}
/// Returns the line drawing style for inter-connecting items.
@@ -1703,13 +2486,15 @@ Fl_Tree_Connector Fl_Tree::connectorstyle() const {
}
/// Sets the line drawing style for inter-connecting items.
+/// See ::Fl_Tree_Connector for possible values.
+///
void Fl_Tree::connectorstyle(Fl_Tree_Connector val) {
_prefs.connectorstyle(val);
redraw();
}
/// Set the default sort order used when items are added to the tree.
-/// See Fl_Tree_Sort for possible values.
+/// See ::Fl_Tree_Sort for possible values.
///
Fl_Tree_Sort Fl_Tree::sortorder() const {
return(_prefs.sortorder());
@@ -1722,7 +2507,7 @@ void Fl_Tree::sortorder(Fl_Tree_Sort val) {
}
/// Sets the style of box used to draw selected items.
-/// This is an fltk Fl_Boxtype.
+/// This is an fltk ::Fl_Boxtype.
/// The default is influenced by FLTK's current Fl::scheme()
///
Fl_Boxtype Fl_Tree::selectbox() const {
@@ -1730,7 +2515,7 @@ Fl_Boxtype Fl_Tree::selectbox() const {
}
/// Gets the style of box used to draw selected items.
-/// This is an fltk Fl_Boxtype.
+/// This is an fltk ::Fl_Boxtype.
/// The default is influenced by FLTK's current Fl::scheme()
///
void Fl_Tree::selectbox(Fl_Boxtype val) {
@@ -1744,44 +2529,64 @@ Fl_Tree_Select Fl_Tree::selectmode() const {
}
/// Sets the tree's selection mode.
+/// See ::Fl_Tree_Select for possible values.
+///
void Fl_Tree::selectmode(Fl_Tree_Select val) {
_prefs.selectmode(val);
}
#if FLTK_ABI_VERSION >= 10301
-/// Returns the current item re/selection mode
+/// Returns the current item re/selection mode.
+/// \version 1.3.1 ABI feature
+///
Fl_Tree_Item_Reselect_Mode Fl_Tree::item_reselect_mode() const {
return(_prefs.item_reselect_mode());
}
/// Sets the item re/selection mode
+/// See ::Fl_Tree_Item_Reselect_Mode for possible values.
+/// \version 1.3.1 ABI feature
+///
void Fl_Tree::item_reselect_mode(Fl_Tree_Item_Reselect_Mode mode) {
_prefs.item_reselect_mode(mode);
}
/// Get the 'item draw mode' used for the tree
+/// \version 1.3.1 ABI feature
+///
Fl_Tree_Item_Draw_Mode Fl_Tree::item_draw_mode() const {
return(_prefs.item_draw_mode());
}
-/// Set the 'item draw mode' used for the tree to \p val.
-/// This affects how items in the tree are drawn,
-/// such as when a widget() is defined.
-/// See Fl_Tree_Item_Draw_Mode for possible values.
+/// Set the 'item draw mode' used for the tree to \p 'mode'.
+///
+/// This affects how items in the tree are drawn,
+/// such as when a widget() is defined.
+/// See ::Fl_Tree_Item_Draw_Mode for possible values.
+/// \version 1.3.1 ABI feature
///
-void Fl_Tree::item_draw_mode(Fl_Tree_Item_Draw_Mode val) {
- _prefs.item_draw_mode(val);
+void Fl_Tree::item_draw_mode(Fl_Tree_Item_Draw_Mode mode) {
+ _prefs.item_draw_mode(mode);
}
-void Fl_Tree::item_draw_mode(int val) {
- _prefs.item_draw_mode(Fl_Tree_Item_Draw_Mode(val));
+
+/// Set the 'item draw mode' used for the tree to integer \p 'mode'.
+///
+/// This affects how items in the tree are drawn,
+/// such as when a widget() is defined.
+/// See ::Fl_Tree_Item_Draw_Mode for possible values.
+/// \version 1.3.1 ABI feature
+///
+void Fl_Tree::item_draw_mode(int mode) {
+ _prefs.item_draw_mode(Fl_Tree_Item_Draw_Mode(mode));
}
-#endif /*FLTK_ABI_VERSION*/
+#endif
-/// See if \p item is currently displayed on-screen (visible within the widget).
+/// See if \p 'item' is currently displayed on-screen (visible within the widget).
+///
/// This can be used to detect if the item is scrolled off-screen.
/// Checks to see if the item's vertical position is within the top and bottom
-/// edges of the display window. This does NOT take into account the hide()/show()
-/// or open()/close() status of the item.
+/// edges of the display window. This does NOT take into account the hide() / show()
+/// or open() / close() status of the item.
///
/// \param[in] item The item to be checked. If NULL, first() is used.
/// \returns 1 if displayed, 0 if scrolled off screen or no items are in tree.
@@ -1792,8 +2597,8 @@ int Fl_Tree::displayed(Fl_Tree_Item *item) {
return( (item->y() >= y()) && (item->y() <= (y()+h()-item->h())) ? 1 : 0);
}
-/// Adjust the vertical scroll bar so that \p item is visible
-/// \p yoff pixels from the top of the Fl_Tree widget's display.
+/// Adjust the vertical scroll bar so that \p 'item' is visible
+/// \p 'yoff' pixels from the top of the Fl_Tree widget's display.
///
/// For instance, yoff=0 will position the item at the top.
///
@@ -1816,7 +2621,7 @@ void Fl_Tree::show_item(Fl_Tree_Item *item, int yoff) {
redraw();
}
-/// Adjust the vertical scroll bar to show \p item at the top
+/// Adjust the vertical scroll bar to show \p 'item' at the top
/// of the display IF it is currently off-screen (e.g. show_item_top()).
/// If it is already on-screen, no change is made.
///
@@ -1831,7 +2636,7 @@ void Fl_Tree::show_item(Fl_Tree_Item *item) {
show_item_top(item);
}
-/// Adjust the vertical scrollbar so that \p item is at the top of the display.
+/// Adjust the vertical scrollbar so that \p 'item' is at the top of the display.
///
/// \param[in] item The item to be shown. If NULL, first() is used.
///
@@ -1840,25 +2645,33 @@ void Fl_Tree::show_item_top(Fl_Tree_Item *item) {
if (item) show_item(item, 0);
}
-/// Adjust the vertical scrollbar so that \p item is in the middle of the display.
+/// Adjust the vertical scrollbar so that \p 'item' is in the middle of the display.
///
/// \param[in] item The item to be shown. If NULL, first() is used.
///
void Fl_Tree::show_item_middle(Fl_Tree_Item *item) {
item = item ? item : first();
+#if FLTK_ABI_VERSION >= 10303
+ if (item) show_item(item, (_tih/2)-(item->h()/2));
+#else
if (item) show_item(item, (h()/2)-(item->h()/2));
+#endif
}
-/// Adjust the vertical scrollbar so that \p item is at the bottom of the display.
+/// Adjust the vertical scrollbar so that \p 'item' is at the bottom of the display.
///
/// \param[in] item The item to be shown. If NULL, first() is used.
///
void Fl_Tree::show_item_bottom(Fl_Tree_Item *item) {
item = item ? item : first();
+#if FLTK_ABI_VERSION >= 10303
+ if (item) show_item(item, _tih-item->h());
+#else
if (item) show_item(item, h()-item->h());
+#endif
}
-/// Displays \p item, scrolling the tree as necessary.
+/// Displays \p 'item', scrolling the tree as necessary.
/// \param[in] item The item to be displayed. If NULL, first() is used.
///
void Fl_Tree::display(Fl_Tree_Item *item) {
@@ -1868,19 +2681,17 @@ void Fl_Tree::display(Fl_Tree_Item *item) {
/// Returns the vertical scroll position as a pixel offset.
/// The position returned is how many pixels of the tree are scrolled off the top edge
-/// of the screen. Example: A position of '3' indicates the top 3 pixels of
-/// the tree are scrolled off the top edge of the screen.
+/// of the screen.
/// \see vposition(), hposition()
///
int Fl_Tree::vposition() const {
return((int)_vscroll->value());
}
-/// Sets the vertical scroll offset to position \p pos.
-/// The position is how many pixels of the tree are scrolled off the top edge
-/// of the screen. Example: A position of '3' scrolls the top three pixels of
-/// the tree off the top edge of the screen.
-/// \param[in] pos The vertical position (in pixels) to scroll the browser to.
+/// Sets the vertical scroll offset to position \p 'pos'.
+/// The position is how many pixels of the tree are scrolled off the top edge
+/// of the screen.
+/// \param[in] pos The vertical position (in pixels) to scroll the browser to.
///
void Fl_Tree::vposition(int pos) {
if (pos < 0) pos = 0;
@@ -1890,7 +2701,37 @@ void Fl_Tree::vposition(int pos) {
redraw();
}
-/// See if widget \p w is one of the Fl_Tree widget's scrollbars.
+/// Returns the horizontal scroll position as a pixel offset.
+/// The position returned is how many pixels of the tree are scrolled off the left edge
+/// of the screen.
+/// \see vposition(), hposition()
+/// \note Must be using FLTK ABI 1.3.3 or higher for this to be effective.
+///
+int Fl_Tree::hposition() const {
+#if FLTK_ABI_VERSION >= 10303
+ return((int)_hscroll->value());
+#else
+ return(0);
+#endif
+}
+
+/// Sets the horizontal scroll offset to position \p 'pos'.
+/// The position is how many pixels of the tree are scrolled off the left edge
+/// of the screen.
+/// \param[in] pos The vertical position (in pixels) to scroll the browser to.
+/// \note Must be using FLTK ABI 1.3.3 or higher for this to be effective.
+///
+void Fl_Tree::hposition(int pos) {
+#if FLTK_ABI_VERSION >= 10303
+ if (pos < 0) pos = 0;
+ if (pos > _hscroll->maximum()) pos = (int)_hscroll->maximum();
+ if (pos == _hscroll->value()) return;
+ _hscroll->value(pos);
+ redraw();
+#endif
+}
+
+/// See if widget \p 'w' is one of the Fl_Tree widget's scrollbars.
/// Use this to skip over the scrollbars when walking the child() array. Example:
/// \code
/// for ( int i=0; i<tree->children(); i++ ) { // walk children
@@ -1901,12 +2742,18 @@ void Fl_Tree::vposition(int pos) {
/// \endcode
/// \param[in] w Widget to test
/// \returns 1 if \p w is a scrollbar, 0 if not.
+/// \todo should be const
///
int Fl_Tree::is_scrollbar(Fl_Widget *w) {
- return( ( w == _vscroll ) ? 1 : 0 );
+#if FLTK_ABI_VERSION >= 10303
+ return( (w==_vscroll || w==_hscroll) ? 1 : 0 );
+#else
+ return( (w==_vscroll) ? 1 : 0 );
+#endif
}
-/// Gets the current size of the scrollbars' troughs, in pixels.
+/// Gets the default size of scrollbars' troughs for this widget
+/// in pixels.
///
/// If this value is zero (default), this widget will use the global
/// Fl::scrollbar_size() value as the scrollbar's width.
@@ -1918,16 +2765,17 @@ int Fl_Tree::scrollbar_size() const {
return(_scrollbar_size);
}
-/// Sets the pixel size of the scrollbars' troughs to the \p size, in pixels.
+/// Sets the pixel size of the scrollbars' troughs to \p 'size'
+/// for this widget, in pixels.
///
/// Normally you should not need this method, and should use the global
/// Fl::scrollbar_size(int) instead to manage the size of ALL
/// your widgets' scrollbars. This ensures your application
-/// has a consistent UI, is the default behavior, and is normally
-/// what you want.
+/// has a consistent UI, and is the default behavior. Normally
+/// this is what you want.
///
-/// Only use THIS method if you really need to override the global
-/// scrollbar size. The need for this should be rare.
+/// Only use this method if you really need to override just THIS
+/// instance of the widget's scrollbar size. (This need should be rare.)
///
/// Setting \p size to the special value of 0 causes the widget to
/// track the global Fl::scrollbar_size(), which is the default.
@@ -1942,15 +2790,37 @@ void Fl_Tree::scrollbar_size(int size) {
if ( _vscroll->w() != scrollsize ) {
_vscroll->resize(x()+w()-scrollsize, h(), scrollsize, _vscroll->h());
}
+#if FLTK_ABI_VERSION >= 10303
+ if ( _hscroll->h() != scrollsize ) {
+ _hscroll->resize(x(), y()+h()-scrollsize, _hscroll->w(), scrollsize);
+ }
+ // Changing scrollbar size affects _tiw/_tih + may affect scrollbar visibility
+ calc_dimensions();
+#endif
}
/// See if the vertical scrollbar is currently visible.
/// \returns 1 if scrollbar visible, 0 if not.
+///
int Fl_Tree::is_vscroll_visible() const {
return(_vscroll->visible() ? 1 : 0);
}
-/// Do the callback for the item, setting the item and reason
+/// See if the horizontal scrollbar is currently visible.
+/// \returns 1 if scrollbar visible, 0 if not.
+/// \note Must be using FLTK ABI 1.3.3 or higher for this to be effective.
+///
+int Fl_Tree::is_hscroll_visible() const {
+#if FLTK_ABI_VERSION >= 10303
+ return(_hscroll->visible() ? 1 : 0);
+#else
+ return 0;
+#endif
+}
+
+/// Do the callback for the specified \p 'item' using \p 'reason',
+/// setting the callback_item() and callback_reason().
+///
void Fl_Tree::do_callback_for_item(Fl_Tree_Item* item, Fl_Tree_Reason reason) {
callback_reason(reason);
callback_item(item);
@@ -1958,7 +2828,7 @@ void Fl_Tree::do_callback_for_item(Fl_Tree_Item* item, Fl_Tree_Reason reason) {
}
/// Sets the item that was changed for this callback.
-/// Used internally to pass the item that invoked the callback.
+/// Used internally to pass the item that invoked the callback.
///
void Fl_Tree::callback_item(Fl_Tree_Item* item) {
_callback_item = item;
@@ -2007,8 +2877,7 @@ Fl_Tree_Reason Fl_Tree::callback_reason() const {
* directly loaded into the tree view for inspection.
* \param[in] prefs the Fl_Preferences database
*/
-void Fl_Tree::load(Fl_Preferences &prefs)
-{
+void Fl_Tree::load(Fl_Preferences &prefs) {
int i, j, n, pn = (int) strlen(prefs.path());
char *p;
const char *path = prefs.path();
@@ -2056,13 +2925,30 @@ void Fl_Tree::fix_scrollbar_order() {
Fl_Widget** a = (Fl_Widget**)array();
if (a[children()-1] != _vscroll) {
int i,j;
+#if FLTK_ABI_VERSION >= 10303
+ for (i = j = 0; j < children(); j++) {
+ if (a[j] != _vscroll && a[j] != _hscroll ) a[i++] = a[j];
+ }
+ a[i++] = _hscroll;
+ a[i++] = _vscroll;
+#else
for (i = j = 0; j < children(); j++) {
if (a[j] != _vscroll) a[i++] = a[j];
}
a[i++] = _vscroll;
+#endif
}
}
+/// Schedule tree to recalc the entire tree size.
+/// \note Must be using FLTK ABI 1.3.3 or higher for this to be effective.
+///
+void Fl_Tree::recalc_tree() {
+#if FLTK_ABI_VERSION >= 10303
+ _tree_w = _tree_h = -1;
+#endif
+}
+
//
-// End of "$Id: Fl_Tree.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree.cxx 10275 2014-09-05 12:04:28Z cand $".
//
diff --git a/src/Fl_Tree_Item.cxx b/src/Fl_Tree_Item.cxx
index 81cb47b..d08494e 100644
--- a/src/Fl_Tree_Item.cxx
+++ b/src/Fl_Tree_Item.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Item.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Item.cxx 10272 2014-09-05 02:59:00Z greg.ercolano $"
//
#include <stdio.h>
@@ -35,9 +35,22 @@ static int event_inside(const int xywh[4]) {
}
/// Constructor.
-/// Makes a new instance of Fl_Tree_Item using defaults from 'prefs'.
+/// Makes a new instance of Fl_Tree_Item using defaults from \p 'prefs'.
+#if FLTK_ABI_VERSION >= 10303
+/// \deprecated in 1.3.3 ABI -- you must use Fl_Tree_Item(Fl_Tree*) for proper horizontal scrollbar behavior.
+#endif
///
Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) {
+ _Init(prefs, 0);
+}
+
+// Initialize the tree item
+// Used by constructors
+//
+void Fl_Tree_Item::_Init(const Fl_Tree_Prefs &prefs, Fl_Tree *tree) {
+#if FLTK_ABI_VERSION >= 10303
+ _tree = tree;
+#endif
_label = 0;
_labelfont = prefs.labelfont();
_labelsize = prefs.labelsize();
@@ -67,12 +80,29 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Prefs &prefs) {
_usericon = 0;
_userdata = 0;
_parent = 0;
+#if FLTK_ABI_VERSION >= 10303
+ _children.manage_item_destroy(1); // let array's dtor manage destroying Fl_Tree_Items
+#endif
#if FLTK_ABI_VERSION >= 10301
_prev_sibling = 0;
_next_sibling = 0;
#endif /*FLTK_ABI_VERSION*/
}
+#if FLTK_ABI_VERSION >= 10303
+/// Constructor.
+/// Makes a new instance of Fl_Tree_Item for \p 'tree'.
+///
+/// This must be used instead of the older, deprecated Fl_Tree_Item(Fl_Tree_Prefs)
+/// constructor for proper horizontal scrollbar calculation.
+///
+/// \version 1.3.3 ABI feature
+///
+Fl_Tree_Item::Fl_Tree_Item(Fl_Tree *tree) {
+ _Init(tree->_prefs, tree);
+}
+#endif
+
// DTOR
Fl_Tree_Item::~Fl_Tree_Item() {
if ( _label ) {
@@ -86,6 +116,9 @@ Fl_Tree_Item::~Fl_Tree_Item() {
/// Copy constructor.
Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) {
+#if FLTK_ABI_VERSION >= 10303
+ _tree = o->_tree;
+#endif
_label = o->label() ? strdup(o->label()) : 0;
_labelfont = o->labelfont();
_labelsize = o->labelsize();
@@ -125,31 +158,34 @@ Fl_Tree_Item::Fl_Tree_Item(const Fl_Tree_Item *o) {
/// Used mainly for debugging.
///
void Fl_Tree_Item::show_self(const char *indent) const {
- if ( label() ) {
+ const char *thelabel = label() ? label() : "(NULL)";
#if FLTK_ABI_VERSION >= 10301
- printf("%s-%s (%d children, this=%p, parent=%p, prev=%p, next=%p, depth=%d)\n",
- indent,label(),children(),(void*)this, (void*)_parent,
- _prev_sibling, _next_sibling, depth());
+ printf("%s-%s (%d children, this=%p, parent=%p, prev=%p, next=%p, depth=%d)\n",
+ indent,thelabel,children(),(void*)this, (void*)_parent,
+ _prev_sibling, _next_sibling, depth());
#else /*FLTK_ABI_VERSION*/
- printf("%s-%s (%d children, this=%p, parent=%p depth=%d)\n",
- indent,label(),children(),(void*)this, (void*)_parent, depth());
+ printf("%s-%s (%d children, this=%p, parent=%p depth=%d)\n",
+ indent,thelabel,children(),(void*)this, (void*)_parent, depth());
#endif /*FLTK_ABI_VERSION*/
- }
if ( children() ) {
- char *i2 = (char*)malloc(strlen(indent) + 2);
+ char *i2 = new char [strlen(indent)+2];
strcpy(i2, indent);
strcat(i2, " |");
for ( int t=0; t<children(); t++ ) {
child(t)->show_self(i2);
}
+ delete[] i2;
}
fflush(stdout);
}
-/// Set the label. Makes a copy of the name.
+/// Set the label to \p 'name'.
+/// Makes and manages an internal copy of \p 'name'.
+///
void Fl_Tree_Item::label(const char *name) {
if ( _label ) { free((void*)_label); _label = 0; }
_label = name ? strdup(name) : 0;
+ recalc_tree(); // may change label geometry
}
/// Return the label.
@@ -157,7 +193,7 @@ const char *Fl_Tree_Item::label() const {
return(_label);
}
-/// Return child item for the specified 'index'.
+/// Return const child item for the specified 'index'.
const Fl_Tree_Item *Fl_Tree_Item::child(int index) const {
return(_children[index]);
}
@@ -165,51 +201,55 @@ const Fl_Tree_Item *Fl_Tree_Item::child(int index) const {
/// Clear all the children for this item.
void Fl_Tree_Item::clear_children() {
_children.clear();
+ recalc_tree(); // may change tree geometry
}
-/// Return the index of the immediate child of this item that has the label 'name'.
+/// Return the index of the immediate child of this item
+/// that has the label \p 'name'.
///
/// \returns index of found item, or -1 if not found.
+/// \version 1.3.0 release
///
int Fl_Tree_Item::find_child(const char *name) {
if ( name ) {
- for ( int t=0; t<children(); t++ ) {
- if ( child(t)->label() ) {
- if ( strcmp(child(t)->label(), name) == 0 ) {
+ for ( int t=0; t<children(); t++ )
+ if ( child(t)->label() )
+ if ( strcmp(child(t)->label(), name) == 0 )
return(t);
- }
- }
- }
}
return(-1);
}
-/// Find child item by descending array of names. Does not include self in search.
-/// Only Fl_Tree should need this method.
+/// Return the /immediate/ child of current item
+/// that has the label \p 'name'.
///
-/// \returns item, or 0 if not found
+/// \returns const found item, or 0 if not found.
+/// \version 1.3.3
///
-const Fl_Tree_Item *Fl_Tree_Item::find_child_item(char **arr) const {
- for ( int t=0; t<children(); t++ ) {
- if ( child(t)->label() ) {
- if ( strcmp(child(t)->label(), *arr) == 0 ) { // match?
- if ( *(arr+1) ) { // more in arr? descend
- return(_children[t]->find_item(arr+1));
- } else { // end of arr? done
- return(_children[t]);
- }
- }
- }
- }
+const Fl_Tree_Item* Fl_Tree_Item::find_child_item(const char *name) const {
+ if ( name )
+ for ( int t=0; t<children(); t++ )
+ if ( child(t)->label() )
+ if ( strcmp(child(t)->label(), name) == 0 )
+ return(child(t));
return(0);
}
-/// Find child item by descending array of names. Does not include self in search.
-/// Only Fl_Tree should need this method. Use Fl_Tree::find_item() instead.
+/// Non-const version of Fl_Tree_Item::find_child_item(const char *name) const.
+Fl_Tree_Item* Fl_Tree_Item::find_child_item(const char *name) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree_Item &>(*this).find_child_item(name)));
+}
+
+/// Find child item by descending array \p 'arr' of names.
+/// Does not include self in search.
+/// Only Fl_Tree should need this method.
///
/// \returns item, or 0 if not found
+/// \version 1.3.0 release
///
-Fl_Tree_Item *Fl_Tree_Item::find_child_item(char **arr) {
+const Fl_Tree_Item *Fl_Tree_Item::find_child_item(char **arr) const {
for ( int t=0; t<children(); t++ ) {
if ( child(t)->label() ) {
if ( strcmp(child(t)->label(), *arr) == 0 ) { // match?
@@ -224,16 +264,24 @@ Fl_Tree_Item *Fl_Tree_Item::find_child_item(char **arr) {
return(0);
}
-/// Find item by descending array of \p names. Includes self in search.
+/// Non-const version of Fl_Tree_Item::find_child_item(char **arr) const.
+Fl_Tree_Item *Fl_Tree_Item::find_child_item(char **arr) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree_Item &>(*this).find_child_item(arr)));
+}
+
+/// Find item by descending array of \p 'names'.
+/// Includes self in search.
/// Only Fl_Tree should need this method. Use Fl_Tree::find_item() instead.
///
-/// \returns item, or 0 if not found
+/// \returns const item, or 0 if not found
///
const Fl_Tree_Item *Fl_Tree_Item::find_item(char **names) const {
+ if ( ! *names ) return(0);
if ( label() && strcmp(label(), *names) == 0 ) { // match self?
- if ( *(names+1) == 0 ) { // end of names,
- return(this); // found ourself.
- }
+ ++names; // skip self
+ if ( *names == 0 ) return(this); // end of names, found ourself
}
if ( children() ) { // check children..
return(find_child_item(names));
@@ -241,44 +289,56 @@ const Fl_Tree_Item *Fl_Tree_Item::find_item(char **names) const {
return(0);
}
-/// Find item by descending array of \p names. Includes self in search.
-/// Only Fl_Tree should need this method.
-///
-/// \returns item, or 0 if not found
-///
+/// Non-const version of Fl_Tree_Item::find_item(char **names) const.
Fl_Tree_Item *Fl_Tree_Item::find_item(char **names) {
- if ( label() && strcmp(label(), *names) == 0 ) { // match self?
- if ( *(names+1) == 0 ) { // end of names,
- return(this); // found ourself.
- }
- }
- if ( children() ) { // check children..
- return(find_child_item(names));
- }
- return(0);
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree_Item &>(*this).find_item(names)));
}
-/// Find the index number for the specified 'item'
+/// Find the index number for the specified \p 'item'
/// in the current item's list of children.
///
/// \returns the index, or -1 if not found.
///
int Fl_Tree_Item::find_child(Fl_Tree_Item *item) {
- for ( int t=0; t<children(); t++ ) {
- if ( item == child(t) ) {
+ for ( int t=0; t<children(); t++ )
+ if ( item == child(t) )
return(t);
- }
- }
return(-1);
}
-/// Add a new child to this item with the name 'new_label', with defaults from 'prefs'.
+/// Add a new child to this item with the name \p 'new_label'
+/// and defaults from \p 'prefs'.
/// An internally managed copy is made of the label string.
/// Adds the item based on the value of prefs.sortorder().
+/// \returns the item added
+/// \version 1.3.0 release
///
-Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs, const char *new_label) {
- Fl_Tree_Item *item = new Fl_Tree_Item(prefs);
- item->label(new_label);
+Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs,
+ const char *new_label) {
+ return(add(prefs, new_label, (Fl_Tree_Item*)0));
+}
+
+/// Add \p 'item' as immediate child with \p 'new_label'
+/// and defaults from \p 'prefs'.
+/// If \p 'item' is NULL, a new item is created.
+/// An internally managed copy is made of the label string.
+/// Adds the item based on the value of prefs.sortorder().
+/// \returns the item added
+/// \version 1.3.3
+///
+Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs,
+ const char *new_label,
+ Fl_Tree_Item *item) {
+#if FLTK_ABI_VERSION >= 10303
+ if ( !item )
+ { item = new Fl_Tree_Item(_tree); item->label(new_label); }
+#else
+ if ( !item )
+ { item = new Fl_Tree_Item(prefs); item->label(new_label); }
+#endif
+ recalc_tree(); // may change tree geometry
item->_parent = this;
switch ( prefs.sortorder() ) {
case FL_TREE_SORT_NONE: {
@@ -311,38 +371,73 @@ Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs, const char *new_labe
return(item);
}
-/// Descend into the path specified by \p arr, and add a new child there.
+/// Descend into the path specified by \p 'arr', and add a new child there.
/// Should be used only by Fl_Tree's internals.
/// Adds the item based on the value of prefs.sortorder().
/// \returns the item added.
+/// \version 1.3.0 release
///
Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs, char **arr) {
- int t = (*arr && *(arr+1)) ? find_child(*arr) : -1;
- Fl_Tree_Item *item = 0;
- if ( t == -1 ) {
- item = (Fl_Tree_Item*)add(prefs, *arr);
- } else {
- item = (Fl_Tree_Item*)child(t);
- }
- if ( *(arr+1) ) { // descend?
- return(item->add(prefs, arr+1));
- } else {
- return(item); // end? done
+ return add(prefs, arr, 0);
+}
+
+/// Descend into path specified by \p 'arr' and add \p 'newitem' there.
+/// Should be used only by Fl_Tree's internals.
+/// If item is NULL, a new item is created.
+/// Adds the item based on the value of prefs.sortorder().
+/// \returns the item added.
+/// \version 1.3.3 ABI feature
+///
+Fl_Tree_Item *Fl_Tree_Item::add(const Fl_Tree_Prefs &prefs,
+ char **arr,
+ Fl_Tree_Item *newitem) {
+ if ( !*arr ) return 0;
+ // See if we can find an existing child with name requested.
+ Fl_Tree_Item *child = find_child_item(*arr);
+ if ( child ) { // Child found?
+ if ( *(arr+1) == 0 ) { // ..and at end of path?
+ if ( !newitem ) { // ..and no item specified?
+ return 0; // ..error: child exists already
+ } else {
+ // Child found, end of path, item specified
+ return child->add(prefs, newitem->label(), newitem);
+ }
+ }
+ // Child found: more path elements to go or item specified?
+ // Descend into child to handle add..
+ return child->add(prefs, arr+1, newitem); // recurse
}
+ // No child found, see if we reached end of path.
+ // If so, add as an immediate child, done
+ if ( *(arr+1) == 0 ) // end of path?
+ return add(prefs, *arr, newitem); // add as immediate child
+
+ // No child found, but more to path?
+ // If so, create new child to handle add()
+ Fl_Tree_Item *newchild;
+ return (newchild=add(prefs, *arr)) // create new immediate child
+ ? newchild->add(prefs,arr+1,newitem) // it worked? recurse to add
+ : 0; // failed? error
}
-/// Insert a new item into current item's children at a specified position.
+/// Insert a new item named \p 'new_label' into current item's
+/// children at a specified position \p 'pos'.
/// \returns the new item inserted.
///
Fl_Tree_Item *Fl_Tree_Item::insert(const Fl_Tree_Prefs &prefs, const char *new_label, int pos) {
+#if FLTK_ABI_VERSION >= 10303
+ Fl_Tree_Item *item = new Fl_Tree_Item(_tree);
+#else
Fl_Tree_Item *item = new Fl_Tree_Item(prefs);
+#endif
item->label(new_label);
item->_parent = this;
_children.insert(pos, item);
+ recalc_tree(); // may change tree geometry
return(item);
}
-/// Insert a new item above this item.
+/// Insert a new item named \p 'new_label' above this item.
/// \returns the new item inserted, or 0 if an error occurred.
///
Fl_Tree_Item *Fl_Tree_Item::insert_above(const Fl_Tree_Prefs &prefs, const char *new_label) {
@@ -358,28 +453,231 @@ Fl_Tree_Item *Fl_Tree_Item::insert_above(const Fl_Tree_Prefs &prefs, const char
return(0);
}
-/// Remove child by item.
-/// \returns 0 if removed, -1 if item not an immediate child.
+/// Deparent child at index position \p 'pos'.
+/// This creates an "orphaned" item that is still allocated,
+/// but has no parent or siblings. Normally the caller would
+/// want to immediately reparent the orphan elsewhere.
+///
+/// A successfully orphaned item will have its parent()
+/// and prev_sibling()/next_sibling() set to NULL.
+///
+/// \returns
+/// - pointer to orphaned item on success
+/// - NULL on error (could not deparent the item)
+///
+Fl_Tree_Item* Fl_Tree_Item::deparent(int pos) {
+ Fl_Tree_Item *orphan = _children[pos];
+ if ( _children.deparent(pos) < 0 ) return NULL;
+ return orphan;
+}
+
+/// Reparent specified item as a child of ourself at position \p 'pos'.
+/// Typically 'newchild' was recently orphaned with deparent().
+///
+/// \returns
+/// - 0: on success
+/// - -1: on error (e.g. if \p 'pos' out of range)
+///
+int Fl_Tree_Item::reparent(Fl_Tree_Item *newchild, int pos) {
+ int ret;
+ if ( (ret = _children.reparent(newchild, this, pos)) < 0 ) return ret;
+ newchild->parent(this); // take custody
+ return 0;
+}
+
+/// Move the item 'to' to sibling position of 'from'.
+///
+/// \returns
+/// - 0: Success
+/// - -1: range error (e.g. if \p 'to' or \p 'from' out of range).
+/// - (Other return values reserved for future use)
+///
+int Fl_Tree_Item::move(int to, int from) {
+ return _children.move(to, from);
+}
+
+/// Move the current item above/below/into the specified 'item',
+/// where \p 'op' determines the type of move:
+///
+/// - 0: move above \p 'item' (\p 'pos' ignored)
+/// - 1: move below \p 'item' (\p 'pos' ignored)
+/// - 2: move into \p 'item' as a child (at optional position \p 'pos')
+///
+/// \returns 0 on success. a negative number on error:
+/// - -1: one of the items has no parent
+/// - -2: item's index could not be determined
+/// - -3: bad 'op'
+/// - -4: index range error
+/// - -5: could not deparent
+/// - -6: could not reparent at \p 'pos'
+/// - (Other return values reserved for future use.)
+///
+int Fl_Tree_Item::move(Fl_Tree_Item *item, int op, int pos) {
+ Fl_Tree_Item *from_parent, *to_parent;
+ int from, to;
+ switch (op) {
+ case 0: // "above"
+ from_parent = this->parent();
+ to_parent = item->parent();
+ from = from_parent->find_child(this);
+ to = to_parent->find_child(item);
+ break;
+ case 1: // "below"
+ from_parent = this->parent();
+ to_parent = item->parent();
+ from = from_parent->find_child(this);
+ to = to_parent->find_child(item);
+ break;
+ case 2: // "into"
+ from_parent = this->parent();
+ to_parent = item;
+ from = from_parent->find_child(this);
+ to = pos;
+ break;
+ default:
+ return -3;
+ }
+ if ( !from_parent || !to_parent ) return -1;
+ if ( from < 0 || to < 0 ) return -2;
+ if ( from_parent == to_parent ) { // same parent?
+ switch (op) { // 'to' offsets due to scroll
+ case 0: if ( from < to && to > 0 ) --to; break;
+ case 1: if ( from > to && to < to_parent->children() ) ++to; break;
+ }
+ if ( from_parent->move(to, from) < 0 ) // simple move among siblings
+ return -4;
+ } else { // different parent?
+ if ( to > to_parent->children() ) // try to prevent a reparent() error
+ return -4;
+ if ( from_parent->deparent(from) < 0 ) // deparent self from current parent
+ return -5;
+ if ( to_parent->reparent(this, to) < 0 ) { // reparent self to new parent at position 'to'
+ to_parent->reparent(this, 0); // failed? shouldn't happen, reparent at 0
+ return -6;
+ }
+ }
+ return 0;
+}
+
+/// Move the current item above the specified 'item'.
+/// This is the equivalent of calling move(item,0,0).
+///
+/// \returns 0 on success.<br>
+/// On error returns a negative value;
+/// see move(Fl_Tree_Item*,int,int) for possible error codes.
+///
+int Fl_Tree_Item::move_above(Fl_Tree_Item *item) {
+ return move(item, 0, 0);
+}
+
+/// Move the current item below the specified 'item'.
+/// This is the equivalent of calling move(item,1,0).
+///
+/// \returns 0 on success.<br>
+/// On error returns a negative value;
+/// see move(Fl_Tree_Item*,int,int) for possible error codes.
+///
+int Fl_Tree_Item::move_below(Fl_Tree_Item *item) {
+ return move(item, 1, 0);
+}
+
+/// Parent the current item as a child of the specified \p 'item'.
+/// This is the equivalent of calling move(item,2,pos).
+///
+/// \returns 0 on success.<br>
+/// On error returns a negative value;
+/// see move(Fl_Tree_Item*,int,int) for possible error codes.
+///
+int Fl_Tree_Item::move_into(Fl_Tree_Item *item, int pos) {
+ return move(item, 2, pos);
+}
+
+#if FLTK_ABI_VERSION >= 10303
+/// Return the parent tree's prefs.
+/// \returns a reference to the parent tree's Fl_Tree_Prefs
+/// \version 1.3.3 ABI feature
+///
+const Fl_Tree_Prefs& Fl_Tree_Item::prefs() const {
+ return(_tree->_prefs);
+}
+
+/// Replace the current item with a new item.
+///
+/// The current item is destroyed if successful.
+/// No checks are made to see if an item with the same name exists.
+///
+/// This method can be used to, for example, install 'custom' items
+/// into the tree derived from Fl_Tree_Item; see draw_item_content().
+///
+/// \param[in] newitem The new item to replace the current item
+/// \returns newitem on success, NULL if could not be replaced.
+/// \see Fl_Tree_Item::draw_item_content(), Fl_Tree::root(Fl_Tree_Item*)
+/// \version 1.3.3 ABI feature
+///
+Fl_Tree_Item *Fl_Tree_Item::replace(Fl_Tree_Item *newitem) {
+ Fl_Tree_Item *p = parent();
+ if ( !p ) { // no parent? then we're the tree's root..
+ _tree->root(newitem); // ..tell tree to replace root
+ return newitem;
+ }
+ // has parent? ask parent to replace us
+ return p->replace_child(this, newitem);
+}
+
+/// Replace existing child \p 'olditem' with \p 'newitem'.
+///
+/// The \p 'olditem' is destroyed if successful.
+/// Can be used to put custom items (derived from Fl_Tree_Item) into the tree.
+/// No checks are made to see if an item with the same name exists.
+///
+/// \param[in] olditem The item to be found and replaced
+/// \param[in] newitem The new item to take the place of \p 'olditem'
+/// \returns newitem on success and \p 'olditem' is destroyed.
+/// NULL on error if \p 'olditem' was not found
+/// as an immediate child.
+/// \see replace(), Fl_Tree_Item::draw()
+/// \version 1.3.3 ABI feature
+///
+Fl_Tree_Item *Fl_Tree_Item::replace_child(Fl_Tree_Item *olditem,
+ Fl_Tree_Item *newitem) {
+ int pos = find_child(olditem); // find our index for olditem
+ if ( pos == -1 ) return(NULL);
+ newitem->_parent = this;
+ // replace in array (handles stitching neighboring items)
+ _children.replace(pos, newitem);
+ recalc_tree(); // newitem may have changed tree geometry
+ return newitem;
+}
+#endif
+
+/// Remove \p 'item' from the current item's children.
+/// \returns 0 if removed, -1 if item not an immediate child.
///
int Fl_Tree_Item::remove_child(Fl_Tree_Item *item) {
for ( int t=0; t<children(); t++ ) {
if ( child(t) == item ) {
item->clear_children();
_children.remove(t);
+ recalc_tree(); // may change tree geometry
return(0);
}
}
return(-1);
}
-/// Remove immediate child (and its children) by its label 'name'.
+/// Remove immediate child (and its children) by its label \p 'name'.
+/// If more than one item matches \p 'name', only the first
+/// matching item is removed.
+/// \param[in] name The label name of the immediate child to remove
/// \returns 0 if removed, -1 if not found.
+/// \version 1.3.3
///
int Fl_Tree_Item::remove_child(const char *name) {
for ( int t=0; t<children(); t++ ) {
if ( child(t)->label() ) {
if ( strcmp(child(t)->label(), name) == 0 ) {
_children.remove(t);
+ recalc_tree(); // may change tree geometry
return(0);
}
}
@@ -387,30 +685,27 @@ int Fl_Tree_Item::remove_child(const char *name) {
return(-1);
}
-/// Swap two of our children, given two child index values.
-/// Use this eg. for sorting.
-///
-/// This method is FAST, and does not involve lookups.
-///
+/// Swap two of our children, given two child index values \p 'ax' and \p 'bx'.
+/// Use e.g. for sorting.<br>
+/// This method is FAST, and does not involve lookups.<br>
/// No range checking is done on either index value.
-///
-/// \returns
-/// - 0 : OK
-/// - -1 : failed: 'a' or 'b' is not our immediate child
+/// \param[in] ax,bx the index of the items to swap
///
void Fl_Tree_Item::swap_children(int ax, int bx) {
_children.swap(ax, bx);
}
-/// Swap two of our children, given item pointers.
-/// Use this eg. for sorting.
+/// Swap two of our immediate children, given item pointers.
+/// Use e.g. for sorting.
///
-/// This method is SLOW because it involves linear lookups.
+/// This method is SLOW because it involves linear lookups.<br>
/// For speed, use swap_children(int,int) instead.
///
+/// \param[in] a,b The item ptrs of the two items to swap.
+/// Both must be immediate children of the current item.
/// \returns
/// - 0 : OK
-/// - -1 : failed: 'a' or 'b' is not our immediate child
+/// - -1 : failed: item \p 'a' or \p 'b' is not our child.
///
int Fl_Tree_Item::swap_children(Fl_Tree_Item *a, Fl_Tree_Item *b) {
int ax = -1, bx = -1;
@@ -424,6 +719,11 @@ int Fl_Tree_Item::swap_children(Fl_Tree_Item *a, Fl_Tree_Item *b) {
}
/// Internal: Horizontal connector line based on preference settings.
+/// \param[in] x1 The left hand X position of the horizontal connector
+/// \param[in] x2 The right hand X position of the horizontal connector
+/// \param[in] y The vertical position of the horizontal connector
+/// \param[in] prefs The Fl_Tree prefs
+///
void Fl_Tree_Item::draw_horizontal_connector(int x1, int x2, int y, const Fl_Tree_Prefs &prefs) {
fl_color(prefs.connectorcolor());
switch ( prefs.connectorstyle() ) {
@@ -445,6 +745,11 @@ void Fl_Tree_Item::draw_horizontal_connector(int x1, int x2, int y, const Fl_Tre
}
/// Internal: Vertical connector line based on preference settings.
+/// \param[in] x The x position of the vertical connector
+/// \param[in] y1 The top of the vertical connector
+/// \param[in] y2 The bottom of the vertical connector
+/// \param[in] prefs The Fl_Tree prefs
+///
void Fl_Tree_Item::draw_vertical_connector(int x, int y1, int y2, const Fl_Tree_Prefs &prefs) {
fl_color(prefs.connectorcolor());
switch ( prefs.connectorstyle() ) {
@@ -467,45 +772,55 @@ void Fl_Tree_Item::draw_vertical_connector(int x, int y1, int y2, const Fl_Tree_
}
}
+#if FLTK_ABI_VERSION >= 10303
/// Find the item that the last event was over.
+/// If \p 'yonly' is 1, only check event's y value, don't care about x.
+/// \param[in] prefs The parent tree's Fl_Tree_Prefs
+/// \param[in] yonly -- 0: check both event's X and Y values.
+/// -- 1: only check event's Y value, don't care about X.
+/// \returns pointer to clicked item, or NULL if none found
+/// \version 1.3.3 ABI feature
///
-/// Returns the item if it is visible, and mouse is over it.
-/// Works even if widget deactivated.
-/// Use event_on_collapse_icon() to determine if collapse button was pressed.
-///
-/// \returns const visible item under the event if found, or 0 if none.
-///
-const Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs) const {
+const Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs, int yonly) const {
if ( ! is_visible() ) return(0);
if ( is_root() && !prefs.showroot() ) {
// skip event check if we're root but root not being shown
} else {
// See if event is over us
- if ( event_inside(_xywh) ) { // event within this item?
- return(this); // found
+ if ( yonly ) {
+ if ( Fl::event_y() >= _xywh[1] &&
+ Fl::event_y() <= (_xywh[1]+_xywh[3]) ) {
+ return(this);
+ }
+ } else {
+ if ( event_inside(_xywh) ) { // event within this item?
+ return(this); // found
+ }
}
}
if ( is_open() ) { // open? check children of this item
for ( int t=0; t<children(); t++ ) {
const Fl_Tree_Item *item;
- if ( ( item = _children[t]->find_clicked(prefs) ) != NULL) { // check child and its descendents
- return(item); // found?
- }
+ if ( (item = _children[t]->find_clicked(prefs, yonly)) != NULL) // recurse into child for descendents
+ return(item); // found?
}
}
return(0);
}
-/// Non-const version of the above.
+/// Non-const version of Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs&,int) const
+Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs, int yonly) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree_Item &>(*this).find_clicked(prefs, yonly)));
+}
+#else
/// Find the item that the last event was over.
+/// \param[in] prefs The parent tree's Fl_Tree_Prefs
+/// \returns pointer to clicked item, or NULL if none found
+/// \version 1.3.0
///
-/// Returns the item if it is visible, and mouse is over it.
-/// Works even if widget deactivated.
-/// Use event_on_collapse_icon() to determine if collapse button was pressed.
-///
-/// \returns the visible item under the event if found, or 0 if none.
-///
-Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs) {
+const Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs) const {
if ( ! is_visible() ) return(0);
if ( is_root() && !prefs.showroot() ) {
// skip event check if we're root but root not being shown
@@ -517,16 +832,23 @@ Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs) {
}
if ( is_open() ) { // open? check children of this item
for ( int t=0; t<children(); t++ ) {
- Fl_Tree_Item *item;
- if ( ( item = _children[t]->find_clicked(prefs) ) != NULL ) { // check child and its descendents
- return(item); // found?
- }
+ const Fl_Tree_Item *item;
+ if ( (item = _children[t]->find_clicked(prefs)) != NULL) // recurse into child for descendents
+ return(item); // found?
}
}
return(0);
}
-static void draw_item_focus(Fl_Boxtype B, Fl_Color C, int X, int Y, int W, int H) {
+/// Non-const version of Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs&) const.
+Fl_Tree_Item *Fl_Tree_Item::find_clicked(const Fl_Tree_Prefs &prefs) {
+ // "Effective C++, 3rd Ed", p.23. Sola fide, Amen.
+ return(const_cast<Fl_Tree_Item*>(
+ static_cast<const Fl_Tree_Item &>(*this).find_clicked(prefs)));
+}
+#endif
+
+static void draw_item_focus(Fl_Boxtype B, Fl_Color fg, Fl_Color bg, int X, int Y, int W, int H) {
if (!Fl::visible_focus()) return;
switch (B) {
case FL_DOWN_BOX:
@@ -538,7 +860,7 @@ static void draw_item_focus(Fl_Boxtype B, Fl_Color C, int X, int Y, int W, int H
default:
break;
}
- fl_color(fl_contrast(FL_BLACK, C));
+ fl_color(fl_contrast(fg, bg));
#if defined(USE_X11) || defined(__APPLE_QUARTZ__)
fl_line_style(FL_DOT);
@@ -566,8 +888,14 @@ static void draw_item_focus(Fl_Boxtype B, Fl_Color C, int X, int Y, int W, int H
#endif
}
-/// Return the item's 'visible' height.
-/// Doesn't include linespacing(); prevents affecting eg. height of widget().
+/// Return the item's 'visible' height. Takes into account the item's:
+/// - visibility (if !is_visible(), returns 0)
+/// - labelfont() height: if label() != NULL
+/// - widget() height: if widget() != NULL
+/// - openicon() height (if not NULL)
+/// - usericon() height (if not NULL)
+/// Does NOT include Fl_Tree::linespacing();
+/// \returns maximum pixel height
///
int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) const {
if ( ! is_visible() ) return(0);
@@ -590,7 +918,336 @@ int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) const {
return(H);
}
+#if FLTK_ABI_VERSION >= 10303
+// These methods held for 1.3.3 ABI: all need 'tree()' back-reference.
+
+/// Returns the recommended foreground color used for drawing this item.
+/// \see draw_item_content()
+/// \version 1.3.3 ABI ABI
+///
+Fl_Color Fl_Tree_Item::drawfgcolor() const {
+ return is_selected() ? fl_contrast(_labelfgcolor, tree()->selection_color())
+ : is_active() ? _labelfgcolor
+ : fl_inactive(_labelfgcolor);
+}
+
+/// Returns the recommended background color used for drawing this item.
+/// \see draw_item_content()
+/// \version 1.3.3 ABI
+///
+Fl_Color Fl_Tree_Item::drawbgcolor() const {
+ const Fl_Color unspecified = 0xffffffff;
+ return is_selected() ? is_active() ? tree()->selection_color()
+ : fl_inactive(tree()->selection_color())
+ : _labelbgcolor == unspecified ? tree()->color()
+ : _labelbgcolor;
+}
+
+/// Draw the item content
+///
+/// This method can be overridden to implement custom drawing
+/// by filling the label_[xywh]() area with content.
+///
+/// A minimal example of how to override draw_item_content()
+/// and draw just a normal item's background and label ourselves:
+///
+/// \code
+/// class MyTreeItem : public Fl_Tree_Item {
+/// public:
+/// MyTreeItem() { }
+/// ~MyTreeItem() { }
+/// // DRAW OUR CUSTOM CONTENT FOR THE ITEM
+/// int draw_item_content(int render) {
+/// // Our item's dimensions + text content
+/// int X=label_x(), Y=label_y(), W=label_w(), H=label_h();
+/// const char *text = label() ? label() : "";
+/// // Rendering? Do any drawing that's needed
+/// if ( render ) {
+/// // Draw bg -- a filled rectangle
+/// fl_color(drawbgcolor()); fl_rectf(X,Y,W,H);
+/// // Draw label
+/// fl_font(labelfont(), labelsize()); // use item's label font/size
+/// fl_color(drawfgcolor()); // use recommended fg color
+/// fl_draw(text, X,Y,W,H, FL_ALIGN_LEFT); // draw the item's label
+/// }
+/// // Rendered or not, we must calculate content's max X position
+/// int lw=0, lh=0;
+/// fl_measure(text, lw, lh); // get width of label text
+/// return X + lw; // return X + label width
+/// }
+/// };
+/// \endcode
+///
+/// You can draw anything you want inside draw_item_content()
+/// using any of the fl_draw.H functions, as long as it's
+/// within the label's xywh area.
+///
+/// To add instances of your custom item to the tree, you can use:
+///
+/// \code
+/// // Example #1: using add()
+/// MyTreeItem *bart = new MyTreeItem(..); // class derived from Fl_Tree_Item
+/// tree->add("/Simpsons/Bart", bart); // Add item as /Simpsons/Bart
+/// \endcode
+///
+/// ..or you can insert or replace existing items:
+///
+/// \code
+/// // Example #2: using replace()
+/// MyTreeItem *marge = new MyTreeItem(..); // class derived from Fl_Tree_Item
+/// item = tree->add("/Simpsons/Marge"); // create item
+/// item->replace(mi); // replace it with our own
+/// \endcode
+///
+/// \param[in] render Whether we should render content (1), or just tally
+/// the geometry (0). Fl_Tree may want only to find the widest
+/// item in the tree for scrollbar calculations.
+///
+/// \returns the right-most X coordinate, or 'xmax' of content we drew,
+/// i.e. the "scrollable" content.
+/// The tree uses the largest xmax to determine the maximum
+/// width of the tree's content (needed for e.g. computing the
+/// horizontal scrollbar's size).
+/// \version 1.3.3 ABI feature
+///
+int Fl_Tree_Item::draw_item_content(int render) {
+ Fl_Color fg = drawfgcolor();
+ Fl_Color bg = drawbgcolor();
+ const Fl_Tree_Prefs &prefs = tree()->prefs();
+ int xmax = label_x();
+ // Background for this item, only if different from tree's bg
+ if ( render && (bg != tree()->color() || is_selected()) ) {
+ if ( is_selected() ) { // Selected? Use selectbox() style
+ fl_draw_box(prefs.selectbox(),
+ label_x(), label_y(), label_w(), label_h(), bg);
+ } else { // Not Selected? use plain filled rectangle
+ fl_color(bg);
+ fl_rectf(label_x(), label_y(), label_w(), label_h());
+ }
+ if ( widget() ) widget()->damage(FL_DAMAGE_ALL); // if there's a child widget, we just damaged it
+ }
+ // Draw label
+ if ( _label &&
+ ( !widget() ||
+ (prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) ) {
+ if ( render ) {
+ fl_color(fg);
+ fl_font(_labelfont, _labelsize);
+ }
+ int lx = label_x()+(_label ? prefs.labelmarginleft() : 0);
+ int ly = label_y()+(label_h()/2)+(_labelsize/2)-fl_descent()/2;
+ int lw=0, lh=0;
+ fl_measure(_label, lw, lh); // get box around text (including white space)
+ if ( render ) fl_draw(_label, lx, ly);
+ xmax = lx + lw; // update max width of drawn item
+ }
+ return xmax;
+}
+
+/// Draw this item and its children.
+///
+/// \param[in] X Horizontal position for item being drawn
+/// \param[in,out] Y Vertical position for item being drawn,
+/// returns new position for next item
+/// \param[in] W Recommended width for item
+/// \param[in] itemfocus The tree's current focus item (if any)
+/// \param[in,out] tree_item_xmax The tree's running xmax (right-most edge so far).
+/// Mainly used by parent tree when render==0 to
+/// calculate tree's max width.
+/// \param[in] lastchild Is this item the last child in a subtree?
+/// \param[in] render Whether or not to render the item:
+/// 0: no rendering, just calculate size w/out drawing.
+/// 1: render item as well as size calc
+///
+/// \version 1.3.3 ABI feature: modified parameters
+///
+void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus,
+ int &tree_item_xmax, int lastchild, int render) {
+ Fl_Tree_Prefs &prefs = _tree->_prefs;
+ if ( !is_visible() ) return;
+ int tree_top = tree()->_tiy;
+ int tree_bot = tree_top + tree()->_tih;
+ int H = calc_item_height(prefs); // height of item
+ int H2 = H + prefs.linespacing(); // height of item with line spacing
+
+ // Update the xywh of this item
+ _xywh[0] = X;
+ _xywh[1] = Y;
+ _xywh[2] = W;
+ _xywh[3] = H;
+
+ // Determine collapse icon's xywh
+ // Note: calculate collapse icon's xywh for possible mouse click detection.
+ // We don't care about items clipped off the viewport; they won't get mouse events.
+ //
+ int item_y_center = Y+(H/2);
+ _collapse_xywh[2] = prefs.openicon()->w();
+ int &icon_w = _collapse_xywh[2];
+ _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
+ int &icon_x = _collapse_xywh[0];
+ _collapse_xywh[1] = item_y_center - (prefs.openicon()->h()/2);
+ int &icon_y = _collapse_xywh[1];
+ _collapse_xywh[3] = prefs.openicon()->h();
+
+ // Horizontal connector values
+ // Must calculate these even if(clipped) because 'draw children' code (below)
+ // needs hconn_x_center value. (Otherwise, these calculations could be 'clipped')
+ //
+ int hconn_x = X+icon_w/2-1;
+ int hconn_x2 = hconn_x + prefs.connectorwidth();
+ int hconn_x_center = X + icon_w + ((hconn_x2 - (X + icon_w)) / 2);
+ int cw1 = icon_w+prefs.connectorwidth()/2, cw2 = prefs.connectorwidth();
+ int conn_w = cw1>cw2 ? cw1 : cw2;
+
+ // Usericon position
+ int uicon_x = X+(icon_w/2-1+conn_w) + ( (usericon() || prefs.usericon())
+ ? prefs.usericonmarginleft() : 0);
+ int uicon_w = usericon() ? usericon()->w()
+ : prefs.usericon() ? prefs.usericon()->w() : 0;
+
+ // Label xywh
+ _label_xywh[0] = uicon_x + uicon_w + prefs.labelmarginleft();
+ _label_xywh[1] = Y;
+ _label_xywh[2] = tree()->_tix + tree()->_tiw - _label_xywh[0];
+ _label_xywh[3] = H;
+
+ // Begin calc of this item's max width..
+ // It might not even be visible, so start at zero.
+ //
+ int xmax = 0;
+
+ // Recalc widget position
+ // Do this whether clipped or not, so that when scrolled,
+ // the widgets move to appropriate 'offscreen' positions
+ // (so that they don't get mouse events, etc)
+ //
+ if ( widget() ) {
+ int wx = uicon_x + uicon_w + (_label ? prefs.labelmarginleft() : 0);
+ int wy = label_y();
+ int ww = widget()->w(); // use widget's width
+ int wh = (prefs.item_draw_mode() & FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
+ ? widget()->h() : H;
+ if ( _label &&
+ (prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) {
+ fl_font(_labelfont, _labelsize); // fldescent() needs this
+ int lw=0, lh=0;
+ fl_measure(_label,lw,lh); // get box around text (including white space)
+ wx += (lw + prefs.widgetmarginleft());
+ }
+ if ( widget()->x() != wx || widget()->y() != wy ||
+ widget()->w() != ww || widget()->h() != wh ) {
+ widget()->resize(wx,wy,ww,wh); // we'll handle redraw below
+ }
+ }
+ char clipped = ((Y+H) < tree_top) || (Y>tree_bot) ? 1 : 0;
+ if (!render) clipped = 0; // NOT rendering? Then don't clip, so we calc unclipped items
+ char drawthis = ( is_root() && prefs.showroot() == 0 ) ? 0 : 1;
+ if ( !clipped ) {
+ Fl_Color fg = drawfgcolor();
+ Fl_Color bg = drawbgcolor();
+ // See if we should draw this item
+ // If this item is root, and showroot() is disabled, don't draw.
+ // 'clipped' is an optimization to prevent drawing anything offscreen.
+ //
+ if ( drawthis ) { // draw this item at all?
+ if ( (tree()->damage() & ~FL_DAMAGE_CHILD) || !render ) { // non-child damage?
+ // Draw connectors
+ if ( render && prefs.connectorstyle() != FL_TREE_CONNECTOR_NONE ) {
+ // Horiz connector between center of icon and text
+ // if this is root, the connector should not dangle in thin air on the left
+ if (is_root()) draw_horizontal_connector(hconn_x_center, hconn_x2, item_y_center, prefs);
+ else draw_horizontal_connector(hconn_x, hconn_x2, item_y_center, prefs);
+ // Small vertical line down to children
+ if ( has_children() && is_open() )
+ draw_vertical_connector(hconn_x_center, item_y_center, Y+H2, prefs);
+ // Connectors for last child
+ if ( !is_root() ) {
+ if ( lastchild ) draw_vertical_connector(hconn_x, Y, item_y_center, prefs);
+ else draw_vertical_connector(hconn_x, Y, Y+H2, prefs);
+ }
+ }
+ // Draw collapse icon
+ if ( render && has_children() && prefs.showcollapse() ) {
+ // Draw icon image
+ if ( is_open() ) {
+ prefs.closeicon()->draw(icon_x,icon_y);
+ } else {
+ prefs.openicon()->draw(icon_x,icon_y);
+ }
+ }
+ // Draw user icon (if any)
+ if ( render && usericon() ) {
+ // Item has user icon? Use it
+ int uicon_y = item_y_center - (usericon()->h() >> 1);
+ usericon()->draw(uicon_x,uicon_y);
+ } else if ( render && prefs.usericon() ) {
+ // Prefs has user icon? Use it
+ int uicon_y = item_y_center - (prefs.usericon()->h() >> 1);
+ prefs.usericon()->draw(uicon_x,uicon_y);
+ }
+ // Draw item's content
+ xmax = draw_item_content(render);
+ } // end non-child damage
+ // Draw child FLTK widget?
+ if ( widget() ) {
+ if (render)
+ tree()->draw_child(*widget()); // let group handle drawing child
+ if ( widget()->label() && render )
+ tree()->draw_outside_label(*widget());// label too
+ xmax = widget()->x() + widget()->w(); // update max width of widget
+ }
+ // Draw focus box around item's bg last
+ if ( render &&
+ this == itemfocus &&
+ Fl::visible_focus() &&
+ Fl::focus() == tree() &&
+ prefs.selectmode() != FL_TREE_SELECT_NONE ) {
+ draw_item_focus(FL_NO_BOX,fg,bg,label_x()+1,label_y()+1,label_w()-1,label_h()-1);
+ }
+ } // end drawthis
+ } // end clipped
+ if ( drawthis ) Y += H2; // adjust Y (even if clipped)
+ // Manage tree_item_xmax
+ if ( xmax > tree_item_xmax )
+ tree_item_xmax = xmax;
+ // Draw child items (if any)
+ if ( has_children() && is_open() ) {
+ int child_x = drawthis ? (hconn_x_center - (icon_w/2) + 1) // offset children to right,
+ : X; // unless didn't drawthis
+ int child_w = W - (child_x-X);
+ int child_y_start = Y;
+ for ( int t=0; t<children(); t++ ) {
+ int lastchild = ((t+1)==children()) ? 1 : 0;
+ _children[t]->draw(child_x, Y, child_w, itemfocus, tree_item_xmax, lastchild, render);
+ }
+ if ( has_children() && is_open() ) {
+ Y += prefs.openchild_marginbottom(); // offset below open child tree
+ }
+ if ( ! lastchild ) {
+ // Special 'clipped' calculation. (intentional variable shadowing)
+ int clipped = ((child_y_start < tree_top) && (Y < tree_top)) ||
+ ((child_y_start > tree_bot) && (Y > tree_bot));
+ if (render && !clipped )
+ draw_vertical_connector(hconn_x, child_y_start, Y, prefs);
+ }
+ }
+}
+
+#else
+
/// Draw this item and its children.
+///
+/// \param[in] X Horizontal position for item being drawn
+/// \param[in,out] Y Vertical position for item being drawn,
+/// returns new position for next item
+/// \param[in] W Recommended width of item
+/// \param[in] tree The parent tree
+/// \param[in] itemfocus The tree's current focus item (if any)
+/// \param[in] prefs The tree's preferences
+/// \param[in] lastchild Is this item the last child in a subtree?
+///
+/// \version 1.3.0 release, removed 1.3.3 ABI
+///
void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
Fl_Tree_Item *itemfocus,
const Fl_Tree_Prefs &prefs, int lastchild) {
@@ -611,9 +1268,12 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
// We don't care about items clipped off the viewport; they won't get mouse events.
//
int item_y_center = Y+(H/2);
- int &icon_w = _collapse_xywh[2] = prefs.openicon()->w();
- int &icon_x = _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
- int &icon_y = _collapse_xywh[1] = item_y_center - (prefs.openicon()->h()/2);
+ _collapse_xywh[2] = prefs.openicon()->w();
+ int &icon_w = _collapse_xywh[2];
+ _collapse_xywh[0] = X + (icon_w + prefs.connectorwidth())/2 - 3;
+ int &icon_x = _collapse_xywh[0];
+ _collapse_xywh[1] = item_y_center - (prefs.openicon()->h()/2);
+ int &icon_y = _collapse_xywh[1];
_collapse_xywh[3] = prefs.openicon()->h();
// Horizontal connector values
@@ -676,13 +1336,14 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
char clipped = ((Y+H) < tree_top) || (Y>tree_bot) ? 1 : 0;
char drawthis = ( is_root() && prefs.showroot() == 0 ) ? 0 : 1;
if ( !clipped ) {
+ const Fl_Color unspecified = 0xffffffff;
Fl_Color fg = is_selected() ? fl_contrast(_labelfgcolor, tree->selection_color())
- : is_active() ? _labelfgcolor
+ : is_active() ? _labelfgcolor
: fl_inactive(_labelfgcolor);
Fl_Color bg = is_selected() ? is_active() ? tree->selection_color()
: fl_inactive(tree->selection_color())
- : _labelbgcolor == 0xffffffff ? tree->color() // transparent bg?
- : _labelbgcolor;
+ : _labelbgcolor == unspecified ? tree->color()
+ : _labelbgcolor;
// See if we should draw this item
// If this item is root, and showroot() is disabled, don't draw.
// 'clipped' is an optimization to prevent drawing anything offscreen.
@@ -713,8 +1374,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
prefs.openicon()->draw(icon_x,icon_y);
}
}
- // Background for this item
- // Draw bg only if different from tree's bg
+ // Draw background for the item.. only if different from tree's bg color
if ( bg != tree->color() || is_selected() ) {
if ( is_selected() ) { // Selected? Use selectbox() style
fl_draw_box(prefs.selectbox(),bg_x,bg_y,bg_w,bg_h,bg);
@@ -736,13 +1396,13 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
}
// Draw label
#if FLTK_ABI_VERSION >= 10301
- if ( _label &&
+ if ( _label &&
( !widget() ||
(prefs.item_draw_mode() & FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET) ) )
#else /*FLTK_ABI_VERSION*/
- if ( _label && !widget() ) // back compat: don't draw label if widget() present
+ if ( _label && !widget() ) // back compat: don't draw label if widget() present
#endif /*FLTK_ABI_VERSION*/
- {
+ {
fl_color(fg);
fl_font(_labelfont, _labelsize);
int label_y = Y+(H/2)+(_labelsize/2)-fl_descent()/2;
@@ -760,7 +1420,7 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
Fl::visible_focus() &&
Fl::focus() == tree &&
prefs.selectmode() != FL_TREE_SELECT_NONE ) {
- draw_item_focus(FL_NO_BOX,bg,bg_x+1,bg_y+1,bg_w-1,bg_h-1);
+ draw_item_focus(FL_NO_BOX,fg,bg,bg_x+1,bg_y+1,bg_w-1,bg_h-1);
}
} // end drawthis
} // end clipped
@@ -786,8 +1446,9 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Widget *tree,
}
}
}
+#endif
-/// Was the event on the 'collapse' button?
+/// Was the event on the 'collapse' button of this item?
///
int Fl_Tree_Item::event_on_collapse_icon(const Fl_Tree_Prefs &prefs) const {
if ( is_visible() && is_active() && has_children() && prefs.showcollapse() ) {
@@ -797,7 +1458,7 @@ int Fl_Tree_Item::event_on_collapse_icon(const Fl_Tree_Prefs &prefs) const {
}
}
-/// Was event on the label()?
+/// Was event on the label() of this item?
///
int Fl_Tree_Item::event_on_label(const Fl_Tree_Prefs &prefs) const {
if ( is_visible() && is_active() ) {
@@ -836,6 +1497,7 @@ void Fl_Tree_Item::open() {
for ( int t=0; t<_children.total(); t++ ) {
_children[t]->show_widgets();
}
+ recalc_tree(); // may change tree geometry
}
/// Close this item and all its children.
@@ -845,12 +1507,14 @@ void Fl_Tree_Item::close() {
for ( int t=0; t<_children.total(); t++ ) {
_children[t]->hide_widgets();
}
+ recalc_tree(); // may change tree geometry
}
/// Returns how many levels deep this item is in the hierarchy.
///
/// For instance; root has a depth of zero, and its immediate children
-/// would have a depth of 1, and so on.
+/// would have a depth of 1, and so on. Use e.g. for determining the
+/// horizontal indent of this item during drawing.
///
int Fl_Tree_Item::depth() const {
int count = 0;
@@ -898,7 +1562,8 @@ Fl_Tree_Item *Fl_Tree_Item::next() {
/// This method can be used to walk the tree backwards.
/// For an example of how to use this method, see Fl_Tree::last().
///
-/// \returns the previous item in the tree, or 0 if there's no item above this one (hit the root).
+/// \returns the previous item in the tree,
+/// or 0 if there's no item above this one (hit the root).
///
Fl_Tree_Item *Fl_Tree_Item::prev() {
#if FLTK_ABI_VERSION >= 10301
@@ -949,7 +1614,7 @@ Fl_Tree_Item *Fl_Tree_Item::prev() {
/// Return this item's next sibling.
///
/// Moves to the next item below us at the same level (sibling).
-/// Use this to move down the tree without moving deeper into the tree,
+/// Use this to move down the tree without changing depth().
/// effectively skipping over this item's children/descendents.
///
/// \returns item's next sibling, or 0 if none.
@@ -972,7 +1637,7 @@ Fl_Tree_Item *Fl_Tree_Item::next_sibling() {
/// Return this item's previous sibling.
///
/// Moves to the previous item above us at the same level (sibling).
-/// Use this to move up the tree without moving deeper into the tree.
+/// Use this to move up the tree without changing depth().
///
/// \returns This item's previous sibling, or 0 if none.
///
@@ -990,13 +1655,21 @@ Fl_Tree_Item *Fl_Tree_Item::prev_sibling() {
#endif /*FLTK_ABI_VERSION*/
}
-/// Update our _prev_sibling and _next_sibling pointers to point to neighbors,
+/// Update our _prev_sibling and _next_sibling pointers to point to neighbors
/// given \p index as being our current position in the parent's item array.
-/// Call this whenever items in the array are added/removed/moved/swapped.
+/// Call this whenever items in the array are added/removed/moved/swapped/etc.
+/// \param[in] index Our index# in the parent.<br>
+/// Special case if index=-1: become an orphan; null out all parent/sibling associations.
///
void Fl_Tree_Item::update_prev_next(int index) {
#if FLTK_ABI_VERSION >= 10301
// NEW
+ if ( index == -1 ) { // special case: become an orphan
+ _parent = 0;
+ _prev_sibling = 0;
+ _next_sibling = 0;
+ return;
+ }
int pchildren = parent() ? parent()->children() : 0;
int index_prev = index-1;
int index_next = index+1;
@@ -1015,14 +1688,17 @@ void Fl_Tree_Item::update_prev_next(int index) {
#endif /*FLTK_ABI_VERSION*/
}
-/// Return the next visible item. (If this item has children and is closed, children are skipped)
+/// Return the next open(), visible() item.
+/// (If this item has children and is closed, children are skipped)
///
/// This method can be used to walk the tree forward, skipping items
-/// that are not currently visible to the user.
+/// that are not currently open/visible to the user.
///
-/// \returns the next visible item below us, or 0 if there's no more items.
+/// \returns the next open() visible() item below us,
+/// or 0 if there's no more items.
+/// \version 1.3.3
///
-Fl_Tree_Item *Fl_Tree_Item::next_displayed(Fl_Tree_Prefs &prefs) {
+Fl_Tree_Item *Fl_Tree_Item::next_visible(Fl_Tree_Prefs &prefs) {
Fl_Tree_Item *item = this;
while ( 1 ) {
item = item->next();
@@ -1032,14 +1708,22 @@ Fl_Tree_Item *Fl_Tree_Item::next_displayed(Fl_Tree_Prefs &prefs) {
}
}
-/// Return the previous visible item. (If this item above us has children and is closed, its children are skipped)
+/// Same as next_visible().
+/// \deprecated in 1.3.3 for confusing name, use next_visible() instead
+Fl_Tree_Item *Fl_Tree_Item::next_displayed(Fl_Tree_Prefs &prefs) {
+ return next_visible(prefs);
+}
+
+/// Return the previous open(), visible() item.
+/// (If this item above us has children and is closed, its children are skipped)
///
/// This method can be used to walk the tree backward,
-/// skipping items that are not currently visible to the user.
+/// skipping items that are not currently open/visible to the user.
///
-/// \returns the previous visible item above us, or 0 if there's no more items.
+/// \returns the previous open() visible() item above us,
+/// or 0 if there's no more items.
///
-Fl_Tree_Item *Fl_Tree_Item::prev_displayed(Fl_Tree_Prefs &prefs) {
+Fl_Tree_Item *Fl_Tree_Item::prev_visible(Fl_Tree_Prefs &prefs) {
Fl_Tree_Item *c = this;
while ( c ) {
c = c->prev(); // previous item
@@ -1059,11 +1743,17 @@ Fl_Tree_Item *Fl_Tree_Item::prev_displayed(Fl_Tree_Prefs &prefs) {
return(0); // hit end: no more items
}
-/// Returns if item and all its parents are visible.
-/// Also takes into consideration if any parent is close()ed.
+/// Same as prev_visible().
+/// \deprecated in 1.3.3 for confusing name, use prev_visible()
+///
+Fl_Tree_Item *Fl_Tree_Item::prev_displayed(Fl_Tree_Prefs &prefs) {
+ return prev_visible(prefs);
+}
+
+/// See if item and all its parents are open() and visible().
/// \returns
-/// 1 -- item and its parents are visible/open()
-/// 0 -- item (or parents) invisible or close()ed.
+/// 1 -- item and its parents are open() and visible()
+/// 0 -- item (or one of its parents) are invisible or close()ed.
///
int Fl_Tree_Item::visible_r() const {
if ( !visible() ) return(0);
@@ -1072,6 +1762,17 @@ int Fl_Tree_Item::visible_r() const {
return(1);
}
+/// Call this when our geometry is changed. (Font size, label contents, etc)
+/// Schedules tree to recalculate itself, as changes to us may affect tree
+/// widget's scrollbar visibility and tab sizes.
+/// \version 1.3.3 ABI
+///
+void Fl_Tree_Item::recalc_tree() {
+#if FLTK_ABI_VERSION >= 10303
+ _tree->recalc_tree();
+#endif
+}
+
//
-// End of "$Id: Fl_Tree_Item.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Item.cxx 10272 2014-09-05 02:59:00Z greg.ercolano $".
//
diff --git a/src/Fl_Tree_Item_Array.cxx b/src/Fl_Tree_Item_Array.cxx
index aea7e09..63d05af 100644
--- a/src/Fl_Tree_Item_Array.cxx
+++ b/src/Fl_Tree_Item_Array.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Item_Array.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Item_Array.cxx 10272 2014-09-05 02:59:00Z greg.ercolano $"
//
#include <stdio.h>
@@ -36,6 +36,9 @@ Fl_Tree_Item_Array::Fl_Tree_Item_Array(int new_chunksize) {
_items = 0;
_total = 0;
_size = 0;
+#if FLTK_ABI_VERSION >= 10303
+ _flags = 0;
+#endif
_chunksize = new_chunksize;
}
@@ -50,10 +53,24 @@ Fl_Tree_Item_Array::Fl_Tree_Item_Array(const Fl_Tree_Item_Array* o) {
_total = 0;
_size = o->_size;
_chunksize = o->_chunksize;
+#if FLTK_ABI_VERSION >= 10303
+ _flags = o->_flags;
+#endif
for ( int t=0; t<o->_total; t++ ) {
- _items[t] = new Fl_Tree_Item(o->_items[t]);
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM ) {
+ _items[t] = new Fl_Tree_Item(o->_items[t]); // make new copy of item
+ ++_total;
+ _items[t]->update_prev_next(t); // update uses _total's current value
+ } else {
+ _items[t] = o->_items[t]; // copy ptr only
+ ++_total;
+ }
+#else
+ _items[t] = new Fl_Tree_Item(o->_items[t]); // make new copy of item
++_total;
- _items[t]->update_prev_next(t); // update uses _total's current value
+ _items[t]->update_prev_next(t); // update uses _total's current value
+#endif
}
}
@@ -65,8 +82,13 @@ Fl_Tree_Item_Array::Fl_Tree_Item_Array(const Fl_Tree_Item_Array* o) {
void Fl_Tree_Item_Array::clear() {
if ( _items ) {
for ( int t=0; t<_total; t++ ) {
- delete _items[t];
- _items[t] = 0;
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ {
+ delete _items[t];
+ _items[t] = 0;
+ }
}
free((void*)_items); _items = 0;
}
@@ -110,7 +132,12 @@ void Fl_Tree_Item_Array::insert(int pos, Fl_Tree_Item *new_item) {
}
_items[pos] = new_item;
_total++;
- _items[pos]->update_prev_next(pos); // adjust item's prev/next and its neighbors
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ {
+ _items[pos]->update_prev_next(pos); // adjust item's prev/next and its neighbors
+ }
}
/// Add an item* to the end of the array.
@@ -123,24 +150,55 @@ void Fl_Tree_Item_Array::add(Fl_Tree_Item *val) {
insert(_total, val);
}
+/// Replace the item at \p index with \p newitem.
+///
+/// Old item at index position will be destroyed,
+/// and the new item will take it's place, and stitched into the linked list.
+///
+void Fl_Tree_Item_Array::replace(int index, Fl_Tree_Item *newitem) {
+ if ( _items[index] ) { // delete if non-zero
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ // Destroy old item
+ delete _items[index];
+ }
+ _items[index] = newitem; // install new item
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ {
+ // Restitch into linked list
+ _items[index]->update_prev_next(index);
+ }
+}
+
/// Remove the item at \param[in] index from the array.
///
/// The item will be delete'd (if non-NULL), so its destructor will be called.
///
void Fl_Tree_Item_Array::remove(int index) {
if ( _items[index] ) { // delete if non-zero
- delete _items[index];
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ delete _items[index];
}
_items[index] = 0;
_total--;
for ( int i=index; i<_total; i++ ) { // reshuffle the array
_items[i] = _items[i+1];
}
- if ( index < _total ) { // removed item not last?
- _items[index]->update_prev_next(index); // update next item's prev/next and neighbors
- } else if ( ((index-1) >= 0) && // removed item IS last?
- ((index-1) < _total)) {
- _items[index-1]->update_prev_next(index-1); // update prev item's prev/next and neighbors
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ {
+ if ( index < _total ) { // removed item not last?
+ _items[index]->update_prev_next(index); // update next item's prev/next and neighbors
+ } else if ( ((index-1) >= 0) && // removed item IS last?
+ ((index-1) < _total)) {
+ _items[index-1]->update_prev_next(index-1);// update prev item's prev/next and neighbors
+ }
}
}
@@ -164,12 +222,88 @@ void Fl_Tree_Item_Array::swap(int ax, int bx) {
Fl_Tree_Item *asave = _items[ax];
_items[ax] = _items[bx];
_items[bx] = asave;
- // Adjust prev/next ptrs
- _items[ax]->update_prev_next(ax);
- _items[bx]->update_prev_next(bx);
+#if FLTK_ABI_VERSION >= 10303
+ if ( _flags & MANAGE_ITEM )
+#endif
+ {
+ // Adjust prev/next ptrs
+ _items[ax]->update_prev_next(ax);
+ _items[bx]->update_prev_next(bx);
+ }
}
#endif /* FLTK_ABI_VERSION */
+/// Move item at 'from' to new position 'to' in the array.
+/// Due to how the moving an item shuffles the array around,
+/// a positional 'move' implies things that may not be obvious:
+/// - When 'from' moved lower in tree, appears BELOW item that was at 'to'.
+/// - When 'from' moved higher in tree, appears ABOVE item that was at 'to'.
+///
+/// \returns 0 on success, -1 on range error (e.g. if \p 'to' or \p 'from' out of range)
+///
+int Fl_Tree_Item_Array::move(int to, int from) {
+ if ( from == to ) return 0; // nop
+ if ( to<0 || to>=_total || from<0 || from>=_total ) return -1;
+ Fl_Tree_Item *item = _items[from];
+ // Remove item..
+ if ( from < to )
+ for ( int t=from; t<to && t<(_total+1); t++ )
+ _items[t] = _items[t+1];
+ else
+ for ( int t=from; t>to && t>0; t-- )
+ _items[t] = _items[t-1];
+ // Move to new position
+ _items[to] = item;
+ // Update all children
+ for ( int r=0; r<_total; r++ ) // XXX: excessive to do all children,
+ _items[r]->update_prev_next(r); // XXX: but avoids weird boundary issues
+ return 0;
+}
+
+/// Deparent item at \p 'pos' from our list of children.
+/// Similar to a remove() without the destruction of the item.
+/// This creates an orphaned item (still allocated, has no parent)
+/// which soon after is typically reparented elsewhere.
+///
+/// \returns 0 on success, -1 on error (e.g. if \p 'pos' out of range)
+///
+int Fl_Tree_Item_Array::deparent(int pos) {
+ if ( pos>=_total || pos<0 ) return -1;
+ // Save item being deparented, and its two nearest siblings
+ Fl_Tree_Item *item = _items[pos];
+ Fl_Tree_Item *prev = item->prev_sibling();
+ Fl_Tree_Item *next = item->next_sibling();
+ // Remove from parent's list of children
+ _total -= 1;
+ for ( int t=pos; t<_total; t++ )
+ _items[t] = _items[t+1]; // delete, no destroy
+ // Now an orphan: remove association with old parent and siblings
+ item->update_prev_next(-1); // become an orphan
+ // Adjust bereaved siblings
+ if ( prev ) prev->update_prev_next(pos-1);
+ if ( next ) next->update_prev_next(pos);
+ return 0;
+}
+
+/// Reparent specified item as a child of ourself.
+/// Typically 'newchild' was recently orphaned with deparent().
+///
+/// \returns 0 on success, -1 on error (e.g. if \p 'pos' out of range)
+///
+int Fl_Tree_Item_Array::reparent(Fl_Tree_Item *item, Fl_Tree_Item* newparent, int pos) {
+ if ( pos<0 || pos>_total ) return -1;
+ // Add item to new parent
+ enlarge(1);
+ _total += 1;
+ for ( int t=_total-1; t>pos; --t ) // shuffle array to make room for new entry
+ _items[t] = _items[t-1];
+ _items[pos] = item; // insert new entry
+ // Attach to new parent and siblings
+ _items[pos]->parent(newparent); // reparent (update_prev_next() needs this)
+ _items[pos]->update_prev_next(pos); // find new siblings
+ return 0;
+}
+
//
-// End of "$Id: Fl_Tree_Item_Array.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Item_Array.cxx 10272 2014-09-05 02:59:00Z greg.ercolano $".
//
diff --git a/src/Fl_Tree_Prefs.cxx b/src/Fl_Tree_Prefs.cxx
index 204340e..322caee 100644
--- a/src/Fl_Tree_Prefs.cxx
+++ b/src/Fl_Tree_Prefs.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tree_Prefs.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Tree_Prefs.cxx 10233 2014-08-21 12:16:40Z cand $"
//
#include <FL/Fl.H>
@@ -28,7 +28,7 @@
// INTERNAL: BUILT IN OPEN/STOW XPMS
// These can be replaced via prefs.openicon()/closeicon()
//
-static const char *L_open_xpm[] = {
+static const char * const L_open_xpm[] = {
#ifdef __APPLE__
"11 11 2 1",
". c None",
@@ -64,7 +64,7 @@ static const char *L_open_xpm[] = {
};
static Fl_Pixmap L_openpixmap(L_open_xpm);
-static const char *L_close_xpm[] = {
+static const char * const L_close_xpm[] = {
#ifdef __APPLE__
"11 11 2 1",
". c None",
@@ -156,6 +156,10 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
_itemreselectmode = FL_TREE_SELECTABLE_ONCE;
_itemdrawmode = FL_TREE_ITEM_DRAW_DEFAULT;
#endif
+#if FLTK_ABI_VERSION >= 10303
+ _itemdrawcallback = 0;
+ _itemdrawuserdata = 0;
+#endif
// Let fltk's current 'scheme' affect defaults
if ( Fl::scheme() ) {
if ( strcmp(Fl::scheme(), "gtk+") == 0 ) {
@@ -167,5 +171,5 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
}
//
-// End of "$Id: Fl_Tree_Prefs.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Tree_Prefs.cxx 10233 2014-08-21 12:16:40Z cand $".
//
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index d7e4794..a0dca45 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Window.cxx 10405 2014-10-29 15:53:52Z manolo $"
//
// Window widget class for the Fast Light Tool Kit (FLTK).
//
@@ -23,6 +23,7 @@
#include <config.h>
#include <FL/Fl.H>
#include <FL/x.H>
+#include <FL/Fl_RGB_Image.H>
#include <FL/Fl_Window.H>
#include <stdlib.h>
#include "flstring.h"
@@ -45,11 +46,13 @@ void Fl_Window::_Fl_Window() {
}
i = 0;
xclass_ = 0;
- icon_ = 0;
+ icon_ = new icon_data;
+ memset(icon_, 0, sizeof(*icon_));
iconlabel_ = 0;
resizable(0);
size_range_set = 0;
minw = maxw = minh = maxh = 0;
+ shape_data_ = NULL;
#if FLTK_ABI_VERSION >= 10301
no_fullscreen_x = 0;
no_fullscreen_y = 0;
@@ -62,8 +65,6 @@ void Fl_Window::_Fl_Window() {
Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l)
: Fl_Group(X, Y, W, H, l) {
cursor_default = FL_CURSOR_DEFAULT;
- cursor_fg = FL_BLACK;
- cursor_bg = FL_WHITE;
_Fl_Window();
set_flag(FORCE_POSITION);
@@ -73,18 +74,72 @@ Fl_Window::Fl_Window(int W, int H, const char *l)
// fix common user error of a missing end() with current(0):
: Fl_Group((Fl_Group::current(0),0), 0, W, H, l) {
cursor_default = FL_CURSOR_DEFAULT;
- cursor_fg = FL_BLACK;
- cursor_bg = FL_WHITE;
_Fl_Window();
clear_visible();
}
+Fl_Window::~Fl_Window() {
+ hide();
+ if (xclass_) {
+ free(xclass_);
+ }
+ free_icons();
+ delete icon_;
+ if (shape_data_) {
+ if (shape_data_->todelete_) delete shape_data_->todelete_;
+#if defined(__APPLE__)
+ if (shape_data_->mask) {
+ CGImageRelease(shape_data_->mask);
+ }
+#endif
+ delete shape_data_;
+ }
+}
+
+
+/** Returns a pointer to the nearest parent window up the widget hierarchy.
+ This will return sub-windows if there are any, or the parent window if there's no sub-windows.
+ If this widget IS the top-level window, NULL is returned.
+ \retval NULL if no window is associated with this widget.
+ \note for an Fl_Window widget, this returns its <I>parent</I> window
+ (if any), not <I>this</I> window.
+ \see top_window()
+*/
Fl_Window *Fl_Widget::window() const {
for (Fl_Widget *o = parent(); o; o = o->parent())
if (o->type() >= FL_WINDOW) return (Fl_Window*)o;
return 0;
}
+
+/** Returns a pointer to the top-level window for the widget.
+ In other words, the 'window manager window' that contains this widget.
+ This method differs from window() in that it won't return sub-windows (if there are any).
+ \returns the top-level window, or NULL if no top-level window is associated with this widget.
+ \see window()
+*/
+Fl_Window *Fl_Widget::top_window() const {
+ const Fl_Widget *w = this;
+ while (w->parent()) { w = w->parent(); } // walk up the widget hierarchy to top-level item
+ return const_cast<Fl_Widget*>(w)->as_window(); // return if window, or NULL if not
+}
+
+/**
+ Finds the x/y offset of the current widget relative to the top-level window.
+ \param[out] xoff,yoff Returns the x/y offset
+ \returns the top-level window (or NULL for a widget that's not in any window)
+*/
+Fl_Window* Fl_Widget::top_window_offset(int& xoff, int& yoff) const {
+ xoff = yoff = 0;
+ const Fl_Widget *w = this;
+ while (w && w->window()) {
+ xoff += w->x(); // accumulate offsets
+ yoff += w->y();
+ w = w->window(); // walk up window hierarchy
+ }
+ return const_cast<Fl_Widget*>(w)->as_window();
+}
+
/** Gets the x position of the window on the screen */
int Fl_Window::x_root() const {
Fl_Window *p = window();
@@ -98,50 +153,11 @@ int Fl_Window::y_root() const {
return y();
}
-void Fl_Window::draw() {
-
- // The following is similar to Fl_Group::draw(), but ...
- // - we draw the box with x=0 and y=0 instead of x() and y()
- // - we don't draw a label
-
- if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing
- draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0
- }
- draw_children();
-
-#ifdef __APPLE_QUARTZ__
- // on OS X, windows have no frame. Before OS X 10.7, to resize a window, we drag the lower right
- // corner. This code draws a little ribbed triangle for dragging.
- if (fl_mac_os_version < 100700 && fl_gc && !parent() && resizable() &&
- (!size_range_set || minh!=maxh || minw!=maxw)) {
- int dx = Fl::box_dw(box())-Fl::box_dx(box());
- int dy = Fl::box_dh(box())-Fl::box_dy(box());
- if (dx<=0) dx = 1;
- if (dy<=0) dy = 1;
- int x1 = w()-dx-1, x2 = x1, y1 = h()-dx-1, y2 = y1;
- Fl_Color c[4] = {
- color(),
- fl_color_average(color(), FL_WHITE, 0.7f),
- fl_color_average(color(), FL_BLACK, 0.6f),
- fl_color_average(color(), FL_BLACK, 0.8f),
- };
- int i;
- for (i=dx; i<12; i++) {
- fl_color(c[i&3]);
- fl_line(x1--, y1, x2, y2--);
- }
- }
-#endif
-
-# if defined(FLTK_USE_CAIRO)
- Fl::cairo_make_current(this); // checkout if an update is necessary
-# endif
-}
-
void Fl_Window::label(const char *name) {
label(name, iconlabel()); // platform dependent
}
+/** Sets the window titlebar label to a copy of a character string */
void Fl_Window::copy_label(const char *a) {
Fl_Widget::copy_label(a);
label(label(), iconlabel()); // platform dependent
@@ -268,17 +284,175 @@ const char *Fl_Window::xclass() const
}
}
-/** Gets the current icon window target dependent data. */
+/** Sets a single default window icon.
+
+ \param[in] icon default icon for all windows subsequently created
+
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ */
+void Fl_Window::default_icon(const Fl_RGB_Image *icon) {
+ default_icons(&icon, 1);
+}
+
+/** Sets the default window icons.
+
+ The default icons are used for all windows that don't have their
+ own icons set before show() is called. You can change the default
+ icons whenever you want, but this only affects windows that are
+ created (and shown) after this call.
+
+ The given images in \p icons are copied. You can use a local
+ variable or free the images immediately after this call.
+
+ \param[in] icons default icons for all windows subsequently created
+ \param[in] count number of images in \p icons. set to 0 to remove
+ the current default icons
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ */
+void Fl_Window::default_icons(const Fl_RGB_Image *icons[], int count) {
+ Fl_X::set_default_icons(icons, count);
+}
+
+/** Sets a single window icon.
+
+ \param[in] icon icon for this window
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ */
+void Fl_Window::icon(const Fl_RGB_Image *icon) {
+ icons(&icon, 1);
+}
+
+/** Sets the window icons.
+
+ The given images in \p icons are copied. You can use a local
+ variable or free the images immediately after this call.
+
+ \param[in] icons icons for this window
+ \param[in] count number of images in \p icons. set to 0 to remove
+ the current icons
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ */
+void Fl_Window::icons(const Fl_RGB_Image *icons[], int count) {
+ free_icons();
+
+ if (count > 0) {
+ icon_->icons = new Fl_RGB_Image*[count];
+ icon_->count = count;
+ // FIXME: Fl_RGB_Image lacks const modifiers on methods
+ for (int i = 0;i < count;i++)
+ icon_->icons[i] = (Fl_RGB_Image*)((Fl_RGB_Image*)icons[i])->copy();
+ }
+
+ if (i)
+ i->set_icons();
+}
+
+/** Gets the current icon window target dependent data.
+ \deprecated in 1.3.3
+ */
const void *Fl_Window::icon() const {
- return icon_;
+ return icon_->legacy_icon;
}
-/** Sets the current icon window target dependent data. */
+/** Sets the current icon window target dependent data.
+ \deprecated in 1.3.3
+ */
void Fl_Window::icon(const void * ic) {
- icon_ = ic;
+ free_icons();
+ icon_->legacy_icon = ic;
+}
+
+/** Deletes all icons previously attached to the window.
+ \see Fl_Window::icons(const Fl_RGB_Image *icons[], int count)
+ */
+void Fl_Window::free_icons() {
+ int i;
+
+ icon_->legacy_icon = 0L;
+
+ if (icon_->icons) {
+ for (i = 0;i < icon_->count;i++)
+ delete icon_->icons[i];
+ delete [] icon_->icons;
+ icon_->icons = 0L;
+ }
+
+ icon_->count = 0;
+
+#ifdef WIN32
+ if (icon_->big_icon)
+ DestroyIcon(icon_->big_icon);
+ if (icon_->small_icon)
+ DestroyIcon(icon_->small_icon);
+
+ icon_->big_icon = NULL;
+ icon_->small_icon = NULL;
+#endif
}
+/**
+ Waits for the window to be fully displayed after calling show().
+
+ Fl_Window::show() is not guaranteed to show and draw the window on
+ all platforms immediately. Instead this is done in the background;
+ particularly on X11 this will take a few messages (client server
+ roundtrips) to display the window.
+
+ Usually this small delay doesn't matter, but in some cases you may
+ want to have the window instantiated and displayed synchronously.
+
+ Currently (as of FLTK 1.3.3) this method only has an effect on X11.
+ On Windows and Mac OS X show() is always synchronous. If you want to
+ write portable code and need this synchronous show() feature, add
+ win->wait_for_expose() on all platforms, FLTK will just do the
+ right thing.
+
+ This method can be used for displaying splash screens before
+ calling Fl::run() or for having exact control over which window
+ has focus after calling show().
+
+ If the window is not shown(), this method does nothing.
+
+ \see virtual void Fl_Window::show()
+
+ Example code for displaying a window before calling Fl::run()
+
+ \code
+ Fl_Double_Window win = new Fl_Double_Window(...);
+
+ // do more window initialization here ...
+
+ win->show(); // show window
+ win->wait_for_expose(); // wait, until displayed
+ Fl::flush(); // make sure everything gets drawn
+
+ // do more initialization work that needs some time here ...
+
+ Fl::run(); // start FLTK event loop
+ \endcode
+
+ Note that the window will not be responsive until the event loop
+ is started with Fl::run().
+*/
+
+void Fl_Window::wait_for_expose() {
+ if (!shown()) return;
+ while (!i || i->wait_for_expose) {
+ Fl::wait();
+ }
+}
//
-// End of "$Id: Fl_Window.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Window.cxx 10405 2014-10-29 15:53:52Z manolo $".
//
diff --git a/src/Fl_Window_fullscreen.cxx b/src/Fl_Window_fullscreen.cxx
index a7044eb..2808f29 100644
--- a/src/Fl_Window_fullscreen.cxx
+++ b/src/Fl_Window_fullscreen.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Window_fullscreen.cxx 9706 2012-11-06 20:46:14Z matt $"
+// "$Id: Fl_Window_fullscreen.cxx 10189 2014-06-11 09:10:53Z ossman $"
//
// Fullscreen window support for the Fast Light Tool Kit (FLTK).
//
@@ -36,6 +36,10 @@ int Fl_Window::no_fullscreen_x = 0;
int Fl_Window::no_fullscreen_y = 0;
int Fl_Window::no_fullscreen_w = 0;
int Fl_Window::no_fullscreen_h = 0;
+int Fl_Window::fullscreen_screen_top = -1;
+int Fl_Window::fullscreen_screen_bottom = -1;
+int Fl_Window::fullscreen_screen_left = -1;
+int Fl_Window::fullscreen_screen_right = -1;
#endif
void Fl_Window::border(int b) {
@@ -95,7 +99,24 @@ void Fl_Window::fullscreen_off() {
fullscreen_off(no_fullscreen_x, no_fullscreen_y, no_fullscreen_w, no_fullscreen_h);
}
+void Fl_Window::fullscreen_screens(int top, int bottom, int left, int right) {
+ if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
+ fullscreen_screen_top = -1;
+ fullscreen_screen_bottom = -1;
+ fullscreen_screen_left = -1;
+ fullscreen_screen_right = -1;
+ } else {
+ fullscreen_screen_top = top;
+ fullscreen_screen_bottom = bottom;
+ fullscreen_screen_left = left;
+ fullscreen_screen_right = right;
+ }
+
+ if (shown() && fullscreen_active())
+ fullscreen_x();
+}
+
//
-// End of "$Id: Fl_Window_fullscreen.cxx 9706 2012-11-06 20:46:14Z matt $".
+// End of "$Id: Fl_Window_fullscreen.cxx 10189 2014-06-11 09:10:53Z ossman $".
//
diff --git a/src/Fl_Window_shape.cxx b/src/Fl_Window_shape.cxx
new file mode 100644
index 0000000..3204944
--- /dev/null
+++ b/src/Fl_Window_shape.cxx
@@ -0,0 +1,407 @@
+//
+// "$Id: Fl_Window_shape.cxx 10348 2014-10-01 16:37:13Z manolo $"
+//
+// implementation of Fl_Window::shape(Fl_Image*) for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 2010-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems to:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+#include <FL/x.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Bitmap.H>
+#include <FL/Fl_Pixmap.H>
+#include <string.h>
+
+#ifdef WIN32
+# include <malloc.h> // needed for VisualC2010
+#elif !defined(__APPLE__)
+#include <config.h>
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+#define ShapeBounding 0
+#define ShapeSet 0
+#endif
+
+
+#if defined(__APPLE__)
+
+static void MyProviderReleaseData (void *info, const void *data, size_t size) {
+ delete[] (uchar*)data;
+}
+
+// bitwise inversion of all 4-bit quantities
+static const unsigned char swapped[16] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
+
+static inline uchar swap_byte(const uchar b) {
+ // reverse the order of bits of byte b: 1->8 becomes 8->1
+ return (swapped[b & 0xF] << 4) | swapped[b >> 4];
+}
+
+#elif defined(WIN32)
+
+static inline BYTE bit(int x) { return (BYTE)(1 << (x%8)); }
+
+static HRGN bitmap2region(Fl_Bitmap* image) {
+ HRGN hRgn = 0;
+ /* Does this need to be dynamically determined, perhaps? */
+ const int ALLOC_UNIT = 100;
+ DWORD maxRects = ALLOC_UNIT;
+
+ RGNDATA* pData = (RGNDATA*)malloc(sizeof(RGNDATAHEADER)+(sizeof(RECT)*maxRects));
+ pData->rdh.dwSize = sizeof(RGNDATAHEADER);
+ pData->rdh.iType = RDH_RECTANGLES;
+ pData->rdh.nCount = pData->rdh.nRgnSize = 0;
+ SetRect(&pData->rdh.rcBound, MAXLONG, MAXLONG, 0, 0);
+
+ const int bytesPerLine = (image->w() + 7)/8;
+ BYTE* p, *data = (BYTE*)image->array;
+ for (int y = 0; y < image->h(); y++) {
+ // each row, left to right
+ for (int x = 0; x < image->w(); x++) {
+ int x0 = x;
+ while (x < image->w()) {
+ p = data + x / 8;
+ if (!((*p) & bit(x))) break; // transparent pixel
+ x++;
+ }
+ if (x > x0) {
+ RECT *pr;
+ /* Add the pixels (x0, y) to (x, y+1) as a new rectangle
+ * in the region
+ */
+ if (pData->rdh.nCount >= maxRects) {
+ maxRects += ALLOC_UNIT;
+ pData = (RGNDATA*)realloc(pData, sizeof(RGNDATAHEADER)
+ + (sizeof(RECT)*maxRects));
+ }
+ pr = (RECT*)&pData->Buffer;
+ SetRect(&pr[pData->rdh.nCount], x0, y, x, y+1);
+ if (x0 < pData->rdh.rcBound.left)
+ pData->rdh.rcBound.left = x0;
+ if (y < pData->rdh.rcBound.top)
+ pData->rdh.rcBound.top = y;
+ if (x > pData->rdh.rcBound.right)
+ pData->rdh.rcBound.right = x;
+ if (y+1 > pData->rdh.rcBound.bottom)
+ pData->rdh.rcBound.bottom = y+1;
+ pData->rdh.nCount++;
+ /* On Windows98, ExtCreateRegion() may fail if the
+ * number of rectangles is too large (ie: >
+ * 4000). Therefore, we have to create the region by
+ * multiple steps.
+ */
+ if (pData->rdh.nCount == 2000) {
+ HRGN h = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER)
+ + (sizeof(RECT)*maxRects), pData);
+ if (hRgn) {
+ CombineRgn(hRgn, hRgn, h, RGN_OR);
+ DeleteObject(h);
+ } else
+ hRgn = h;
+ pData->rdh.nCount = 0;
+ SetRect(&pData->rdh.rcBound, MAXLONG, MAXLONG, 0, 0);
+ }
+ }
+ }
+ /* Go to next row */
+ data += bytesPerLine;
+ }
+ /* Create or extend the region with the remaining rectangles*/
+ HRGN h = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER)
+ + (sizeof(RECT)*maxRects), pData);
+ if (hRgn) {
+ CombineRgn(hRgn, hRgn, h, RGN_OR);
+ DeleteObject(h);
+ } else hRgn = h;
+ free(pData); // I've created the region so I can free this now, right?
+ return hRgn;
+}
+
+#else
+
+#ifndef FL_DOXYGEN
+void Fl_Window::combine_mask()
+{
+ typedef void (*XShapeCombineMask_type)(Display*, int, int, int, int, Pixmap, int);
+ static XShapeCombineMask_type XShapeCombineMask_f = NULL;
+ static int beenhere = 0;
+ typedef Bool (*XShapeQueryExtension_type)(Display*, int*, int*);
+ if (!beenhere) {
+ beenhere = 1;
+#if HAVE_DLSYM && HAVE_DLFCN_H
+ fl_open_display();
+ void *handle = dlopen(NULL, RTLD_LAZY); // search symbols in executable
+ XShapeQueryExtension_type XShapeQueryExtension_f = (XShapeQueryExtension_type)dlsym(handle, "XShapeQueryExtension");
+ XShapeCombineMask_f = (XShapeCombineMask_type)dlsym(handle, "XShapeCombineMask");
+ // make sure that the X server has the SHAPE extension
+ int error_base, shapeEventBase;
+ if ( !( XShapeQueryExtension_f && XShapeCombineMask_f &&
+ XShapeQueryExtension_f(fl_display, &shapeEventBase, &error_base) ) ) XShapeCombineMask_f = NULL;
+#endif
+ }
+ if (!XShapeCombineMask_f) return;
+ shape_data_->lw_ = w();
+ shape_data_->lh_ = h();
+ Fl_Bitmap* temp = (Fl_Bitmap*)shape_data_->shape_->copy(shape_data_->lw_, shape_data_->lh_);
+ Pixmap pbitmap = XCreateBitmapFromData(fl_display, fl_xid(this),
+ (const char*)temp->array,
+ temp->w(), temp->h());
+ XShapeCombineMask_f(fl_display, fl_xid(this), ShapeBounding, 0, 0, pbitmap, ShapeSet);
+ if (pbitmap != None) XFreePixmap(fl_display, pbitmap);
+ delete temp;
+}
+#endif // !FL_DOXYGEN
+
+#endif // __APPLE__
+
+
+void Fl_Window::shape_bitmap_(Fl_Bitmap* b) {
+ shape_data_->shape_ = b;
+#if defined(__APPLE__)
+ if (b) {
+ // complement mask bits and perform bitwise inversion of all bytes and also reverse top and bottom
+ int bytes_per_row = (b->w() + 7)/8;
+ uchar *from = new uchar[bytes_per_row * b->h()];
+ for (int i = 0; i < b->h(); i++) {
+ uchar *p = (uchar*)b->array + bytes_per_row * i;
+ uchar *last = p + bytes_per_row;
+ uchar *q = from + (b->h() - 1 - i) * bytes_per_row;
+ while (p < last) {
+ *q++ = swap_byte(~*p++);
+ }
+ }
+ CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, from, bytes_per_row * b->h(), MyProviderReleaseData);
+ shape_data_->mask = CGImageMaskCreate(b->w(), b->h(), 1, 1, bytes_per_row, provider, NULL, false);
+ CFRelease(provider);
+ }
+#endif
+}
+
+
+#if defined(__APPLE__) // on the mac, use an 8-bit mask
+/* the image can be of any depth
+ offset gives the byte offset from the pixel start to the byte used to construct the shape
+ */
+void Fl_Window::shape_alpha_(Fl_RGB_Image* img, int offset) {
+ int i, d = img->d(), w = img->w(), h = img->h();
+ shape_data_->shape_ = img;
+ if (shape_data_->shape_) {
+ // reverse top and bottom and convert to gray scale if img->d() == 3 and complement bits
+ int bytes_per_row = w * d;
+ uchar *from = new uchar[w * h];
+ for ( i = 0; i < h; i++) {
+ uchar *p = (uchar*)img->array + bytes_per_row * i + offset;
+ uchar *last = p + bytes_per_row;
+ uchar *q = from + (h - 1 - i) * w;
+ while (p < last) {
+ if (d == 3) {
+ unsigned u = *p++;
+ u += *p++;
+ u += *p++;
+ *q++ = ~(u/3);
+ }
+ else {
+ *q++ = ~(*p);
+ p += d;
+ }
+ }
+ }
+ CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, from, w * h, MyProviderReleaseData);
+ shape_data_->mask = CGImageMaskCreate(w, h, 8, 8, w, provider, NULL, false);
+ CFRelease(provider);
+ }
+}
+
+#else
+
+/* the img image can be of any depth
+ offset gives the byte offset from the pixel start to the byte used to construct the shape
+ */
+void Fl_Window::shape_alpha_(Fl_RGB_Image* img, int offset) {
+ int i, j, d = img->d(), w = img->w(), h = img->h(), bytesperrow = (w+7)/8;
+ unsigned u;
+ uchar byte, onebit;
+ // build an Fl_Bitmap covering the non-fully transparent/black part of the image
+ const uchar* bits = new uchar[h*bytesperrow]; // to store the bitmap
+ const uchar* alpha = img->array + offset; // points to alpha value of rgba pixels
+ for (i = 0; i < h; i++) {
+ uchar *p = (uchar*)bits + i * bytesperrow;
+ byte = 0;
+ onebit = 1;
+ for (j = 0; j < w; j++) {
+ if (d == 3) {
+ u = *alpha;
+ u += *(alpha+1);
+ u += *(alpha+2);
+ }
+ else u = *alpha;
+ if (u > 0) { // if the pixel is not fully transparent/black
+ byte |= onebit; // turn on the corresponding bit of the bitmap
+ }
+ onebit = onebit << 1; // move the single set bit one position to the left
+ if (onebit == 0 || j == w-1) {
+ onebit = 1;
+ *p++ = byte; // store in bitmap one pack of bits
+ byte = 0;
+ }
+ alpha += d; // point to alpha value of next pixel
+ }
+ }
+ Fl_Bitmap* bitmap = new Fl_Bitmap(bits, w, h);
+ bitmap->alloc_array = 1;
+ shape_bitmap_(bitmap);
+ shape_data_->todelete_ = bitmap;
+}
+
+#endif
+
+
+void Fl_Window::shape_pixmap_(Fl_Pixmap* pixmap) {
+ Fl_RGB_Image* rgba = new Fl_RGB_Image(pixmap);
+ shape_alpha_(rgba, 3);
+ delete rgba;
+}
+
+#if FLTK_ABI_VERSION < 10303 && !defined(FL_DOXYGEN)
+Fl_Window::shape_data_type* Fl_Window::shape_data_ = NULL;
+#endif
+
+/** Assigns a non-rectangular shape to the window.
+ This function gives an arbitrary shape (not just a rectangular region) to an Fl_Window.
+ An Fl_Image of any dimension can be used as mask; it is rescaled to the window's dimension as needed.
+
+ The layout and widgets inside are unaware of the mask shape, and most will act as though the window's
+ rectangular bounding box is available
+ to them. It is up to you to make sure they adhere to the bounds of their masking shape.
+
+ The \p img argument can be an Fl_Bitmap, Fl_Pixmap or Fl_RGB_Image:
+ \li With Fl_Bitmap or Fl_Pixmap, the shaped window covers the image part where bitmap bits equal one,
+ or where the pixmap is not fully transparent.
+ \li With an Fl_RGB_Image with an alpha channel (depths 2 or 4), the shaped window covers the image part
+ that is not fully transparent.
+ \li With an Fl_RGB_Image of depth 1 (gray-scale) or 3 (RGB), the shaped window covers the non-black image part.
+
+ Platform details:
+ \li On the unix/linux platform, the SHAPE extension of the X server is required.
+ This function does control the shape of Fl_Gl_Window instances.
+ \li On the MSWindows platform, this function does nothing with class Fl_Gl_Window.
+ \li On the Mac platform, OS version 10.4 or above is required.
+ An 8-bit shape-mask is used when \p img is an Fl_RGB_Image:
+ with depths 2 or 4, the image alpha channel becomes the shape mask such that areas with alpha = 0
+ are out of the shaped window;
+ with depths 1 or 3, white and black are in and out of the
+ shaped window, respectively, and other colors give intermediate masking scores.
+ This function does nothing with class Fl_Gl_Window.
+
+ The window borders and caption created by the window system are turned off by default. They
+ can be re-enabled by calling Fl_Window::border(1).
+
+ A usage example is found at example/shapedwindow.cxx.
+
+ \version 1.3.3 (and requires compilation with -DFLTK_ABI_VERSION = 10303)
+ */
+void Fl_Window::shape(const Fl_Image* img) {
+#if FLTK_ABI_VERSION >= 10303
+ if (shape_data_) {
+ if (shape_data_->todelete_) { delete shape_data_->todelete_; }
+#if defined(__APPLE__)
+ if (shape_data_->mask) { CGImageRelease(shape_data_->mask); }
+#endif
+ }
+ else {
+ shape_data_ = new shape_data_type;
+ }
+ memset(shape_data_, 0, sizeof(shape_data_type));
+ border(false);
+ int d = img->d();
+ if (d && img->count() >= 2) shape_pixmap_((Fl_Pixmap*)img);
+ else if (d == 0) shape_bitmap_((Fl_Bitmap*)img);
+ else if (d == 2 || d == 4) shape_alpha_((Fl_RGB_Image*)img, d - 1);
+ else if ((d == 1 || d == 3) && img->count() == 1) shape_alpha_((Fl_RGB_Image*)img, 0);
+#endif
+}
+
+void Fl_Window::draw() {
+ if (shape_data_) {
+# if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ if (shape_data_->mask && (CGContextClipToMask != NULL)) {
+ CGContextClipToMask(fl_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4
+ }
+ CGContextSaveGState(fl_gc);
+#elif defined(WIN32)
+ if ((shape_data_->lw_ != w() || shape_data_->lh_ != h()) && shape_data_->shape_) {
+ // size of window has changed since last time
+ shape_data_->lw_ = w();
+ shape_data_->lh_ = h();
+ Fl_Bitmap* temp = (Fl_Bitmap*)shape_data_->shape_->copy(shape_data_->lw_, shape_data_->lh_);
+ HRGN region = bitmap2region(temp);
+ SetWindowRgn(fl_xid(this), region, TRUE); // the system deletes the region when it's no longer needed
+ delete temp;
+ }
+#elif !(defined(__APPLE__) || defined(WIN32))
+ if (( shape_data_->lw_ != w() || shape_data_->lh_ != h() ) && shape_data_->shape_) {
+ // size of window has changed since last time
+ combine_mask();
+ }
+# endif
+ }
+
+ // The following is similar to Fl_Group::draw(), but ...
+ // - we draw the box with x=0 and y=0 instead of x() and y()
+ // - we don't draw a label
+
+ if (damage() & ~FL_DAMAGE_CHILD) { // draw the entire thing
+ draw_box(box(),0,0,w(),h(),color()); // draw box with x/y = 0
+ }
+ draw_children();
+
+#ifdef __APPLE_QUARTZ__
+ // on OS X, windows have no frame. Before OS X 10.7, to resize a window, we drag the lower right
+ // corner. This code draws a little ribbed triangle for dragging.
+ if (fl_mac_os_version < 100700 && fl_gc && !parent() && resizable() &&
+ (!size_range_set || minh!=maxh || minw!=maxw)) {
+ int dx = Fl::box_dw(box())-Fl::box_dx(box());
+ int dy = Fl::box_dh(box())-Fl::box_dy(box());
+ if (dx<=0) dx = 1;
+ if (dy<=0) dy = 1;
+ int x1 = w()-dx-1, x2 = x1, y1 = h()-dx-1, y2 = y1;
+ Fl_Color c[4] = {
+ color(),
+ fl_color_average(color(), FL_WHITE, 0.7f),
+ fl_color_average(color(), FL_BLACK, 0.6f),
+ fl_color_average(color(), FL_BLACK, 0.8f),
+ };
+ int i;
+ for (i=dx; i<12; i++) {
+ fl_color(c[i&3]);
+ fl_line(x1--, y1, x2, y2--);
+ }
+ }
+#endif
+# if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ if (shape_data_) CGContextRestoreGState(fl_gc);
+# endif
+
+# if defined(FLTK_USE_CAIRO)
+ Fl::cairo_make_current(this); // checkout if an update is necessary
+# endif
+}
+
+
+
+//
+// End of "$Id: Fl_Window_shape.cxx 10348 2014-10-01 16:37:13Z manolo $".
+//
diff --git a/src/Fl_XPM_Image.cxx b/src/Fl_XPM_Image.cxx
index f79bfef..580d5fe 100644
--- a/src/Fl_XPM_Image.cxx
+++ b/src/Fl_XPM_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_XPM_Image.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: Fl_XPM_Image.cxx 10156 2014-05-22 12:11:17Z manolo $"
//
// Fl_XPM_Image routines.
//
@@ -60,6 +60,7 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
int malloc_size = INITIALLINES;
char buffer[MAXSIZE+20];
int i = 0;
+ int W,H,ncolors,chars_per_pixel;
while (fgets(buffer,MAXSIZE+20,f)) {
if (buffer[0] != '\"') continue;
char *myp = buffer;
@@ -74,7 +75,7 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
case 'x': {
q++;
int n = 0;
- for (int x = 0; x < 3; x++) {
+ for (int x = 0; x < 2; x++) {
int xd = hexdigit(*q);
if (xd > 15) break;
n = (n<<4)+xd;
@@ -107,6 +108,15 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
new_data = temp_data;
malloc_size += INITIALLINES;
}
+ // first line has 4 ints: width, height, ncolors, chars_per_pixel
+ // followed by color segment:
+ // if ncolors < 0 this is FLTK (non standard) compressed colormap - all colors coded in single line of 4*ncolors bytes
+ // otherwise - ncolor lines of at least chars_per_pixel bytes
+ // followed by pic segment: H lines of at least chars_per_pixel*W bytes
+ // next line: would have loved to use measure_pixmap, but it doesn't return all the data!
+ if ((!i) && (sscanf(buffer,"%d%d%d%d", &W, &H, &ncolors, &chars_per_pixel) < 4)) goto bad_data; // first line
+ else if ((i > (ncolors<0?1:ncolors)) && (myp-buffer-1<W*chars_per_pixel)) goto bad_data; // pic segment
+ else if (myp-buffer-1<(ncolors<0?-ncolors*4:chars_per_pixel)) goto bad_data; // color segment
new_data[i] = new char[myp-buffer+1];
memcpy(new_data[i], buffer,myp-buffer);
new_data[i][myp-buffer] = 0;
@@ -114,14 +124,21 @@ Fl_XPM_Image::Fl_XPM_Image(const char *name) : Fl_Pixmap((char *const*)0) {
}
fclose(f);
-
+ f = NULL;
+ if ((!i) || (i<1+(ncolors<0?1:ncolors)+H)) goto bad_data;
data((const char **)new_data, i);
alloc_data = 1;
measure();
+ return;
+ // dealloc and close as needed when bad data was found
+bad_data:
+ while (i > 0) delete[] new_data[--i];
+ delete[] new_data;
+ if (f) fclose(f);
}
//
-// End of "$Id: Fl_XPM_Image.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: Fl_XPM_Image.cxx 10156 2014-05-22 12:11:17Z manolo $".
//
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx
index 74e525f..99bf6a3 100644
--- a/src/Fl_arg.cxx
+++ b/src/Fl_arg.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_arg.cxx 9365 2012-04-21 11:13:10Z matt $"
+// "$Id: Fl_arg.cxx 10145 2014-05-04 13:46:09Z manolo $"
//
// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
//
@@ -435,7 +435,7 @@ without express or implied warranty.
static int ReadInteger(char* string, char** NextString)
{
- register int Result = 0;
+ int Result = 0;
int Sign = 1;
if (*string == '+')
@@ -458,7 +458,7 @@ int XParseGeometry(const char* string, int* x, int* y,
unsigned int* width, unsigned int* height)
{
int mask = NoValue;
- register char *strind;
+ char *strind;
unsigned int tempWidth = 0, tempHeight = 0;
int tempX = 0, tempY = 0;
char *nextCharacter;
@@ -541,5 +541,5 @@ int XParseGeometry(const char* string, int* x, int* y,
#endif // ifdef WIN32
//
-// End of "$Id: Fl_arg.cxx 9365 2012-04-21 11:13:10Z matt $".
+// End of "$Id: Fl_arg.cxx 10145 2014-05-04 13:46:09Z manolo $".
//
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index a361f29..6f5b8b1 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1,9 +1,9 @@
//
-// "$Id: Fl_cocoa.mm 9734 2012-11-30 18:20:36Z manolo $"
+// "$Id: Fl_cocoa.mm 10427 2014-11-02 21:06:07Z manolo $"
//
// MacOS-Cocoa specific code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2012 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -41,7 +41,6 @@ extern "C" {
#include <FL/x.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Tooltip.H>
-#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/Fl_Printer.H>
#include <FL/Fl_Input_.H>
#include <FL/Fl_Text_Display.H>
@@ -51,6 +50,8 @@ extern "C" {
#include <unistd.h>
#include <stdarg.h>
#include <math.h>
+#include <limits.h>
+#include <dlfcn.h>
#import <Cocoa/Cocoa.h>
@@ -80,6 +81,7 @@ typedef unsigned int NSUInteger;
// external functions
extern void fl_fix_focus();
extern unsigned short *fl_compute_macKeyLookUp();
+extern int fl_send_system_handlers(void *e);
// forward definition of functions in this file
// converting cr lf converter function
@@ -88,27 +90,34 @@ static void createAppleMenu(void);
static Fl_Region MacRegionMinusRect(Fl_Region r, int x,int y,int w,int h);
static void cocoaMouseHandler(NSEvent *theEvent);
static int calc_mac_os_version();
+static void clipboard_check(void);
+static NSString *calc_utf8_format(void);
+static void im_update(void);
+static unsigned make_current_counts = 0; // if > 0, then Fl_Window::make_current() can be called only once
+static Fl_X *fl_x_to_redraw = NULL; // set by Fl_X::flush() to the Fl_X object of the window to be redrawn
-static Fl_Quartz_Graphics_Driver fl_quartz_driver;
-static Fl_Display_Device fl_quartz_display(&fl_quartz_driver);
-Fl_Display_Device *Fl_Display_Device::_display = &fl_quartz_display; // the platform display
+Fl_Display_Device *Fl_Display_Device::_display = new Fl_Display_Device(new Fl_Quartz_Graphics_Driver); // the platform display
// public variables
CGContextRef fl_gc = 0;
-void *fl_system_menu; // this is really a NSMenu*
-Fl_Sys_Menu_Bar *fl_sys_menu_bar = 0;
-void *fl_default_cursor; // this is really a NSCursor*
void *fl_capture = 0; // (NSWindow*) we need this to compensate for a missing(?) mouse capture
bool fl_show_iconic; // true if called from iconize() - shows the next created window in collapsed state
//int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
Window fl_window;
Fl_Window *Fl_Window::current_;
int fl_mac_os_version = calc_mac_os_version(); // the version number of the running Mac OS X (e.g., 100604 for 10.6.4)
+static SEL inputContextSEL = (fl_mac_os_version >= 100600 ? @selector(inputContext) : @selector(FLinputContext));
+Fl_Fontdesc* fl_fonts = Fl_X::calc_fl_fonts();
+static NSString *utf8_format = calc_utf8_format();
// forward declarations of variables in this file
static int got_events = 0;
static Fl_Window* resize_from_system;
static int main_screen_height; // height of menubar-containing screen used to convert between Cocoa and FLTK global screen coordinates
+// through_drawRect = YES means the drawRect: message was sent to the view,
+// thus the graphics context was prepared by the system
+static BOOL through_drawRect = NO;
+static int im_enabled = -1;
#if CONSOLIDATE_MOTION
static Fl_Window* send_motion;
@@ -117,6 +126,29 @@ extern Fl_Window* fl_xmousewin;
enum { FLTKTimerEvent = 1, FLTKDataReadyEvent };
+// Carbon functions and definitions
+
+typedef void *TSMDocumentID;
+
+extern "C" enum {
+ kTSMDocumentEnabledInputSourcesPropertyTag = 'enis' // from Carbon/TextServices.h
+};
+
+// Undocumented voodoo. Taken from Mozilla.
+static const int smEnableRomanKybdsOnly = -23;
+
+typedef TSMDocumentID (*TSMGetActiveDocument_type)(void);
+static TSMGetActiveDocument_type TSMGetActiveDocument;
+typedef OSStatus (*TSMSetDocumentProperty_type)(TSMDocumentID, OSType, UInt32, void*);
+static TSMSetDocumentProperty_type TSMSetDocumentProperty;
+typedef OSStatus (*TSMRemoveDocumentProperty_type)(TSMDocumentID, OSType);
+static TSMRemoveDocumentProperty_type TSMRemoveDocumentProperty;
+typedef CFArrayRef (*TISCreateASCIICapableInputSourceList_type)(void);
+static TISCreateASCIICapableInputSourceList_type TISCreateASCIICapableInputSourceList;
+
+typedef void (*KeyScript_type)(short);
+static KeyScript_type KeyScript;
+
/* fltk-utf8 placekeepers */
void fl_reset_spot()
@@ -462,9 +494,7 @@ static void processFLTKEvent(void) {
* break the current event loop
*/
static void breakMacEventLoop()
-{
- fl_lock_function();
-
+{
NSPoint pt={0,0};
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined location:pt
modifierFlags:0
@@ -472,7 +502,6 @@ static void breakMacEventLoop()
windowNumber:0 context:NULL
subtype:FLTKTimerEvent data1:0 data2:0];
[NSApp postEvent:event atStart:NO];
- fl_unlock_function();
}
//
@@ -520,6 +549,7 @@ static void delete_timer(MacTimeout& t)
static void do_timer(CFRunLoopTimerRef timer, void* data)
{
+ fl_lock_function();
current_timer = (MacTimeout*)data;
current_timer->pending = 0;
(current_timer->callback)(current_timer->data);
@@ -528,6 +558,7 @@ static void do_timer(CFRunLoopTimerRef timer, void* data)
current_timer = NULL;
breakMacEventLoop();
+ fl_unlock_function();
}
void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
@@ -628,11 +659,35 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
contentRect:(NSRect)rect
styleMask:(NSUInteger)windowStyle;
- (Fl_Window *)getFl_Window;
+/* These two functions allow to check if a window contains OpenGL-subwindows.
+ This is useful only for Mac OS < 10.7 to repair a problem apparent with the "cube" test program:
+ if the cube window is moved around rapidly (with OS < 10.7), the GL pixels leak away from where they should be.
+ The repair is performed by [FLWindowDelegate windowDidMove:], only if OS < 10.7.
+ */
- (BOOL)containsGLsubwindow;
-- (void)setContainsGLsubwindow:(BOOL)contains;
+- (void)containsGLsubwindow:(BOOL)contains;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
+#endif
@end
@implementation FLWindow
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+- (NSPoint)convertBaseToScreen:(NSPoint)aPoint
+{
+ if (fl_mac_os_version >= 100700) {
+ NSRect r = [self convertRectToScreen:NSMakeRect(aPoint.x, aPoint.y, 0, 0)];
+ return r.origin;
+ }
+ else {
+ // replaces return [super convertBaseToScreen:aPoint] that may trigger a compiler warning
+ typedef NSPoint (*convertIMP)(id, SEL, NSPoint);
+ convertIMP addr = (convertIMP)[NSWindow instanceMethodForSelector:@selector(convertBaseToScreen:)];
+ return addr(self, @selector(convertBaseToScreen:), aPoint);
+ }
+}
+#endif
+
- (FLWindow*)initWithFl_W:(Fl_Window *)flw
contentRect:(NSRect)rect
styleMask:(NSUInteger)windowStyle
@@ -641,6 +696,12 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
if (self) {
w = flw;
containsGLsubwindow = NO;
+ if (fl_mac_os_version >= 100700) {
+ // replaces [self setRestorable:NO] that may trigger a compiler warning
+ typedef void (*setIMP)(id, SEL, BOOL);
+ setIMP addr = (setIMP)[self methodForSelector:@selector(setRestorable:)];
+ addr(self, @selector(setRestorable:), NO);
+ }
}
return self;
}
@@ -652,7 +713,7 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
{
return containsGLsubwindow;
}
-- (void)setContainsGLsubwindow:(BOOL)contains
+- (void)containsGLsubwindow:(BOOL)contains
{
containsGLsubwindow = contains;
}
@@ -666,9 +727,6 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
return !(w->tooltip_window() || w->menu_window());
}
-// TODO see if we really need a canBecomeMainWindow ...
-#if 0
-
- (BOOL)canBecomeMainWindow
{
if (Fl::modal_ && (Fl::modal_ != w))
@@ -677,7 +735,6 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
return !(w->tooltip_window() || w->menu_window());
}
-#endif
@end
@@ -726,6 +783,7 @@ static double do_queued_events( double time = 0.0 )
return time;
}
+
/*
* This public function handles all events. It wait a maximum of
* 'time' seconds for an event. This version returns 1 if events
@@ -739,17 +797,132 @@ int fl_wait( double time )
return (got_events);
}
-double fl_mac_flush_and_wait(double time_to_wait, char in_idle) {
+double fl_mac_flush_and_wait(double time_to_wait) {
+ static int in_idle = 0;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ if (Fl::idle) {
+ if (!in_idle) {
+ in_idle = 1;
+ Fl::idle();
+ in_idle = 0;
+ }
+ // the idle function may turn off idle, we can then wait:
+ if (Fl::idle) time_to_wait = 0.0;
+ }
Fl::flush();
if (Fl::idle && !in_idle) // 'idle' may have been set within flush()
time_to_wait = 0.0;
double retval = fl_wait(time_to_wait);
+ if (fl_gc) {
+ CGContextFlush(fl_gc);
+ fl_gc = 0;
+ }
[pool release];
return retval;
}
+static NSInteger max_normal_window_level(void)
+{
+ Fl_X *x;
+ NSInteger max_level;
+
+ max_level = 0;
+
+ for (x = Fl_X::first;x;x = x->next) {
+ NSInteger level;
+ FLWindow *cw = x->xid;
+ Fl_Window *win = x->w;
+ if (!win || !cw || ![cw isVisible])
+ continue;
+ if (win->modal() || win->non_modal())
+ continue;
+ level = [cw level];
+ if (level >= max_level)
+ max_level = level;
+ }
+
+ return max_level;
+}
+
+// appropriate window level for modal windows
+static NSInteger modal_window_level(void)
+{
+ NSInteger level;
+
+ level = max_normal_window_level();
+ if (level < NSModalPanelWindowLevel)
+ return NSModalPanelWindowLevel;
+
+ // Need some room for non-modal windows
+ level += 2;
+
+ // We cannot exceed this
+ if (level > CGShieldingWindowLevel())
+ return CGShieldingWindowLevel();
+
+ return level;
+}
+
+// appropriate window level for non-modal windows
+static NSInteger non_modal_window_level(void)
+{
+ NSInteger level;
+
+ level = max_normal_window_level();
+ if (level < NSFloatingWindowLevel)
+ return NSFloatingWindowLevel;
+
+ level += 1;
+
+ if (level > CGShieldingWindowLevel())
+ return CGShieldingWindowLevel();
+
+ return level;
+}
+
+// makes sure modal and non-modal windows stay on top
+static void fixup_window_levels(void)
+{
+ NSInteger modal_level, non_modal_level;
+
+ Fl_X *x;
+ FLWindow *prev_modal, *prev_non_modal;
+
+ modal_level = modal_window_level();
+ non_modal_level = non_modal_window_level();
+
+ prev_modal = NULL;
+ prev_non_modal = NULL;
+
+ for (x = Fl_X::first;x;x = x->next) {
+ FLWindow *cw = x->xid;
+ Fl_Window *win = x->w;
+ if (!win || !cw || ![cw isVisible])
+ continue;
+ if (win->modal()) {
+ if ([cw level] != modal_level) {
+ [cw setLevel:modal_level];
+ // changing level puts then in front, so make sure the
+ // stacking isn't messed up
+ if (prev_modal != NULL)
+ [cw orderWindow:NSWindowBelow
+ relativeTo:[prev_modal windowNumber]];
+ }
+ prev_modal = cw;
+ } else if (win->non_modal()) {
+ if ([cw level] != non_modal_level) {
+ [cw setLevel:non_modal_level];
+ if (prev_non_modal != NULL)
+ [cw orderWindow:NSWindowBelow
+ relativeTo:[prev_non_modal windowNumber]];
+ }
+ prev_non_modal = cw;
+ }
+ }
+}
+
+
// updates Fl::e_x, Fl::e_y, Fl::e_x_root, and Fl::e_y_root
static void update_e_xy_and_e_xy_root(NSWindow *nsw)
{
@@ -893,97 +1066,35 @@ static void cocoaMouseHandler(NSEvent *theEvent)
return;
}
-@interface FLTextView : NSTextView
-// this subclass is needed under OS X <= 10.5 but not under >= 10.6 where the base class is enough
+@interface FLTextView : NSTextView // this subclass is only needed under OS X < 10.6
{
+ BOOL isActive;
}
+- (void)insertText:(id)aString;
+- (void)doCommandBySelector:(SEL)aSelector;
+- (void)setActive:(BOOL)a;
@end
@implementation FLTextView
- (void)insertText:(id)aString
{
- [[[NSApp keyWindow] contentView] insertText:aString];
+ if (isActive) [[[NSApp keyWindow] contentView] insertText:aString];
}
- (void)doCommandBySelector:(SEL)aSelector
{
[[[NSApp keyWindow] contentView] doCommandBySelector:aSelector];
}
-@end
-
-/*
-Handle cocoa keyboard events
-Events during a character composition sequence:
- - keydown with deadkey -> [[theEvent characters] length] is 0
- - keyup -> [theEvent characters] contains the deadkey
- - keydown with next key -> [theEvent characters] contains the composed character
- - keyup -> [theEvent characters] contains the standard character
- */
-static void cocoaKeyboardHandler(NSEvent *theEvent)
+- (void)setActive:(BOOL)a
{
- NSUInteger mods;
-
- // get the modifiers
- mods = [theEvent modifierFlags];
- // get the key code
- UInt32 keyCode = 0, maskedKeyCode = 0;
- unsigned short sym = 0;
- keyCode = [theEvent keyCode];
- NSString *s = [theEvent characters];
- if ( (mods & NSShiftKeyMask) && (mods & NSCommandKeyMask) ) {
- s = [s uppercaseString]; // US keyboards return lowercase letter in s if cmd-shift-key is hit
- }
- // extended keyboards can also send sequences on key-up to generate Kanji etc. codes.
- // Some observed prefixes are 0x81 to 0x83, followed by an 8 bit keycode.
- // In this mode, there seem to be no key-down codes
- // printf("%08x %08x %08x\n", keyCode, mods, key);
- maskedKeyCode = keyCode & 0x7f;
-
- if ([theEvent type] == NSKeyUp) {
- Fl::e_state &= 0xbfffffff; // clear the deadkey flag
- }
-
- mods_to_e_state( mods ); // process modifier keys
- sym = macKeyLookUp[maskedKeyCode];
- if (sym < 0xff00) { // a "simple" key
- // find the result of this key without modifier
- NSString *sim = [theEvent charactersIgnoringModifiers];
- UniChar one;
- CFStringGetCharacters((CFStringRef)sim, CFRangeMake(0, 1), &one);
- // charactersIgnoringModifiers doesn't ignore shift, remove it when it's on
- if(one >= 'A' && one <= 'Z') one += 32;
- if (one > 0 && one <= 0x7f && (sym<'0' || sym>'9') ) sym = one;
- }
- Fl::e_keysym = Fl::e_original_keysym = sym;
-
- //NSLog(@"cocoaKeyboardHandler: keycode=%08x keysym=%08x mods=%08x symbol=%@ (%@)",
- // keyCode, sym, mods, [theEvent characters], [theEvent charactersIgnoringModifiers]);
-
- // If there is text associated with this key, it will be filled in later.
- Fl::e_length = 0;
- Fl::e_text = (char*)"";
-}
-
-
-/*
- * Open callback function to call...
- */
-static void (*open_cb)(const char *) = 0;
-
-/*
- * Install an open documents event handler...
- */
-void fl_open_callback(void (*cb)(const char *)) {
- fl_open_display();
- open_cb = cb;
+ isActive = a;
}
+@end
-@interface FLDelegate : NSObject
+@interface FLWindowDelegate : NSObject
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
-<NSWindowDelegate, NSApplicationDelegate>
+<NSWindowDelegate>
#endif
-{
- BOOL seen_open_file;
-}
++ (FLWindowDelegate*)createOnce;
- (void)windowDidMove:(NSNotification *)notif;
- (void)windowDidResize:(NSNotification *)notif;
- (void)windowDidResignKey:(NSNotification *)notif;
@@ -992,18 +1103,18 @@ void fl_open_callback(void (*cb)(const char *)) {
- (void)windowDidDeminiaturize:(NSNotification *)notif;
- (void)windowDidMiniaturize:(NSNotification *)notif;
- (BOOL)windowShouldClose:(id)fl;
-- (void)anyWindowWillClose:(NSNotification *)notif;
-- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
-- (void)applicationDidBecomeActive:(NSNotification *)notify;
-- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification;
-- (void)applicationWillResignActive:(NSNotification *)notify;
-- (void)applicationWillHide:(NSNotification *)notify;
-- (void)applicationWillUnhide:(NSNotification *)notify;
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client;
-- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
+- (void)anyWindowWillClose:(NSNotification *)notif;
@end
-@implementation FLDelegate
+@implementation FLWindowDelegate
++ (FLWindowDelegate*)createOnce
+{
+ static FLWindowDelegate* delegate = nil;
+ if (!delegate) {
+ delegate = [[FLWindowDelegate alloc] init];
+ }
+ return delegate;
+}
- (void)windowDidMove:(NSNotification *)notif
{
fl_lock_function();
@@ -1016,8 +1127,8 @@ void fl_open_callback(void (*cb)(const char *)) {
update_e_xy_and_e_xy_root(nsw);
resize_from_system = window;
window->position((int)pt2.x, (int)(main_screen_height - pt2.y));
- if ([nsw containsGLsubwindow] ) {
- [nsw display];// redraw window after moving if it contains OpenGL subwindows
+ if ([nsw containsGLsubwindow] && fl_mac_os_version < 100700) {
+ [nsw display];// with OS < 10.7, redraw window after moving if it contains OpenGL subwindows
}
fl_unlock_function();
}
@@ -1045,9 +1156,11 @@ void fl_open_callback(void (*cb)(const char *)) {
FLWindow *nsw = (FLWindow*)[notif object];
Fl_Window *window = [nsw getFl_Window];
/* Fullscreen windows obscure all other windows so we need to return
- to a "normal" level when the user switches to another window */
- if (window->fullscreen_active())
+ to a "normal" level when the user switches to another window */
+ if (window->fullscreen_active()) {
[nsw setLevel:NSNormalWindowLevel];
+ fixup_window_levels();
+ }
Fl::handle( FL_UNFOCUS, window);
fl_unlock_function();
}
@@ -1057,8 +1170,10 @@ void fl_open_callback(void (*cb)(const char *)) {
FLWindow *nsw = (FLWindow*)[notif object];
Fl_Window *w = [nsw getFl_Window];
/* Restore previous fullscreen level */
- if (w->fullscreen_active())
+ if (w->fullscreen_active()) {
[nsw setLevel:NSStatusWindowLevel];
+ fixup_window_levels();
+ }
if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle( FL_FOCUS, w);
fl_unlock_function();
}
@@ -1096,6 +1211,18 @@ void fl_open_callback(void (*cb)(const char *)) {
// the system doesn't need to send [fl close] because FLTK does it when needed
return NO;
}
+- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client
+{
+ if (fl_mac_os_version < 100600) {
+ static FLTextView *view = nil;
+ if (!view) {
+ NSRect rect={{0,0},{20,20}};
+ view = [[FLTextView alloc] initWithFrame:rect];
+ }
+ return view;
+ }
+ return nil;
+}
- (void)anyWindowWillClose:(NSNotification *)notif
{
fl_lock_function();
@@ -1105,13 +1232,34 @@ void fl_open_callback(void (*cb)(const char *)) {
Fl_Window *w = Fl::first_window();
while (w && (w->parent() || !w->border() || !w->visible())) {
w = Fl::next_window(w);
- }
+ }
if (w) {
[Fl_X::i(w)->xid makeKeyWindow];
}
}
fl_unlock_function();
}
+@end
+
+@interface FLAppDelegate : NSObject
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSApplicationDelegate>
+#endif
+{
+ void (*open_cb)(const char*);
+ TSMDocumentID currentDoc;
+}
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender;
+- (void)applicationDidBecomeActive:(NSNotification *)notify;
+- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification;
+- (void)applicationDidUpdate:(NSNotification *)aNotification;
+- (void)applicationWillResignActive:(NSNotification *)notify;
+- (void)applicationWillHide:(NSNotification *)notify;
+- (void)applicationWillUnhide:(NSNotification *)notify;
+- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
+- (void)open_cb:(void (*)(const char*))cb;
+@end
+@implementation FLAppDelegate
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender
{
fl_lock_function();
@@ -1128,44 +1276,25 @@ void fl_open_callback(void (*cb)(const char *)) {
fl_unlock_function();
return reply;
}
-/**
- * Cocoa organizes the Z depth of windows on a global priority. FLTK however
- * expects the window manager to organize Z level by application. The trickery
- * below will change Z order during activation and deactivation.
- */
- (void)applicationDidBecomeActive:(NSNotification *)notify
{
fl_lock_function();
- Fl_X *x;
- FLWindow *top = 0, *topModal = 0, *topNonModal = 0;
- for (x = Fl_X::first;x;x = x->next) {
- FLWindow *cw = x->xid;
- Fl_Window *win = x->w;
- if (win && cw && [cw isVisible]) {
- if (win->modal()) {
- [cw setLevel:NSModalPanelWindowLevel];
- if (topModal)
- [cw orderWindow:NSWindowBelow relativeTo:[topModal windowNumber]];
- else
- topModal = cw;
- } else if (win->non_modal()) {
- [cw setLevel:NSFloatingWindowLevel];
- if (topNonModal)
- [cw orderWindow:NSWindowBelow relativeTo:[topNonModal windowNumber]];
- else
- topNonModal = cw;
- } else {
- if (top)
- ;
- else
- top = cw;
- }
- }
- }
+
+ // update clipboard status
+ clipboard_check();
+
+ /**
+ * Cocoa organizes the Z depth of windows on a global priority. FLTK however
+ * expects the window manager to organize Z level by application. The trickery
+ * below will change Z order during activation and deactivation.
+ */
+ fixup_window_levels();
+
fl_unlock_function();
}
- (void)applicationDidChangeScreenParameters:(NSNotification *)unused
{ // react to changes in screen numbers and positions
+ fl_lock_function();
main_screen_height = [[[NSScreen screens] objectAtIndex:0] frame].size.height;
Fl::call_screen_init();
// FLTK windows have already been notified they were moved,
@@ -1179,6 +1308,24 @@ void fl_open_callback(void (*cb)(const char *)) {
}
}
Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL);
+ fl_unlock_function();
+}
+- (void)applicationDidUpdate:(NSNotification *)aNotification
+{
+ if ((fl_mac_os_version >= 100500) && (im_enabled != -1) &&
+ (TSMGetActiveDocument != NULL)) {
+ TSMDocumentID newDoc;
+ // It is extremely unclear when Cocoa decides to create/update
+ // the input context, but debugging reveals that it is done
+ // by NSApplication:updateWindows. So check if the input context
+ // has shifted after each such run so that we can update our
+ // input methods status.
+ newDoc = TSMGetActiveDocument();
+ if (newDoc != currentDoc) {
+ im_update();
+ currentDoc = newDoc;
+ }
+ }
}
- (void)applicationWillResignActive:(NSNotification *)notify
{
@@ -1243,21 +1390,11 @@ void fl_open_callback(void (*cb)(const char *)) {
}
fl_unlock_function();
}
-- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client
-{
- if (fl_mac_os_version < 100600) {
- static FLTextView *view = nil;
- if (!view) {
- NSRect rect={{0,0},{20,20}};
- view = [[FLTextView alloc] initWithFrame:rect];
- }
- return view;
- }
- return nil;
-}
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
{
- seen_open_file = YES;
+ // without the next statement, the opening of the 1st window is delayed by several seconds
+ // under Mac OS ≥ 10.8 when a file is dragged on the application icon
+ [[theApplication mainWindow] orderFront:self];
if (open_cb) {
fl_lock_function();
(*open_cb)([filename UTF8String]);
@@ -1266,17 +1403,26 @@ void fl_open_callback(void (*cb)(const char *)) {
}
return NO;
}
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+- (void)open_cb:(void (*)(const char*))cb
{
- // without this, the opening of the 1st window is delayed by several seconds
- // under Mac OS 10.8 when a file is dragged on the application icon
- if (fl_mac_os_version >= 100800 && seen_open_file) [[NSApp mainWindow] orderFront:self];
+ open_cb = cb;
}
@end
+/*
+ * Install an open documents event handler...
+ */
+void fl_open_callback(void (*cb)(const char *)) {
+ fl_open_display();
+ [(FLAppDelegate*)[NSApp delegate] open_cb:cb];
+}
+
@implementation FLApplication
+ (void)sendEvent:(NSEvent *)theEvent
{
+ if (fl_send_system_handlers(theEvent))
+ return;
+
NSEventType type = [theEvent type];
if (type == NSLeftMouseDown) {
fl_lock_function();
@@ -1308,21 +1454,29 @@ void fl_open_callback(void (*cb)(const char *)) {
}
@end
-extern "C" {
- OSErr CPSEnableForegroundOperation(ProcessSerialNumber *psn, UInt32 _arg2,
- UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+/* Prototype of undocumented function needed to support Mac OS 10.2 or earlier
+ extern "C" {
+ OSErr CPSEnableForegroundOperation(ProcessSerialNumber*, UInt32, UInt32, UInt32, UInt32);
}
+*/
void fl_open_display() {
static char beenHereDoneThat = 0;
if ( !beenHereDoneThat ) {
beenHereDoneThat = 1;
+
+ TSMGetActiveDocument = (TSMGetActiveDocument_type)Fl_X::get_carbon_function("TSMGetActiveDocument");
+ TSMSetDocumentProperty = (TSMSetDocumentProperty_type)Fl_X::get_carbon_function("TSMSetDocumentProperty");
+ TSMRemoveDocumentProperty = (TSMRemoveDocumentProperty_type)Fl_X::get_carbon_function("TSMRemoveDocumentProperty");
+ TISCreateASCIICapableInputSourceList = (TISCreateASCIICapableInputSourceList_type)Fl_X::get_carbon_function("TISCreateASCIICapableInputSourceList");
+
+ KeyScript = (KeyScript_type)Fl_X::get_carbon_function("KeyScript");
BOOL need_new_nsapp = (NSApp == nil);
if (need_new_nsapp) [NSApplication sharedApplication];
NSAutoreleasePool *localPool;
localPool = [[NSAutoreleasePool alloc] init]; // never released
- [NSApp setDelegate:[[FLDelegate alloc] init]];
+ [(NSApplication*)NSApp setDelegate:[[FLAppDelegate alloc] init]];
if (need_new_nsapp) [NSApp finishLaunching];
// empty the event queue but keep system events for drag&drop of files at launch
@@ -1333,44 +1487,48 @@ void fl_open_display() {
dequeue:YES];
while (ign_event);
- fl_default_cursor = [NSCursor arrowCursor];
-
// bring the application into foreground without a 'CARB' resource
- Boolean same_psn;
- ProcessSerialNumber cur_psn, front_psn;
- if ( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
- !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn ) {
+ bool i_am_in_front;
+ ProcessSerialNumber cur_psn = { 0, kCurrentProcess };
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ if (fl_mac_os_version >= 100600) {
+ i_am_in_front = [[NSRunningApplication currentApplication] isActive];
+ }
+ else
+#endif
+ {
+ Boolean same_psn;
+ ProcessSerialNumber front_psn;
+ //avoid compilation warnings triggered by GetFrontProcess() and SameProcess()
+ void* h = dlopen(NULL, RTLD_LAZY);
+ typedef OSErr (*GetFrontProcess_type)(ProcessSerialNumber*);
+ GetFrontProcess_type GetFrontProcess_ = (GetFrontProcess_type)dlsym(h, "GetFrontProcess");
+ typedef OSErr (*SameProcess_type)(ProcessSerialNumber*, ProcessSerialNumber*, Boolean*);
+ SameProcess_type SameProcess_ = (SameProcess_type)dlsym(h, "SameProcess");
+ i_am_in_front = (!GetFrontProcess_( &front_psn ) &&
+ !SameProcess_( &front_psn, &cur_psn, &same_psn ) && same_psn );
+ }
+ if (!i_am_in_front) {
// only transform the application type for unbundled apps
NSBundle *bundle = [NSBundle mainBundle];
if (bundle) {
- NSString *exe = [[bundle executablePath] stringByStandardizingPath];
- NSString *bpath = [bundle bundlePath];
- NSString *exe_dir = [exe stringByDeletingLastPathComponent];
- if ([bpath isEqualToString:exe] || [bpath isEqualToString:exe_dir]) bundle = nil;
- }
-
- if ( !bundle )
- {
- // Earlier versions of this code tried to use weak linking, however it
- // appears that this does not work on 10.2. Since 10.3 and higher provide
- // both TransformProcessType and CPSEnableForegroundOperation, the following
- // conditional code compiled on 10.2 will still work on newer releases...
- OSErr err;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- if (TransformProcessType != NULL) {
- err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
- } else
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
- if (err == noErr) {
- SetFrontProcess( &cur_psn );
- }
+ NSString *exe = [[bundle executablePath] stringByStandardizingPath];
+ NSString *bpath = [bundle bundlePath];
+ NSString *exe_dir = [exe stringByDeletingLastPathComponent];
+ if ([bpath isEqualToString:exe] || [bpath isEqualToString:exe_dir]) bundle = nil;
+ }
+
+ if ( !bundle ) {
+ TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication); // needs Mac OS 10.3
+ /* support of Mac OS 10.2 or earlier used this undocumented call instead
+ err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
+ */
+ [NSApp activateIgnoringOtherApps:YES];
}
}
if (![NSApp servicesMenu]) createAppleMenu();
- fl_system_menu = [NSApp mainMenu];
main_screen_height = [[[NSScreen screens] objectAtIndex:0] frame].size.height;
- [[NSNotificationCenter defaultCenter] addObserver:[NSApp delegate]
+ [[NSNotificationCenter defaultCenter] addObserver:[FLWindowDelegate createOnce]
selector:@selector(anyWindowWillClose:)
name:NSWindowWillCloseNotification
object:nil];
@@ -1387,6 +1545,66 @@ void fl_open_display() {
void fl_close_display() {
}
+// Force a "Roman" or "ASCII" keyboard, which both the Mozilla and
+// Safari people seem to think implies turning off advanced IME stuff
+// (see nsTSMManager::SyncKeyScript in Mozilla and enableSecureTextInput
+// in Safari/Webcore). Should be good enough for us then...
+
+static void im_update(void) {
+ if (fl_mac_os_version >= 100500) {
+ TSMDocumentID doc;
+
+ if ((TSMGetActiveDocument == NULL) ||
+ (TSMSetDocumentProperty == NULL) ||
+ (TSMRemoveDocumentProperty == NULL) ||
+ (TISCreateASCIICapableInputSourceList == NULL))
+ return;
+
+ doc = TSMGetActiveDocument();
+
+ if (im_enabled)
+ TSMRemoveDocumentProperty(doc, kTSMDocumentEnabledInputSourcesPropertyTag);
+ else {
+ CFArrayRef inputSources;
+
+ inputSources = TISCreateASCIICapableInputSourceList();
+ TSMSetDocumentProperty(doc, kTSMDocumentEnabledInputSourcesPropertyTag,
+ sizeof(CFArrayRef), &inputSources);
+ CFRelease(inputSources);
+ }
+ } else {
+ if (KeyScript == NULL)
+ return;
+
+ if (im_enabled)
+ KeyScript(smKeyEnableKybds);
+ else
+ KeyScript(smEnableRomanKybdsOnly);
+ }
+}
+
+void Fl::enable_im() {
+ fl_open_display();
+
+ im_enabled = 1;
+
+ if (fl_mac_os_version >= 100500)
+ [NSApp updateWindows];
+ else
+ im_update();
+}
+
+void Fl::disable_im() {
+ fl_open_display();
+
+ im_enabled = 0;
+
+ if (fl_mac_os_version >= 100500)
+ [NSApp updateWindows];
+ else
+ im_update();
+}
+
// Gets the border sizes and the titlebar size
static void get_window_frame_sizes(int &bx, int &by, int &bt) {
@@ -1463,15 +1681,6 @@ void Fl::get_mouse(int &x, int &y)
/*
- * Initialize the given port for redraw and call the window's flush() to actually draw the content
- */
-void Fl_X::flush()
-{
- w->flush();
- if (fl_gc) CGContextFlush(fl_gc);
-}
-
-/*
* Gets called when a window is created, resized, or deminiaturized
*/
static void handleUpdateEvent( Fl_Window *window )
@@ -1491,7 +1700,10 @@ static void handleUpdateEvent( Fl_Window *window )
cx->region = 0;
}
cx->w->clear_damage(FL_DAMAGE_ALL);
+ CGContextRef gc = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+ CGContextSaveGState(gc); // save original context
cx->flush();
+ CGContextRestoreGState(gc); // restore original context
cx->w->clear_damage();
}
window->clear_damage(FL_DAMAGE_ALL);
@@ -1629,16 +1841,143 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
}
}
+/** How FLTK handles Mac OS text input
+
+ Let myview be the instance of the FLView class that has the keyboard focus. FLView is an FLTK-defined NSView subclass
+ that implements the NSTextInputClient protocol to properly handle text input. It also implements the old NSTextInput
+ protocol to run with OS <= 10.4. The few NSTextInput protocol methods that differ in signature from the NSTextInputClient
+ protocol transmit the received message to the corresponding NSTextInputClient method.
+
+ Keyboard input sends keyDown: and performKeyEquivalent: messages to myview. The latter occurs for keys such as
+ ForwardDelete, arrows and F1, and when the Ctrl or Cmd modifiers are used. Other key presses send keyDown: messages.
+ The keyDown: method calls [[myview inputContext] handleEvent:theEvent] that triggers system
+ processing of keyboard events. The performKeyEquivalent: method directly calls Fl::handle(FL_KEYBOARD, focus-window)
+ when the Ctrl or Cmd modifiers are used. If not, it also calls [[myview inputContext] handleEvent:theEvent].
+ The performKeyEquivalent: method returns YES when the keystroke has been handled and NO otherwise, which allows
+ shortcuts of the system menu to be processed. Three sorts of messages are then sent back by the system to myview:
+ doCommandBySelector:, setMarkedText: and insertText:. All 3 messages eventually produce Fl::handle(FL_KEYBOARD, win) calls.
+ The doCommandBySelector: message allows to process events such as new-line, forward and backward delete, arrows,
+ escape, tab, F1. The message setMarkedText: is sent when marked text, that is, temporary text that gets replaced later
+ by some other text, is inserted. This happens when a dead key is pressed, and also
+ when entering complex scripts (e.g., Chinese). Fl_X::next_marked_length gives the byte
+ length of marked text before the FL_KEYBOARD event is processed. Fl::compose_state gives this length after this processing.
+ Message insertText: is sent to enter text in the focused widget. If there's marked text, Fl::compose_state is > 0, and this
+ marked text gets replaced by the inserted text. If there's no marked text, the new text is inserted at the insertion point.
+ When the character palette is used to enter text, the system sends an insertText: message to myview.
+ The in_key_event field of the FLView class allows to differentiate keyboard from palette inputs.
+
+ During processing of the handleEvent message, inserted and marked strings are concatenated in a single string
+ inserted in a single FL_KEYBOARD event after return from handleEvent. The need_handle member variable of FLView allows
+ to determine when setMarkedText or insertText strings have been sent during handleEvent processing and must trigger
+ an FL_KEYBOARD event. Concatenating two insertText operations or an insertText followed by a setMarkedText is possible.
+ In contrast, setMarkedText followed by insertText or by another setMarkedText isn't correct if concatenated in a single
+ string. Thus, in such case, the setMarkedText and the next operation produce each an FL_KEYBOARD event.
+
+ OS >= 10.7 contains a feature where pressing and holding certain keys opens a menu window that shows a list
+ of possible accented variants of this key. The selectedRange field of the FLView class and the selectedRange, insertText:
+ and setMarkedText: methods of the NSTextInputClient protocol are used to support this feature.
+ The notion of selected text (!= marked text) is monitored by the selectedRange field.
+ The -(NSRange)[FLView selectedRange] method is used to control whether an FLTK widget opens accented character windows
+ by returning .location = NSNotFound to disable that, or returning the value of the selectedRange field to enable the feature.
+ When selectedRange.location >= 0, the value of selectedRange.length is meaningful. 0 means no text is currently selected,
+ > 0 means this number of characters before the insertion point are selected. The insertText: method does
+ selectedRange = NSMakeRange(100, 0); to indicate no text is selected. The setMarkedText: method does
+ selectedRange = NSMakeRange(100, newSelection.length); to indicate that this length of text is selected.
+
+ With OS <= 10.5, the crucial call [[myview inputContext] handleEvent:theEvent] is not possible because neither the
+ inputContext nor the handleEvent: methods are implemented. This call is re-written:
+ static SEL inputContextSEL = (fl_mac_os_version >= 100600 ? @selector(inputContext) : @selector(FLinputContext));
+ [[myview performSelector:inputContextSEL] handleEvent:theEvent];
+ that replaces the 10.6 inputContext message by the FLinputContext message. This message and two FLTK-defined classes,
+ FLTextInputContext and FLTextView, are used to emulate with OS <= 10.5 what's possible with OS >= 10.6.
+ Method -(FLTextInputContext*)[FLView FLinputContext] returns an instance of class FLTextInputContext that possesses
+ a handleEvent: method. FLView's FLinputContext method also calls [[self window] fieldEditor:YES forObject:nil] which
+ returns the so-called view's "field editor". This editor is an instance of the FLTextView class allocated by the
+ -(id)[FLWindowDelegate windowWillReturnFieldEditor: toObject:] method.
+ The -(BOOL)[FLTextInputContext handleEvent:] method emulates the missing 10.6 -(BOOL)[NSTextInputContext handleEvent:]
+ by sending the interpretKeyEvents: message to the FLTextView object. The system sends back doCommandBySelector: and
+ insertText: messages to the FLTextView object that are transmitted unchanged to myview to be processed as with OS >= 10.6.
+ The system also sends setMarkedText: messages directly to myview.
+
+ There is furthermore an oddity of dead key processing with OS <= 10.5. It occurs when a dead key followed by a non-accented
+ key are pressed. Say, for example, that keys '^' followed by 'p' are pressed on a French or German keyboard. Resulting
+ messages are: [myview setMarkedText:@"^"], [myview insertText:@"^"], [myview insertText:@"p"], [FLTextView insertText:@"^p"].
+ The 2nd '^' replaces the marked 1st one, followed by p^p. The resulting text in the widget is "^p^p" instead of the
+ desired "^p". To avoid that, the FLTextView object is deactivated by the insertText: message and reactivated after
+ the handleEvent: message has been processed.
+
+ NSEvent's during a character composition sequence:
+ - keyDown with deadkey -> [[theEvent characters] length] is 0
+ - keyUp -> [theEvent characters] contains the deadkey
+ - keyDown with next key -> [theEvent characters] contains the composed character
+ - keyUp -> [theEvent characters] contains the standard character
+ */
-@interface FLView : NSView <NSTextInput> {
- int next_compose_length;
- bool in_key_event;
+static void cocoaKeyboardHandler(NSEvent *theEvent)
+{
+ NSUInteger mods;
+ // get the modifiers
+ mods = [theEvent modifierFlags];
+ // get the key code
+ UInt32 keyCode = 0, maskedKeyCode = 0;
+ unsigned short sym = 0;
+ keyCode = [theEvent keyCode];
+ // extended keyboards can also send sequences on key-up to generate Kanji etc. codes.
+ // Some observed prefixes are 0x81 to 0x83, followed by an 8 bit keycode.
+ // In this mode, there seem to be no key-down codes
+ // printf("%08x %08x %08x\n", keyCode, mods, key);
+ maskedKeyCode = keyCode & 0x7f;
+ mods_to_e_state( mods ); // process modifier keys
+ sym = macKeyLookUp[maskedKeyCode];
+ if (sym < 0xff00) { // a "simple" key
+ // find the result of this key without modifier
+ NSString *sim = [theEvent charactersIgnoringModifiers];
+ UniChar one;
+ CFStringGetCharacters((CFStringRef)sim, CFRangeMake(0, 1), &one);
+ // charactersIgnoringModifiers doesn't ignore shift, remove it when it's on
+ if(one >= 'A' && one <= 'Z') one += 32;
+ if (one > 0 && one <= 0x7f && (sym<'0' || sym>'9') ) sym = one;
+ }
+ Fl::e_keysym = Fl::e_original_keysym = sym;
+ /*NSLog(@"cocoaKeyboardHandler: keycode=%08x keysym=%08x mods=%08x symbol=%@ (%@)",
+ keyCode, sym, mods, [theEvent characters], [theEvent charactersIgnoringModifiers]);*/
+ // If there is text associated with this key, it will be filled in later.
+ Fl::e_length = 0;
+ Fl::e_text = (char*)"";
+}
+
+@interface FLTextInputContext : NSObject { // "emulates" NSTextInputContext before OS 10.6
+@public
+ FLTextView *edit;
+}
+-(BOOL)handleEvent:(NSEvent*)theEvent;
+@end
+@implementation FLTextInputContext
+-(BOOL)handleEvent:(NSEvent*)theEvent {
+ [self->edit setActive:YES];
+ [self->edit interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
+ [self->edit setActive:YES];
+ return YES;
+}
+@end
+
+@interface FLView : NSView <NSTextInput
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+, NSTextInputClient
+#endif
+> {
+ BOOL in_key_event; // YES means keypress is being processed by handleEvent
+ BOOL need_handle; // YES means Fl::handle(FL_KEYBOARD,) is needed after handleEvent processing
+ NSInteger identifier;
+ NSRange selectedRange;
}
+ (void)prepareEtext:(NSString*)aString;
++ (void)concatEtext:(NSString*)aString;
- (id)init;
- (void)drawRect:(NSRect)rect;
- (BOOL)acceptsFirstResponder;
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent;
+- (void)resetCursorRects;
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
- (void)mouseUp:(NSEvent *)theEvent;
- (void)rightMouseUp:(NSEvent *)theEvent;
@@ -1651,7 +1990,6 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
- (void)rightMouseDragged:(NSEvent *)theEvent;
- (void)otherMouseDragged:(NSEvent *)theEvent;
- (void)scrollWheel:(NSEvent *)theEvent;
-- (BOOL)handleKeyDown:(NSEvent *)theEvent;
- (void)keyDown:(NSEvent *)theEvent;
- (void)keyUp:(NSEvent *)theEvent;
- (void)flagsChanged:(NSEvent *)theEvent;
@@ -1660,24 +1998,36 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
- (void)draggingExited:(id < NSDraggingInfo >)sender;
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal;
+- (FLTextInputContext*)FLinputContext;
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)newSelection replacementRange:(NSRange)replacementRange;
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;
+- (NSInteger)windowLevel;
+#endif
@end
@implementation FLView
- (id)init
{
+ static NSInteger counter = 0;
self = [super init];
if (self) {
- next_compose_length = -1;
- in_key_event = false;
+ in_key_event = NO;
+ identifier = ++counter;
}
return self;
}
- (void)drawRect:(NSRect)rect
{
fl_lock_function();
+ through_drawRect = YES;
FLWindow *cw = (FLWindow*)[self window];
Fl_Window *w = [cw getFl_Window];
- handleUpdateEvent(w);
+ if (fl_x_to_redraw) fl_x_to_redraw->flush();
+ else handleUpdateEvent(w);
+ through_drawRect = NO;
fl_unlock_function();
}
@@ -1688,7 +2038,28 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
- (BOOL)performKeyEquivalent:(NSEvent*)theEvent
{
//NSLog(@"performKeyEquivalent:");
- return [self handleKeyDown:theEvent];
+ fl_lock_function();
+ cocoaKeyboardHandler(theEvent);
+ BOOL handled;
+ NSUInteger mods = [theEvent modifierFlags];
+ if ( (mods & NSControlKeyMask) || (mods & NSCommandKeyMask) ) {
+ NSString *s = [theEvent characters];
+ if ( (mods & NSShiftKeyMask) && (mods & NSCommandKeyMask) ) {
+ s = [s uppercaseString]; // US keyboards return lowercase letter in s if cmd-shift-key is hit
+ }
+ [FLView prepareEtext:s];
+ Fl::compose_state = 0;
+ handled = Fl::handle(FL_KEYBOARD, [(FLWindow*)[theEvent window] getFl_Window]);
+ }
+ else {
+ in_key_event = YES;
+ need_handle = NO;
+ handled = [[self performSelector:inputContextSEL] handleEvent:theEvent];
+ if (need_handle) handled = Fl::handle(FL_KEYBOARD, [(FLWindow*)[theEvent window] getFl_Window]);
+ in_key_event = NO;
+ }
+ fl_unlock_function();
+ return handled;
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent
{
@@ -1696,6 +2067,17 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
Fl_Window *first = Fl::first_window();
return (first == w || !first->modal());
}
+- (void)resetCursorRects {
+ Fl_Window *w = [(FLWindow*)[self window] getFl_Window];
+ Fl_X *i = Fl_X::i(w);
+ if (!i) return; // fix for STR #3128
+ // We have to have at least one cursor rect for invalidateCursorRectsForView
+ // to work, hence the "else" clause.
+ if (i->cursor)
+ [self addCursorRect:[self visibleRect] cursor:(NSCursor*)i->cursor];
+ else
+ [self addCursorRect:[self visibleRect] cursor:[NSCursor arrowCursor]];
+}
- (void)mouseUp:(NSEvent *)theEvent {
cocoaMouseHandler(theEvent);
}
@@ -1729,57 +2111,21 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
- (void)scrollWheel:(NSEvent *)theEvent {
cocoaMouseWheelHandler(theEvent);
}
-- (BOOL)handleKeyDown:(NSEvent *)theEvent {
- //NSLog(@"handleKeyDown");
+- (void)keyDown:(NSEvent *)theEvent {
+ //NSLog(@"keyDown:%@",[theEvent characters]);
fl_lock_function();
-
- Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
+ Fl_Window *window = [(FLWindow*)[theEvent window] getFl_Window];
Fl::first_window(window);
-
- next_compose_length = -1;
- // First let's process the raw key press
cocoaKeyboardHandler(theEvent);
-
- int no_text_key = false;
- static const int notext[] = { // keys that don't emit text
- FL_BackSpace, FL_Print, FL_Scroll_Lock, FL_Pause,
- FL_Insert, FL_Home, FL_Page_Up, FL_Delete, FL_End, FL_Page_Down,
- FL_Left, FL_Up, FL_Right, FL_Down,
- FL_Menu, FL_Num_Lock, FL_Help
- };
- static const int count = sizeof(notext)/sizeof(int);
- if (Fl::e_keysym > FL_F && Fl::e_keysym <= FL_F_Last) no_text_key = true;
- else for (int i=0; i < count; i++) {
- if (notext[i] == Fl::e_keysym) {
- no_text_key = true;
- break;
- }
- }
- if (!no_text_key && !(Fl::e_state & FL_META) ) {
- // Don't send cmd-<key> to interpretKeyEvents because it beeps.
- // Then we can let the OS have a stab at it and see if it thinks it
- // should result in some text
- NSText *edit = [[theEvent window] fieldEditor:YES forObject:nil];
- in_key_event = true;
- [edit interpretKeyEvents:[NSArray arrayWithObject:theEvent]];
- in_key_event = false;
- }
- //NSLog(@"to text=%@ l=%d", [NSString stringWithUTF8String:Fl::e_text], Fl::e_length);
- int handled = Fl::handle(FL_KEYDOWN, window);
- // We have to update this after Fl::handle as it says what to do on the
- // _next_ input
- if (next_compose_length != -1)
- Fl::compose_state = next_compose_length;
-
+ in_key_event = YES;
+ need_handle = NO;
+ [[self performSelector:inputContextSEL] handleEvent:theEvent];
+ if (need_handle) Fl::handle(FL_KEYBOARD, window);
+ in_key_event = NO;
fl_unlock_function();
- return (handled ? YES : NO);
-}
-- (void)keyDown:(NSEvent *)theEvent {
- //NSLog(@"keyDown: ");
- [self handleKeyDown:theEvent];
}
- (void)keyUp:(NSEvent *)theEvent {
- //NSLog(@"keyUp: ");
+ //NSLog(@"keyUp:%@",[theEvent characters]);
fl_lock_function();
Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
Fl::first_window(window);
@@ -1863,8 +2209,8 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
CFStringGetCString(all, DragData, l + 1, kCFStringEncodingUTF8);
CFRelease(all);
}
- else if ( [[pboard types] containsObject:NSStringPboardType] ) {
- NSData *data = [pboard dataForType:NSStringPboardType];
+ else if ( [[pboard types] containsObject:utf8_format] ) {
+ NSData *data = [pboard dataForType:utf8_format];
DragData = (char *)malloc([data length] + 1);
[data getBytes:DragData];
DragData[[data length]] = 0;
@@ -1902,6 +2248,15 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
return NSDragOperationGeneric;
}
+- (FLTextInputContext*)FLinputContext { // used only if OS < 10.6 to replace [NSView inputContext]
+ static FLTextInputContext *context = NULL;
+ if (!context) {
+ context = [[FLTextInputContext alloc] init];
+ }
+ context->edit = (FLTextView*)[[self window] fieldEditor:YES forObject:nil];
+ return context;
+}
+
+ (void)prepareEtext:(NSString*)aString {
// fills Fl::e_text with UTF-8 encoded aString using an adequate memory allocation
static char *received_utf8 = NULL;
@@ -1923,69 +2278,124 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
Fl::e_length = l;
}
-// These functions implement text input.
-// Only two-stroke character composition works at this point.
-// Needs much elaboration to fully support CJK text input,
-// but this is the way to go.
++ (void)concatEtext:(NSString*)aString {
+ // extends Fl::e_text with aString
+ NSString *newstring = [[NSString stringWithUTF8String:Fl::e_text] stringByAppendingString:aString];
+ [FLView prepareEtext:newstring];
+}
+
- (void)doCommandBySelector:(SEL)aSelector {
+ NSString *s = [[NSApp currentEvent] characters];
+ //NSLog(@"doCommandBySelector:%s text='%@'",sel_getName(aSelector), s);
+ s = [s substringFromIndex:[s length] - 1];
+ [FLView prepareEtext:s]; // use the last character of the event; necessary for deadkey + Tab
+ Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+ Fl::handle(FL_KEYBOARD, target);
}
- (void)insertText:(id)aString {
+ [self insertText:aString replacementRange:NSMakeRange(NSNotFound, 0)];
+}
+
+- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange {
NSString *received;
if ([aString isKindOfClass:[NSAttributedString class]]) {
received = [(NSAttributedString*)aString string];
} else {
received = (NSString*)aString;
}
- //NSLog(@"insertText: received=%@",received);
-
- if (!in_key_event) fl_lock_function();
- [FLView prepareEtext:received];
- // We can get called outside of key events (e.g. from the character
- // palette). Transform such actions to FL_PASTE events.
- if (!in_key_event) {
- Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
- Fl::handle(FL_PASTE, target);
- // for some reason, the window does not redraw until the next mouse move or button push
- // sending a 'redraw()' or 'awake()' does not solve the issue!
- Fl::flush();
- }
- if (!in_key_event) fl_unlock_function();
+ /*NSLog(@"insertText='%@' l=%d Fl::compose_state=%d range=%d,%d",
+ received,strlen([received UTF8String]),Fl::compose_state,replacementRange.location,replacementRange.length);*/
+ fl_lock_function();
+ Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+ while (replacementRange.length--) { // delete replacementRange.length characters before insertion point
+ int saved_keysym = Fl::e_keysym;
+ Fl::e_keysym = FL_BackSpace;
+ Fl::handle(FL_KEYBOARD, target);
+ Fl::e_keysym = saved_keysym;
+ }
+ if (in_key_event && Fl_X::next_marked_length && Fl::e_length) {
+ // if setMarkedText + insertText is sent during handleEvent, text cannot be concatenated in single FL_KEYBOARD event
+ Fl::handle(FL_KEYBOARD, target);
+ Fl::e_length = 0;
+ }
+ if (in_key_event && Fl::e_length) [FLView concatEtext:received];
+ else [FLView prepareEtext:received];
+ Fl_X::next_marked_length = 0;
+ // We can get called outside of key events (e.g., from the character palette, from CJK text input).
+ BOOL palette = !(in_key_event || Fl::compose_state);
+ if (palette) Fl::e_keysym = 0;
+ // YES if key has text attached
+ BOOL has_text_key = Fl::e_keysym <= '~' || Fl::e_keysym == FL_Iso_Key ||
+ (Fl::e_keysym >= FL_KP && Fl::e_keysym <= FL_KP_Last && Fl::e_keysym != FL_KP_Enter);
+ // insertText sent during handleEvent of a key without text cannot be processed in a single FL_KEYBOARD event.
+ // Occurs with deadkey followed by non-text key
+ if (!in_key_event || !has_text_key) {
+ Fl::handle(FL_KEYBOARD, target);
+ Fl::e_length = 0;
+ }
+ else need_handle = YES;
+ selectedRange = NSMakeRange(100, 0); // 100 is an arbitrary value
+ // for some reason, with the palette, the window does not redraw until the next mouse move or button push
+ // sending a 'redraw()' or 'awake()' does not solve the issue!
+ if (palette) Fl::flush();
+ if (fl_mac_os_version < 100600) [(FLTextView*)[[self window] fieldEditor:YES forObject:nil] setActive:NO];
+ fl_unlock_function();
}
- (void)setMarkedText:(id)aString selectedRange:(NSRange)newSelection {
+ [self setMarkedText:aString selectedRange:newSelection replacementRange:NSMakeRange(NSNotFound, 0)];
+}
+
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)newSelection replacementRange:(NSRange)replacementRange {
NSString *received;
- if (newSelection.location == 0) {
- [self unmarkText];
- return;
- }
if ([aString isKindOfClass:[NSAttributedString class]]) {
received = [(NSAttributedString*)aString string];
} else {
received = (NSString*)aString;
}
- //NSLog(@"setMarkedText: %@ %d %d",received,newSelection.location,newSelection.length);
- // This code creates the OS X behaviour of seeing dead keys as things
- // are being composed.
- next_compose_length = newSelection.location;
- [FLView prepareEtext:received];
- //NSLog(@"Fl::e_text=%@ Fl::e_length=%d next_compose_length=%d", received, Fl::e_length, next_compose_length);
+ fl_lock_function();
+ /*NSLog(@"setMarkedText:%@ l=%d newSelection=%d,%d Fl::compose_state=%d replacement=%d,%d",
+ received, strlen([received UTF8String]), newSelection.location, newSelection.length, Fl::compose_state,
+ replacementRange.location, replacementRange.length);*/
+ Fl_Window *target = [(FLWindow*)[self window] getFl_Window];
+ while (replacementRange.length--) { // delete replacementRange.length characters before insertion point
+ Fl::e_keysym = FL_BackSpace;
+ Fl::compose_state = 0;
+ Fl_X::next_marked_length = 0;
+ Fl::handle(FL_KEYBOARD, target);
+ Fl::e_keysym = 'a'; // pretend a letter key was hit
+ }
+ if (in_key_event && Fl_X::next_marked_length && Fl::e_length) {
+ // if setMarkedText + setMarkedText is sent during handleEvent, text cannot be concatenated in single FL_KEYBOARD event
+ Fl::handle(FL_KEYBOARD, target);
+ Fl::e_length = 0;
+ }
+ if (in_key_event && Fl::e_length) [FLView concatEtext:received];
+ else [FLView prepareEtext:received];
+ Fl_X::next_marked_length = strlen([received UTF8String]);
+ if (!in_key_event) Fl::handle( FL_KEYBOARD, target);
+ else need_handle = YES;
+ selectedRange = NSMakeRange(100, newSelection.length);
+ fl_unlock_function();
}
- (void)unmarkText {
fl_lock_function();
- Fl::compose_state = 0;
+ Fl::reset_marked_text();
fl_unlock_function();
//NSLog(@"unmarkText");
}
- (NSRange)selectedRange {
+ Fl_Widget *w = Fl::focus();
+ if (w && w->use_accents_menu()) return selectedRange;
return NSMakeRange(NSNotFound, 0);
}
- (NSRange)markedRange {
- //NSLog(@"markedRange ?");
- return NSMakeRange(NSNotFound, Fl::compose_state);
+ //NSLog(@"markedRange=%d %d", Fl::compose_state > 0?0:NSNotFound, Fl::compose_state);
+ return NSMakeRange(Fl::compose_state > 0?0:NSNotFound, Fl::compose_state);
}
- (BOOL)hasMarkedText {
@@ -1994,6 +2404,9 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
}
- (NSAttributedString *)attributedSubstringFromRange:(NSRange)aRange {
+ return [self attributedSubstringForProposedRange:aRange actualRange:NULL];
+}
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
//NSLog(@"attributedSubstringFromRange: %d %d",aRange.location,aRange.length);
return nil;
}
@@ -2003,28 +2416,44 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
}
- (NSRect)firstRectForCharacterRange:(NSRange)aRange {
+ return [self firstRectForCharacterRange:aRange actualRange:NULL];
+}
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
+ //NSLog(@"firstRectForCharacterRange %d %d actualRange=%p",aRange.location, aRange.length,actualRange);
NSRect glyphRect;
fl_lock_function();
Fl_Widget *focus = Fl::focus();
- Fl_Window *wfocus = focus->window();
- while (wfocus->window()) wfocus = wfocus->window();
+ Fl_Window *wfocus = [(FLWindow*)[self window] getFl_Window];
+ if (!focus) focus = wfocus;
glyphRect.size.width = 0;
- if (dynamic_cast<Fl_Text_Display*>(focus) != NULL) {
- int x, y;
- Fl_Text_Display *current = (Fl_Text_Display*)focus;
- current->position_to_xy( current->insert_position(), &x, &y );
+ int x, y, height;
+ if (Fl_X::insertion_point_location(&x, &y, &height)) {
glyphRect.origin.x = (CGFloat)x;
- glyphRect.origin.y = (CGFloat)y + current->textsize();
- glyphRect.size.height = current->textsize();
+ glyphRect.origin.y = (CGFloat)y;
} else {
- glyphRect.origin.x = focus->x();
- glyphRect.origin.y = focus->y() + focus->h();
- glyphRect.size.height = 12;
+ if (focus->as_window()) {
+ glyphRect.origin.x = 0;
+ glyphRect.origin.y = focus->h();
+ }
+ else {
+ glyphRect.origin.x = focus->x();
+ glyphRect.origin.y = focus->y() + focus->h();
+ }
+ height = 12;
+ }
+ glyphRect.size.height = height;
+ Fl_Window *win = focus->as_window();
+ if (!win) win = focus->window();
+ while (win != NULL && win != wfocus) {
+ glyphRect.origin.x += win->x();
+ glyphRect.origin.y += win->y();
+ win = win->window();
}
// Convert the rect to screen coordinates
glyphRect.origin.y = wfocus->h() - glyphRect.origin.y;
- glyphRect.origin = [[self window] convertBaseToScreen:glyphRect.origin];
+ glyphRect.origin = [(FLWindow*)[self window] convertBaseToScreen:glyphRect.origin];
+ if (actualRange) *actualRange = aRange;
fl_unlock_function();
return glyphRect;
}
@@ -2033,8 +2462,12 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi
return 0;
}
+- (NSInteger)windowLevel {
+ return [[self window] level];
+}
+
- (NSInteger)conversationIdentifier {
- return (NSInteger)self;
+ return identifier;
}
@end
@@ -2057,6 +2490,29 @@ void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) {
}
/*
+ * Initialize the given port for redraw and call the window's flush() to actually draw the content
+ */
+void Fl_X::flush()
+{
+ if (through_drawRect || w->as_gl_window()) {
+ make_current_counts = 1;
+ w->flush();
+ make_current_counts = 0;
+ Fl_X::q_release_context();
+ return;
+ }
+ // have Cocoa immediately redraw the window's view
+ FLView *view = (FLView*)[fl_xid(w) contentView];
+ fl_x_to_redraw = this;
+ [view setNeedsDisplay:YES];
+ // will send the drawRect: message to the window's view after having prepared the adequate NSGraphicsContext
+ [view displayIfNeededIgnoringOpacity];
+ fl_x_to_redraw = NULL;
+}
+
+//bool Fl_X::make_shaped = false;
+
+/*
* go ahead, create that (sub)window
*/
void Fl_X::make(Fl_Window* w)
@@ -2069,8 +2525,9 @@ void Fl_X::make(Fl_Window* w)
x->other_xid = 0;
x->region = 0;
x->subRegion = 0;
- x->cursor = fl_default_cursor;
+ x->cursor = NULL;
x->gc = 0; // stay 0 for Quickdraw; fill with CGContext for Quartz
+ w->set_visible();
Fl_Window *win = w->window();
Fl_X *xo = Fl_X::i(win);
if (xo) {
@@ -2092,7 +2549,7 @@ void Fl_X::make(Fl_Window* w)
}
if (w->as_gl_window()) { // if creating a sub-GL-window
while (win->window()) win = win->window();
- [Fl_X::i(win)->xid setContainsGLsubwindow:YES];
+ [Fl_X::i(win)->xid containsGLsubwindow:YES];
}
fl_show_iconic = 0;
}
@@ -2109,7 +2566,7 @@ void Fl_X::make(Fl_Window* w)
int hp = w->h();
if (w->size_range_set) {
if ( w->minh != w->maxh || w->minw != w->maxw) {
- winstyle |= NSResizableWindowMask;
+ if (w->border()) winstyle |= NSResizableWindowMask;
}
} else {
if (w->resizable()) {
@@ -2117,7 +2574,7 @@ void Fl_X::make(Fl_Window* w)
int minw = o->w(); if (minw > 100) minw = 100;
int minh = o->h(); if (minh > 100) minh = 100;
w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
- winstyle |= NSResizableWindowMask;
+ if (w->border()) winstyle |= NSResizableWindowMask;
} else {
w->size_range(w->w(), w->h(), w->w(), w->h());
}
@@ -2127,18 +2584,17 @@ void Fl_X::make(Fl_Window* w)
if (!fake_X_wm(w, xwm, ywm, bt, bx, by)) {
// menu windows and tooltips
if (w->modal()||w->tooltip_window()) {
- winstyle = NSBorderlessWindowMask;
- winlevel = NSModalPanelWindowLevel;
- } else {
- winstyle = NSBorderlessWindowMask;
+ winlevel = modal_window_level();
}
- } else if (w->modal()) {
+ //winstyle = NSBorderlessWindowMask;
+ }
+ if (w->modal()) {
winstyle &= ~NSMiniaturizableWindowMask;
// winstyle &= ~(NSResizableWindowMask | NSMiniaturizableWindowMask);
- winlevel = NSModalPanelWindowLevel;
+ winlevel = modal_window_level();
}
else if (w->non_modal()) {
- winlevel = NSFloatingWindowLevel;
+ winlevel = non_modal_window_level();
}
if (by+bt) {
@@ -2165,16 +2621,39 @@ void Fl_X::make(Fl_Window* w)
x->other_xid = 0; // room for doublebuffering image map. On OS X this is only used by overlay windows
x->region = 0;
x->subRegion = 0;
- x->cursor = fl_default_cursor;
+ x->cursor = NULL;
x->xidChildren = 0;
x->xidNext = 0;
x->gc = 0;
NSRect crect;
if (w->fullscreen_active()) {
- int sx, sy, sw, sh;
- Fl::screen_xywh(sx, sy, sw, sh, w->x(), w->y(), w->w(), w->h());
- w->resize(sx, sy, sw, sh);
+ int top, bottom, left, right;
+ int sx, sy, sw, sh, X, Y, W, H;
+
+ top = w->fullscreen_screen_top;
+ bottom = w->fullscreen_screen_bottom;
+ left = w->fullscreen_screen_left;
+ right = w->fullscreen_screen_right;
+
+ if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
+ top = Fl::screen_num(w->x(), w->y(), w->w(), w->h());
+ bottom = top;
+ left = top;
+ right = top;
+ }
+
+ Fl::screen_xywh(sx, sy, sw, sh, top);
+ Y = sy;
+ Fl::screen_xywh(sx, sy, sw, sh, bottom);
+ H = sy + sh - Y;
+ Fl::screen_xywh(sx, sy, sw, sh, left);
+ X = sx;
+ Fl::screen_xywh(sx, sy, sw, sh, right);
+ W = sx + sw - X;
+
+ w->resize(X, Y, W, H);
+
winstyle = NSBorderlessWindowMask;
winlevel = NSStatusWindowLevel;
}
@@ -2188,6 +2667,10 @@ void Fl_X::make(Fl_Window* w)
[cw setFrameOrigin:crect.origin];
[cw setHasShadow:YES];
[cw setAcceptsMouseMovedEvents:YES];
+ if (w->shape_data_) {
+ [cw setOpaque:NO]; // shaped windows must be non opaque
+ [cw setBackgroundColor:[NSColor clearColor]]; // and with transparent background color
+ }
x->xid = cw;
x->w = w; w->i = x;
x->wait_for_expose = 1;
@@ -2195,6 +2678,7 @@ void Fl_X::make(Fl_Window* w)
Fl_X::first = x;
FLView *myview = [[FLView alloc] init];
[cw setContentView:myview];
+ [myview release];
[cw setLevel:winlevel];
q_set_window_title(cw, w->label(), w->iconlabel());
@@ -2212,12 +2696,10 @@ void Fl_X::make(Fl_Window* w)
[cw setAlphaValue:0.97];
}
// Install DnD handlers
- [myview registerForDraggedTypes:[NSArray arrayWithObjects:
- NSStringPboardType, NSFilenamesPboardType, nil]];
+ [myview registerForDraggedTypes:[NSArray arrayWithObjects:utf8_format, NSFilenamesPboardType, nil]];
if ( ! Fl_X::first->next ) {
// if this is the first window, we need to bring the application to the front
- ProcessSerialNumber psn = { 0, kCurrentProcess };
- SetFrontProcess( &psn );
+ [NSApp activateIgnoringOtherApps:YES];
}
if (w->size_range_set) w->size_range_();
@@ -2231,7 +2713,7 @@ void Fl_X::make(Fl_Window* w)
w->set_visible();
if ( w->border() || (!w->modal() && !w->tooltip_window()) ) Fl::handle(FL_FOCUS, w);
Fl::first_window(w);
- [cw setDelegate:[NSApp delegate]];
+ [cw setDelegate:[FLWindowDelegate createOnce]];
if (fl_show_iconic) {
fl_show_iconic = 0;
[cw miniaturize:nil];
@@ -2316,7 +2798,7 @@ void Fl_Window::show() {
labeltype(FL_NO_LABEL);
}
Fl_Tooltip::exit(this);
- if (!shown() || !i) {
+ if (!shown()) {
Fl_X::make(this);
} else {
if ( !parent() ) {
@@ -2388,9 +2870,34 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
/*
* make all drawing go into this window (called by subclass flush() impl.)
+
+ This can be called in 3 different instances:
+
+ 1) When a window is created, resized, or deminiaturized.
+ The system sends the drawRect: message to the window's view after having prepared the current graphics context
+ to draw to this view. Variable through_drawRect is YES, and fl_x_to_redraw is NULL. Processing of drawRect: calls
+ handleUpdateEvent() that calls Fl_X::flush() for the window and its subwindows. Fl_X::flush() calls
+ Fl_Window::flush() that calls Fl_Window::make_current() that only needs to identify the graphics port of the
+ current graphics context. The window's draw() function is then executed.
+
+ 2) At each round of the FLTK event loop.
+ Fl::flush() is called, that calls Fl_X::flush() on each window that needs drawing. Fl_X::flush() sets
+ fl_x_to_redraw to this and sends the displayIfNeededIgnoringOpacity message to the window's view.
+ This message makes the system prepare the current graphics context adequately for drawing to this view, and
+ send it the drawRect: message which sets through_drawRect to YES. Processing of the drawRect: message calls
+ Fl_X::flush() for the window which proceeds as in 1) above.
+
+ 3) An FLTK application can call Fl_Window::make_current() at any time before it draws to a window.
+ This occurs for instance in the idle callback function of the mandelbrot test program. Variable through_drawRect is NO,
+ so Fl_Window::make_current() creates a new graphics context adequate for the window.
+ Subsequent drawing requests go to this window. CAUTION: it's not possible to call Fl::wait(), Fl::check()
+ nor Fl::ready() while in the draw() function of a widget. Use an idle callback instead.
+
*/
void Fl_Window::make_current()
{
+ if (make_current_counts > 1) return;
+ if (make_current_counts) make_current_counts++;
Fl_X::q_release_context();
fl_window = i->xid;
current_ = this;
@@ -2404,12 +2911,9 @@ void Fl_Window::make_current()
yp += win->y();
win = (Fl_Window*)win->window();
}
-
- NSView *current_focus = [NSView focusView];
- // sometimes current_focus is set to a non-FLTK view: don't touch that
- if ( [current_focus isKindOfClass:[FLView class]] ) [current_focus unlockFocus];
- [[i->xid contentView] lockFocus];
- i->gc = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
+ NSGraphicsContext *nsgc = through_drawRect ? [NSGraphicsContext currentContext] :
+ [NSGraphicsContext graphicsContextWithWindow:fl_window];
+ i->gc = (CGContextRef)[nsgc graphicsPort];
fl_gc = i->gc;
Fl_Region fl_window_region = XRectangleRegion(0,0,w(),h());
if ( ! this->window() ) {
@@ -2477,7 +2981,8 @@ void Fl_X::q_clear_clipping() {
void Fl_X::q_release_context(Fl_X *x) {
if (x && x->gc!=fl_gc) return;
if (!fl_gc) return;
- CGContextRestoreGState(fl_gc); // matches the CGContextSaveGState of make_current
+ CGContextRestoreGState(fl_gc); // KEEP IT: matches the CGContextSaveGState of make_current
+ CGContextFlush(fl_gc);
fl_gc = 0;
#if defined(FLTK_USE_CAIRO)
if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0); // capture gc changes automatically to update the cairo context adequately
@@ -2514,35 +3019,55 @@ static void convert_crlf(char * s, size_t len)
}
// fltk 1.3 clipboard support constant definitions:
-const CFStringRef flavorNames[] = {
- CFSTR("public.utf16-plain-text"),
- CFSTR("public.utf8-plain-text"),
- CFSTR("com.apple.traditional-mac-plain-text") };
-const CFStringEncoding encodings[] = {
- kCFStringEncodingUnicode,
- kCFStringEncodingUTF8,
- kCFStringEncodingMacRoman};
-const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
+static NSString *calc_utf8_format(void)
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#define NSPasteboardTypeString @"public.utf8-plain-text"
+#endif
+ if (fl_mac_os_version >= 100600) return NSPasteboardTypeString;
+ return NSStringPboardType;
+}
// clipboard variables definitions :
-char *fl_selection_buffer[2];
-int fl_selection_length[2];
+char *fl_selection_buffer[2] = {NULL, NULL};
+int fl_selection_length[2] = {0, 0};
static int fl_selection_buffer_length[2];
-static PasteboardRef myPasteboard = 0;
-static void allocatePasteboard() {
- if (!myPasteboard)
- PasteboardCreate(kPasteboardClipboard, &myPasteboard);
+static PasteboardRef allocatePasteboard(void)
+{
+ PasteboardRef clip;
+ PasteboardCreate(kPasteboardClipboard, &clip); // requires Mac OS 10.3
+ return clip;
}
+static PasteboardRef myPasteboard = allocatePasteboard();
+extern void fl_trigger_clipboard_notify(int source);
+
+void fl_clipboard_notify_change() {
+ // No need to do anything here...
+}
+
+static void clipboard_check(void)
+{
+ PasteboardSyncFlags flags;
+
+ flags = PasteboardSynchronize(myPasteboard); // requires Mac OS 10.3
+
+ if (!(flags & kPasteboardModified))
+ return;
+ if (flags & kPasteboardClientIsOwner)
+ return;
+
+ fl_trigger_clipboard_notify(1);
+}
/*
* create a selection
- * owner: widget that created the selection
* stuff: pointer to selected data
- * size of selected data
+ * len: size of selected data
+ * type: always "plain/text" for now
*/
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void Fl::copy(const char *stuff, int len, int clipboard, const char *type) {
if (!stuff || len<0) return;
if (len+1 > fl_selection_buffer_length[clipboard]) {
delete[] fl_selection_buffer[clipboard];
@@ -2553,84 +3078,180 @@ void Fl::copy(const char *stuff, int len, int clipboard) {
fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
fl_selection_length[clipboard] = len;
if (clipboard) {
- allocatePasteboard();
- OSStatus err = PasteboardClear(myPasteboard);
- if (err!=noErr) return; // clear did not work, maybe not owner of clipboard.
- PasteboardSynchronize(myPasteboard);
CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[1], len);
if (text==NULL) return; // there was a pb creating the object, abort.
- err=PasteboardPutItemFlavor(myPasteboard, (PasteboardItemID)1, CFSTR("public.utf8-plain-text"), text, 0);
+ NSPasteboard *clip = [NSPasteboard generalPasteboard];
+ [clip declareTypes:[NSArray arrayWithObject:utf8_format] owner:nil];
+ [clip setData:(NSData*)text forType:utf8_format];
CFRelease(text);
}
}
+static int get_plain_text_from_clipboard(char **buffer, int previous_length)
+{
+ NSInteger length = 0;
+ NSPasteboard *clip = [NSPasteboard generalPasteboard];
+ NSString *found = [clip availableTypeFromArray:[NSArray arrayWithObjects:utf8_format, @"public.utf16-plain-text", @"com.apple.traditional-mac-plain-text", nil]];
+ if (found) {
+ NSData *data = [clip dataForType:found];
+ if (data) {
+ NSInteger len;
+ char *aux_c = NULL;
+ if (![found isEqualToString:utf8_format]) {
+ NSString *auxstring;
+ auxstring = (NSString *)CFStringCreateWithBytes(NULL,
+ (const UInt8*)[data bytes],
+ [data length],
+ [found isEqualToString:@"public.utf16-plain-text"] ? kCFStringEncodingUnicode : kCFStringEncodingMacRoman,
+ false);
+ aux_c = strdup([auxstring UTF8String]);
+ [auxstring release];
+ len = strlen(aux_c) + 1;
+ }
+ else len = [data length] + 1;
+ if ( len >= previous_length ) {
+ length = len;
+ delete[] *buffer;
+ *buffer = new char[len];
+ }
+ if (![found isEqualToString:utf8_format]) {
+ strcpy(*buffer, aux_c);
+ free(aux_c);
+ }
+ else {
+ [data getBytes:*buffer];
+ }
+ (*buffer)[len - 1] = 0;
+ length = len - 1;
+ convert_crlf(*buffer, len - 1); // turn all \r characters into \n:
+ Fl::e_clipboard_type = Fl::clipboard_plain_text;
+ }
+ }
+ return length;
+}
+
+static Fl_Image* get_image_from_clipboard()
+{
+ Fl_RGB_Image *image = NULL;
+ uchar *imagedata;
+ NSBitmapImageRep *bitmap;
+ NSPasteboard *clip = [NSPasteboard generalPasteboard];
+ NSArray *present = [clip types]; // types in pasteboard in order of decreasing preference
+ NSArray *possible = [NSArray arrayWithObjects:@"com.adobe.pdf", @"public.tiff", @"com.apple.pict", nil];
+ NSString *found = nil;
+ NSUInteger rank;
+ for (rank = 0; rank < [present count]; rank++) { // find first of possible types present in pasteboard
+ for (NSUInteger i = 0; i < [possible count]; i++) {
+ if ([[present objectAtIndex:rank] isEqualToString:[possible objectAtIndex:i]]) {
+ found = [present objectAtIndex:rank];
+ goto after_loop;
+ }
+ }
+ }
+after_loop:
+ if (found) {
+ NSData *data = [clip dataForType:found];
+ if (data) {
+ if ([found isEqualToString:@"public.tiff"]) {
+ bitmap = [NSBitmapImageRep imageRepWithData:data];
+ int bpp = [bitmap bytesPerPlane];
+ int bpr = [bitmap bytesPerRow];
+ int depth = [bitmap samplesPerPixel], w = bpr/depth, h = bpp/bpr;
+ imagedata = new uchar[w * h * depth];
+ memcpy(imagedata, [bitmap bitmapData], w * h * depth);
+ image = new Fl_RGB_Image(imagedata, w, h, depth);
+ image->alloc_array = 1;
+ }
+ else if ([found isEqualToString:@"com.adobe.pdf"] || [found isEqualToString:@"com.apple.pict"]) {
+ NSRect rect;
+ NSImageRep *vectorial;
+ NSAffineTransform *dilate = [NSAffineTransform transform];
+ if ([found isEqualToString:@"com.adobe.pdf"] ) {
+ vectorial = [NSPDFImageRep imageRepWithData:data];
+ rect = [(NSPDFImageRep*)vectorial bounds]; // in points = 1/72 inch
+ Fl_Window *win = Fl::first_window();
+ int screen_num = win ? Fl::screen_num(win->x(), win->y(), win->w(), win->h()) : 0;
+ float hr, vr;
+ Fl::screen_dpi(hr, vr, screen_num); // 1 inch = hr pixels = 72 points -> hr/72 pixel/point
+ CGFloat scale = hr/72;
+ [dilate scaleBy:scale];
+ rect.size.width *= scale;
+ rect.size.height *= scale;
+ rect = NSIntegralRect(rect);
+ }
+ else {
+ vectorial = [NSPICTImageRep imageRepWithData:data];
+ rect = [(NSPICTImageRep*)vectorial boundingBox]; // in pixel, no scaling required
+ }
+ imagedata = new uchar[(int)(rect.size.width * rect.size.height) * 4];
+ memset(imagedata, -1, (int)(rect.size.width * rect.size.height) * 4);
+ bitmap = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&imagedata
+ pixelsWide:rect.size.width
+ pixelsHigh:rect.size.height
+ bitsPerSample:8
+ samplesPerPixel:3
+ hasAlpha:NO
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:rect.size.width*4
+ bitsPerPixel:32];
+ NSDictionary *dict = [NSDictionary dictionaryWithObject:bitmap
+ forKey:NSGraphicsContextDestinationAttributeName];
+ NSGraphicsContext *oldgc = [NSGraphicsContext currentContext];
+ [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithAttributes:dict]];
+ [dilate concat];
+ [vectorial draw];
+ [NSGraphicsContext setCurrentContext:oldgc];
+ [bitmap release];
+ image = new Fl_RGB_Image(imagedata, rect.size.width, rect.size.height, 4);
+ image->alloc_array = 1;
+ }
+ Fl::e_clipboard_type = Fl::clipboard_image;
+ }
+ }
+ return image;
+}
+
// Call this when a "paste" operation happens:
-void Fl::paste(Fl_Widget &receiver, int clipboard) {
+void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) {
+ if (type[0] == 0) type = Fl::clipboard_plain_text;
if (clipboard) {
- // see if we own the selection, if not go get it:
- fl_selection_length[1] = 0;
- OSStatus err = noErr;
- Boolean found = false;
- CFDataRef flavorData = NULL;
- CFStringEncoding encoding = 0;
-
- allocatePasteboard();
- PasteboardSynchronize(myPasteboard);
- ItemCount nFlavor = 0, i, j;
- err = PasteboardGetItemCount(myPasteboard, &nFlavor);
- if (err==noErr) {
- for (i=1; i<=nFlavor; i++) {
- PasteboardItemID itemID = 0;
- CFArrayRef flavorTypeArray = NULL;
- found = false;
- err = PasteboardGetItemIdentifier(myPasteboard, i, &itemID);
- if (err!=noErr) continue;
- err = PasteboardCopyItemFlavors(myPasteboard, itemID, &flavorTypeArray);
- if (err!=noErr) {
- if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
- continue;
- }
- CFIndex flavorCount = CFArrayGetCount(flavorTypeArray);
- for (j = 0; j < handledFlavorsCount; j++) {
- for (CFIndex flavorIndex=0; flavorIndex<flavorCount; flavorIndex++) {
- CFStringRef flavorType = (CFStringRef)CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex);
- if (UTTypeConformsTo(flavorType, flavorNames[j])) {
- err = PasteboardCopyItemFlavorData( myPasteboard, itemID, flavorNames[j], &flavorData );
- if (err != noErr) continue;
- encoding = encodings[j];
- found = true;
- break;
- }
- }
- if (found) break;
- }
- if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
- if (found) break;
+ Fl::e_clipboard_type = "";
+ if (strcmp(type, Fl::clipboard_plain_text) == 0) {
+ fl_selection_length[1] = get_plain_text_from_clipboard( &fl_selection_buffer[1], fl_selection_length[1]);
}
- if (found) {
- CFIndex len = CFDataGetLength(flavorData);
- CFStringRef mycfs = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(flavorData), len, encoding, false);
- CFRelease(flavorData);
- len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(mycfs), kCFStringEncodingUTF8) + 1;
- if ( len >= fl_selection_buffer_length[1] ) {
- fl_selection_buffer_length[1] = len;
- delete[] fl_selection_buffer[1];
- fl_selection_buffer[1] = new char[len];
- }
- CFStringGetCString(mycfs, fl_selection_buffer[1], len, kCFStringEncodingUTF8);
- CFRelease(mycfs);
- len = strlen(fl_selection_buffer[1]);
- fl_selection_length[1] = len;
- convert_crlf(fl_selection_buffer[1],len); // turn all \r characters into \n:
+ else if (strcmp(type, Fl::clipboard_image) == 0) {
+ Fl::e_clipboard_data = get_image_from_clipboard( );
+ if (Fl::e_clipboard_data) {
+ int done = receiver.handle(FL_PASTE);
+ Fl::e_clipboard_type = "";
+ if (done == 0) {
+ delete (Fl_Image*)Fl::e_clipboard_data;
+ Fl::e_clipboard_data = NULL;
+ }
}
- }
+ return;
+ }
+ else
+ fl_selection_length[1] = 0;
}
Fl::e_text = fl_selection_buffer[clipboard];
Fl::e_length = fl_selection_length[clipboard];
- if (!Fl::e_text) Fl::e_text = (char *)"";
+ if (!Fl::e_length) Fl::e_text = (char *)"";
receiver.handle(FL_PASTE);
}
+int Fl::clipboard_contains(const char *type) {
+ NSString *found = nil;
+ if (strcmp(type, Fl::clipboard_plain_text) == 0) {
+ found = [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObjects:utf8_format, @"public.utf16-plain-text", @"com.apple.traditional-mac-plain-text", nil]];
+ }
+ else if (strcmp(type, Fl::clipboard_image) == 0) {
+ found = [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObjects:@"public.tiff", @"com.adobe.pdf", @"com.apple.pict", nil]];
+ }
+ return found != nil;
+}
+
int Fl_X::unlink(Fl_X *start) {
if (start) {
Fl_X *pc = start;
@@ -2674,11 +3295,6 @@ void Fl_X::relink(Fl_Window *w, Fl_Window *wp) {
void Fl_X::destroy() {
// subwindows share their xid with their parent window, so should not close it
if (!subwindow && w && !w->parent() && xid) {
- NSView *topview = [xid contentView];
- if ( [NSView focusView] == topview ) {
- [topview unlockFocus];
- }
- [topview release];
[xid close];
}
}
@@ -2692,6 +3308,10 @@ void Fl_X::map() {
Fl_X::relink(w, w->window() );
w->redraw();
}
+ if (cursor) {
+ [(NSCursor*)cursor release];
+ cursor = NULL;
+ }
}
void Fl_X::unmap() {
@@ -2780,84 +3400,152 @@ void Fl_X::collapse() {
static NSImage *CGBitmapContextToNSImage(CGContextRef c)
// the returned NSImage is autoreleased
{
+ NSImage* image;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ if (fl_mac_os_version >= 100600) {
+ CGImageRef cgimg = CGBitmapContextCreateImage(c); // requires 10.4
+ image = [[NSImage alloc] initWithCGImage:cgimg size:NSZeroSize]; // requires 10.6
+ CFRelease(cgimg);
+ }
+ else
+#endif
+ {
+ unsigned char *pdata = (unsigned char *)CGBitmapContextGetData(c);
+ NSBitmapImageRep *imagerep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&pdata
+ pixelsWide:CGBitmapContextGetWidth(c)
+ pixelsHigh:CGBitmapContextGetHeight(c)
+ bitsPerSample:8
+ samplesPerPixel:4
+ hasAlpha:YES
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:CGBitmapContextGetBytesPerRow(c)
+ bitsPerPixel:CGBitmapContextGetBitsPerPixel(c)];
+ image = [[NSImage alloc] initWithData: [imagerep TIFFRepresentation]];
+ [imagerep release];
+ }
+ return [image autorelease];
+}
+
+
+CFDataRef Fl_X::CGBitmapContextToTIFF(CGContextRef c)
+{ // the returned value is autoreleased
unsigned char *pdata = (unsigned char *)CGBitmapContextGetData(c);
NSBitmapImageRep *imagerep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&pdata
- pixelsWide:CGBitmapContextGetWidth(c)
- pixelsHigh:CGBitmapContextGetHeight(c)
- bitsPerSample:8
- samplesPerPixel:4
- hasAlpha:YES
- isPlanar:NO
- colorSpaceName:NSDeviceRGBColorSpace
- bytesPerRow:CGBitmapContextGetBytesPerRow(c)
- bitsPerPixel:CGBitmapContextGetBitsPerPixel(c)];
- NSImage* image = [[NSImage alloc] initWithData: [imagerep TIFFRepresentation]];
+ pixelsWide:CGBitmapContextGetWidth(c)
+ pixelsHigh:CGBitmapContextGetHeight(c)
+ bitsPerSample:8
+ samplesPerPixel:3
+ hasAlpha:NO
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:CGBitmapContextGetBytesPerRow(c)
+ bitsPerPixel:CGBitmapContextGetBitsPerPixel(c)];
+ NSData* tiff = [imagerep TIFFRepresentation];
[imagerep release];
- return [image autorelease];
+ return (CFDataRef)tiff;
}
-static NSCursor *PrepareCursor(NSCursor *cursor, CGContextRef (*f)() )
+int Fl_X::set_cursor(Fl_Cursor c)
{
- if (cursor == nil) {
- CGContextRef c = f();
- NSImage *image = CGBitmapContextToNSImage(c);
- fl_delete_offscreen( (Fl_Offscreen)c );
- NSPoint pt = {[image size].width/2, [image size].height/2};
- cursor = [[NSCursor alloc] initWithImage:image hotSpot:pt];
+ if (cursor) {
+ [(NSCursor*)cursor release];
+ cursor = NULL;
}
- return cursor;
-}
-void Fl_X::set_cursor(Fl_Cursor c)
-{
- NSCursor *icrsr;
switch (c) {
- case FL_CURSOR_CROSS: icrsr = [NSCursor crosshairCursor]; break;
- case FL_CURSOR_WAIT:
- static NSCursor *watch = nil;
- watch = PrepareCursor(watch, &Fl_X::watch_cursor_image);
- icrsr = watch;
- break;
- case FL_CURSOR_INSERT: icrsr = [NSCursor IBeamCursor]; break;
- case FL_CURSOR_N: icrsr = [NSCursor resizeUpCursor]; break;
- case FL_CURSOR_S: icrsr = [NSCursor resizeDownCursor]; break;
- case FL_CURSOR_NS: icrsr = [NSCursor resizeUpDownCursor]; break;
- case FL_CURSOR_HELP:
- static NSCursor *help = nil;
- help = PrepareCursor(help, &Fl_X::help_cursor_image);
- icrsr = help;
- break;
- case FL_CURSOR_HAND: icrsr = [NSCursor pointingHandCursor]; break;
- case FL_CURSOR_MOVE: icrsr = [NSCursor openHandCursor]; break;
- case FL_CURSOR_NE:
- case FL_CURSOR_SW:
- case FL_CURSOR_NESW:
- static NSCursor *nesw = nil;
- nesw = PrepareCursor(nesw, &Fl_X::nesw_cursor_image);
- icrsr = nesw;
- break;
- case FL_CURSOR_E: icrsr = [NSCursor resizeRightCursor]; break;
- case FL_CURSOR_W: icrsr = [NSCursor resizeLeftCursor]; break;
- case FL_CURSOR_WE: icrsr = [NSCursor resizeLeftRightCursor]; break;
- case FL_CURSOR_SE:
- case FL_CURSOR_NW:
- case FL_CURSOR_NWSE:
- static NSCursor *nwse = nil;
- nwse = PrepareCursor(nwse, &Fl_X::nwse_cursor_image);
- icrsr = nwse;
- break;
- case FL_CURSOR_NONE:
- static NSCursor *none = nil;
- none = PrepareCursor(none, &Fl_X::none_cursor_image);
- icrsr = none;
- break;
- case FL_CURSOR_ARROW:
- case FL_CURSOR_DEFAULT:
- default: icrsr = [NSCursor arrowCursor];
- break;
+ case FL_CURSOR_ARROW: cursor = [NSCursor arrowCursor]; break;
+ case FL_CURSOR_CROSS: cursor = [NSCursor crosshairCursor]; break;
+ case FL_CURSOR_INSERT: cursor = [NSCursor IBeamCursor]; break;
+ case FL_CURSOR_HAND: cursor = [NSCursor pointingHandCursor]; break;
+ case FL_CURSOR_MOVE: cursor = [NSCursor openHandCursor]; break;
+ case FL_CURSOR_NS: cursor = [NSCursor resizeUpDownCursor]; break;
+ case FL_CURSOR_WE: cursor = [NSCursor resizeLeftRightCursor]; break;
+ case FL_CURSOR_N: cursor = [NSCursor resizeUpCursor]; break;
+ case FL_CURSOR_E: cursor = [NSCursor resizeRightCursor]; break;
+ case FL_CURSOR_W: cursor = [NSCursor resizeLeftCursor]; break;
+ case FL_CURSOR_S: cursor = [NSCursor resizeDownCursor]; break;
+ default:
+ return 0;
}
- [icrsr set];
- cursor = icrsr;
+
+ [(NSCursor*)cursor retain];
+
+ [(NSWindow*)xid invalidateCursorRectsForView:[(NSWindow*)xid contentView]];
+
+ return 1;
+}
+
+int Fl_X::set_cursor(const Fl_RGB_Image *image, int hotx, int hoty) {
+ if (cursor) {
+ [(NSCursor*)cursor release];
+ cursor = NULL;
+ }
+
+ if ((hotx < 0) || (hotx >= image->w()))
+ return 0;
+ if ((hoty < 0) || (hoty >= image->h()))
+ return 0;
+
+ // OS X >= 10.6 can create a NSImage from a CGImage, but we need to
+ // support older versions, hence this pesky handling.
+
+ NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc]
+ initWithBitmapDataPlanes:NULL
+ pixelsWide:image->w()
+ pixelsHigh:image->h()
+ bitsPerSample:8
+ samplesPerPixel:image->d()
+ hasAlpha:!(image->d() & 1)
+ isPlanar:NO
+ colorSpaceName:(image->d()<=2) ? NSDeviceWhiteColorSpace : NSDeviceRGBColorSpace
+ bytesPerRow:(image->w() * image->d())
+ bitsPerPixel:(image->d()*8)];
+
+ // Alpha needs to be premultiplied for this format
+
+ const uchar *i = (const uchar*)*image->data();
+ unsigned char *o = [bitmap bitmapData];
+ for (int y = 0;y < image->h();y++) {
+ if (!(image->d() & 1)) {
+ for (int x = 0;x < image->w();x++) {
+ unsigned int alpha;
+ if (image->d() == 4) {
+ alpha = i[3];
+ *o++ = (unsigned char)((unsigned int)*i++ * alpha / 255);
+ *o++ = (unsigned char)((unsigned int)*i++ * alpha / 255);
+ }
+
+ alpha = i[1];
+ *o++ = (unsigned char)((unsigned int)*i++ * alpha / 255);
+ *o++ = alpha;
+ i++;
+ }
+ } else {
+ // No alpha, so we can just copy everything directly.
+ int len = image->w() * image->d();
+ memcpy(o, i, len);
+ o += len;
+ i += len;
+ }
+ i += image->ld();
+ }
+
+ NSImage *nsimage = [[NSImage alloc]
+ initWithSize:NSMakeSize(image->w(), image->h())];
+
+ [nsimage addRepresentation:bitmap];
+
+ cursor = [[NSCursor alloc]
+ initWithImage:nsimage
+ hotSpot:NSMakePoint(hotx, hoty)];
+
+ [(NSWindow*)xid invalidateCursorRectsForView:[(NSWindow*)xid contentView]];
+
+ [bitmap release];
+ [nsimage release];
+
+ return 1;
}
@interface FLaboutItemTarget : NSObject
@@ -2879,7 +3567,7 @@ void Fl_X::set_cursor(Fl_Cursor c)
}
//#include <FL/Fl_PostScript.H>
- (void)printPanel
-{
+{
Fl_Printer printer;
//Fl_PostScript_File_Device printer;
int w, h, ww, wh;
@@ -2920,24 +3608,26 @@ static void createAppleMenu(void)
static BOOL donethat = NO;
if (donethat) return;
donethat = YES;
- NSMenu *mainmenu, *services, *appleMenu;
+ NSMenu *mainmenu, *services = nil, *appleMenu;
NSMenuItem *menuItem;
NSString *title;
-
- NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
+
+ SEL infodictSEL = (fl_mac_os_version >= 100200 ? @selector(localizedInfoDictionary) : @selector(infoDictionary));
+ NSString *nsappname = [[[NSBundle mainBundle] performSelector:infodictSEL] objectForKey:@"CFBundleName"];
if (nsappname == nil)
nsappname = [[NSProcessInfo processInfo] processName];
appleMenu = [[NSMenu alloc] initWithTitle:@""];
/* Add menu items */
- title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::about] stringByAppendingString:nsappname];
+ title = [NSString stringWithFormat:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::about],nil), nsappname];
menuItem = [appleMenu addItemWithTitle:title action:@selector(showPanel) keyEquivalent:@""];
FLaboutItemTarget *about = [[FLaboutItemTarget alloc] init];
[menuItem setTarget:about];
[appleMenu addItem:[NSMenuItem separatorItem]];
// Print front window
- if (strlen(Fl_Mac_App_Menu::print) > 0) {
+ title = NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::print], nil);
+ if ([title length] > 0) {
menuItem = [appleMenu
- addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::print]
+ addItemWithTitle:title
action:@selector(printPanel)
keyEquivalent:@""];
[menuItem setTarget:about];
@@ -2945,35 +3635,37 @@ static void createAppleMenu(void)
[menuItem setEnabled:YES];
[appleMenu addItem:[NSMenuItem separatorItem]];
}
- // Services Menu
- services = [[NSMenu alloc] init];
- menuItem = [appleMenu
- addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::services]
- action:nil
- keyEquivalent:@""];
- [appleMenu setSubmenu:services forItem:menuItem];
- [appleMenu addItem:[NSMenuItem separatorItem]];
- // Hide AppName
- title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::hide] stringByAppendingString:nsappname];
- [appleMenu addItemWithTitle:title
- action:@selector(hide:)
+ if (fl_mac_os_version >= 100400) { // services+hide+quit already in menu in OS 10.3
+ // Services Menu
+ services = [[NSMenu alloc] init];
+ menuItem = [appleMenu
+ addItemWithTitle:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::services], nil)
+ action:nil
+ keyEquivalent:@""];
+ [appleMenu setSubmenu:services forItem:menuItem];
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+ // Hide AppName
+ title = [NSString stringWithFormat:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::hide],nil), nsappname];
+ [appleMenu addItemWithTitle:title
+ action:@selector(hide:)
+ keyEquivalent:@"h"];
+ // Hide Others
+ menuItem = [appleMenu
+ addItemWithTitle:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::hide_others] , nil)
+ action:@selector(hideOtherApplications:)
keyEquivalent:@"h"];
- // Hide Others
- menuItem = [appleMenu
- addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::hide_others]
- action:@selector(hideOtherApplications:)
- keyEquivalent:@"h"];
- [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
- // Show All
- [appleMenu addItemWithTitle:[NSString stringWithUTF8String:Fl_Mac_App_Menu::show]
- action:@selector(unhideAllApplications:) keyEquivalent:@""];
- [appleMenu addItem:[NSMenuItem separatorItem]];
- // Quit AppName
- title = [[NSString stringWithUTF8String:Fl_Mac_App_Menu::quit]
- stringByAppendingString:nsappname];
- [appleMenu addItemWithTitle:title
- action:@selector(terminate:)
- keyEquivalent:@"q"];
+ [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+ // Show All
+ [appleMenu addItemWithTitle:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::show] , nil)
+ action:@selector(unhideAllApplications:) keyEquivalent:@""];
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+ // Quit AppName
+ title = [NSString stringWithFormat:NSLocalizedString([NSString stringWithUTF8String:Fl_Mac_App_Menu::quit] , nil),
+ nsappname];
+ [appleMenu addItemWithTitle:title
+ action:@selector(terminate:)
+ keyEquivalent:@"q"];
+ }
/* Put menu into the menubar */
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
[menuItem setSubmenu:appleMenu];
@@ -2984,224 +3676,16 @@ static void createAppleMenu(void)
// to avoid compiler warning raised by use of undocumented setAppleMenu :
[NSApp performSelector:@selector(setAppleMenu:) withObject:appleMenu];
}
- [NSApp setServicesMenu:services];
[NSApp setMainMenu:mainmenu];
- [services release];
+ if (services) {
+ [NSApp setServicesMenu:services];
+ [services release];
+ }
[mainmenu release];
[appleMenu release];
[menuItem release];
}
-@interface FLMenuItem : NSMenuItem {
-}
-- (void) doCallback:(id)unused;
-- (void) directCallback:(id)unused;
-- (const Fl_Menu_Item*) getFlItem;
-@end
-@implementation FLMenuItem
-- (const Fl_Menu_Item*) getFlItem
-{
- return *(const Fl_Menu_Item **)[(NSData*)[self representedObject] bytes];
-}
-- (void) doCallback:(id)unused
-{
- fl_lock_function();
- const Fl_Menu_Item *item = [self getFlItem];
- fl_sys_menu_bar->picked(item);
- if ( item->flags & FL_MENU_TOGGLE ) { // update the menu toggle symbol
- [self setState:(item->value() ? NSOnState : NSOffState)];
- }
- else if ( item->flags & FL_MENU_RADIO ) { // update the menu radio symbols
- NSMenu* menu = [self menu];
- NSInteger flRank = [menu indexOfItem:self];
- NSInteger last = [menu numberOfItems] - 1;
- int from = flRank;
- while(from > 0) {
- if ([[menu itemAtIndex:from-1] isSeparatorItem]) break;
- item = [(FLMenuItem*)[menu itemAtIndex:from-1] getFlItem];
- if ( !(item->flags & FL_MENU_RADIO) ) break;
- from--;
- }
- int to = flRank;
- while (to < last) {
- if ([[menu itemAtIndex:to+1] isSeparatorItem]) break;
- item = [(FLMenuItem*)[menu itemAtIndex:to+1] getFlItem];
- if (!(item->flags & FL_MENU_RADIO)) break;
- to++;
- }
- for(int i = from; i <= to; i++) {
- NSMenuItem *nsitem = [menu itemAtIndex:i];
- [nsitem setState:(nsitem != self ? NSOffState : NSOnState)];
- }
- }
- fl_unlock_function();
-}
-- (void) directCallback:(id)unused
-{
- fl_lock_function();
- Fl_Menu_Item *item = (Fl_Menu_Item *)[(NSData*)[self representedObject] bytes];
- if ( item && item->callback() ) item->do_callback(NULL);
- fl_unlock_function();
-}
-@end
-
-void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut)
-{
- fl_open_display();
- Fl_Menu_Item aboutItem;
- memset(&aboutItem, 0, sizeof(Fl_Menu_Item));
- aboutItem.callback(cb);
- aboutItem.user_data(user_data);
- aboutItem.shortcut(shortcut);
- NSMenu *appleMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
- CFStringRef cfname = CFStringCreateCopy(NULL, (CFStringRef)[[appleMenu itemAtIndex:0] title]);
- [appleMenu removeItemAtIndex:0];
- FLMenuItem *item = [[[FLMenuItem alloc] initWithTitle:(NSString*)cfname
- action:@selector(directCallback:)
- keyEquivalent:@""] autorelease];
- if (aboutItem.shortcut()) {
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setKeyEquivalent, item, aboutItem.shortcut() & 0xff);
- Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::setKeyEquivalentModifierMask, item, aboutItem.shortcut() );
- }
- NSData *pointer = [NSData dataWithBytes:&aboutItem length:sizeof(Fl_Menu_Item)];
- [item setRepresentedObject:pointer];
- [appleMenu insertItem:item atIndex:0];
- CFRelease(cfname);
- [item setTarget:item];
-}
-
-static char *remove_ampersand(const char *s)
-{
- char *ret = strdup(s);
- const char *p = s;
- char *q = ret;
- while(*p != 0) {
- if (p[0]=='&') {
- if (p[1]=='&') {
- *q++ = '&'; p+=2;
- } else {
- p++;
- }
- } else {
- *q++ = *p++;
- }
- }
- *q = 0;
- return ret;
-}
-
-void *Fl_Sys_Menu_Bar::doMenuOrItemOperation(Fl_Sys_Menu_Bar::menuOrItemOperation operation, ...)
-/* these operations apply to menus, submenus, or menu items
- */
-{
- NSAutoreleasePool *localPool;
- localPool = [[NSAutoreleasePool alloc] init];
- NSMenu *menu;
- NSMenuItem *item;
- int value;
- void *pter;
- void *retval = NULL;
- va_list ap;
- va_start(ap, operation);
-
- if (operation == Fl_Sys_Menu_Bar::itemAtIndex) { // arguments: NSMenu*, int. Returns the item
- menu = va_arg(ap, NSMenu*);
- value = va_arg(ap, int);
- retval = (void *)[menu itemAtIndex:value];
- }
- else if (operation == Fl_Sys_Menu_Bar::setKeyEquivalent) { // arguments: NSMenuItem*, int
- item = va_arg(ap, NSMenuItem*);
- value = va_arg(ap, int);
- char key = value;
- NSString *equiv = [[NSString alloc] initWithBytes:&key length:1 encoding:NSASCIIStringEncoding];
- [item setKeyEquivalent:equiv];
- [equiv release];
- }
- else if (operation == Fl_Sys_Menu_Bar::setKeyEquivalentModifierMask) { // arguments: NSMenuItem*, int
- item = va_arg(ap, NSMenuItem*);
- value = va_arg(ap, int);
- NSUInteger macMod = 0;
- if ( value & FL_META ) macMod = NSCommandKeyMask;
- if ( value & FL_SHIFT || isupper(value) ) macMod |= NSShiftKeyMask;
- if ( value & FL_ALT ) macMod |= NSAlternateKeyMask;
- if ( value & FL_CTRL ) macMod |= NSControlKeyMask;
- [item setKeyEquivalentModifierMask:macMod];
- }
- else if (operation == Fl_Sys_Menu_Bar::setState) { // arguments: NSMenuItem*, int
- item = va_arg(ap, NSMenuItem*);
- value = va_arg(ap, int);
- [item setState:(value ? NSOnState : NSOffState)];
- }
- else if (operation == Fl_Sys_Menu_Bar::initWithTitle) { // arguments: const char*title. Returns the newly created menu
- // creates a new (sub)menu
- char *ts = remove_ampersand(va_arg(ap, char *));
- CFStringRef title = CFStringCreateWithCString(NULL, ts, kCFStringEncodingUTF8);
- free(ts);
- NSMenu *menu = [[NSMenu alloc] initWithTitle:(NSString*)title];
- CFRelease(title);
- [menu setAutoenablesItems:NO];
- retval = (void *)menu;
- }
- else if (operation == Fl_Sys_Menu_Bar::numberOfItems) { // arguments: NSMenu *menu, int *pcount
- // upon return, *pcount is set to menu's item count
- menu = va_arg(ap, NSMenu*);
- pter = va_arg(ap, void *);
- *(int*)pter = [menu numberOfItems];
- }
- else if (operation == Fl_Sys_Menu_Bar::setSubmenu) { // arguments: NSMenuItem *item, NSMenu *menu
- // sets 'menu' as submenu attached to 'item'
- item = va_arg(ap, NSMenuItem*);
- menu = va_arg(ap, NSMenu*);
- [item setSubmenu:menu];
- [menu release];
- }
- else if (operation == Fl_Sys_Menu_Bar::setEnabled) { // arguments: NSMenuItem*, int
- item = va_arg(ap, NSMenuItem*);
- value = va_arg(ap, int);
- [item setEnabled:(value ? YES : NO)];
- }
- else if (operation == Fl_Sys_Menu_Bar::addSeparatorItem) { // arguments: NSMenu*
- menu = va_arg(ap, NSMenu*);
- [menu addItem:[NSMenuItem separatorItem]];
- }
- else if (operation == Fl_Sys_Menu_Bar::setTitle) { // arguments: NSMenuItem*, const char *
- item = va_arg(ap, NSMenuItem*);
- char *ts = remove_ampersand(va_arg(ap, char *));
- CFStringRef title = CFStringCreateWithCString(NULL, ts, kCFStringEncodingUTF8);
- free(ts);
- [item setTitle:(NSString*)title];
- CFRelease(title);
- }
- else if (operation == Fl_Sys_Menu_Bar::removeItem) { // arguments: NSMenu*, int
- menu = va_arg(ap, NSMenu*);
- value = va_arg(ap, int);
- [menu removeItem:[menu itemAtIndex:value]];
- }
- else if (operation == Fl_Sys_Menu_Bar::addNewItem) { // arguments: NSMenu *menu, Fl_Menu_Item* mitem, int *prank
- // creates a new menu item at the end of 'menu'
- // attaches the item of fl_sys_menu_bar to it
- // upon return, puts the rank (counted in NSMenu) of the new item in *prank unless prank is NULL
- menu = va_arg(ap, NSMenu*);
- Fl_Menu_Item *mitem = va_arg(ap, Fl_Menu_Item *);
- int *prank = va_arg(ap, int*);
- char *name = remove_ampersand(mitem->label());
- CFStringRef cfname = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
- free(name);
- FLMenuItem *item = [[FLMenuItem alloc] initWithTitle:(NSString*)cfname
- action:@selector(doCallback:)
- keyEquivalent:@""];
- NSData *pointer = [NSData dataWithBytes:&mitem length:sizeof(Fl_Menu_Item*)];
- [item setRepresentedObject:pointer];
- [menu addItem:item];
- CFRelease(cfname);
- [item setTarget:item];
- if (prank != NULL) *prank = [menu indexOfItem:item];
- [item release];
- }
- va_end(ap);
- [localPool release];
- return retval;
-}
void Fl_X::set_key_window()
{
@@ -3215,7 +3699,7 @@ static NSImage *imageFromText(const char *text, int *pwidth, int *pheight)
fl_font(FL_HELVETICA, 10);
p = text;
int nl = 0;
- while((q=strchr(p, '\n')) != NULL) {
+ while(nl < 100 && (q=strchr(p, '\n')) != NULL) {
nl++;
w2 = int(fl_width(p, q - p));
if (w2 > width) width = w2;
@@ -3256,14 +3740,30 @@ static NSImage *imageFromText(const char *text, int *pwidth, int *pheight)
static NSImage *defaultDragImage(int *pwidth, int *pheight)
{
- const int width = 16, height = 16;
+ const int version_threshold = 100700;
+ int width, height;
+ if (fl_mac_os_version >= version_threshold) {
+ width = 50; height = 40;
+ }
+ else {
+ width = 16; height = 16;
+ }
Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(width, height);
fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,width,height);
- CGContextSetRGBStrokeColor( (CGContextRef)off, 0,0,0,0.6);
- fl_rect(0,0,width,height);
- fl_rect(2,2,width-4,height-4);
+ if (fl_mac_os_version >= version_threshold) {
+ fl_font(FL_HELVETICA, 20);
+ fl_color(FL_BLACK);
+ char str[4];
+ int l = fl_utf8encode(0x1F69A, str); // the "Delivery truck" Unicode character from "Apple Color Emoji" font
+ fl_draw(str, l, 1, 16);
+ }
+ else { // draw two squares
+ CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
+ fl_rectf(0,0,width,height);
+ CGContextSetRGBStrokeColor( (CGContextRef)off, 0,0,0,0.6);
+ fl_rect(0,0,width,height);
+ fl_rect(2,2,width-4,height-4);
+ }
fl_end_offscreen();
NSImage* image = CGBitmapContextToNSImage( (CGContextRef)off );
fl_delete_offscreen( off );
@@ -3279,16 +3779,11 @@ int Fl::dnd(void)
NSAutoreleasePool *localPool;
localPool = [[NSAutoreleasePool alloc] init];
NSPasteboard *mypasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
- [mypasteboard declareTypes:[NSArray arrayWithObjects:@"public.utf8-plain-text", nil] owner:nil];
- [mypasteboard setData:(NSData*)text forType:@"public.utf8-plain-text"];
+ [mypasteboard declareTypes:[NSArray arrayWithObject:utf8_format] owner:nil];
+ [mypasteboard setData:(NSData*)text forType:utf8_format];
CFRelease(text);
Fl_Widget *w = Fl::pushed();
- Fl_Window *win = w->window();
- if (win == NULL) {
- win = (Fl_Window*)w;
- } else {
- while(win->window()) win = win->window();
- }
+ Fl_Window *win = w->top_window();
NSView *myview = [Fl_X::i(win)->xid contentView];
NSEvent *theEvent = [NSApp currentEvent];
@@ -3319,20 +3814,29 @@ int Fl::dnd(void)
}
static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y, int w, int h)
-// release the returned value after use
+// the returned value is autoreleased
{
+ NSRect rect;
+ NSView *winview = nil;
while (win->window()) {
x += win->x();
y += win->y();
win = win->window();
}
- CGFloat epsilon = 0;
- if (fl_mac_os_version >= 100600) epsilon = 0.5; // STR #2887
- // The epsilon offset is absolutely necessary under 10.6. Without it, the top pixel row and
- // left pixel column are not read, and bitmap is read shifted by one pixel in both directions.
- // Under 10.5, we want no offset.
- NSRect rect = NSMakeRect(x - epsilon, y - epsilon, w, h);
- return [[NSBitmapImageRep alloc] initWithFocusedViewRect:rect];
+ if ( through_drawRect ) {
+ CGFloat epsilon = 0;
+ if (fl_mac_os_version >= 100600) epsilon = 0.5; // STR #2887
+ rect = NSMakeRect(x - epsilon, y - epsilon, w, h);
+ }
+ else {
+ rect = NSMakeRect(x, win->h()-(y+h), w, h);
+ // lock focus to win's view
+ winview = [fl_xid(win) contentView];
+ [winview lockFocus];
+ }
+ NSBitmapImageRep *bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:rect] autorelease];
+ if ( !through_drawRect ) [winview unlockFocus];
+ return bitmap;
}
unsigned char *Fl_X::bitmap_from_window_rect(Fl_Window *win, int x, int y, int w, int h, int *bytesPerPixel)
@@ -3344,24 +3848,38 @@ unsigned char *Fl_X::bitmap_from_window_rect(Fl_Window *win, int x, int y, int w
*/
{
NSBitmapImageRep *bitmap = rect_to_NSBitmapImageRep(win, x, y, w, h);
+ if (bitmap == nil) return NULL;
*bytesPerPixel = [bitmap bitsPerPixel]/8;
int bpp = (int)[bitmap bytesPerPlane];
int bpr = (int)[bitmap bytesPerRow];
- int hh = bpp/bpr; // sometimes hh = h-1 for unclear reason
- int ww = bpr/(*bytesPerPixel); // sometimes ww = w-1
- unsigned char *data = new unsigned char[w * h * *bytesPerPixel];
- if (w == ww) {
- memcpy(data, [bitmap bitmapData], w * hh * *bytesPerPixel);
- } else {
- unsigned char *p = [bitmap bitmapData];
- unsigned char *q = data;
- for(int i = 0;i < hh; i++) {
- memcpy(q, p, *bytesPerPixel * ww);
- p += bpr;
- q += w * *bytesPerPixel;
+ int hh = bpp/bpr; // sometimes hh = h-1 for unclear reason, and hh = 2*h with retina
+ int ww = bpr/(*bytesPerPixel); // sometimes ww = w-1, and ww = 2*w with retina
+ unsigned char *data;
+ if (ww > w) { // with a retina display
+ Fl_RGB_Image *rgb = new Fl_RGB_Image([bitmap bitmapData], ww, hh, 4);
+ Fl_RGB_Scaling save_scaling = Fl_Image::RGB_scaling();
+ Fl_Image::RGB_scaling(FL_RGB_SCALING_BILINEAR);
+ Fl_RGB_Image *rgb2 = (Fl_RGB_Image*)rgb->copy(w, h);
+ Fl_Image::RGB_scaling(save_scaling);
+ delete rgb;
+ rgb2->alloc_array = 0;
+ data = (uchar*)rgb2->array;
+ delete rgb2;
+ }
+ else {
+ data = new unsigned char[w * h * *bytesPerPixel];
+ if (w == ww) {
+ memcpy(data, [bitmap bitmapData], w * hh * *bytesPerPixel);
+ } else {
+ unsigned char *p = [bitmap bitmapData];
+ unsigned char *q = data;
+ for(int i = 0;i < hh; i++) {
+ memcpy(q, p, *bytesPerPixel * ww);
+ p += bpr;
+ q += w * *bytesPerPixel;
}
+ }
}
- [bitmap release];
return data;
}
@@ -3376,13 +3894,13 @@ CGImageRef Fl_X::CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, i
CGImageRef img;
if (fl_mac_os_version >= 100500) {
NSBitmapImageRep *bitmap = rect_to_NSBitmapImageRep(win, x, y, w, h);
- img = [bitmap CGImage]; // requires Mac OS 10.5
+ img = (CGImageRef)[bitmap performSelector:@selector(CGImage)]; // requires Mac OS 10.5
CGImageRetain(img);
- [bitmap release];
}
else {
int bpp;
unsigned char *bitmap = bitmap_from_window_rect(win, x, y, w, h, &bpp);
+ if (!bitmap) return NULL;
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, bitmap, w*h*bpp, imgProviderReleaseData);
img = CGImageCreate(w, h, 8, 8*bpp, w*bpp, lut,
@@ -3401,7 +3919,7 @@ WindowRef Fl_X::window_ref()
// so a CGRect matches exactly what is denoted x,y,w,h for clipping purposes
CGRect fl_cgrectmake_cocoa(int x, int y, int w, int h) {
- return CGRectMake(x, y, w > 0 ? w - 0.9 : 0, h > 0 ? h - 0.9 : 0);
+ return CGRectMake(x - 0.5, y - 0.5, w, h);
}
Window fl_xid(const Fl_Window* w)
@@ -3428,30 +3946,110 @@ int Fl_Window::decorated_h()
void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
{
+ NSButton *close = nil, *miniaturize = nil, *zoom = nil;
if (!win->shown() || win->parent() || !win->border() || !win->visible()) {
this->print_widget(win, x_offset, y_offset);
return;
}
- int bx, by, bt;
+ int bx, by, bt, bpp;
get_window_frame_sizes(bx, by, bt);
Fl_Display_Device::display_device()->set_current(); // send win to front and make it current
+ const char *title = win->label();
+ win->label(""); // temporarily set a void window title
win->show();
+ if (fl_mac_os_version >= 101000) {
+ // if linked for OS 10.10, capture of title bar does not capture the title bar buttons
+ // so we draw them in FLTK
+ NSWindow *xid = fl_xid(win);
+ close = [xid standardWindowButton:NSWindowCloseButton]; // 10.2
+ miniaturize = [xid standardWindowButton:NSWindowMiniaturizeButton];
+ zoom = [xid standardWindowButton:NSWindowZoomButton];
+ [close setHidden:YES]; // 10.3
+ [miniaturize setHidden:YES];
+ [zoom setHidden:YES];
+ }
fl_gc = NULL;
Fl::check();
- win->make_current();
+ BOOL to_quartz = dynamic_cast<Fl_Printer*>(this) != NULL;
+ // capture the window title bar with no title
+ CGImageRef img = NULL;
+ unsigned char *bitmap = NULL;
+ if (to_quartz)
+ img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
+ else
+ bitmap = Fl_X::bitmap_from_window_rect(win, 0, -bt, win->w(), bt, &bpp);
+ win->label(title); // put back the window title
this->set_current(); // back to the Fl_Paged_Device
- // capture the window title bar
- CGImageRef img = Fl_X::CGImage_from_window_rect(win, 0, -bt, win->w(), bt);
- // and print it
- CGRect rect = { { x_offset, y_offset }, { win->w(), bt } };
- Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
- CGContextDrawImage(fl_gc, rect, img);
- Fl_X::q_end_image();
- CFRelease(img);
+ if (img && to_quartz) { // print the title bar
+ CGRect rect = { { x_offset, y_offset }, { win->w(), bt } };
+ Fl_X::q_begin_image(rect, 0, 0, win->w(), bt);
+ CGContextDrawImage(fl_gc, rect, img);
+ Fl_X::q_end_image();
+ CFRelease(img);
+ }
+ else if(!to_quartz) {
+ Fl_RGB_Image *rgb = new Fl_RGB_Image(bitmap, win->w(), bt, bpp);
+ rgb->draw(x_offset, y_offset);
+ delete rgb;
+ delete[] bitmap;
+ }
+ if (fl_mac_os_version >= 101000) { // print the title bar buttons
+ Fl_Color inactive = fl_rgb_color((uchar)0xCE, (uchar)0xCE, (uchar)0xCE); // inactive button color
+ Fl_Color redish, yellowish, greenish;
+ if ([[NSUserDefaults standardUserDefaults] integerForKey:@"AppleAquaColorVariant"] == 6) { // graphite appearance
+ redish = yellowish = greenish = fl_rgb_color((uchar)0x8C, (uchar)0x8C, (uchar)0x8C);
+ }
+ else {
+ redish = fl_rgb_color((uchar)0xFF, (uchar)0x63, (uchar)0x5A);
+ yellowish = fl_rgb_color((uchar)0xFF, (uchar)0xC6, (uchar)0x42);
+ greenish = fl_rgb_color((uchar)0x29, (uchar)0xD6, (uchar)0x52);
+ }
+
+ if (![close isEnabled]) fl_color(inactive); else fl_color(redish);
+ fl_pie(x_offset+8, y_offset+5, 12, 12, 0, 360);
+ if (![miniaturize isEnabled]) fl_color(inactive); else fl_color(yellowish);
+ fl_pie(x_offset+28, y_offset+5, 12, 12, 0, 360);
+ if (![zoom isEnabled]) fl_color(inactive); else fl_color(greenish);
+ fl_pie(x_offset+48, y_offset+5, 12, 12, 0, 360);
+
+ [close setHidden:NO]; // 10.3
+ [miniaturize setHidden:NO];
+ [zoom setHidden:NO];
+ }
+ if (title) { // print the window title
+ const int skip = 65; // approx width of the zone of the 3 window control buttons
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ if (fl_mac_os_version >= 100400 && to_quartz) { // use Cocoa string drawing with exact title bar font
+ // the exact font is LucidaGrande 13 pts (and HelveticaNeueDeskInterface-Regular with 10.10)
+ NSGraphicsContext *current = [NSGraphicsContext currentContext];
+ [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:fl_gc flipped:YES]];//10.4
+ NSDictionary *attr = [NSDictionary dictionaryWithObject:[NSFont titleBarFontOfSize:0]
+ forKey:NSFontAttributeName];
+ NSString *title_s = [fl_xid(win) title];
+ NSSize size = [title_s sizeWithAttributes:attr];
+ int x = x_offset + win->w()/2 - size.width/2;
+ if (x < x_offset+skip) x = x_offset+skip;
+ NSRect r = {{x, y_offset+bt/2+4}, {win->w() - skip, bt}};
+ [[NSGraphicsContext currentContext] setShouldAntialias:YES];
+ [title_s drawWithRect:r options:(NSStringDrawingOptions)0 attributes:attr]; // 10.4
+ [[NSGraphicsContext currentContext] setShouldAntialias:NO];
+ [NSGraphicsContext setCurrentContext:current];
+ }
+ else
+#endif
+ {
+ fl_font(FL_HELVETICA, 14);
+ fl_color(FL_BLACK);
+ int x = x_offset + win->w()/2 - fl_width(title)/2;
+ if (x < x_offset+skip) x = x_offset+skip;
+ fl_push_clip(x_offset, y_offset, win->w(), bt);
+ fl_draw(title, x, y_offset+bt/2+4);
+ fl_pop_clip();
+ }
+ }
this->print_widget(win, x_offset, y_offset + bt); // print the window inner part
}
-#include <dlfcn.h>
/* Returns the address of a Carbon function after dynamically loading the Carbon library if needed.
Supports old Mac OS X versions that may use a couple of Carbon calls:
@@ -3476,9 +4074,20 @@ void *Fl_X::get_carbon_function(const char *function_name) {
static int calc_mac_os_version() {
int M, m, b = 0;
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
- NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
- const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
- sscanf(s, "%d.%d.%d", &M, &m, &b);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
+ if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) {
+ NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
+ M = version.majorVersion;
+ m = version.minorVersion;
+ b = version.patchVersion;
+ }
+ else
+#endif
+ {
+ NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
+ const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
+ sscanf(s, "%d.%d.%d", &M, &m, &b);
+ }
[localPool release];
return M*10000 + m*100 + b;
}
@@ -3486,5 +4095,5 @@ static int calc_mac_os_version() {
#endif // __APPLE__
//
-// End of "$Id: Fl_cocoa.mm 9734 2012-11-30 18:20:36Z manolo $".
+// End of "$Id: Fl_cocoa.mm 10427 2014-11-02 21:06:07Z manolo $".
//
diff --git a/src/Fl_compose.cxx b/src/Fl_compose.cxx
index 03dd216..0cd2a57 100644
--- a/src/Fl_compose.cxx
+++ b/src/Fl_compose.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_compose.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: Fl_compose.cxx 9966 2013-09-06 09:03:22Z manolo $"
//
// Character compose processing for the Fast Light Tool Kit (FLTK).
//
@@ -16,11 +16,20 @@
// http://www.fltk.org/str.php
//
+/**
+\file Fl_compose.cxx
+Utility functions to support text input.
+*/
+
+
#include <FL/Fl.H>
#include <FL/x.H>
#ifndef FL_DOXYGEN
int Fl::compose_state = 0;
+#ifdef __APPLE__
+int Fl_X::next_marked_length = 0;
+#endif
#endif
#if !defined(WIN32) && !defined(__APPLE__)
@@ -32,7 +41,7 @@ extern XIC fl_xim_ic;
<p>If <i>true</i> is returned, then it has modified the
Fl::event_text() and Fl::event_length() to a set of <i>bytes</i> to
- insert (it may be of zero length!). In will also set the "del"
+ insert (it may be of zero length!). It will also set the "del"
parameter to the number of <i>bytes</i> to the left of the cursor to
delete, this is used to delete the results of the previous call to
Fl::compose().
@@ -41,38 +50,88 @@ extern XIC fl_xim_ic;
keys, and del is set to zero. You could insert the text anyways, if
you don't know what else to do.
+ <p>On the Mac OS platform, text input can involve marked text, that is,
+ temporary text replaced by other text during the input process. This occurs,
+ e.g., when using dead keys or when entering CJK characters.
+ Text editing widgets should preferentially signal
+ marked text, usually underlining it. Widgets can use
+ <tt>int Fl::compose_state</tt> <i>after</i> having called Fl::compose(int&)
+ to obtain the length in bytes of marked text that always finishes at the
+ current insertion point. It's the widget's task to underline marked text.
+ Widgets should also call <tt>void Fl::reset_marked_text()</tt> when processing FL_UNFOCUS
+ events. Optionally, widgets can also call
+ <tt>void Fl::insertion_point_location(int x, int y, int height)</tt> to indicate the window
+ coordinates of the bottom of the current insertion point and the line height.
+ This way, auxiliary windows that help choosing among alternative characters
+ appear just below the insertion point. If widgets don't do that,
+ auxiliary windows appear at the widget's bottom. The
+ Fl_Input and Fl_Text_Editor widgets underline marked text.
+ If none of this is done by a user-defined text editing widget,
+ text input will work, but will not signal to the user what text is marked.
+ Finally, text editing widgets should call <tt>set_flag(MAC_USE_ACCENTS_MENU);</tt>
+ in their constructor if they want to use the feature introduced with Mac OS 10.7 "Lion"
+ where pressing and holding a key on the keyboard opens an accented-character menu window.
+
<p>Though the current implementation returns immediately, future
versions may take quite awhile, as they may pop up a window or do
other user-interface things to allow characters to be selected.
*/
int Fl::compose(int& del) {
- // character composition is now handled by the OS
- del = 0;
+ int condition;
#if defined(__APPLE__)
- // this stuff is to be treated as a function key
- if(Fl::e_length == 0 || Fl::e_keysym == FL_Enter || Fl::e_keysym == FL_KP_Enter ||
- Fl::e_keysym == FL_Tab || Fl::e_keysym == FL_Escape || Fl::e_state&(FL_META | FL_CTRL) ) {
- return 0;
- }
-#elif defined(WIN32)
- unsigned char ascii = (unsigned)e_text[0];
- if ((e_state & (FL_ALT | FL_META)) && !(ascii & 128)) return 0;
+ int has_text_key = Fl::compose_state || Fl::e_keysym <= '~' || Fl::e_keysym == FL_Iso_Key ||
+ (Fl::e_keysym >= FL_KP && Fl::e_keysym <= FL_KP_Last && Fl::e_keysym != FL_KP_Enter);
+ condition = Fl::e_state&(FL_META | FL_CTRL) ||
+ (Fl::e_keysym >= FL_Shift_L && Fl::e_keysym <= FL_Alt_R) || // called from flagsChanged
+ !has_text_key ;
#else
- unsigned char ascii = (unsigned)e_text[0];
- if ((e_state & (FL_ALT | FL_META | FL_CTRL)) && !(ascii & 128)) return 0;
-#endif
- if(Fl::compose_state) {
- del = Fl::compose_state;
- Fl::compose_state = 0;
-#ifndef __APPLE__
- } else {
- // Only insert non-control characters:
- if (! (ascii & ~31 && ascii!=127)) { return 0; }
+unsigned char ascii = (unsigned char)e_text[0];
+#if defined(WIN32)
+ condition = (e_state & (FL_ALT | FL_META)) && !(ascii & 128) ;
+#else
+ condition = (e_state & (FL_ALT | FL_META | FL_CTRL)) && !(ascii & 128) ;
+#endif // WIN32
+#endif // __APPLE__
+ if (condition) { del = 0; return 0;} // this stuff is to be treated as a function key
+ del = Fl::compose_state;
+#ifdef __APPLE__
+ Fl::compose_state = Fl_X::next_marked_length;
+#else
+ Fl::compose_state = 0;
+// Only insert non-control characters:
+ if ( (!Fl::compose_state) && ! (ascii & ~31 && ascii!=127)) { return 0; }
#endif
- }
return 1;
}
+#ifdef __APPLE__
+static int insertion_point_x = 0;
+static int insertion_point_y = 0;
+static int insertion_point_height = 0;
+static bool insertion_point_location_is_valid = false;
+
+void Fl::reset_marked_text() {
+ Fl::compose_state = 0;
+ Fl_X::next_marked_length = 0;
+ insertion_point_location_is_valid = false;
+ }
+int Fl_X::insertion_point_location(int *px, int *py, int *pheight)
+// return true if the current coordinates of the insertion point are available
+{
+ if ( ! insertion_point_location_is_valid ) return false;
+ *px = insertion_point_x;
+ *py = insertion_point_y;
+ *pheight = insertion_point_height;
+ return true;
+}
+void Fl::insertion_point_location(int x, int y, int height) {
+ insertion_point_location_is_valid = true;
+ insertion_point_x = x;
+ insertion_point_y = y;
+ insertion_point_height = height;
+}
+#endif // __APPLE__
+
/**
If the user moves the cursor, be sure to call Fl::compose_reset().
The next call to Fl::compose() will start out in an initial state. In
@@ -88,6 +147,6 @@ void Fl::compose_reset()
}
//
-// End of "$Id: Fl_compose.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// End of "$Id: Fl_compose.cxx 9966 2013-09-06 09:03:22Z manolo $"
//
diff --git a/src/Fl_get_key_mac.cxx b/src/Fl_get_key_mac.cxx
index 01c2c83..a59df4a 100644
--- a/src/Fl_get_key_mac.cxx
+++ b/src/Fl_get_key_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_key_mac.cxx 9303 2012-03-26 16:54:54Z manolo $"
+// "$Id: Fl_get_key_mac.cxx 9952 2013-07-23 16:02:44Z manolo $"
//
// MacOS keyboard state routines for the Fast Light Tool Kit (FLTK).
//
@@ -164,6 +164,15 @@ enum {
kVK_ISO_Section = 0x0A
};
+/* JIS keyboards only*/
+enum {
+ kVK_JIS_Yen = 0x5D,
+ kVK_JIS_Underscore = 0x5E,
+ kVK_JIS_KeypadComma = 0x5F,
+ kVK_JIS_Eisu = 0x66,
+ kVK_JIS_Kana = 0x68
+};
+
#endif
// convert an FLTK (X) keysym to a MacOS symbol:
@@ -181,12 +190,16 @@ static const struct {unsigned short vk, fltk;} vktab[] = {
{ kVK_ANSI_U, 'U' }, { kVK_ANSI_V, 'V' }, { kVK_ANSI_W, 'W' }, { kVK_ANSI_X, 'X' },
{ kVK_ANSI_Y, 'Y' }, { kVK_ANSI_Z, 'Z' },
{ kVK_ANSI_LeftBracket, '[' }, { kVK_ANSI_Backslash, '\\' }, { kVK_ANSI_RightBracket, ']' }, { kVK_ANSI_Grave, '`' },
+ { kVK_VolumeDown, FL_Volume_Down}, { kVK_Mute, FL_Volume_Mute}, { kVK_VolumeUp, FL_Volume_Up},
{ kVK_Delete, FL_BackSpace }, { kVK_Tab, FL_Tab }, { kVK_ISO_Section, FL_Iso_Key }, { kVK_Return, FL_Enter }, /*{ 0x7F, FL_Pause },
- { 0x7F, FL_Scroll_Lock },*/ { kVK_Escape, FL_Escape }, { kVK_Home, FL_Home }, { kVK_LeftArrow, FL_Left },
+ { 0x7F, FL_Scroll_Lock },*/ { kVK_Escape, FL_Escape },
+ { kVK_JIS_Kana, FL_Kana}, { kVK_JIS_Eisu, FL_Eisu}, { kVK_JIS_Yen, FL_Yen}, { kVK_JIS_Underscore, FL_JIS_Underscore},
+ { kVK_Home, FL_Home }, { kVK_LeftArrow, FL_Left },
{ kVK_UpArrow, FL_Up }, { kVK_RightArrow, FL_Right }, { kVK_DownArrow, FL_Down }, { kVK_PageUp, FL_Page_Up },
{ kVK_PageDown, FL_Page_Down }, { kVK_End, FL_End }, /*{ 0x7F, FL_Print }, { 0x7F, FL_Insert },*/
{ 0x6e, FL_Menu }, { kVK_Help, FL_Help }, { kVK_ANSI_KeypadClear, FL_Num_Lock },
{ kVK_ANSI_KeypadEnter, FL_KP_Enter }, { kVK_ANSI_KeypadMultiply, FL_KP+'*' }, { kVK_ANSI_KeypadPlus, FL_KP+'+'},
+ { kVK_JIS_KeypadComma, FL_KP+',' },
{ kVK_ANSI_KeypadMinus, FL_KP+'-' }, { kVK_ANSI_KeypadDecimal, FL_KP+'.' }, { kVK_ANSI_KeypadDivide, FL_KP+'/' },
{ kVK_ANSI_Keypad0, FL_KP+'0' }, { kVK_ANSI_Keypad1, FL_KP+'1' }, { kVK_ANSI_Keypad2, FL_KP+'2' }, { kVK_ANSI_Keypad3, FL_KP+'3' },
{ kVK_ANSI_Keypad4, FL_KP+'4' }, { kVK_ANSI_Keypad5, FL_KP+'5' }, { kVK_ANSI_Keypad6, FL_KP+'6' }, { kVK_ANSI_Keypad7, FL_KP+'7' },
@@ -195,6 +208,7 @@ static const struct {unsigned short vk, fltk;} vktab[] = {
{ kVK_F5, FL_F+5 }, { kVK_F6, FL_F+6 }, { kVK_F7, FL_F+7 }, { kVK_F8, FL_F+8 },
{ kVK_F9, FL_F+9 }, { kVK_F10, FL_F+10 }, { kVK_F11, FL_F+11 }, { kVK_F12, FL_F+12 },
{ kVK_F13, FL_F+13 }, { kVK_F14, FL_F+14 }, { kVK_F15, FL_F+15 }, { kVK_F16, FL_F+16 },
+ { kVK_F17, FL_F+17 }, { kVK_F18, FL_F+18 }, { kVK_F19, FL_F+19 }, { kVK_F20, FL_F+20 },
{ kVK_Shift, FL_Shift_L }, { kVK_RightShift, FL_Shift_R }, { kVK_Control, FL_Control_L }, { kVK_RightControl, FL_Control_R },
{ kVK_CapsLock, FL_Caps_Lock }, { kVK_Command, FL_Meta_L }, { 0x36, FL_Meta_R },
{ kVK_Option, FL_Alt_L }, { kVK_RightOption, FL_Alt_R }, { kVK_ForwardDelete, FL_Delete }
@@ -219,7 +233,7 @@ static int fltk2mac(int fltk) {
if (vktab[c].fltk == fltk) return vktab[c].vk;
if (vktab[c].fltk < fltk) a = c+1; else b = c;
}
- return 127;
+ return vktab[a].vk;
}
//: returns true, if that key was pressed during the last event
@@ -261,5 +275,5 @@ int Fl::get_key(int k) {
}
//
-// End of "$Id: Fl_get_key_mac.cxx 9303 2012-03-26 16:54:54Z manolo $".
+// End of "$Id: Fl_get_key_mac.cxx 9952 2013-07-23 16:02:44Z manolo $".
//
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index fd64e54..b728b76 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx 9740 2012-12-09 17:45:24Z manolo $"
+// "$Id: Fl_get_system_colors.cxx 10126 2014-04-19 14:55:15Z greg.ercolano $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -258,19 +258,28 @@ Fl_Image *Fl::scheme_bg_ = (Fl_Image *)0; // current background image for the
static Fl_Pixmap tile(tile_xpm);
/**
- Gets or sets the current widget scheme. NULL will use
- the scheme defined in the FLTK_SCHEME environment
- variable or the scheme resource under X11. Otherwise,
- any of the following schemes can be used:
-
- - "none" - This is the default look-n-feel which resembles old
- Windows (95/98/Me/NT/2000) and old GTK/KDE
-
- - "plastic" - This scheme is inspired by the Aqua user interface
- on Mac OS X
-
- - "gtk+" - This scheme is inspired by the Red Hat Bluecurve
- theme
+ Sets the current widget scheme. NULL will use the scheme defined
+ in the FLTK_SCHEME environment variable or the scheme resource
+ under X11. Otherwise, any of the following schemes can be used:
+
+ - "none" - This is the default look-n-feel which resembles old
+ Windows (95/98/Me/NT/2000) and old GTK/KDE
+
+ - "base" - This is an alias for "none"
+
+ - "plastic" - This scheme is inspired by the Aqua user interface
+ on Mac OS X
+
+ - "gtk+" - This scheme is inspired by the Red Hat Bluecurve theme
+
+ - "gleam" - This scheme is inspired by the Clearlooks Glossy scheme.
+ (Colin Jones and Edmanuel Torres).
+
+ Uppercase scheme names are equivalent, but the stored scheme name will
+ always be lowercase and Fl::scheme() will return this lowercase name.
+
+ If the resulting scheme name is not defined, the default scheme will
+ be used and Fl::scheme() will return NULL.
*/
int Fl::scheme(const char *s) {
if (!s) {
@@ -289,6 +298,7 @@ int Fl::scheme(const char *s) {
if (!fl_ascii_strcasecmp(s, "none") || !fl_ascii_strcasecmp(s, "base") || !*s) s = 0;
else if (!fl_ascii_strcasecmp(s, "gtk+")) s = strdup("gtk+");
else if (!fl_ascii_strcasecmp(s, "plastic")) s = strdup("plastic");
+ else if (!fl_ascii_strcasecmp(s, "gleam")) s = strdup("gleam");
else s = 0;
}
if (scheme_) free((void*)scheme_);
@@ -375,6 +385,27 @@ int Fl::reload_scheme() {
// Use slightly thinner scrollbars...
Fl::scrollbar_size(15);
+ } else if (scheme_ && !fl_ascii_strcasecmp(scheme_, "gleam")) {
+ // Use a GTK+ inspired look-n-feel...
+ if (scheme_bg_) {
+ delete scheme_bg_;
+ scheme_bg_ = (Fl_Image *)0;
+ }
+
+ set_boxtype(FL_UP_FRAME, FL_GLEAM_UP_FRAME);
+ set_boxtype(FL_DOWN_FRAME, FL_GLEAM_DOWN_FRAME);
+ set_boxtype(FL_THIN_UP_FRAME, FL_GLEAM_UP_FRAME);
+ set_boxtype(FL_THIN_DOWN_FRAME, FL_GLEAM_DOWN_FRAME);
+
+ set_boxtype(FL_UP_BOX, FL_GLEAM_UP_BOX);
+ set_boxtype(FL_DOWN_BOX, FL_GLEAM_DOWN_BOX);
+ set_boxtype(FL_THIN_UP_BOX, FL_GLEAM_THIN_UP_BOX);
+ set_boxtype(FL_THIN_DOWN_BOX, FL_GLEAM_THIN_DOWN_BOX);
+ set_boxtype(_FL_ROUND_UP_BOX, FL_GLEAM_ROUND_UP_BOX);
+ set_boxtype(_FL_ROUND_DOWN_BOX, FL_GLEAM_ROUND_DOWN_BOX);
+
+ // Use slightly thinner scrollbars...
+ Fl::scrollbar_size(15);
} else {
// Use the standard FLTK look-n-feel...
if (scheme_bg_) {
@@ -411,5 +442,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx 9740 2012-12-09 17:45:24Z manolo $".
+// End of "$Id: Fl_get_system_colors.cxx 10126 2014-04-19 14:55:15Z greg.ercolano $".
//
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx
deleted file mode 100644
index 3fb4ffc..0000000
--- a/src/Fl_mac.cxx
+++ /dev/null
@@ -1,2861 +0,0 @@
-//
-// "$Id: Fl_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
-//
-// MacOS specific code for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 1998-2010 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// http://www.fltk.org/COPYING.php
-//
-// Please report all bugs and problems on the following page:
-//
-// http://www.fltk.org/str.php
-//
-
-//// From the inner edge of a MetroWerks CodeWarrior CD:
-// (without permission)
-//
-// "Three Compiles for 68Ks under the sky,
-// Seven Compiles for PPCs in their fragments of code,
-// Nine Compiles for Mortal Carbon doomed to die,
-// One Compile for Mach-O Cocoa on its Mach-O throne,
-// in the Land of MacOS X where the Drop-Shadows lie.
-//
-// One Compile to link them all, One Compile to merge them,
-// One Compile to copy them all and in the bundle bind them,
-// in the Land of MacOS X where the Drop-Shadows lie."
-
-// warning: the Apple Quartz version still uses some Quickdraw calls,
-// mostly to get around the single active context in QD and
-// to implement clipping. This should be changed into pure
-// Quartz calls in the near future.
-
-// FIXME moving away from Carbon, I am replacing the Scrap manager calls with Pasteboard
-// calls that support utf8 encoding. As soon as these function haven proven working
-// the Scrap manager calls should be removed
-#define USE_PASTEBOARD 1
-
-// we don't need the following definition because we deliver only
-// true mouse moves. On very slow systems however, this flag may
-// still be useful.
-#ifndef FL_DOXYGEN
-
-#define CONSOLIDATE_MOTION 0
-extern "C" {
-#include <pthread.h>
-}
-
-#include <config.h>
-#include <FL/Fl.H>
-#include <FL/x.H>
-#include <FL/Fl_Window.H>
-#include <FL/Fl_Tooltip.H>
-#include <FL/Fl_Sys_Menu_Bar.H>
-#include <stdio.h>
-#include <stdlib.h>
-#include "flstring.h"
-#include <unistd.h>
-
-// #define DEBUG_SELECT // UNCOMMENT FOR SELECT()/THREAD DEBUGGING
-#ifdef DEBUG_SELECT
-#include <stdio.h> // testing
-#define DEBUGMSG(msg) if ( msg ) fprintf(stderr, msg);
-#define DEBUGPERRORMSG(msg) if ( msg ) perror(msg)
-#define DEBUGTEXT(txt) txt
-#else
-#define DEBUGMSG(msg)
-#define DEBUGPERRORMSG(msg)
-#define DEBUGTEXT(txt) NULL
-#endif /*DEBUG_SELECT*/
-
-// external functions
-extern Fl_Window* fl_find(Window);
-extern void fl_fix_focus();
-
-// forward definition of functions in this file
-static void handleUpdateEvent( WindowPtr xid );
-//+ int fl_handle(const EventRecord &event);
-static int FSSpec2UnixPath( FSSpec *fs, char *dst );
-// converting cr lf converter function
-static void convert_crlf(char * string, size_t len);
-
-// public variables
-int fl_screen;
-CGContextRef fl_gc = 0;
-Handle fl_system_menu;
-Fl_Sys_Menu_Bar *fl_sys_menu_bar = 0;
-CursHandle fl_default_cursor;
-WindowRef fl_capture = 0; // we need this to compensate for a missing(?) mouse capture
-ulong fl_event_time; // the last timestamp from an x event
-char fl_key_vector[32]; // used by Fl::get_key()
-bool fl_show_iconic; // true if called from iconize() - shows the next created window in collapsed state
-int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
-const Fl_Window* fl_modal_for; // parent of modal() window
-Fl_Region fl_window_region = 0;
-Window fl_window;
-Fl_Window *Fl_Window::current_;
-EventRef fl_os_event; // last (mouse) event
-
-// forward declarations of variables in this file
-static int got_events = 0;
-static Fl_Window* resize_from_system;
-static CursPtr default_cursor_ptr;
-static Cursor default_cursor;
-static WindowRef fl_os_capture = 0; // the dispatch handler will redirect mose move and drag events to these windows
-
-#if CONSOLIDATE_MOTION
-static Fl_Window* send_motion;
-extern Fl_Window* fl_xmousewin;
-#endif
-
-enum { kEventClassFLTK = 'fltk' };
-enum { kEventFLTKBreakLoop = 1, kEventFLTKDataReady };
-
-/* fltk-utf8 placekeepers */
-void fl_reset_spot()
-{
-}
-
-void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
-{
-}
-
-void fl_set_status(int x, int y, int w, int h)
-{
-}
-
-/**
-* Mac keyboard lookup table
- */
-static unsigned short macKeyLookUp[128] =
-{
- 'a', 's', 'd', 'f', 'h', 'g', 'z', 'x',
- 'c', 'v', '^', 'b', 'q', 'w', 'e', 'r',
-
- 'y', 't', '1', '2', '3', '4', '6', '5',
- '=', '9', '7', '-', '8', '0', ']', 'o',
-
- 'u', '[', 'i', 'p', FL_Enter, 'l', 'j', '\'',
- 'k', ';', '\\', ',', '/', 'n', 'm', '.',
-
- FL_Tab, ' ', '`', FL_BackSpace,
- FL_KP_Enter, FL_Escape, 0, 0/*FL_Meta_L*/,
- 0/*FL_Shift_L*/, 0/*FL_Caps_Lock*/, 0/*FL_Alt_L*/, 0/*FL_Control_L*/,
- 0/*FL_Shift_R*/, 0/*FL_Alt_R*/, 0/*FL_Control_R*/, 0,
-
- 0, FL_KP+'.', FL_Right, FL_KP+'*', 0, FL_KP+'+', FL_Left, FL_Delete,
- FL_Down, 0, 0, FL_KP+'/', FL_KP_Enter, FL_Up, FL_KP+'-', 0,
-
- 0, FL_KP+'=', FL_KP+'0', FL_KP+'1', FL_KP+'2', FL_KP+'3', FL_KP+'4', FL_KP+'5',
- FL_KP+'6', FL_KP+'7', 0, FL_KP+'8', FL_KP+'9', 0, 0, 0,
-
- FL_F+5, FL_F+6, FL_F+7, FL_F+3, FL_F+8, FL_F+9, 0, FL_F+11,
- 0, 0/*FL_F+13*/, FL_Print, FL_Scroll_Lock, 0, FL_F+10, FL_Menu, FL_F+12,
-
- 0, FL_Pause, FL_Help, FL_Home, FL_Page_Up, FL_Delete, FL_F+4, FL_End,
- FL_F+2, FL_Page_Down, FL_F+1, FL_Left, FL_Right, FL_Down, FL_Up, 0/*FL_Power*/,
-};
-
-/**
- * convert the current mouse chord into the FLTK modifier state
- */
-static unsigned int mods_to_e_state( UInt32 mods )
-{
- long state = 0;
- if ( mods & kEventKeyModifierNumLockMask ) state |= FL_NUM_LOCK;
- if ( mods & cmdKey ) state |= FL_META;
- if ( mods & (optionKey|rightOptionKey) ) state |= FL_ALT;
- if ( mods & (controlKey|rightControlKey) ) state |= FL_CTRL;
- if ( mods & (shiftKey|rightShiftKey) ) state |= FL_SHIFT;
- if ( mods & alphaLock ) state |= FL_CAPS_LOCK;
- unsigned int ret = ( Fl::e_state & 0xff000000 ) | state;
- Fl::e_state = ret;
- //printf( "State 0x%08x (%04x)\n", Fl::e_state, mods );
- return ret;
-}
-
-
-/**
- * convert the current mouse chord into the FLTK keysym
- */
-static void mods_to_e_keysym( UInt32 mods )
-{
- if ( mods & cmdKey ) Fl::e_keysym = FL_Meta_L;
- else if ( mods & kEventKeyModifierNumLockMask ) Fl::e_keysym = FL_Num_Lock;
- else if ( mods & optionKey ) Fl::e_keysym = FL_Alt_L;
- else if ( mods & rightOptionKey ) Fl::e_keysym = FL_Alt_R;
- else if ( mods & controlKey ) Fl::e_keysym = FL_Control_L;
- else if ( mods & rightControlKey ) Fl::e_keysym = FL_Control_R;
- else if ( mods & shiftKey ) Fl::e_keysym = FL_Shift_L;
- else if ( mods & rightShiftKey ) Fl::e_keysym = FL_Shift_R;
- else if ( mods & alphaLock ) Fl::e_keysym = FL_Caps_Lock;
- else Fl::e_keysym = 0;
- //printf( "to sym 0x%08x (%04x)\n", Fl::e_keysym, mods );
-}
-// these pointers are set by the Fl::lock() function:
-static void nothing() {}
-void (*fl_lock_function)() = nothing;
-void (*fl_unlock_function)() = nothing;
-
-//
-// Select interface -- how it's implemented:
-// When the user app configures one or more file descriptors to monitor
-// with Fl::add_fd(), we start a separate thread to select() the data,
-// sending a custom OSX 'FLTK data ready event' to the parent thread's
-// RunApplicationLoop(), so that it triggers the data ready callbacks
-// in the parent thread. -erco 04/04/04
-//
-#define POLLIN 1
-#define POLLOUT 4
-#define POLLERR 8
-
-// Class to handle select() 'data ready'
-class DataReady
-{
- struct FD
- {
- int fd;
- short events;
- void (*cb)(int, void*);
- void* arg;
- };
- int nfds, fd_array_size;
- FD *fds;
- pthread_t tid; // select()'s thread id
-
- // Data that needs to be locked (all start with '_')
- pthread_mutex_t _datalock; // data lock
- fd_set _fdsets[3]; // r/w/x sets user wants to monitor
- int _maxfd; // max fd count to monitor
- int _cancelpipe[2]; // pipe used to help cancel thread
- void *_userdata; // thread's userdata
-
-public:
- DataReady()
- {
- nfds = 0;
- fd_array_size = 0;
- fds = 0;
- tid = 0;
-
- pthread_mutex_init(&_datalock, NULL);
- FD_ZERO(&_fdsets[0]); FD_ZERO(&_fdsets[1]); FD_ZERO(&_fdsets[2]);
- _cancelpipe[0] = _cancelpipe[1] = 0;
- _userdata = 0;
- _maxfd = 0;
- }
-
- ~DataReady()
- {
- CancelThread(DEBUGTEXT("DESTRUCTOR\n"));
- if (fds) { free(fds); fds = 0; }
- nfds = 0;
- }
-
- // Locks
- // The convention for locks: volatile vars start with '_',
- // and must be locked before use. Locked code is prefixed
- // with /*LOCK*/ to make painfully obvious esp. in debuggers. -erco
- //
- void DataLock() { pthread_mutex_lock(&_datalock); }
- void DataUnlock() { pthread_mutex_unlock(&_datalock); }
-
- // Accessors
- int IsThreadRunning() { return(tid ? 1 : 0); }
- int GetNfds() { return(nfds); }
- int GetCancelPipe(int ix) { return(_cancelpipe[ix]); }
- fd_set GetFdset(int ix) { return(_fdsets[ix]); }
-
- // Methods
- void AddFD(int n, int events, void (*cb)(int, void*), void *v);
- void RemoveFD(int n, int events);
- int CheckData(fd_set& r, fd_set& w, fd_set& x);
- void HandleData(fd_set& r, fd_set& w, fd_set& x);
- static void* DataReadyThread(void *self);
- void StartThread(void *userdata);
- void CancelThread(const char *reason);
-};
-
-static DataReady dataready;
-
-void DataReady::AddFD(int n, int events, void (*cb)(int, void*), void *v)
-{
- RemoveFD(n, events);
- int i = nfds++;
- if (i >= fd_array_size)
- {
- FD *temp;
- fd_array_size = 2*fd_array_size+1;
- if (!fds) { temp = (FD*)malloc(fd_array_size*sizeof(FD)); }
- else { temp = (FD*)realloc(fds, fd_array_size*sizeof(FD)); }
- if (!temp) return;
- fds = temp;
- }
- fds[i].cb = cb;
- fds[i].arg = v;
- fds[i].fd = n;
- fds[i].events = events;
- DataLock();
- /*LOCK*/ if (events & POLLIN) FD_SET(n, &_fdsets[0]);
- /*LOCK*/ if (events & POLLOUT) FD_SET(n, &_fdsets[1]);
- /*LOCK*/ if (events & POLLERR) FD_SET(n, &_fdsets[2]);
- /*LOCK*/ if (n > _maxfd) _maxfd = n;
- DataUnlock();
-}
-
-// Remove an FD from the array
-void DataReady::RemoveFD(int n, int events)
-{
- int i,j;
- for (i=j=0; i<nfds; i++)
- {
- if (fds[i].fd == n)
- {
- int e = fds[i].events & ~events;
- if (!e) continue; // if no events left, delete this fd
- fds[i].events = e;
- }
- // move it down in the array if necessary:
- if (j<i)
- { fds[j] = fds[i]; }
- j++;
- }
- nfds = j;
- DataLock();
- /*LOCK*/ if (events & POLLIN) FD_CLR(n, &_fdsets[0]);
- /*LOCK*/ if (events & POLLOUT) FD_CLR(n, &_fdsets[1]);
- /*LOCK*/ if (events & POLLERR) FD_CLR(n, &_fdsets[2]);
- /*LOCK*/ if (n == _maxfd) _maxfd--;
- DataUnlock();
-}
-
-// CHECK IF USER DATA READY, RETURNS r/w/x INDICATING WHICH IF ANY
-int DataReady::CheckData(fd_set& r, fd_set& w, fd_set& x)
-{
- int ret;
- DataLock();
- /*LOCK*/ timeval t = { 0, 1 }; // quick check
- /*LOCK*/ r = _fdsets[0], w = _fdsets[1], x = _fdsets[2];
- /*LOCK*/ ret = ::select(_maxfd+1, &r, &w, &x, &t);
- DataUnlock();
- if ( ret == -1 )
- { DEBUGPERRORMSG("CheckData(): select()"); }
- return(ret);
-}
-
-// HANDLE DATA READY CALLBACKS
-void DataReady::HandleData(fd_set& r, fd_set& w, fd_set& x)
-{
- for (int i=0; i<nfds; i++)
- {
- int f = fds[i].fd;
- short revents = 0;
- if (FD_ISSET(f, &r)) revents |= POLLIN;
- if (FD_ISSET(f, &w)) revents |= POLLOUT;
- if (FD_ISSET(f, &x)) revents |= POLLERR;
- if (fds[i].events & revents)
- {
- DEBUGMSG("DOING CALLBACK: ");
- fds[i].cb(f, fds[i].arg);
- DEBUGMSG("DONE\n");
- }
- }
-}
-
-// DATA READY THREAD
-// This thread watches for changes in user's file descriptors.
-// Sends a 'data ready event' to the main thread if any change.
-//
-void* DataReady::DataReadyThread(void *o)
-{
- DataReady *self = (DataReady*)o;
- while ( 1 ) // loop until thread cancel or error
- {
- // Thread safe local copies of data before each select()
- self->DataLock();
- /*LOCK*/ int maxfd = self->_maxfd;
- /*LOCK*/ fd_set r = self->GetFdset(0);
- /*LOCK*/ fd_set w = self->GetFdset(1);
- /*LOCK*/ fd_set x = self->GetFdset(2);
- /*LOCK*/ void *userdata = self->_userdata;
- /*LOCK*/ int cancelpipe = self->GetCancelPipe(0);
- /*LOCK*/ if ( cancelpipe > maxfd ) maxfd = cancelpipe;
- /*LOCK*/ FD_SET(cancelpipe, &r); // add cancelpipe to fd's to watch
- /*LOCK*/ FD_SET(cancelpipe, &x);
- self->DataUnlock();
- // timeval t = { 1000, 0 }; // 1000 seconds;
- timeval t = { 2, 0 }; // HACK: 2 secs prevents 'hanging' problem
- int ret = ::select(maxfd+1, &r, &w, &x, &t);
- pthread_testcancel(); // OSX 10.0.4 and older: needed for parent to cancel
- switch ( ret )
- {
- case 0: // NO DATA
- continue;
- case -1: // ERROR
- {
- DEBUGPERRORMSG("CHILD THREAD: select() failed");
- return(NULL); // error? exit thread
- }
- default: // DATA READY
- {
- if (FD_ISSET(cancelpipe, &r) || FD_ISSET(cancelpipe, &x)) // cancel?
- { return(NULL); } // just exit
- DEBUGMSG("CHILD THREAD: DATA IS READY\n");
- EventRef drEvent;
- CreateEvent( 0, kEventClassFLTK, kEventFLTKDataReady,
- 0, kEventAttributeUserEvent, &drEvent);
- EventQueueRef eventqueue = (EventQueueRef)userdata;
- PostEventToQueue(eventqueue, drEvent, kEventPriorityStandard );
- ReleaseEvent( drEvent );
- return(NULL); // done with thread
- }
- }
- }
-}
-
-// START 'DATA READY' THREAD RUNNING, CREATE INTER-THREAD PIPE
-void DataReady::StartThread(void *new_userdata)
-{
- CancelThread(DEBUGTEXT("STARTING NEW THREAD\n"));
- DataLock();
- /*LOCK*/ pipe(_cancelpipe); // pipe for sending cancel msg to thread
- /*LOCK*/ _userdata = new_userdata;
- DataUnlock();
- DEBUGMSG("*** START THREAD\n");
- pthread_create(&tid, NULL, DataReadyThread, (void*)this);
-}
-
-// CANCEL 'DATA READY' THREAD, CLOSE PIPE
-void DataReady::CancelThread(const char *reason)
-{
- if ( tid )
- {
- DEBUGMSG("*** CANCEL THREAD: ");
- DEBUGMSG(reason);
- if ( pthread_cancel(tid) == 0 ) // cancel first
- {
- DataLock();
- /*LOCK*/ write(_cancelpipe[1], "x", 1); // wake thread from select
- DataUnlock();
- pthread_join(tid, NULL); // wait for thread to finish
- }
- tid = 0;
- DEBUGMSG("(JOINED) OK\n");
- }
- // Close pipe if open
- DataLock();
- /*LOCK*/ if ( _cancelpipe[0] ) { close(_cancelpipe[0]); _cancelpipe[0] = 0; }
- /*LOCK*/ if ( _cancelpipe[1] ) { close(_cancelpipe[1]); _cancelpipe[1] = 0; }
- DataUnlock();
-}
-
-void Fl::add_fd( int n, int events, void (*cb)(int, void*), void *v )
- { dataready.AddFD(n, events, cb, v); }
-
-void Fl::add_fd(int fd, void (*cb)(int, void*), void* v)
- { dataready.AddFD(fd, POLLIN, cb, v); }
-
-void Fl::remove_fd(int n, int events)
- { dataready.RemoveFD(n, events); }
-
-void Fl::remove_fd(int n)
- { dataready.RemoveFD(n, -1); }
-
-/**
- * Check if there is actually a message pending!
- */
-int fl_ready()
-{
- EventRef event;
- return !ReceiveNextEvent(0, NULL, 0.0, false, &event);
-}
-
-/**
- * handle Apple Menu items (can be created using the Fl_Sys_Menu_Bar
- * returns eventNotHandledErr if the menu item could not be handled
- */
-OSStatus HandleMenu( HICommand *cmd )
-{
- OSStatus ret = eventNotHandledErr;
- // attributes, commandIDm menu.menuRef, menu.menuItemIndex
- UInt32 ref;
- OSErr rrc = GetMenuItemRefCon( cmd->menu.menuRef, cmd->menu.menuItemIndex, &ref );
- //printf( "%d, %08x, %08x, %d, %d, %8x\n", rrc, cmd->attributes, cmd->commandID, cmd->menu.menuRef, cmd->menu.menuItemIndex, rrc );
- if ( rrc==noErr && ref )
- {
- Fl_Menu_Item *m = (Fl_Menu_Item*)ref;
- //printf( "Menu: %s\n", m->label() );
- fl_sys_menu_bar->picked( m );
- if ( m->flags & FL_MENU_TOGGLE ) // update the menu toggle symbol
- SetItemMark( cmd->menu.menuRef, cmd->menu.menuItemIndex, (m->flags & FL_MENU_VALUE ) ? 0x12 : 0 );
- if ( m->flags & FL_MENU_RADIO ) // update all radio buttons in this menu
- {
- Fl_Menu_Item *j = m;
- int i = cmd->menu.menuItemIndex;
- for (;;)
- {
- if ( j->flags & FL_MENU_DIVIDER )
- break;
- j++; i++;
- if ( !j->text || !j->radio() )
- break;
- SetItemMark( cmd->menu.menuRef, i, ( j->flags & FL_MENU_VALUE ) ? 0x13 : 0 );
- }
- j = m-1; i = cmd->menu.menuItemIndex-1;
- for ( ; i>0; j--, i-- )
- {
- if ( !j->text || j->flags&FL_MENU_DIVIDER || !j->radio() )
- break;
- SetItemMark( cmd->menu.menuRef, i, ( j->flags & FL_MENU_VALUE ) ? 0x13 : 0 );
- }
- SetItemMark( cmd->menu.menuRef, cmd->menu.menuItemIndex, ( m->flags & FL_MENU_VALUE ) ? 0x13 : 0 );
- }
- ret = noErr; // done handling this event
- }
- HiliteMenu(0);
- return ret;
-}
-
-
-/**
- * We can make every event pass through this function
- * - mouse events need to be manipulated to use a mouse focus window
- * - keyboard, mouse and some window events need to quit the Apple Event Loop
- * so FLTK can continue its own management
- */
-static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- OSStatus ret = eventNotHandledErr;
- HICommand cmd;
-
- fl_lock_function();
-
- got_events = 1;
-
- switch ( GetEventClass( event ) )
- {
- case kEventClassMouse:
- switch ( GetEventKind( event ) )
- {
- case kEventMouseUp:
- case kEventMouseMoved:
- case kEventMouseDragged:
- if ( fl_capture )
- ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_capture ) );
- else if ( fl_os_capture ){
- ret = SendEventToEventTarget( event, GetWindowEventTarget( fl_os_capture ) );
- fl_os_capture = 0;
- }
- break;
- }
- break;
- case kEventClassCommand:
- switch (GetEventKind( event ) )
- {
- case kEventCommandProcess:
- ret = GetEventParameter( event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd );
- if (ret == noErr && (cmd.attributes & kHICommandFromMenu) != 0)
- ret = HandleMenu( &cmd );
- else
- ret = eventNotHandledErr;
- break;
- }
- break;
- case kEventClassFLTK:
- switch ( GetEventKind( event ) )
- {
- case kEventFLTKBreakLoop:
- ret = noErr;
- break;
- case kEventFLTKDataReady:
- {
- dataready.CancelThread(DEBUGTEXT("DATA READY EVENT\n"));
-
- // CHILD THREAD TELLS US DATA READY
- // Check to see what's ready, and invoke user's cb's
- //
- fd_set r,w,x;
- switch(dataready.CheckData(r,w,x))
- {
- case 0: // NO DATA
- break;
- case -1: // ERROR
- break;
- default: // DATA READY
- dataready.HandleData(r,w,x);
- break;
- }
- }
- ret = noErr;
- break;
- }
- }
- if ( ret == eventNotHandledErr )
- ret = CallNextEventHandler( nextHandler, event ); // let the OS handle the activation, but continue to get a click-through effect
-
- fl_unlock_function();
-
- return ret;
-}
-
-
-/**
- * break the current event loop
- */
-static void breakMacEventLoop()
-{
- EventRef breakEvent;
-
- fl_lock_function();
-
- CreateEvent( 0, kEventClassFLTK, kEventFLTKBreakLoop, 0, kEventAttributeUserEvent, &breakEvent );
- PostEventToQueue( GetCurrentEventQueue(), breakEvent, kEventPriorityStandard );
- ReleaseEvent( breakEvent );
-
- fl_unlock_function();
-}
-
-//
-// MacOS X timers
-//
-
-struct MacTimeout {
- Fl_Timeout_Handler callback;
- void* data;
- EventLoopTimerRef timer;
- EventLoopTimerUPP upp;
- char pending;
-};
-static MacTimeout* mac_timers;
-static int mac_timer_alloc;
-static int mac_timer_used;
-
-
-static void realloc_timers()
-{
- if (mac_timer_alloc == 0) {
- mac_timer_alloc = 8;
- }
- mac_timer_alloc *= 2;
- MacTimeout* new_timers = new MacTimeout[mac_timer_alloc];
- memset(new_timers, 0, sizeof(MacTimeout)*mac_timer_alloc);
- memcpy(new_timers, mac_timers, sizeof(MacTimeout) * mac_timer_used);
- MacTimeout* delete_me = mac_timers;
- mac_timers = new_timers;
- delete [] delete_me;
-}
-
-static void delete_timer(MacTimeout& t)
-{
- if (t.timer) {
- RemoveEventLoopTimer(t.timer);
- DisposeEventLoopTimerUPP(t.upp);
- memset(&t, 0, sizeof(MacTimeout));
- }
-}
-
-
-static pascal void do_timer(EventLoopTimerRef timer, void* data)
-{
- for (int i = 0; i < mac_timer_used; ++i) {
- MacTimeout& t = mac_timers[i];
- if (t.timer == timer && t.data == data) {
- t.pending = 0;
- (*t.callback)(data);
- if (t.pending==0)
- delete_timer(t);
- break;
- }
- }
- breakMacEventLoop();
-}
-
-/**
- * This function is the central event handler.
- * It reads events from the event queue using the given maximum time
- * Funny enough, it returns the same time that it got as the argument.
- */
-static double do_queued_events( double time = 0.0 )
-{
- static bool been_here = false;
- static RgnHandle rgn;
-
- // initialize events and a region that enables mouse move events
- if (!been_here) {
- rgn = NewRgn();
- Point mp;
- GetMouse(&mp);
- SetRectRgn(rgn, mp.h, mp.v, mp.h, mp.v);
- SetEventMask(everyEvent);
- been_here = true;
- }
- OSStatus ret;
- static EventTargetRef target = 0;
- if ( !target )
- {
- target = GetEventDispatcherTarget();
-
- EventHandlerUPP dispatchHandler = NewEventHandlerUPP( carbonDispatchHandler ); // will not be disposed by Carbon...
- static EventTypeSpec dispatchEvents[] = {
- { kEventClassWindow, kEventWindowShown },
- { kEventClassWindow, kEventWindowHidden },
- { kEventClassWindow, kEventWindowActivated },
- { kEventClassWindow, kEventWindowDeactivated },
- { kEventClassWindow, kEventWindowClose },
- { kEventClassKeyboard, kEventRawKeyDown },
- { kEventClassKeyboard, kEventRawKeyRepeat },
- { kEventClassKeyboard, kEventRawKeyUp },
- { kEventClassKeyboard, kEventRawKeyModifiersChanged },
- { kEventClassMouse, kEventMouseDown },
- { kEventClassMouse, kEventMouseUp },
- { kEventClassMouse, kEventMouseMoved },
- { kEventClassMouse, 11 }, // MightyMouse wheels
- { kEventClassMouse, kEventMouseWheelMoved },
- { kEventClassMouse, kEventMouseDragged },
- { kEventClassFLTK, kEventFLTKBreakLoop },
- { kEventClassFLTK, kEventFLTKDataReady } };
- ret = InstallEventHandler( target, dispatchHandler, GetEventTypeCount(dispatchEvents), dispatchEvents, 0, 0L );
- static EventTypeSpec appEvents[] = {
- { kEventClassCommand, kEventCommandProcess } };
- ret = InstallApplicationEventHandler( dispatchHandler, GetEventTypeCount(appEvents), appEvents, 0, 0L );
- }
-
- got_events = 0;
-
- // Check for re-entrant condition
- if ( dataready.IsThreadRunning() )
- { dataready.CancelThread(DEBUGTEXT("AVOID REENTRY\n")); }
-
- // Start thread to watch for data ready
- if ( dataready.GetNfds() )
- { dataready.StartThread((void*)GetCurrentEventQueue()); }
-
- fl_unlock_function();
-
- EventRef event;
- EventTimeout timeout = time;
- if (!ReceiveNextEvent(0, NULL, timeout, true, &event)) {
- got_events = 1;
- OSErr ret = SendEventToEventTarget( event, target );
- if (ret!=noErr) {
- EventRecord clevent;
- ConvertEventRefToEventRecord(event, &clevent);
- if (clevent.what==kHighLevelEvent) {
- ret = AEProcessAppleEvent(&clevent);
- }
- }
- if ( ret==eventNotHandledErr
- && GetEventClass(event)==kEventClassMouse
- && GetEventKind(event)==kEventMouseDown ) {
- WindowRef win; Point pos;
- GetEventParameter(event, kEventParamMouseLocation, typeQDPoint,
- NULL, sizeof(pos), NULL, &pos);
- if (MacFindWindow(pos, &win)==inMenuBar) {
- MenuSelect(pos);
- }
- }
- ReleaseEvent( event );
- }
-
- fl_lock_function();
-
-#if CONSOLIDATE_MOTION
- if (send_motion && send_motion == fl_xmousewin) {
- send_motion = 0;
- Fl::handle(FL_MOVE, fl_xmousewin);
- }
-#endif
-
- return time;
-}
-
-
-/**
- * This public function handles all events. It wait a maximum of
- * 'time' secods for an event. This version returns 1 if events
- * other than the timeout timer were processed.
- *
- * \todo there is no socket handling in this code whatsoever
- */
-int fl_wait( double time )
-{
- do_queued_events( time );
- return (got_events);
-}
-
-
-/**
- * event handler for Apple-Q key combination
- * this is also called from the Carbon Window handler after all windows were closed
- */
-static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
-{
- fl_lock_function();
-
- while ( Fl_X::first ) {
- Fl_X *x = Fl_X::first;
- Fl::handle( FL_CLOSE, x->w );
- if ( Fl_X::first == x ) {
- fl_unlock_function();
- return noErr; // FLTK has not close all windows, so we return to the main program now
- }
- }
-
- fl_unlock_function();
-
- return noErr;
-}
-
-
-/**
- * Carbon Window handler
- * This needs to be linked into all new window event handlers
- */
-static pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- UInt32 kind = GetEventKind( event );
- OSStatus ret = eventNotHandledErr;
- Fl_Window *window = (Fl_Window*)userData;
- Fl::first_window(window);
-
- Rect currentBounds, originalBounds;
- WindowClass winClass;
- static Fl_Window *activeWindow = 0;
-
- fl_lock_function();
-
- switch ( kind )
- {
- case kEventWindowBoundsChanging:
- GetEventParameter( event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds );
- GetEventParameter( event, kEventParamOriginalBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &originalBounds );
- break;
- case kEventWindowDrawContent:
- handleUpdateEvent( fl_xid( window ) );
- ret = noErr;
- break;
- case kEventWindowBoundsChanged: {
- GetEventParameter( event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds );
- GetEventParameter( event, kEventParamOriginalBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &originalBounds );
- int X = currentBounds.left, W = currentBounds.right-X;
- int Y = currentBounds.top, H = currentBounds.bottom-Y;
- resize_from_system = window;
- window->resize( X, Y, W, H );
- if ( ( originalBounds.right - originalBounds.left != W )
- || ( originalBounds.bottom - originalBounds.top != H ) )
- {
- if ( window->shown() )
- handleUpdateEvent( fl_xid( window ) );
- }
- break; }
- case kEventWindowShown:
- if ( !window->parent() )
- {
- GetWindowClass( fl_xid( window ), &winClass );
- if ( winClass != kHelpWindowClass ) { // help windows can't get the focus!
- Fl::handle( FL_FOCUS, window);
- activeWindow = window;
- }
- Fl::handle( FL_SHOW, window);
- mods_to_e_state(GetCurrentKeyModifiers());
- }
- break;
- case kEventWindowHidden:
- if ( !window->parent() ) Fl::handle( FL_HIDE, window);
- break;
- case kEventWindowActivated:
- if ( window->shown() && window!=activeWindow )
- {
- GetWindowClass( fl_xid( window ), &winClass );
- if ( winClass != kHelpWindowClass ) { // help windows can't get the focus!
- Fl::handle( FL_FOCUS, window);
- activeWindow = window;
- }
- }
- break;
- case kEventWindowDeactivated:
- if ( window==activeWindow )
- {
- Fl::handle( FL_UNFOCUS, window);
- activeWindow = 0;
- }
- break;
- case kEventWindowClose:
- Fl::handle( FL_CLOSE, window ); // this might or might not close the window
- // if there are no more windows, send a high-level quit event
- if (!Fl_X::first) QuitAppleEventHandler( 0, 0, 0 );
- ret = noErr; // returning noErr tells Carbon to stop following up on this event
- break;
- case kEventWindowCollapsed:
- window->clear_visible();
- break;
- case kEventWindowExpanded:
- window->set_visible();
- break;
- }
-
- fl_unlock_function();
-
- return ret;
-}
-
-
-/**
- * Carbon Mousewheel handler
- * This needs to be linked into all new window event handlers
- */
-static pascal OSStatus carbonMousewheelHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- // Handle the new "MightyMouse" mouse wheel events. Please, someone explain
- // to me why Apple changed the API on this even though the current API
- // supports two wheels just fine. Matthias,
- fl_lock_function();
-
- fl_os_event = event;
- Fl_Window *window = (Fl_Window*)userData;
- if ( !window->shown() )
- {
- fl_unlock_function();
- return noErr;
- }
- Fl::first_window(window);
-
- EventMouseWheelAxis axis;
- GetEventParameter( event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(EventMouseWheelAxis), NULL, &axis );
- long delta;
- GetEventParameter( event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(long), NULL, &delta );
-// fprintf(stderr, "axis=%d, delta=%d\n", axis, delta);
- if ( axis == kEventMouseWheelAxisX ) {
- Fl::e_dx = -delta;
- Fl::e_dy = 0;
- if ( Fl::e_dx) Fl::handle( FL_MOUSEWHEEL, window );
- } else if ( axis == kEventMouseWheelAxisY ) {
- Fl::e_dx = 0;
- Fl::e_dy = -delta;
- if ( Fl::e_dy) Fl::handle( FL_MOUSEWHEEL, window );
- } else {
- fl_unlock_function();
-
- return eventNotHandledErr;
- }
-
- fl_unlock_function();
-
- return noErr;
-}
-
-
-/**
- * convert the current mouse chord into the FLTK modifier state
- */
-static void chord_to_e_state( UInt32 chord )
-{
- static ulong state[] =
- {
- 0, FL_BUTTON1, FL_BUTTON3, FL_BUTTON1|FL_BUTTON3, FL_BUTTON2,
- FL_BUTTON2|FL_BUTTON1, FL_BUTTON2|FL_BUTTON3,
- FL_BUTTON2|FL_BUTTON1|FL_BUTTON3
- };
- Fl::e_state = ( Fl::e_state & 0xff0000 ) | state[ chord & 0x07 ];
-}
-
-
-/**
- * Carbon Mouse Button Handler
- */
-static pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- static int keysym[] = { 0, FL_Button+1, FL_Button+3, FL_Button+2 };
- static int px, py;
- static char suppressed = 0;
-
- fl_lock_function();
-
- fl_os_event = event;
- Fl_Window *window = (Fl_Window*)userData;
- if ( !window->shown() )
- {
- fl_unlock_function();
- return noErr;
- }
- Fl::first_window(window);
- Point pos;
- GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &pos );
- EventMouseButton btn;
- GetEventParameter( event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(EventMouseButton), NULL, &btn );
- UInt32 clickCount;
- GetEventParameter( event, kEventParamClickCount, typeUInt32, NULL, sizeof(UInt32), NULL, &clickCount );
- UInt32 chord;
- GetEventParameter( event, kEventParamMouseChord, typeUInt32, NULL, sizeof(UInt32), NULL, &chord );
- WindowRef xid = fl_xid(window), tempXid;
- int sendEvent = 0, part = 0;
- switch ( GetEventKind( event ) )
- {
- case kEventMouseDown:
- part = FindWindow( pos, &tempXid );
- if (!(Fl::grab() && window!=Fl::grab())) {
- if ( part == inGrow ) {
- fl_unlock_function();
- suppressed = 1;
- Fl_Tooltip::current(0L);
- return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
- }
- if ( part != inContent ) {
- fl_unlock_function();
- suppressed = 1;
- Fl_Tooltip::current(0L);
- // anything else to here?
- return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
- }
- }
- suppressed = 0;
- if (part==inContent && !IsWindowActive( xid ) ) {
- CallNextEventHandler( nextHandler, event ); // let the OS handle the activation, but continue to get a click-through effect
- }
- // normal handling of mouse-down follows
- fl_os_capture = xid;
- sendEvent = FL_PUSH;
- Fl::e_is_click = 1; px = pos.h; py = pos.v;
- if (clickCount>1)
- Fl::e_clicks++;
- else
- Fl::e_clicks = 0;
- // fall through
- case kEventMouseUp:
- if (suppressed) {
- suppressed = 0;
- break;
- }
- if ( !window ) break;
- if ( !sendEvent ) {
- sendEvent = FL_RELEASE;
- }
- Fl::e_keysym = keysym[ btn ];
- // fall through
- case kEventMouseMoved:
- suppressed = 0;
- if ( !sendEvent ) {
- sendEvent = FL_MOVE; chord = 0;
- }
- // fall through
- case kEventMouseDragged:
- if (suppressed) break;
- if ( !sendEvent ) {
- sendEvent = FL_MOVE; // Fl::handle will convert into FL_DRAG
- if (abs(pos.h-px)>5 || abs(pos.v-py)>5)
- Fl::e_is_click = 0;
- }
- chord_to_e_state( chord );
- GrafPtr oldPort;
- GetPort( &oldPort );
- SetPort( GetWindowPort(xid) ); // \todo replace this! There must be some GlobalToLocal call that has a port as an argument
- SetOrigin(0, 0);
- Fl::e_x_root = pos.h;
- Fl::e_y_root = pos.v;
- GlobalToLocal( &pos );
- Fl::e_x = pos.h;
- Fl::e_y = pos.v;
- SetPort( oldPort );
- if (GetEventKind(event)==kEventMouseDown && part!=inContent) {
- int used = Fl::handle( sendEvent, window );
- CallNextEventHandler( nextHandler, event ); // let the OS handle this for us
- if (!used)
- suppressed = 1;
- } else {
- Fl::handle( sendEvent, window );
- }
- break;
- }
-
- fl_unlock_function();
-
- return noErr;
-}
-
-
-/**
- * convert the keyboard return code into the symbol on the keycaps
- */
-static unsigned short keycode_to_sym( UInt32 keyCode, UInt32 mods, unsigned short deflt )
-{
- static Ptr map = 0;
- UInt32 state = 0;
- if (!map) {
- map = (Ptr)GetScriptManagerVariable(smKCHRCache);
- if (!map) {
- long kbID = GetScriptManagerVariable(smKeyScript);
- map = *GetResource('KCHR', kbID);
- }
- }
- if (map)
- return KeyTranslate(map, keyCode|mods, &state );
- return deflt;
-}
-
-/*
- * keycode_function for post-10.5 systems, allows more sophisticated decoding of keys
- */
-static int keycodeToUnicode(
- char * uniChars, int maxChars,
- EventKind eKind,
- UInt32 keycode, UInt32 modifiers,
- UInt32 * deadKeyStatePtr,
- unsigned char, // not used in this function
- unsigned short) // not used in this function
-{
- // first get the keyboard mapping in a post 10.2 way
-
- Ptr resource;
- TextEncoding encoding;
- static TextEncoding lastEncoding = kTextEncodingMacRoman;
- int len = 0;
- KeyboardLayoutRef currentLayout = NULL;
- static KeyboardLayoutRef lastLayout = NULL;
- SInt32 currentLayoutId = 0;
- static SInt32 lastLayoutId;
- int hasLayoutChanged = false;
- static Ptr uchr = NULL;
- static Ptr KCHR = NULL;
- // ScriptCode currentKeyScript;
-
- KLGetCurrentKeyboardLayout(&currentLayout);
- if (currentLayout) {
- KLGetKeyboardLayoutProperty(currentLayout, kKLIdentifier, (const void**)&currentLayoutId);
- if ( (lastLayout != currentLayout) || (lastLayoutId != currentLayoutId) ) {
- lastLayout = currentLayout;
- lastLayoutId = currentLayoutId;
- uchr = NULL;
- KCHR = NULL;
- if ((KLGetKeyboardLayoutProperty(currentLayout, kKLuchrData, (const void**)&uchr) == noErr) && (uchr != NULL)) {
- // done
- } else if ((KLGetKeyboardLayoutProperty(currentLayout, kKLKCHRData, (const void**)&KCHR) == noErr) && (KCHR != NULL)) {
- // done
- }
- // FIXME No Layout property found. Now we have a problem.
- }
- }
- if (hasLayoutChanged) {
- //deadKeyStateUp = deadKeyStateDown = 0;
- if (KCHR != NULL) {
- // FIXME this must not happen
- } else if (uchr == NULL) {
- KCHR = (Ptr) GetScriptManagerVariable(smKCHRCache);
- }
- }
- if (uchr != NULL) {
- // this is what I expect
- resource = uchr;
- } else {
- resource = KCHR;
- encoding = lastEncoding;
- // this is actually not supported by the following code and will likely crash
- }
-
- // now apply that keyboard mapping to our keycode
-
- int action;
- //OptionBits options = 0;
- // not used yet: OptionBits options = kUCKeyTranslateNoDeadKeysMask;
- unsigned long keyboardType;
- keycode &= 0xFF;
- modifiers = (modifiers >> 8) & 0xFF;
- keyboardType = LMGetKbdType();
- OSStatus status;
- UniCharCount actuallength;
- UniChar utext[10];
-
- switch(eKind) {
- case kEventRawKeyDown: action = kUCKeyActionDown; break;
- case kEventRawKeyUp: action = kUCKeyActionUp; break;
- case kEventRawKeyRepeat: action = kUCKeyActionAutoKey; break;
- default: return 0;
- }
-
- UInt32 deadKeyState = *deadKeyStatePtr;
- if ((action==kUCKeyActionUp)&&(*deadKeyStatePtr))
- deadKeyStatePtr = &deadKeyState;
-
- status = UCKeyTranslate(
- (const UCKeyboardLayout *) uchr,
- keycode, action, modifiers, keyboardType,
- 0, deadKeyStatePtr,
- 10, &actuallength, utext);
-
- if (noErr != status) {
- fprintf(stderr,"UCKeyTranslate failed: %d\n", (int) status);
- actuallength = 0;
- }
-
- // convert the list of unicode chars into utf8
- // FIXME no bounds check (see maxchars)
- unsigned i;
- for (i=0; i<actuallength; ++i) {
- len += fl_utf8encode(utext[i], uniChars+len);
- }
- uniChars[len] = 0;
- return len;
-}
-
-/*
- * keycode_function for pre-10.5 systems, this is the "historic" fltk Mac key handling
- */
-static int keycode_wrap_old(
- char * buffer,
- int, EventKind, UInt32, // not used in this function
- UInt32, UInt32 *, // not used in this function
- unsigned char key,
- unsigned short sym)
-{
- if ( (sym >= FL_KP && sym <= FL_KP_Last) || !(sym & 0xff00) ||
- sym == FL_Tab || sym == FL_Enter) {
- buffer[0] = key;
- return 1;
- } else {
- buffer[0] = 0;
- return 0;
- }
-} /* keycode_wrap_old */
-/*
- * Stub pointer to select appropriate keycode_function per operating system version. This function pointer
- * is initialised in fl_open_display, based on the runtime identification of the host OS version. This is
- * intended to allow us to utilise 10.5 services dynamically to improve Unicode handling, whilst still
- * allowing code to run satisfactorily on older systems.
- */
-static int (*keycode_function)(char*, int, EventKind, UInt32, UInt32, UInt32*, unsigned char, unsigned short) = keycode_wrap_old;
-
-
-// EXPERIMENTAL!
-pascal OSStatus carbonTextHandler(
- EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- Fl_Window *window = (Fl_Window*)userData;
- Fl::first_window(window);
- fl_lock_function();
- //int kind = GetEventKind(event);
- unsigned short buf[200];
- ByteCount size;
- GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText,
- NULL, 100, &size, &buf );
-// printf("TextEvent: %02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3]);
- // FIXME: oversimplified!
- unsigned ucs = buf[0];
- char utf8buf[20];
- int len = fl_utf8encode(ucs, utf8buf);
- Fl::e_length = len;
- Fl::e_text = utf8buf;
- while (window->parent()) window = window->window();
- Fl::handle(FL_KEYBOARD, window);
- fl_unlock_function();
- fl_lock_function();
- Fl::handle(FL_KEYUP, window);
- fl_unlock_function();
- // for some reason, the window does not redraw until the next mouse move or button push
- // sending a 'redraw()' or 'awake()' does not solve the issue!
- Fl::flush();
- return noErr;
-}
-
-/**
- * handle carbon keyboard events
- */
-pascal OSStatus carbonKeyboardHandler(
- EventHandlerCallRef nextHandler, EventRef event, void *userData )
-{
- static char buffer[32];
- int sendEvent = 0;
- Fl_Window *window = (Fl_Window*)userData;
- Fl::first_window(window);
- UInt32 mods;
- static UInt32 prevMods = mods_to_e_state( GetCurrentKeyModifiers() );
-
- fl_lock_function();
-
- int kind = GetEventKind(event);
-
- // get the modifiers for any of the events
- GetEventParameter( event, kEventParamKeyModifiers, typeUInt32,
- NULL, sizeof(UInt32), NULL, &mods );
-
- // get the key code only for key events
- UInt32 keyCode = 0, maskedKeyCode = 0;
- unsigned char key = 0;
- unsigned short sym = 0;
- if (kind!=kEventRawKeyModifiersChanged) {
- GetEventParameter( event, kEventParamKeyCode, typeUInt32,
- NULL, sizeof(UInt32), NULL, &keyCode );
- GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar,
- NULL, sizeof(char), NULL, &key );
- }
- // extended keyboards can also send sequences on key-up to generate Kanji etc. codes.
- // Some observed prefixes are 0x81 to 0x83, followed by an 8 bit keycode.
- // In this mode, there seem to be no key-down codes
-// printf("%08x %08x %08x\n", keyCode, mods, key);
- maskedKeyCode = keyCode & 0x7f;
- /* output a human readable event identifier for debugging
- const char *ev = "";
- switch (kind) {
- case kEventRawKeyDown: ev = "kEventRawKeyDown"; break;
- case kEventRawKeyRepeat: ev = "kEventRawKeyRepeat"; break;
- case kEventRawKeyUp: ev = "kEventRawKeyUp"; break;
- case kEventRawKeyModifiersChanged: ev = "kEventRawKeyModifiersChanged"; break;
- default: ev = "unknown";
- }
- printf("%08x %08x %08x '%c' %s \n", mods, keyCode, key, key, ev);
- */
- switch (kind)
- {
- case kEventRawKeyDown:
- case kEventRawKeyRepeat:
-/*
- // FIXME Matt: For 10.5, the keycode_function will handle all this. This is untested for ealier versions of OS X.
- // When the user presses a "dead key", no information is send about
- // which dead key symbol was created. So we need to trick Carbon into
- // giving us the code by sending a "space" after the "dead key".
- if (key==0) {
- UInt32 ktState = 0;
- KeyboardLayoutRef klr;
- KLGetCurrentKeyboardLayout(&klr);
- const void *kchar = 0; KLGetKeyboardLayoutProperty(klr, kKLKCHRData, &kchar);
- KeyTranslate(kchar, (mods&0xff00) | keyCode, &ktState); // send the dead key
- key = KeyTranslate(kchar, 0x31, &ktState); // fake a space key press
- Fl::e_state |= 0x40000000; // mark this as a dead key
- } else {
- Fl::e_state &= 0xbfffffff; // clear the deadkey flag
- }
-*/
- sendEvent = FL_KEYBOARD;
- // fall through
- case kEventRawKeyUp:
- if ( !sendEvent ) {
- sendEvent = FL_KEYUP;
- Fl::e_state &= 0xbfffffff; // clear the deadkey flag
- }
- // if the user pressed alt/option, event_key should have the keycap,
- // but event_text should generate the international symbol
- sym = macKeyLookUp[maskedKeyCode];
- if ( isalpha(key) )
- sym = tolower(key);
- else if ( Fl::e_state&FL_CTRL && key<32 && sym<0xff00)
- sym = key+96;
- else if ( Fl::e_state&FL_ALT && sym<0xff00) // find the keycap of this key
- sym = keycode_to_sym( maskedKeyCode, 0, macKeyLookUp[ maskedKeyCode ] );
- Fl::e_keysym = Fl::e_original_keysym = sym;
- // Handle FL_KP_Enter on regular keyboards and on Powerbooks
- if ( maskedKeyCode==0x4c || maskedKeyCode==0x34) key=0x0d;
- // Handle the Delete key on the keypad
- // Matt: the Mac has no concept of a NumLock key, or at least not visible
- // Matt: to Carbon. The kEventKeyModifierNumLockMask is only set when
- // Matt: a numeric keypad key is pressed and does not correspond with
- // Matt: the NumLock light in PowerBook keyboards.
-
- // Matt: attempt to get the correct Unicode character(s) from our keycode
- // imm: keycode_function function pointer added to allow us to use different functions
- // imm: depending on which OS version we are running on (tested and set in fl_open_display)
- static UInt32 deadKeyState = 0; // must be cleared when losing focus
- Fl::e_length = (*keycode_function)(buffer, 31, kind, keyCode, mods, &deadKeyState, key, sym);
- Fl::e_text = buffer;
- buffer[Fl::e_length] = 0; // just in case...
- break;
- case kEventRawKeyModifiersChanged: {
- UInt32 tMods = prevMods ^ mods;
- if ( tMods )
- {
- mods_to_e_keysym( tMods );
- if ( Fl::e_keysym )
- sendEvent = ( prevMods<mods ) ? FL_KEYBOARD : FL_KEYUP;
- Fl::e_length = 0;
- buffer[0] = 0;
- prevMods = mods;
- }
- mods_to_e_state( mods );
- break; }
- }
- while (window->parent()) window = window->window();
- if (sendEvent && Fl::handle(sendEvent,window)) {
- fl_unlock_function();
- return noErr; // return noErr if FLTK handled the event
- } else {
- fl_unlock_function();
- //return CallNextEventHandler( nextHandler, event );;
- // Matt: I had better results (no duplicate events) always returning
- // Matt: 'noErr'. System keyboard events still seem to work just fine.
- return noErr;
- }
-}
-
-
-
-/**
- * Open callback function to call...
- */
-
-static void (*open_cb)(const char *) = 0;
-
-
-/**
- * Event handler for Apple-O key combination and also for file opens
- * via the finder...
- */
-
-static OSErr OpenAppleEventHandler(const AppleEvent *appleEvt,
- AppleEvent *reply,
- UInt32 refcon) {
- OSErr err;
- AEDescList documents;
- long i, n;
- FSSpec fileSpec;
- AEKeyword keyWd;
- DescType typeCd;
- Size actSz;
- char filename[1024];
-
- if (!open_cb) return noErr;
-
- // Initialize the document list...
- AECreateDesc(typeNull, NULL, 0, &documents);
-
- // Get the open parameter(s)...
- err = AEGetParamDesc(appleEvt, keyDirectObject, typeAEList, &documents);
- if (err != noErr) {
- AEDisposeDesc(&documents);
- return err;
- }
-
- // Lock access to FLTK in this thread...
- fl_lock_function();
-
- // Open the documents via the callback...
- if (AECountItems(&documents, &n) == noErr) {
- for (i = 1; i <= n; i ++) {
- // Get the next FSSpec record...
- AEGetNthPtr(&documents, i, typeFSS, &keyWd, &typeCd,
- (Ptr)&fileSpec, sizeof(fileSpec),
- (actSz = sizeof(fileSpec), &actSz));
-
- // Convert to a UNIX path...
- FSSpec2UnixPath(&fileSpec, filename);
-
- // Call the callback with the filename...
- (*open_cb)(filename);
- }
- }
-
- // Unlock access to FLTK for all threads...
- fl_unlock_function();
-
- // Get rid of the document list...
- AEDisposeDesc(&documents);
-
- return noErr;
-}
-
-
-/**
- * Install an open documents event handler...
- */
-
-void fl_open_callback(void (*cb)(const char *)) {
- open_cb = cb;
- if (cb) {
- AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,
- NewAEEventHandlerUPP((AEEventHandlerProcPtr)
- OpenAppleEventHandler), 0, false);
- } else {
- AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments,
- NewAEEventHandlerUPP((AEEventHandlerProcPtr)
- OpenAppleEventHandler), false);
- }
-}
-
-
-/**
- * initialize the Mac toolboxes, dock status, and set the default menubar
- */
-
-extern "C" {
- extern OSErr CPSEnableForegroundOperation(ProcessSerialNumber *psn, UInt32 _arg2,
- UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
-}
-
-void fl_open_display() {
- static char beenHereDoneThat = 0;
- if ( !beenHereDoneThat ) {
- beenHereDoneThat = 1;
-
- FlushEvents(everyEvent,0);
-
- MoreMasters(); // \todo Carbon suggests MoreMasterPointers()
- AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, false );
-
- // create the Mac Handle for the default cursor (a pointer to a pointer)
- GetQDGlobalsArrow(&default_cursor);
- default_cursor_ptr = &default_cursor;
- fl_default_cursor = &default_cursor_ptr;
-
- ClearMenuBar();
- AppendResMenu( GetMenuHandle( 1 ), 'DRVR' );
- DrawMenuBar();
-
- // bring the application into foreground without a 'CARB' resource
- Boolean same_psn;
- ProcessSerialNumber cur_psn, front_psn;
- if( !GetCurrentProcess( &cur_psn ) && !GetFrontProcess( &front_psn ) &&
- !SameProcess( &front_psn, &cur_psn, &same_psn ) && !same_psn )
- {
- // only transform the application type for unbundled apps
- CFBundleRef bundle = CFBundleGetMainBundle();
- if( bundle )
- {
- FSRef execFs;
- CFURLRef execUrl = CFBundleCopyExecutableURL( bundle );
- CFURLGetFSRef( execUrl, &execFs );
-
- FSRef bundleFs;
- GetProcessBundleLocation( &cur_psn, &bundleFs );
-
- if( !FSCompareFSRefs( &execFs, &bundleFs ) )
- bundle = NULL;
-
- CFRelease(execUrl);
- }
-
- if( !bundle )
- {
- // Earlier versions of this code tried to use weak linking, however it
- // appears that this does not work on 10.2. Since 10.3 and higher provide
- // both TransformProcessType and CPSEnableForegroundOperation, the following
- // conditional code compiled on 10.2 will still work on newer releases...
- OSErr err;
-
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- if (TransformProcessType != NULL) {
- err = TransformProcessType(&cur_psn, kProcessTransformToForegroundApplication);
- } else
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- err = CPSEnableForegroundOperation(&cur_psn, 0x03, 0x3C, 0x2C, 0x1103);
-
- if (err == noErr) {
- SetFrontProcess( &cur_psn );
- }
- }
- }
-
- // imm: keycode handler stub setting - use Gestalt to determine the running system version,
- // then set the keycode_function pointer accordingly
- keycode_function = keycode_wrap_old; // default to pre-10.5 mechanism
- SInt32 MacVersion;
- if (Gestalt(gestaltSystemVersion, &MacVersion) == noErr)
- {
- if(MacVersion >= 0x1050) { // 10.5.0 or later
- keycode_function = keycodeToUnicode;
- }
- }
- }
-}
-
-
-/**
- * get rid of allocated resources
- */
-void fl_close_display() {
-}
-
-
-/**
- * smallest x ccordinate in screen space
- */
-int Fl::x() {
- BitMap r;
- GetQDGlobalsScreenBits(&r);
- return r.bounds.left;
-}
-
-
-/**
- * smallest y ccordinate in screen space
- */
-int Fl::y() {
- BitMap r;
- GetQDGlobalsScreenBits(&r);
- return r.bounds.top + 20; // \todo 20 pixel menu bar?
-}
-
-
-/**
- * screen width (single monitor!?)
- */
-int Fl::w() {
- BitMap r;
- GetQDGlobalsScreenBits(&r);
- return r.bounds.right - r.bounds.left;
-}
-
-
-/**
- * screen height (single monitor!?)
- */
-int Fl::h() {
- BitMap r;
- GetQDGlobalsScreenBits(&r);
- return r.bounds.bottom - r.bounds.top - 20;
-}
-
-
-/**
- * get the current mouse pointer world coordinates
- */
-void Fl::get_mouse(int &x, int &y)
-{
- fl_open_display();
- Point loc;
- GetMouse( &loc );
- LocalToGlobal( &loc );
- x = loc.h;
- y = loc.v;
-}
-
-
-/**
- * convert Mac keystrokes to FLTK
- */
-unsigned short mac2fltk(ulong macKey)
-{
- unsigned short cc = macKeyLookUp[(macKey>>8)&0x7f];
- if (cc) return cc;
- return macKey&0xff;
-}
-
-
-/**
- * Initialize the given port for redraw and call the windw's flush() to actually draw the content
- */
-void Fl_X::flush()
-{
- w->flush();
- if (fl_gc)
- CGContextFlush(fl_gc);
- SetOrigin( 0, 0 );
-}
-
-
-/**
- * Handle all clipping and redraw for the given port
- * There are two different callers for this event:
- * 1: the OS can request a redraw and provides all clipping itself
- * 2: Fl::flush() wants all redraws now
- */
-void handleUpdateEvent( WindowPtr xid )
-{
- Fl_Window *window = fl_find( xid );
- if ( !window ) return;
- GrafPtr oldPort;
- GetPort( &oldPort );
- SetPort( GetWindowPort(xid) );
- Fl_X *i = Fl_X::i( window );
- i->wait_for_expose = 0;
- if ( window->damage() ) {
- if ( i->region ) {
- InvalWindowRgn( xid, i->region );
- }
- }
- if ( i->region ) { // no region, so the sytem will take the update region from the OS
- DisposeRgn( i->region );
- i->region = 0;
- }
- for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext )
- {
- cx->w->clear_damage(window->damage()|FL_DAMAGE_EXPOSE);
- cx->flush();
- cx->w->clear_damage();
- }
- window->clear_damage(window->damage()|FL_DAMAGE_EXPOSE);
- i->flush();
- window->clear_damage();
- SetPort( oldPort );
-}
-
-// Gets the border sizes and the titlebar size
-static void get_window_frame_sizes(int &bx, int &by, int &bt) {
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- static HIRect contentRect = { {50,50}, {100,100} }; // a rect to stand in for the content rect of a real window
- static HIThemeWindowDrawInfo metrics= {0,
- kThemeStateActive, kThemeDocumentWindow,
- kThemeWindowHasFullZoom + kThemeWindowHasCloseBox +
- kThemeWindowHasCollapseBox + kThemeWindowHasTitleText,
- 0, 0};
- HIShapeRef shape1=0, shape2=0, shape3=0;
- HIRect rect1, rect2, rect3;
- OSStatus status;
- status = HIThemeGetWindowShape(&contentRect, &metrics, kWindowStructureRgn, &shape1);
- status |= HIThemeGetWindowShape(&contentRect, &metrics, kWindowContentRgn, &shape2);
- status |= HIThemeGetWindowShape(&contentRect, &metrics, kWindowTitleBarRgn, &shape3);
-
- if (!status)
- {
- HIShapeGetBounds(shape1, &rect1);
- HIShapeGetBounds(shape2, &rect2);
- HIShapeGetBounds(shape3, &rect3);
- bt = rect3.size.height;
- bx = rect2.origin.x - rect1.origin.x;
- by = rect2.origin.y - rect1.origin.y - bt;
- // fprintf(stderr, "HIThemeGetWindowShape succeeded bx=%d by=%d bt=%d\n", bx, by, bt);
- }
- else
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- {
- // sets default dimensions
- bx = by = 6;
- bt = 22;
- // fprintf(stderr, "HIThemeGetWindowShape failed, bx=%d by=%d bt=%d\n", bx, by, bt);
- }
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
- CFRelease(shape1); // we must free HIThemeGetWindowShape() (copied) handles
- CFRelease(shape2);
- CFRelease(shape3);
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2
-}
-
-/**
- * \todo this is a leftover from OS9 times. Please check how much applies to Carbon!
- */
-int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by) {
- int W, H, xoff, yoff, dx, dy;
- int ret = bx = by = bt = 0;
- if (w->border() && !w->parent()) {
- if (w->maxw != w->minw || w->maxh != w->minh) {
- ret = 2;
- get_window_frame_sizes(bx, by, bt);
- /*
- bx = 6; // \todo Mac : GetSystemMetrics(SM_CXSIZEFRAME);
- by = 6; // \todo Mac : get Mac window frame size GetSystemMetrics(SM_CYSIZEFRAME);
- */
- } else {
- ret = 1;
- get_window_frame_sizes(bx, by, bt);
- /*
- bx = 6; // \todo Mac : GetSystemMetrics(SM_CXFIXEDFRAME);
- by = 6; // \todo Mac : GetSystemMetrics(SM_CYFIXEDFRAME);
- */
- }
- }
- //The coordinates of the whole window, including non-client area
- xoff = bx;
- yoff = by + bt;
- dx = 2*bx;
- dy = 2*by + bt;
- X = w->x()-xoff;
- Y = w->y()-yoff;
- W = w->w()+dx;
- H = w->h()+dy;
-
- //Proceed to positioning the window fully inside the screen, if possible
-
- // let's get a little elaborate here. Mac OS X puts a lot of stuff on the desk
- // that we want to avoid when positioning our window, namely the Dock and the
- // top menu bar (and even more stuff in 10.4 Tiger). So we will go through the
- // list of all available screens and find the one that this window is most
- // likely to go to, and then reposition it to fit withing the 'good' area.
- Rect r;
- // find the screen, that the center of this window will fall into
- int R = X+W, B = Y+H; // right and bottom
- int cx = (X+R)/2, cy = (Y+B)/2; // center of window;
- GDHandle gd = 0L;
- for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
- GDPtr gp = *gd;
- if ( cx >= gp->gdRect.left && cx <= gp->gdRect.right
- && cy >= gp->gdRect.top && cy <= gp->gdRect.bottom)
- break;
- }
- // if the center doesn't fall on a screen, try the top left
- if (!gd) {
- for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
- GDPtr gp = *gd;
- if ( X >= gp->gdRect.left && X <= gp->gdRect.right
- && Y >= gp->gdRect.top && Y <= gp->gdRect.bottom)
- break;
- }
- }
- // if that doesn't fall on a screen, try the top right
- if (!gd) {
- for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
- GDPtr gp = *gd;
- if ( R >= gp->gdRect.left && R <= gp->gdRect.right
- && Y >= gp->gdRect.top && Y <= gp->gdRect.bottom)
- break;
- }
- }
- // if that doesn't fall on a screen, try the bottom left
- if (!gd) {
- for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
- GDPtr gp = *gd;
- if ( X >= gp->gdRect.left && X <= gp->gdRect.right
- && B >= gp->gdRect.top && B <= gp->gdRect.bottom)
- break;
- }
- }
- // last resort, try the bottom right
- if (!gd) {
- for (gd = GetDeviceList(); gd; gd = GetNextDevice(gd)) {
- GDPtr gp = *gd;
- if ( R >= gp->gdRect.left && R <= gp->gdRect.right
- && B >= gp->gdRect.top && B <= gp->gdRect.bottom)
- break;
- }
- }
- // if we still have not found a screen, we will use the main
- // screen, the one that has the application menu bar.
- if (!gd) gd = GetMainDevice();
- if (gd) {
- GetAvailableWindowPositioningBounds(gd, &r);
- if ( R > r.right ) X -= R - r.right;
- if ( B > r.bottom ) Y -= B - r.bottom;
- if ( X < r.left ) X = r.left;
- if ( Y < r.top ) Y = r.top;
- }
-
- //Return the client area's top left corner in (X,Y)
- X+=xoff;
- Y+=yoff;
-
- return ret;
-}
-
-/**
- * convert a Mac FSSpec structure into a Unix filename
- */
-static int FSSpec2UnixPath( FSSpec *fs, char *dst )
-{
- FSRef fsRef;
- FSpMakeFSRef( fs, &fsRef );
- FSRefMakePath( &fsRef, (UInt8*)dst, 1024 );
- return strlen(dst);
-}
-static void convert_crlf(char * s, size_t len)
-{
- // turn all \r characters into \n:
- for (size_t x = 0; x < len; x++) if (s[x] == '\r') s[x] = '\n';
-}
-
-
-static DragReference currDragRef = 0;
-static char *currDragData = 0L;
-static int currDragSize = 0;
-static OSErr currDragErr = noErr;
-Fl_Window *fl_dnd_target_window = 0;
-#include <FL/fl_draw.H>
-
-/**
- * Fill the currDrag* variables with the current DnD ASCII text.
- */
-static OSErr fillCurrentDragData(DragReference dragRef)
-{
- OSErr ret = noErr;
- char *dst = 0L;
-
- // shortcut through this whole procedure if this is still the same drag event
- if (dragRef==currDragRef)
- return currDragErr;
-
- // clear currDrag* for a new drag event
- currDragRef = dragRef;
- if (currDragData) free(currDragData);
- currDragData = 0;
- currDragSize = 0;
-
- // fill currDRag* with ASCII data, if available
- UInt16 i, nItem;
- ItemReference itemRef;
- FlavorFlags flags;
- Size itemSize, size = 0;
- CountDragItems( dragRef, &nItem );
-
- for ( i = 1; i <= nItem; i++ )
- {
- GetDragItemReferenceNumber( dragRef, i, &itemRef );
- ret = GetFlavorFlags( dragRef, itemRef, 'utf8', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'utf8', &itemSize );
- size += itemSize;
- continue;
- }
- ret = GetFlavorFlags( dragRef, itemRef, 'utxt', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'utxt', &itemSize );
- size += itemSize;
- continue;
- }
- ret = GetFlavorFlags( dragRef, itemRef, 'TEXT', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'TEXT', &itemSize );
- size += itemSize;
- continue;
- }
- ret = GetFlavorFlags( dragRef, itemRef, 'hfs ', &flags );
- if ( ret == noErr )
- {
- size += 1024; //++ ouch! We should create the full pathname and figure out its length
- continue;
- }
- }
-
- if ( !size )
- {
- currDragErr = userCanceledErr;
- return currDragErr;
- }
-
- currDragSize = size + nItem - 1;
- currDragData = dst = (char*)malloc( size+nItem );;
-
- for ( i = 1; i <= nItem; i++ )
- {
- GetDragItemReferenceNumber( dragRef, i, &itemRef );
- ret = GetFlavorFlags( dragRef, itemRef, 'utf8', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'utf8', &itemSize );
- GetFlavorData( dragRef, itemRef, 'utf8', dst, &itemSize, 0L );
- dst += itemSize;
- *dst++ = '\n'; // add our element separator
- continue;
- }
- GetDragItemReferenceNumber( dragRef, i, &itemRef );
- ret = GetFlavorFlags( dragRef, itemRef, 'utxt', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'utxt', &itemSize );
- GetFlavorData( dragRef, itemRef, 'utxt', dst, &itemSize, 0L );
- dst += itemSize;
- *dst++ = '\n'; // add our element separator
- continue;
- }
- ret = GetFlavorFlags( dragRef, itemRef, 'TEXT', &flags );
- if ( ret == noErr )
- {
- GetFlavorDataSize( dragRef, itemRef, 'TEXT', &itemSize );
- GetFlavorData( dragRef, itemRef, 'TEXT', dst, &itemSize, 0L );
- dst += itemSize;
- *dst++ = '\n'; // add our element separator
- continue;
- }
- ret = GetFlavorFlags( dragRef, itemRef, 'hfs ', &flags );
- if ( ret == noErr )
- {
- HFSFlavor hfs; itemSize = sizeof( hfs );
- GetFlavorData( dragRef, itemRef, 'hfs ', &hfs, &itemSize, 0L );
- itemSize = FSSpec2UnixPath( &hfs.fileSpec, dst ); // return the path name in UTF8
- dst += itemSize;
- if ( itemSize>1 && ( hfs.fileType=='fold' || hfs.fileType=='disk' ) )
- *dst++ = '/';
- *dst++ = '\n'; // add our element separator
- continue;
- }
- }
-
- dst[-1] = 0;
- currDragSize = dst - currDragData - 1;
- currDragErr = ret;
- return ret;
-}
-
-/**
- * Drag'n'drop tracking handler
- */
-static pascal OSErr dndTrackingHandler( DragTrackingMessage msg, WindowPtr w, void *userData, DragReference dragRef )
-{
- Fl_Window *target = (Fl_Window*)userData;
- Fl::first_window(target);
- Point mp;
- static int px, py;
-
- fillCurrentDragData(dragRef);
- Fl::e_length = currDragSize;
- Fl::e_text = currDragData;
-
- switch ( msg )
- {
- case kDragTrackingEnterWindow:
- // check if 'TEXT' is available
- GetDragMouse( dragRef, &mp, 0 );
- Fl::e_x_root = px = mp.h;
- Fl::e_y_root = py = mp.v;
- Fl::e_x = px - target->x();
- Fl::e_y = py - target->y();
- fl_dnd_target_window = target;
- if ( Fl::handle( FL_DND_ENTER, target ) )
- fl_cursor( FL_CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
- else
- fl_cursor( FL_CURSOR_DEFAULT ); //HideDragHilite( dragRef );
- breakMacEventLoop();
- return noErr;
- case kDragTrackingInWindow:
- GetDragMouse( dragRef, &mp, 0 );
- if ( mp.h==px && mp.v==py )
- break; //+ return previous condition for dnd hiliting
- Fl::e_x_root = px = mp.h;
- Fl::e_y_root = py = mp.v;
- Fl::e_x = px - target->x();
- Fl::e_y = py - target->y();
- fl_dnd_target_window = target;
- if ( Fl::handle( FL_DND_DRAG, target ) )
- fl_cursor( FL_CURSOR_HAND ); //ShowDragHilite( ); // modify the mouse cursor?!
- else
- fl_cursor( FL_CURSOR_DEFAULT ); //HideDragHilite( dragRef );
- breakMacEventLoop();
- return noErr;
- break;
- case kDragTrackingLeaveWindow:
- // HideDragHilite()
- fl_cursor( FL_CURSOR_DEFAULT ); //HideDragHilite( dragRef );
- if ( fl_dnd_target_window )
- {
- Fl::handle( FL_DND_LEAVE, fl_dnd_target_window );
- fl_dnd_target_window = 0;
- }
- breakMacEventLoop();
- return noErr;
- }
- return noErr;
-}
-
-
-/**
- * Drag'n'drop receive handler
- */
-static pascal OSErr dndReceiveHandler( WindowPtr w, void *userData, DragReference dragRef )
-{
- Point mp;
- OSErr ret;
-
- Fl_Window *target = fl_dnd_target_window = (Fl_Window*)userData;
- Fl::first_window(target);
- GetDragMouse( dragRef, &mp, 0 );
- Fl::e_x_root = mp.h;
- Fl::e_y_root = mp.v;
- Fl::e_x = Fl::e_x_root - target->x();
- Fl::e_y = Fl::e_y_root - target->y();
- if ( !Fl::handle( FL_DND_RELEASE, target ) )
- return userCanceledErr;
-
- ret = fillCurrentDragData(dragRef);
- if (ret==userCanceledErr)
- return userCanceledErr;
-
- Fl::e_length = currDragSize;
- Fl::e_text = currDragData;
-// printf("Sending following text to widget %p:\n%s\n", Fl::belowmouse(), Fl::e_text);
- int old_event = Fl::e_number;
- Fl::belowmouse()->handle(Fl::e_number = FL_PASTE);
- Fl::e_number = old_event;
-
- if (currDragData) {
- free(currDragData);
- }
- currDragData = 0L;
- currDragRef = 0;
- Fl::e_text = 0L;
- Fl::e_length = 0;
- fl_dnd_target_window = 0L;
-
- breakMacEventLoop();
- return noErr;
-}
-// fc:
-static void q_set_window_title(Window xid, const char * name ) {
-#if 1
- CFStringRef utf8_title = CFStringCreateWithCString(NULL, (name ? name : ""), kCFStringEncodingUTF8);
- SetWindowTitleWithCFString(xid, utf8_title);
- CFRelease(utf8_title);
-#else // old non-utf8 code to remove after new utf8 code approval :
- Str255 pTitle;
- if (name) {
- if (strlen(name) > 255) pTitle[0] = 255;
- else pTitle[0] = strlen(name);
- memcpy(pTitle+1, name, pTitle[0]);
- }
- else
- pTitle[0] = 0;
- SetWTitle(xid, pTitle);
-#endif
-}
-
-/**
- * go ahead, create that (sub)window
- * \todo we should make menu windows slightly transparent for the new Mac look
- */
-void Fl_X::make(Fl_Window* w)
-{
- static int xyPos = 100;
- if ( w->parent() ) // create a subwindow
- {
- Fl_Group::current(0);
- Rect wRect;
- wRect.top = w->y();
- wRect.left = w->x();
- wRect.bottom = w->y() + w->h(); if (wRect.bottom<=wRect.top) wRect.bottom = wRect.top+1;
- wRect.right = w->x() + w->w(); if (wRect.right<=wRect.left) wRect.right = wRect.left+1;
- // our subwindow needs this structure to know about its clipping.
- Fl_X* x = new Fl_X;
- x->other_xid = 0;
- x->region = 0;
- x->subRegion = 0;
- x->cursor = fl_default_cursor;
- x->gc = 0; // stay 0 for Quickdraw; fill with CGContext for Quartz
- Fl_Window *win = w->window();
- Fl_X *xo = Fl_X::i(win);
- if (xo) {
- x->xidNext = xo->xidChildren;
- x->xidChildren = 0L;
- xo->xidChildren = x;
- x->xid = fl_xid(win);
- x->w = w; w->i = x;
- x->wait_for_expose = 0;
- x->next = Fl_X::first; // must be in the list for ::flush()
- Fl_X::first = x;
- int old_event = Fl::e_number;
- w->handle(Fl::e_number = FL_SHOW);
- Fl::e_number = old_event;
- w->redraw(); // force draw to happen
- }
- fl_show_iconic = 0;
- }
- else // create a desktop window
- {
- Fl_Group::current(0);
- fl_open_display();
- int winclass = kDocumentWindowClass;
- int winattr = kWindowStandardHandlerAttribute | kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute;
- int xp = w->x();
- int yp = w->y();
- int wp = w->w();
- int hp = w->h();
- if (w->size_range_set) {
- if ( w->minh != w->maxh || w->minw != w->maxw)
- winattr |= kWindowFullZoomAttribute | kWindowResizableAttribute | kWindowLiveResizeAttribute;
- } else {
- if (w->resizable()) {
- Fl_Widget *o = w->resizable();
- int minw = o->w(); if (minw > 100) minw = 100;
- int minh = o->h(); if (minh > 100) minh = 100;
- w->size_range(w->w() - o->w() + minw, w->h() - o->h() + minh, 0, 0);
- winattr |= kWindowFullZoomAttribute | kWindowResizableAttribute | kWindowLiveResizeAttribute;
- } else {
- w->size_range(w->w(), w->h(), w->w(), w->h());
- }
- }
- int xwm = xp, ywm = yp, bt, bx, by;
-
- if (!fake_X_wm(w, xwm, ywm, bt, bx, by)) {
- // menu windows and tooltips
- if (w->modal()||w->override()) {
- winclass = kHelpWindowClass;
- winattr = 0;
- } else {
- winattr = 512; // kWindowNoTitleBarAttribute;
- }
- } else if (w->modal()) {
- winclass = kMovableModalWindowClass;
- }
-
- if (by+bt) {
- wp += 2*bx;
- hp += 2*by+bt;
- }
- if (!(w->flags() & Fl_Widget::FORCE_POSITION)) {
- // use the Carbon functions below for default window positioning
- w->x(xyPos+Fl::x());
- w->y(xyPos+Fl::y());
- xyPos += 25;
- if (xyPos>200) xyPos = 100;
- } else {
- if (!Fl::grab()) {
- xp = xwm; yp = ywm;
- w->x(xp);w->y(yp);
- }
- xp -= bx;
- yp -= by+bt;
- }
-
- if (w->non_modal() && Fl_X::first && !fl_disable_transient_for) {
- // find some other window to be "transient for":
- Fl_Window* w = Fl_X::first->w;
- while (w->parent()) w = w->window(); // todo: this code does not make any sense! (w!=w??)
- }
-
- Rect wRect;
- wRect.top = w->y();
- wRect.left = w->x();
- wRect.bottom = w->y() + w->h(); if (wRect.bottom<=wRect.top) wRect.bottom = wRect.top+1;
- wRect.right = w->x() + w->w(); if (wRect.right<=wRect.left) wRect.right = wRect.left+1;
-
- const char *name = w->label();
-
- Fl_X* x = new Fl_X;
- x->other_xid = 0; // room for doublebuffering image map. On OS X this is only used by overlay windows
- x->region = 0;
- x->subRegion = 0;
- x->cursor = fl_default_cursor;
- x->xidChildren = 0;
- x->xidNext = 0;
- x->gc = 0;
-
- winattr &= GetAvailableWindowAttributes( winclass ); // make sure that the window will open
- CreateNewWindow( winclass, winattr, &wRect, &(x->xid) );
- q_set_window_title(x->xid, name);
- MoveWindow(x->xid, wRect.left, wRect.top, 1); // avoid Carbon Bug on old OS
- if (w->non_modal() && !w->modal()) {
- // Major kludge: this is to have the regular look, but stay above the document windows
- SetWindowClass(x->xid, kFloatingWindowClass);
- SetWindowActivationScope(x->xid, kWindowActivationScopeAll);
- }
- if (!(w->flags() & Fl_Widget::FORCE_POSITION))
- {
- WindowRef pw = Fl_X::first ? Fl_X::first->xid : 0 ;
- if (w->modal()) {
- RepositionWindow(x->xid, pw, kWindowAlertPositionOnParentWindowScreen);
- } else if (w->non_modal()) {
- RepositionWindow(x->xid, pw, kWindowCenterOnParentWindowScreen);
- } else {
- RepositionWindow(x->xid, pw, kWindowCascadeOnParentWindowScreen);
- }
- }
- x->w = w; w->i = x;
- x->wait_for_expose = 1;
- x->next = Fl_X::first;
- Fl_X::first = x;
- { // Install Carbon Event handlers
- OSStatus ret;
- EventHandlerUPP mousewheelHandler = NewEventHandlerUPP( carbonMousewheelHandler ); // will not be disposed by Carbon...
- static EventTypeSpec mousewheelEvents[] = {
- { kEventClassMouse, kEventMouseWheelMoved } };
- ret = InstallWindowEventHandler( x->xid, mousewheelHandler,
- (int)(sizeof(mousewheelEvents)/sizeof(mousewheelEvents[0])),
- mousewheelEvents, w, 0L );
- EventHandlerUPP mouseHandler = NewEventHandlerUPP( carbonMouseHandler ); // will not be disposed by Carbon...
- static EventTypeSpec mouseEvents[] = {
- { kEventClassMouse, kEventMouseDown },
- { kEventClassMouse, kEventMouseUp },
- { kEventClassMouse, kEventMouseMoved },
- { kEventClassMouse, kEventMouseDragged } };
- ret = InstallWindowEventHandler( x->xid, mouseHandler, 4, mouseEvents, w, 0L );
-
- EventHandlerUPP keyboardHandler = NewEventHandlerUPP( carbonKeyboardHandler ); // will not be disposed by Carbon...
- static EventTypeSpec keyboardEvents[] = {
- { kEventClassKeyboard, kEventRawKeyDown },
- { kEventClassKeyboard, kEventRawKeyRepeat },
- { kEventClassKeyboard, kEventRawKeyUp },
- { kEventClassKeyboard, kEventRawKeyModifiersChanged } };
- ret = InstallWindowEventHandler( x->xid, keyboardHandler, 4, keyboardEvents, w, 0L );
-
- EventHandlerUPP textHandler = NewEventHandlerUPP( carbonTextHandler ); // will not be disposed by Carbon...
- static EventTypeSpec textEvents[] = {
- { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } };
- ret = InstallWindowEventHandler( x->xid, textHandler, 1, textEvents, w, 0L );
-
- EventHandlerUPP windowHandler = NewEventHandlerUPP( carbonWindowHandler ); // will not be disposed by Carbon...
- static EventTypeSpec windowEvents[] = {
- { kEventClassWindow, kEventWindowDrawContent },
- { kEventClassWindow, kEventWindowShown },
- { kEventClassWindow, kEventWindowHidden },
- { kEventClassWindow, kEventWindowActivated },
- { kEventClassWindow, kEventWindowDeactivated },
- { kEventClassWindow, kEventWindowClose },
- { kEventClassWindow, kEventWindowCollapsed },
- { kEventClassWindow, kEventWindowExpanded },
- { kEventClassWindow, kEventWindowBoundsChanging },
- { kEventClassWindow, kEventWindowBoundsChanged } };
- ret = InstallWindowEventHandler( x->xid, windowHandler, 10, windowEvents, w, 0L );
- ret = InstallTrackingHandler( dndTrackingHandler, x->xid, w );
- ret = InstallReceiveHandler( dndReceiveHandler, x->xid, w );
- }
-
- if ( ! Fl_X::first->next ) // if this is the first window, we need to bring the application to the front
- {
- ProcessSerialNumber psn;
- OSErr err = GetCurrentProcess( &psn );
- if ( err==noErr ) SetFrontProcess( &psn );
- }
-
- if (w->size_range_set) w->size_range_();
-
- if (winclass != kHelpWindowClass) {
- Fl_Tooltip::enter(0);
- }
- if (w->size_range_set) w->size_range_();
- ShowWindow(x->xid);
- if (fl_show_iconic) {
- fl_show_iconic = 0;
- CollapseWindow( x->xid, true ); // \todo Mac ; untested
- } else {
- w->set_visible();
- }
-
- Rect rect;
- GetWindowBounds(x->xid, kWindowContentRgn, &rect);
- w->x(rect.left); w->y(rect.top);
- w->w(rect.right-rect.left); w->h(rect.bottom-rect.top);
-
- int old_event = Fl::e_number;
- w->handle(Fl::e_number = FL_SHOW);
- Fl::e_number = old_event;
- w->redraw(); // force draw to happen
-
- if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); }
- }
-}
-
-
-/**
- * Tell the OS what window sizes we want to allow
- */
-void Fl_Window::size_range_() {
- size_range_set = 1;
- HISize minSize = { minw, minh };
- HISize maxSize = { maxw?maxw:32000, maxh?maxh:32000 };
- if (i && i->xid)
- SetWindowResizeLimits(i->xid, &minSize, &maxSize);
-}
-
-
-/**
- * returns pointer to the filename, or null if name ends with ':'
- */
-const char *fl_filename_name( const char *name )
-{
- const char *p, *q;
- if (!name) return (0);
- for ( p = q = name ; *p ; )
- {
- if ( ( p[0] == ':' ) && ( p[1] == ':' ) )
- {
- q = p+2;
- p++;
- }
- else if (p[0] == '/')
- q = p + 1;
- p++;
- }
- return q;
-}
-
-
-/**
- * set the window title bar
- * \todo make the titlebar icon work!
- */
-void Fl_Window::label(const char *name,const char */*iname*/) {
- Fl_Widget::label(name);
-
- if (shown() || i) {
- q_set_window_title(fl_xid(this), name);
- }
-}
-
-
-/**
- * make a window visible
- */
-void Fl_Window::show() {
- image(Fl::scheme_bg_);
- if (Fl::scheme_bg_) {
- labeltype(FL_NORMAL_LABEL);
- align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
- } else {
- labeltype(FL_NO_LABEL);
- }
- Fl_Tooltip::exit(this);
- if (!shown() || !i) {
- Fl_X::make(this);
- } else {
- if ( !parent() )
- {
- if ( IsWindowCollapsed( i->xid ) ) CollapseWindow( i->xid, false );
- if (!fl_capture) {
- BringToFront(i->xid);
- SelectWindow(i->xid);
- }
- }
- }
-}
-
-
-/**
- * resize a window
- */
-void Fl_Window::resize(int X,int Y,int W,int H) {
- if (W<=0) W = 1; // OS X does not like zero width windows
- if (H<=0) H = 1;
- int is_a_resize = (W != w() || H != h());
-// printf("Fl_Winodw::resize(X=%d, Y=%d, W=%d, H=%d), is_a_resize=%d, resize_from_system=%p, this=%p\n",
-// X, Y, W, H, is_a_resize, resize_from_system, this);
- if (X != x() || Y != y()) set_flag(FORCE_POSITION);
- else if (!is_a_resize) return;
- if ( (resize_from_system!=this) && (!parent()) && shown()) {
- if (is_a_resize) {
- if (resizable()) {
- if (W<minw) minw = W; // user request for resize takes priority
- if (W>maxw) maxw = W; // over a previously set size_range
- if (H<minh) minh = H;
- if (H>maxh) maxh = H;
- size_range(minw, minh, maxw, maxh);
- } else {
- size_range(W, H, W, H);
- }
- Rect dim; dim.left=X; dim.top=Y; dim.right=X+W; dim.bottom=Y+H;
- SetWindowBounds(i->xid, kWindowContentRgn, &dim);
- Rect all; all.top=-32000; all.bottom=32000; all.left=-32000; all.right=32000;
- InvalWindowRect( i->xid, &all );
- } else {
- MoveWindow(i->xid, X, Y, 0);
- }
- }
- resize_from_system = 0;
- if (is_a_resize) {
- Fl_Group::resize(X,Y,W,H);
- if (shown()) {
- redraw();
- }
- } else {
- x(X); y(Y);
- }
-}
-
-
-/**
- * make all drawing go into this window (called by subclass flush() impl.)
- */
-void Fl_Window::make_current()
-{
- OSStatus err;
- Fl_X::q_release_context();
- if ( !fl_window_region )
- fl_window_region = NewRgn();
- fl_window = i->xid;
- current_ = this;
-
- SetPort( GetWindowPort(i->xid) ); // \todo check for the handling of doublebuffered windows
-
- int xp = 0, yp = 0;
- Fl_Window *win = this;
- while ( win )
- {
- if ( !win->window() )
- break;
- xp += win->x();
- yp += win->y();
- win = (Fl_Window*)win->window();
- }
- SetOrigin( -xp, -yp );
-
- SetRectRgn( fl_window_region, 0, 0, w(), h() );
-
- // \todo for performance reasons: we don't have to create this unless the child windows moved
- for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext )
- {
- Fl_Window *cw = cx->w;
- if (!cw->visible_r()) continue;
- Fl_Region r = NewRgn();
- SetRectRgn( r, cw->x() - xp, cw->y() - yp,
- cw->x() + cw->w() - xp, cw->y() + cw->h() - yp );
- DiffRgn( fl_window_region, r, fl_window_region );
- DisposeRgn( r );
- }
-
- err = QDBeginCGContext(GetWindowPort(i->xid), &i->gc);
- if (err!=noErr)
- fprintf(stderr, "Error %d in QDBeginCGContext\n", (int)err);
- fl_gc = i->gc;
- CGContextSaveGState(fl_gc);
- Fl_X::q_fill_context();
-#if defined(USE_CAIRO)
- if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
-#endif
-
- fl_clip_region( 0 );
- SetPortClipRegion( GetWindowPort(i->xid), fl_window_region );
-
-#if defined(USE_CAIRO)
- // update the cairo_t context
- if (Fl::cairo_autolink_context()) Fl::cairo_make_current(this);
-#endif
-}
-
-// helper function to manage the current CGContext fl_gc
-extern Fl_Color fl_color_;
-extern class Fl_Font_Descriptor *fl_fontsize;
-extern void fl_font(class Fl_Font_Descriptor*);
-extern void fl_quartz_restore_line_style_();
-
-// FLTK has only one global graphics state. This function copies the FLTK state into the
-// current Quartz context
-void Fl_X::q_fill_context() {
- if (!fl_gc) return;
- int hgt = 0;
- if (fl_window) {
- Rect portRect;
- GetPortBounds(GetWindowPort( fl_window ), &portRect);
- hgt = portRect.bottom-portRect.top;
- } else {
- hgt = CGBitmapContextGetHeight(fl_gc);
- }
- CGContextTranslateCTM(fl_gc, 0.5, hgt-0.5f);
- CGContextScaleCTM(fl_gc, 1.0f, -1.0f);
- fl_font(fl_fontsize);
- fl_color(fl_color_);
- fl_quartz_restore_line_style_();
-}
-
-// The only way to reset clipping to its original state is to pop the current graphics
-// state and restore the global state.
-void Fl_X::q_clear_clipping() {
- if (!fl_gc) return;
- CGContextRestoreGState(fl_gc);
- CGContextSaveGState(fl_gc);
-}
-
-// Give the Quartz context back to the system
-void Fl_X::q_release_context(Fl_X *x) {
- if (x && x->gc!=fl_gc) return;
- if (!fl_gc) return;
- CGContextRestoreGState(fl_gc);
- if (fl_window) {
- OSStatus err = QDEndCGContext(GetWindowPort(fl_window), &fl_gc);
- if (err!=noErr)
- fprintf(stderr, "Error %d in QDEndCGContext\n", (int)err);
- }
- fl_gc = 0;
-#if defined(USE_CAIRO)
- if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0); // capture gc changes automatically to update the cairo context adequately
-#endif
-}
-
-void Fl_X::q_begin_image(CGRect &rect, int cx, int cy, int w, int h) {
- CGContextSaveGState(fl_gc);
- CGAffineTransform mx = CGContextGetCTM(fl_gc);
- CGRect r2 = rect;
- r2.origin.x -= 0.5f;
- r2.origin.y -= 0.5f;
- CGContextClipToRect(fl_gc, r2);
- mx.d = -1.0; mx.tx = -mx.tx;
- CGContextConcatCTM(fl_gc, mx);
- rect.origin.x = -(mx.tx+0.5f) + rect.origin.x - cx;
- rect.origin.y = (mx.ty+0.5f) - rect.origin.y - h + cy;
- rect.size.width = w;
- rect.size.height = h;
-}
-
-void Fl_X::q_end_image() {
- CGContextRestoreGState(fl_gc);
-}
-
-////////////////////////////////////////////////////////////////
-// Copy & Paste fltk implementation.
-////////////////////////////////////////////////////////////////
-
-// fltk 1.3 clipboard support constant definitions:
-const CFStringRef flavorNames[] = {
- CFSTR("public.utf16-plain-text"),
- CFSTR("public.utf8-plain-text"),
- CFSTR("com.apple.traditional-mac-plain-text") };
-const CFStringEncoding encodings[] = {
- kCFStringEncodingUTF16,
- kCFStringEncodingUTF8,
- kCFStringEncodingMacRoman};
-const size_t handledFlavorsCount = sizeof(encodings)/sizeof(CFStringEncoding);
-
-// clipboard variables definitions :
-Fl_Widget *fl_selection_requestor = 0;
-char *fl_selection_buffer[2];
-int fl_selection_length[2];
-static int fl_selection_buffer_length[2];
-
-#ifdef USE_PASTEBOARD
-static PasteboardRef myPasteboard = 0;
-static void allocatePasteboard() {
- if (!myPasteboard)
- PasteboardCreate(kPasteboardClipboard, &myPasteboard);
-}
-#else
-#endif
-
-#ifndef USE_PASTEBOARD
-static ScrapRef myScrap = 0;
-#endif
-
-/**
- * create a selection
- * owner: widget that created the selection
- * stuff: pointer to selected data
- * size of selected data
- */
-void Fl::copy(const char *stuff, int len, int clipboard) {
- if (!stuff || len<0) return;
- if (len+1 > fl_selection_buffer_length[clipboard]) {
- delete[] fl_selection_buffer[clipboard];
- fl_selection_buffer[clipboard] = new char[len+100];
- fl_selection_buffer_length[clipboard] = len+100;
- }
- memcpy(fl_selection_buffer[clipboard], stuff, len);
- fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
- fl_selection_length[clipboard] = len;
- if (clipboard) {
-#ifdef USE_PASTEBOARD
- // FIXME no error checking done yet!
- allocatePasteboard();
- OSStatus err = PasteboardClear(myPasteboard);
- if (err!=noErr) return; // clear did not work, maybe not owner of clipboard.
- PasteboardSynchronize(myPasteboard);
- CFDataRef text = CFDataCreate(kCFAllocatorDefault, (UInt8*)fl_selection_buffer[1], len);
- if (text==NULL) return; // there was a pb creating the object, abort.
- err=PasteboardPutItemFlavor(myPasteboard, (PasteboardItemID)1, CFSTR("public.utf8-plain-text"), text, 0);
- CFRelease(text);
-#else
- OSStatus err = ClearCurrentScrap(); // whatever happens we should clear the current scrap.
- if(err!=noErr) {myScrap=0; return;} // don't get current scrap if a prev err occured.
- err = GetCurrentScrap( &myScrap );
- if ( err != noErr ) {
- myScrap = 0;
- return;
- }
- // Previous version changed \n to \r before sending the text, but I would
- // prefer to leave the local buffer alone, so a copied buffer may be
- // needed. Check to see if this is necessary on OS/X.
- PutScrapFlavor( myScrap, kScrapFlavorTypeText, 0,
- len, fl_selection_buffer[1] );
-#endif
- }
-}
-
-// Call this when a "paste" operation happens:
-void Fl::paste(Fl_Widget &receiver, int clipboard) {
- if (clipboard) {
- // see if we own the selection, if not go get it:
- fl_selection_length[1] = 0;
-#ifdef USE_PASTEBOARD
- OSStatus err = noErr;
- Boolean found = false;
- CFDataRef flavorData = NULL;
- CFStringEncoding encoding = 0;
-
- allocatePasteboard();
- PasteboardSynchronize(myPasteboard);
- ItemCount nFlavor = 0, i, j;
- err = PasteboardGetItemCount(myPasteboard, &nFlavor);
- if (err==noErr) {
- for (i=1; i<=nFlavor; i++) {
- PasteboardItemID itemID = 0;
- CFArrayRef flavorTypeArray = NULL;
- found = false;
- err = PasteboardGetItemIdentifier(myPasteboard, i, &itemID);
- if (err!=noErr) continue;
- err = PasteboardCopyItemFlavors(myPasteboard, itemID, &flavorTypeArray);
- if (err!=noErr) {
- if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
- continue;
- }
- CFIndex flavorCount = CFArrayGetCount(flavorTypeArray);
- for (j = 0; j < handledFlavorsCount; j++) {
- for (CFIndex flavorIndex=0; flavorIndex<flavorCount; flavorIndex++) {
- CFStringRef flavorType = (CFStringRef)CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex);
- if (UTTypeConformsTo(flavorType, flavorNames[j])) {
- err = PasteboardCopyItemFlavorData( myPasteboard, itemID, flavorNames[j], &flavorData );
- if(err != noErr) continue;
- encoding = encodings[j];
- found = true;
- break;
- }
- }
- if(found) break;
- }
- if (flavorTypeArray) {CFRelease(flavorTypeArray); flavorTypeArray = NULL;}
- if (found) break;
- }
- if(found) {
- CFIndex len = CFDataGetLength(flavorData);
- CFStringRef mycfs = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(flavorData), len, encoding, false);
- CFRelease(flavorData);
- len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(mycfs), kCFStringEncodingUTF8) + 1;
- if ( len >= fl_selection_buffer_length[1] ) {
- fl_selection_buffer_length[1] = len;
- delete[] fl_selection_buffer[1];
- fl_selection_buffer[1] = new char[len];
- }
- CFStringGetCString(mycfs, fl_selection_buffer[1], len, kCFStringEncodingUTF8);
- CFRelease(mycfs);
- len = strlen(fl_selection_buffer[1]);
- fl_selection_length[1] = len;
- convert_crlf(fl_selection_buffer[1],len); // turn all \r characters into \n:
- }
- }
-#else
- ScrapRef scrap = 0;
- if (GetCurrentScrap(&scrap) == noErr && scrap != myScrap &&
- GetScrapFlavorSize(scrap, kScrapFlavorTypeText, &len) == noErr) {
- if ( len >= fl_selection_buffer_length[1] ) {
- fl_selection_buffer_length[1] = len + 32;
- delete[] fl_selection_buffer[1];
- fl_selection_buffer[1] = new char[len + 32];
- }
- fl_selection_length[1] = len; len++;
- GetScrapFlavorData( scrap, kScrapFlavorTypeText, &len,
- fl_selection_buffer[1] );
- fl_selection_buffer[1][fl_selection_length[1]] = 0;
- convert_crlf(fl_selection_buffer[1],len);
- }
-#endif
- }
- Fl::e_text = fl_selection_buffer[clipboard];
- Fl::e_length = fl_selection_length[clipboard];
- if (!Fl::e_text) Fl::e_text = (char *)"";
- receiver.handle(FL_PASTE);
-}
-
-void Fl::add_timeout(double time, Fl_Timeout_Handler cb, void* data)
-{
- // check, if this timer slot exists already
- for (int i = 0; i < mac_timer_used; ++i) {
- MacTimeout& t = mac_timers[i];
- // if so, simply change the fire interval
- if (t.callback == cb && t.data == data) {
- SetEventLoopTimerNextFireTime(t.timer, (EventTimerInterval)time);
- t.pending = 1;
- return;
- }
- }
- // no existing timer to use. Create a new one:
- int timer_id = -1;
- // find an empty slot in the timer array
- for (int i = 0; i < mac_timer_used; ++i) {
- if ( !mac_timers[i].timer ) {
- timer_id = i;
- break;
- }
- }
- // if there was no empty slot, append a new timer
- if (timer_id == -1) {
- // make space if needed
- if (mac_timer_used == mac_timer_alloc) {
- realloc_timers();
- }
- timer_id = mac_timer_used++;
- }
- // now install a brand new timer
- MacTimeout& t = mac_timers[timer_id];
- EventTimerInterval fireDelay = (EventTimerInterval)time;
- EventLoopTimerUPP timerUPP = NewEventLoopTimerUPP(do_timer);
- EventLoopTimerRef timerRef = 0;
- OSStatus err = InstallEventLoopTimer(GetMainEventLoop(), fireDelay, 0, timerUPP, data, &timerRef);
- if (err == noErr) {
- t.callback = cb;
- t.data = data;
- t.timer = timerRef;
- t.upp = timerUPP;
- t.pending = 1;
- } else {
- if (timerRef)
- RemoveEventLoopTimer(timerRef);
- if (timerUPP)
- DisposeEventLoopTimerUPP(timerUPP);
- }
-}
-
-void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
-{
- // currently, repeat_timeout does not subtract the trigger time of the previous timer event as it should.
- add_timeout(time, cb, data);
-}
-
-int Fl::has_timeout(Fl_Timeout_Handler cb, void* data)
-{
- for (int i = 0; i < mac_timer_used; ++i) {
- MacTimeout& t = mac_timers[i];
- if (t.callback == cb && t.data == data && t.pending) {
- return 1;
- }
- }
- return 0;
-}
-
-void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
-{
- for (int i = 0; i < mac_timer_used; ++i) {
- MacTimeout& t = mac_timers[i];
- if (t.callback == cb && ( t.data == data || data == NULL)) {
- delete_timer(t);
- }
- }
-}
-
-int MacUnlinkWindow(Fl_X *ip, Fl_X *start) {
- if (!ip) return 0;
- if (start) {
- Fl_X *pc = start;
- while (pc) {
- if (pc->xidNext == ip) {
- pc->xidNext = ip->xidNext;
- return 1;
- }
- if (pc->xidChildren) {
- if (pc->xidChildren == ip) {
- pc->xidChildren = ip->xidNext;
- return 1;
- }
- if (MacUnlinkWindow(ip, pc->xidChildren))
- return 1;
- }
- pc = pc->xidNext;
- }
- } else {
- for ( Fl_X *pc = Fl_X::first; pc; pc = pc->next ) {
- if (MacUnlinkWindow(ip, pc))
- return 1;
- }
- }
- return 0;
-}
-
-static void MacRelinkWindow(Fl_X *x, Fl_X *p) {
- if (!x || !p) return;
- // first, check if 'x' is already registered as a child of 'p'
- for (Fl_X *i = p->xidChildren; i; i=i->xidNext) {
- if (i == x) return;
- }
- // now add 'x' as the first child of 'p'
- x->xidNext = p->xidChildren;
- p->xidChildren = x;
-}
-
-void MacDestroyWindow(Fl_Window *w, WindowPtr p) {
- MacUnmapWindow(w, p);
- if (w && !w->parent() && p)
- DisposeWindow(p);
-}
-
-void MacMapWindow(Fl_Window *w, WindowPtr p) {
- if (w && p)
- ShowWindow(p);
- //+ link to window list
- if (w && w->parent()) {
- MacRelinkWindow(Fl_X::i(w), Fl_X::i(w->window()));
- w->redraw();
- }
-}
-
-void MacUnmapWindow(Fl_Window *w, WindowPtr p) {
- if (w && !w->parent() && p)
- HideWindow(p);
- if (w && Fl_X::i(w))
- MacUnlinkWindow(Fl_X::i(w));
-}
-#endif // FL_DOXYGEN
-
-//
-// End of "$Id: Fl_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
-//
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index fa1fc26..23f1422 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx 9624 2012-06-21 08:52:29Z manolo $"
+// "$Id: Fl_win32.cxx 10387 2014-10-20 15:14:12Z ossman $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>
+#include <signal.h>
#ifdef __CYGWIN__
# include <sys/time.h>
# include <unistd.h>
@@ -59,8 +60,6 @@
#include <ole2.h>
#include <shellapi.h>
-#include "aimm.h"
-
//
// USE_ASYNC_SELECT - define it if you have WSAAsyncSelect()...
// USE_ASYNC_SELECT is OBSOLETED in 1.3 for the following reasons:
@@ -83,10 +82,20 @@
for async mode proper operation, not mentioning the side effects...
*/
+// Internal functions
+static void fl_clipboard_notify_target(HWND wnd);
+static void fl_clipboard_notify_untarget(HWND wnd);
+
+// Internal variables
static Fl_GDI_Graphics_Driver fl_gdi_driver;
static Fl_Display_Device fl_gdi_display(&fl_gdi_driver);
Fl_Display_Device *Fl_Display_Device::_display = &fl_gdi_display; // the platform display
+static HWND clipboard_wnd = 0;
+static HWND next_clipboard_wnd = 0;
+
+static bool initial_clipboard = true;
+
// dynamic wsock dll handling api:
#if defined(__CYGWIN__) && !defined(SOCKET)
# define SOCKET int
@@ -120,27 +129,24 @@ static HMODULE get_wsock_mod() {
* size and link dependencies.
*/
static HMODULE s_imm_module = 0;
+typedef BOOL (WINAPI* flTypeImmAssociateContextEx)(HWND, HIMC, DWORD);
+static flTypeImmAssociateContextEx flImmAssociateContextEx = 0;
typedef HIMC (WINAPI* flTypeImmGetContext)(HWND);
static flTypeImmGetContext flImmGetContext = 0;
typedef BOOL (WINAPI* flTypeImmSetCompositionWindow)(HIMC, LPCOMPOSITIONFORM);
static flTypeImmSetCompositionWindow flImmSetCompositionWindow = 0;
typedef BOOL (WINAPI* flTypeImmReleaseContext)(HWND, HIMC);
static flTypeImmReleaseContext flImmReleaseContext = 0;
-typedef BOOL (WINAPI* flTypeImmIsIME)(HKL);
-static flTypeImmIsIME flImmIsIME = 0;
-
-static HMODULE get_imm_module() {
- if (!s_imm_module) {
- s_imm_module = LoadLibrary("IMM32.DLL");
- if (!s_imm_module)
- Fl::fatal("FLTK Lib Error: IMM32.DLL file not found!\n\n"
- "Please check your input method manager library accessibility.");
- flImmGetContext = (flTypeImmGetContext)GetProcAddress(s_imm_module, "ImmGetContext");
- flImmSetCompositionWindow = (flTypeImmSetCompositionWindow)GetProcAddress(s_imm_module, "ImmSetCompositionWindow");
- flImmReleaseContext = (flTypeImmReleaseContext)GetProcAddress(s_imm_module, "ImmReleaseContext");
- flImmIsIME = (flTypeImmIsIME)GetProcAddress(s_imm_module, "ImmIsIME");
- }
- return s_imm_module;
+
+static void get_imm_module() {
+ s_imm_module = LoadLibrary("IMM32.DLL");
+ if (!s_imm_module)
+ Fl::fatal("FLTK Lib Error: IMM32.DLL file not found!\n\n"
+ "Please check your input method manager library accessibility.");
+ flImmAssociateContextEx = (flTypeImmAssociateContextEx)GetProcAddress(s_imm_module, "ImmAssociateContextEx");
+ flImmGetContext = (flTypeImmGetContext)GetProcAddress(s_imm_module, "ImmGetContext");
+ flImmSetCompositionWindow = (flTypeImmSetCompositionWindow)GetProcAddress(s_imm_module, "ImmSetCompositionWindow");
+ flImmReleaseContext = (flTypeImmReleaseContext)GetProcAddress(s_imm_module, "ImmReleaseContext");
}
// USE_TRACK_MOUSE - define NO_TRACK_MOUSE if you don't have
@@ -205,6 +211,9 @@ static Fl_Window *track_mouse_win=0; // current TrackMouseEvent() window
# define WHEEL_DELTA 120 // according to MSDN.
#endif
+#ifndef SM_CXPADDEDBORDER
+# define SM_CXPADDEDBORDER (92) // STR #3061
+#endif
//
// WM_FLSELECT is the user-defined message that we get when one of
@@ -258,7 +267,9 @@ void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win)
Fl_Window* tw = win;
while (tw->parent()) tw = tw->window(); // find top level window
- get_imm_module();
+ if (!tw->shown())
+ return;
+
HIMC himc = flImmGetContext(fl_xid(tw));
if (himc) {
@@ -335,7 +346,8 @@ void* Fl::thread_message() {
return r;
}
-IActiveIMMApp *fl_aimm = NULL;
+extern int fl_send_system_handlers(void *e);
+
MSG fl_msg;
// This is never called with time_to_wait < 0.0.
@@ -400,23 +412,25 @@ int fl_wait(double time_to_wait) {
// Execute the message we got, and all other pending messages:
// have_message = PeekMessage(&fl_msg, NULL, 0, 0, PM_REMOVE);
- have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE);
- if (have_message > 0) {
- while (have_message != 0 && have_message != -1) {
- if (fl_msg.message == fl_wake_msg) {
- // Used for awaking wait() from another thread
- thread_message_ = (void*)fl_msg.wParam;
- Fl_Awake_Handler func;
- void *data;
- while (Fl::get_awake_handler_(func, data)==0) {
- func(data);
- }
- }
-
- TranslateMessage(&fl_msg);
- DispatchMessageW(&fl_msg);
- have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE);
+ while ((have_message = PeekMessageW(&fl_msg, NULL, 0, 0, PM_REMOVE)) > 0) {
+ if (fl_send_system_handlers(&fl_msg))
+ continue;
+
+ // Let applications treat WM_QUIT identical to SIGTERM on *nix
+ if (fl_msg.message == WM_QUIT)
+ raise(SIGTERM);
+
+ if (fl_msg.message == fl_wake_msg) {
+ // Used for awaking wait() from another thread
+ thread_message_ = (void*)fl_msg.wParam;
+ Fl_Awake_Handler func;
+ void *data;
+ while (Fl::get_awake_handler_(func, data)==0)
+ func(data);
}
+
+ TranslateMessage(&fl_msg);
+ DispatchMessageW(&fl_msg);
}
Fl::flush();
@@ -436,6 +450,63 @@ int fl_ready() {
return get_wsock_mod() ? s_wsock_select(0,&fdt[0],&fdt[1],&fdt[2],&t) : 0;
}
+void fl_open_display() {
+ static char beenHereDoneThat = 0;
+
+ if (beenHereDoneThat)
+ return;
+
+ beenHereDoneThat = 1;
+
+ OleInitialize(0L);
+
+ get_imm_module();
+}
+
+class Fl_Win32_At_Exit {
+public:
+ Fl_Win32_At_Exit() { }
+ ~Fl_Win32_At_Exit() {
+ fl_free_fonts(); // do some WIN32 cleanup
+ fl_cleanup_pens();
+ OleUninitialize();
+ fl_brush_action(1);
+ fl_cleanup_dc_list();
+ // This is actually too late in the cleanup process to remove the
+ // clipboard notifications, but we have no earlier hook so we try
+ // to work around it anyway.
+ if (clipboard_wnd != NULL)
+ fl_clipboard_notify_untarget(clipboard_wnd);
+ }
+};
+static Fl_Win32_At_Exit win32_at_exit;
+
+static char im_enabled = 1;
+
+void Fl::enable_im() {
+ fl_open_display();
+
+ Fl_X* i = Fl_X::first;
+ while (i) {
+ flImmAssociateContextEx(i->xid, 0, IACE_DEFAULT);
+ i = i->next;
+ }
+
+ im_enabled = 1;
+}
+
+void Fl::disable_im() {
+ fl_open_display();
+
+ Fl_X* i = Fl_X::first;
+ while (i) {
+ flImmAssociateContextEx(i->xid, 0, 0);
+ i = i->next;
+ }
+
+ im_enabled = 0;
+}
+
////////////////////////////////////////////////////////////////
int Fl::x()
@@ -531,8 +602,39 @@ public:
const char* GetValue() const { return(out); }
};
+void fl_update_clipboard(void) {
+ Fl_Window *w1 = Fl::first_window();
+ if (!w1)
+ return;
+
+ HWND hwnd = fl_xid(w1);
+
+ if (!OpenClipboard(hwnd))
+ return;
+
+ EmptyClipboard();
+
+ int utf16_len = fl_utf8toUtf16(fl_selection_buffer[1],
+ fl_selection_length[1], 0, 0);
+
+ HGLOBAL hMem = GlobalAlloc(GHND, utf16_len * 2 + 2); // moveable and zero'ed mem alloc.
+ LPVOID memLock = GlobalLock(hMem);
+
+ fl_utf8toUtf16(fl_selection_buffer[1], fl_selection_length[1],
+ (unsigned short*) memLock, utf16_len + 1);
+
+ GlobalUnlock(hMem);
+ SetClipboardData(CF_UNICODETEXT, hMem);
+
+ CloseClipboard();
+
+ // In case Windows managed to lob of a WM_DESTROYCLIPBOARD during
+ // the above.
+ fl_i_own_selection[1] = 1;
+}
+
// call this when you create a selection:
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void Fl::copy(const char *stuff, int len, int clipboard, const char *type) {
if (!stuff || len<0) return;
// Convert \n -> \r\n (for old apps like Notepad, DOS)
@@ -548,35 +650,17 @@ void Fl::copy(const char *stuff, int len, int clipboard) {
memcpy(fl_selection_buffer[clipboard], stuff, len);
fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
fl_selection_length[clipboard] = len;
- if (clipboard) {
- // set up for "delayed rendering":
- if (OpenClipboard(NULL)) {
- // if the system clipboard works, use it
- int utf16_len = fl_utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], 0, 0);
- EmptyClipboard();
- HGLOBAL hMem = GlobalAlloc(GHND, utf16_len * 2 + 2); // moveable and zero'ed mem alloc.
- LPVOID memLock = GlobalLock(hMem);
- fl_utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], (unsigned short*) memLock, utf16_len + 1);
- GlobalUnlock(hMem);
- SetClipboardData(CF_UNICODETEXT, hMem);
- CloseClipboard();
- GlobalFree(hMem);
- fl_i_own_selection[clipboard] = 0;
- } else {
- // only if it fails, instruct paste() to use the internal buffers
- fl_i_own_selection[clipboard] = 1;
- }
- }
+ fl_i_own_selection[clipboard] = 1;
+ if (clipboard)
+ fl_update_clipboard();
}
// Call this when a "paste" operation happens:
-void Fl::paste(Fl_Widget &receiver, int clipboard) {
- if (!clipboard || fl_i_own_selection[clipboard]) {
+void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) {
+ if (!clipboard || (fl_i_own_selection[clipboard] && strcmp(type, Fl::clipboard_plain_text) == 0)) {
// We already have it, do it quickly without window server.
// Notice that the text is clobbered if set_selection is
// called in response to FL_PASTE!
-
- // Convert \r\n -> \n
char *i = fl_selection_buffer[clipboard];
if (i==0L) {
Fl::e_text = 0;
@@ -584,43 +668,209 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) {
}
Fl::e_text = new char[fl_selection_length[clipboard]+1];
char *o = Fl::e_text;
- while (*i) {
+ while (*i) { // Convert \r\n -> \n
if ( *i == '\r' && *(i+1) == '\n') i++;
else *o++ = *i++;
}
*o = 0;
Fl::e_length = (int) (o - Fl::e_text);
+ Fl::e_clipboard_type = Fl::clipboard_plain_text;
receiver.handle(FL_PASTE);
delete [] Fl::e_text;
Fl::e_text = 0;
- } else {
+ } else if (clipboard) {
+ HANDLE h;
if (!OpenClipboard(NULL)) return;
- HANDLE h = GetClipboardData(CF_UNICODETEXT);
- if (h) {
- wchar_t *memLock = (wchar_t*) GlobalLock(h);
- size_t utf16_len = wcslen(memLock);
- Fl::e_text = (char*) malloc (utf16_len * 4 + 1);
- unsigned utf8_len = fl_utf8fromwc(Fl::e_text, (unsigned) (utf16_len * 4), memLock, (unsigned) utf16_len);
- *(Fl::e_text + utf8_len) = 0;
- LPSTR a,b;
- a = b = Fl::e_text;
- while (*a) { // strip the CRLF pairs ($%$#@^)
- if (*a == '\r' && a[1] == '\n') a++;
- else *b++ = *a++;
+ if (strcmp(type, Fl::clipboard_plain_text) == 0) { // we want plain text from clipboard
+ if ((h = GetClipboardData(CF_UNICODETEXT))) { // there's text in the clipboard
+ wchar_t *memLock = (wchar_t*) GlobalLock(h);
+ size_t utf16_len = wcslen(memLock);
+ Fl::e_text = new char[utf16_len * 4 + 1];
+ unsigned utf8_len = fl_utf8fromwc(Fl::e_text, (unsigned) (utf16_len * 4), memLock, (unsigned) utf16_len);
+ *(Fl::e_text + utf8_len) = 0;
+ GlobalUnlock(h);
+ LPSTR a,b;
+ a = b = Fl::e_text;
+ while (*a) { // strip the CRLF pairs ($%$#@^)
+ if (*a == '\r' && a[1] == '\n') a++;
+ else *b++ = *a++;
+ }
+ *b = 0;
+ Fl::e_length = (int) (b - Fl::e_text);
+ Fl::e_clipboard_type = Fl::clipboard_plain_text; // indicates that the paste event is for plain UTF8 text
+ receiver.handle(FL_PASTE); // send the FL_PASTE event to the widget
+ delete[] Fl::e_text;
+ Fl::e_text = 0;
+ }
+ }
+ else if (strcmp(type, Fl::clipboard_image) == 0) { // we want an image from clipboard
+ uchar *rgb = NULL;
+ int width, height, depth;
+ if ( (h = GetClipboardData(CF_DIB)) ) { // if there's a DIB in clipboard
+ LPBITMAPINFO lpBI = (LPBITMAPINFO)GlobalLock(h) ;
+ width = lpBI->bmiHeader.biWidth; // bitmap width & height
+ height = lpBI->bmiHeader.biHeight;
+ if ( (lpBI->bmiHeader.biBitCount == 24 || lpBI->bmiHeader.biBitCount == 32) &&
+ lpBI->bmiHeader.biCompression == BI_RGB &&
+ lpBI->bmiHeader.biClrUsed == 0) { // direct use of the DIB data if it's RGB or RGBA
+ int linewidth; // row length
+ depth = lpBI->bmiHeader.biBitCount/8; // 3 or 4
+ if (depth == 3) linewidth = 4 * ((3*width + 3)/4); // row length: series of groups of 3 bytes, rounded to multiple of 4 bytes
+ else linewidth = 4*width;
+ rgb = new uchar[width * height * depth]; // will hold the image data
+ uchar *p = rgb, *r, rr, gg, bb;
+ for (int i=height-1; i>=0; i--) { // for each row, from last to first
+ r = (uchar*)(lpBI->bmiColors) + i*linewidth; // beginning of pixel data for the ith row
+ for (int j=0; j<width; j++) { // for each pixel in a row
+ bb = *r++; // BGR is in DIB
+ gg = *r++;
+ rr = *r++;
+ *p++ = rr; // we want RGB
+ *p++ = gg;
+ *p++ = bb;
+ if (depth == 4) *p++ = *r++; // copy alpha if present
+ }
+ }
+ }
+ else { // the system will decode a complex DIB
+ void *pDIBBits = (void*)(lpBI->bmiColors);
+ if (lpBI->bmiHeader.biCompression == BI_BITFIELDS) pDIBBits = (void*)(lpBI->bmiColors + 3);
+ else if (lpBI->bmiHeader.biClrUsed > 0) pDIBBits = (void*)(lpBI->bmiColors + lpBI->bmiHeader.biClrUsed);
+ Fl_Offscreen off = fl_create_offscreen(width, height);
+ fl_begin_offscreen(off);
+ SetDIBitsToDevice(fl_gc, 0, 0, width, height, 0, 0, 0, height, pDIBBits, lpBI, DIB_RGB_COLORS);
+ rgb = fl_read_image(NULL, 0, 0, width, height);
+ depth = 3;
+ fl_end_offscreen();
+ fl_delete_offscreen(off);
+ }
+ GlobalUnlock(h);
+ }
+ else if ((h = GetClipboardData(CF_ENHMETAFILE))) { // if there's an enhanced metafile in clipboard
+ ENHMETAHEADER header;
+ GetEnhMetaFileHeader((HENHMETAFILE)h, sizeof(header), &header); // get structure containing metafile dimensions
+ width = (header.rclFrame.right - header.rclFrame.left + 1); // in .01 mm units
+ height = (header.rclFrame.bottom - header.rclFrame.top + 1);
+ HDC hdc = GetDC(NULL); // get unit correspondance between .01 mm and screen pixels
+ int hmm = GetDeviceCaps(hdc, HORZSIZE);
+ int hdots = GetDeviceCaps(hdc, HORZRES);
+ int vmm = GetDeviceCaps(hdc, VERTSIZE);
+ int vdots = GetDeviceCaps(hdc, VERTRES);
+ ReleaseDC(NULL, hdc);
+ float factorw = (100. * hmm) / hdots;
+ float factorh = (100. * vmm) / vdots + 0.5;
+ width /= factorw; height /= factorh; // convert to screen pixel unit
+ RECT rect = {0, 0, width, height};
+ Fl_Offscreen off = fl_create_offscreen(width, height);
+ fl_begin_offscreen(off);
+ fl_color(FL_WHITE); fl_rectf(0,0,width, height); // draw white background
+ PlayEnhMetaFile(fl_gc, (HENHMETAFILE)h, &rect); // draw metafile to offscreen buffer
+ rgb = fl_read_image(NULL, 0, 0, width, height); // read pixels from offscreen buffer
+ depth = 3;
+ fl_end_offscreen();
+ fl_delete_offscreen(off);
+ }
+ if (rgb) {
+ Fl_RGB_Image *image = new Fl_RGB_Image(rgb, width, height, depth); // create new image from pixel data
+ image->alloc_array = 1;
+ Fl::e_clipboard_data = image;
+ Fl::e_clipboard_type = Fl::clipboard_image; // indicates that the paste event is for image data
+ int done = receiver.handle(FL_PASTE); // send FL_PASTE event to widget
+ Fl::e_clipboard_type = "";
+ if (done == 0) { // if widget did not handle the event, delete the image
+ Fl::e_clipboard_data = NULL;
+ delete image;
+ }
+ }
}
- *b = 0;
- Fl::e_length = (int) (b - Fl::e_text);
- receiver.handle(FL_PASTE);
- GlobalUnlock(h);
- free(Fl::e_text);
- Fl::e_text = 0;
+ CloseClipboard();
+ }
+}
+
+int Fl::clipboard_contains(const char *type)
+{
+ int retval = 0;
+ if (!OpenClipboard(NULL)) return 0;
+ if (strcmp(type, Fl::clipboard_plain_text) == 0 || type[0] == 0) {
+ retval = IsClipboardFormatAvailable(CF_UNICODETEXT);
+ }
+ else if (strcmp(type, Fl::clipboard_image) == 0) {
+ retval = IsClipboardFormatAvailable(CF_DIB) || IsClipboardFormatAvailable(CF_ENHMETAFILE);
+ }
+ CloseClipboard();
+ return retval;
+}
+
+static void fl_clipboard_notify_target(HWND wnd) {
+ if (clipboard_wnd)
+ return;
+
+ // We get one fake WM_DRAWCLIPBOARD immediately, which we therefore
+ // need to ignore.
+ initial_clipboard = true;
+
+ clipboard_wnd = wnd;
+ next_clipboard_wnd = SetClipboardViewer(wnd);
+}
+
+static void fl_clipboard_notify_untarget(HWND wnd) {
+ if (wnd != clipboard_wnd)
+ return;
+
+ // We might be called late in the cleanup where Windows has already
+ // implicitly destroyed our clipboard window. At that point we need
+ // to do some extra work to manually repair the clipboard chain.
+ if (IsWindow(wnd))
+ ChangeClipboardChain(wnd, next_clipboard_wnd);
+ else {
+ HWND tmp, head;
+
+ tmp = CreateWindow("STATIC", "Temporary FLTK Clipboard Window", 0,
+ 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
+ if (tmp == NULL)
+ return;
+
+ head = SetClipboardViewer(tmp);
+ if (head == NULL)
+ ChangeClipboardChain(tmp, next_clipboard_wnd);
+ else {
+ SendMessage(head, WM_CHANGECBCHAIN, (WPARAM)wnd, (LPARAM)next_clipboard_wnd);
+ ChangeClipboardChain(tmp, head);
}
- CloseClipboard();
+
+ DestroyWindow(tmp);
+ }
+
+ clipboard_wnd = next_clipboard_wnd = 0;
+}
+
+void fl_clipboard_notify_retarget(HWND wnd) {
+ // The given window is getting destroyed. If it's part of the
+ // clipboard chain then we need to unregister it and find a
+ // replacement window.
+ if (wnd != clipboard_wnd)
+ return;
+
+ fl_clipboard_notify_untarget(wnd);
+
+ if (Fl::first_window())
+ fl_clipboard_notify_target(fl_xid(Fl::first_window()));
+}
+
+void fl_clipboard_notify_change() {
+ // untarget clipboard monitor if no handlers are registered
+ if (clipboard_wnd != NULL && fl_clipboard_notify_empty()) {
+ fl_clipboard_notify_untarget(clipboard_wnd);
+ return;
}
+
+ // if there are clipboard notify handlers but no window targeted
+ // target first window if available
+ if (clipboard_wnd == NULL && Fl::first_window())
+ fl_clipboard_notify_target(fl_xid(Fl::first_window()));
}
////////////////////////////////////////////////////////////////
-char fl_is_ime = 0;
void fl_get_codepage()
{
HKL hkl = GetKeyboardLayout(0);
@@ -628,14 +878,7 @@ void fl_get_codepage()
GetLocaleInfo (LOWORD(hkl), LOCALE_IDEFAULTANSICODEPAGE, ld, 6);
DWORD ccp = atol(ld);
- fl_is_ime = 0;
-
fl_codepage = ccp;
- if (fl_aimm) {
- fl_aimm->GetCodePageA(GetKeyboardLayout(0), &fl_codepage);
- } else if (get_imm_module() && flImmIsIME(hkl)) {
- fl_is_ime = 1;
- }
}
HWND fl_capture;
@@ -856,7 +1099,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
case WM_CLOSE: // user clicked close box
Fl::handle(FL_CLOSE, window);
- PostQuitMessage(0);
return 0;
case WM_SYNCPAINT :
@@ -942,6 +1184,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
break;
case WM_SETFOCUS:
+ if ((Fl::modal_) && (Fl::modal_ != window)) {
+ SetFocus(fl_xid(Fl::modal_));
+ return 0;
+ }
Fl::handle(FL_FOCUS, window);
break;
@@ -1191,38 +1437,31 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
fl_i_own_selection[1] = 0;
return 1;
- case WM_RENDERALLFORMATS:
- fl_i_own_selection[1] = 0;
- // Windoze seems unhappy unless I do these two steps. Documentation
- // seems to vary on whether opening the clipboard is necessary or
- // is in fact wrong:
- CloseClipboard();
- OpenClipboard(NULL);
- // fall through...
- case WM_RENDERFORMAT: {
- HANDLE h;
-
-// int l = fl_utf_nb_char((unsigned char*)fl_selection_buffer[1], fl_selection_length[1]);
- int l = fl_utf8toUtf16(fl_selection_buffer[1], fl_selection_length[1], NULL, 0); // Pass NULL buffer to query length required
- h = GlobalAlloc(GHND, (l+1) * sizeof(unsigned short));
- if (h) {
- unsigned short *g = (unsigned short*) GlobalLock(h);
-// fl_utf2unicode((unsigned char *)fl_selection_buffer[1], fl_selection_length[1], (xchar*)g);
- l = fl_utf8toUtf16(fl_selection_buffer[1], fl_selection_length[1], g, (l+1));
- g[l] = 0;
- GlobalUnlock(h);
- SetClipboardData(CF_UNICODETEXT, h);
- }
-
- // Windoze also seems unhappy if I don't do this. Documentation very
- // unclear on what is correct:
- if (fl_msg.message == WM_RENDERALLFORMATS) CloseClipboard();
- return 1;}
case WM_DISPLAYCHANGE: // occurs when screen configuration (number, position) changes
Fl::call_screen_init();
Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL);
return 0;
+ case WM_CHANGECBCHAIN:
+ if ((hWnd == clipboard_wnd) && (next_clipboard_wnd == (HWND)wParam))
+ next_clipboard_wnd = (HWND)lParam;
+ else
+ SendMessage(next_clipboard_wnd, WM_CHANGECBCHAIN, wParam, lParam);
+ return 0;
+
+ case WM_DRAWCLIPBOARD:
+ // When the clipboard moves between two FLTK windows,
+ // fl_i_own_selection will temporarily be false as we are
+ // processing this message. Hence the need to use fl_find().
+ if (!initial_clipboard && !fl_find(GetClipboardOwner()))
+ fl_trigger_clipboard_notify(1);
+ initial_clipboard = false;
+
+ if (next_clipboard_wnd)
+ SendMessage(next_clipboard_wnd, WM_DRAWCLIPBOARD, wParam, lParam);
+
+ return 0;
+
default:
if (Fl::handle(0,0)) return 0;
break;
@@ -1290,13 +1529,17 @@ int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by)
if (fallback) {
if (w->border() && !w->parent()) {
if (w->size_range_set && (w->maxw != w->minw || w->maxh != w->minh)) {
- ret = 2;
- bx = GetSystemMetrics(SM_CXSIZEFRAME);
- by = GetSystemMetrics(SM_CYSIZEFRAME);
+ ret = 2;
+ bx = GetSystemMetrics(SM_CXSIZEFRAME);
+ by = GetSystemMetrics(SM_CYSIZEFRAME);
} else {
- ret = 1;
- bx = GetSystemMetrics(SM_CXFIXEDFRAME);
- by = GetSystemMetrics(SM_CYFIXEDFRAME);
+ ret = 1;
+ int padding = GetSystemMetrics(SM_CXPADDEDBORDER);
+ NONCLIENTMETRICS ncm;
+ ncm.cbSize = sizeof(NONCLIENTMETRICS);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
+ bx = GetSystemMetrics(SM_CXFIXEDFRAME) + (padding ? padding + ncm.iBorderWidth : 0);
+ by = GetSystemMetrics(SM_CYFIXEDFRAME) + (padding ? padding + ncm.iBorderWidth : 0);
}
bt = GetSystemMetrics(SM_CYCAPTION);
}
@@ -1333,7 +1576,6 @@ int Fl_X::fake_X_wm(const Fl_Window* w,int &X,int &Y, int &bt,int &bx, int &by)
Y+=yoff;
if (w->fullscreen_active()) {
- X = Y = 0;
bx = by = bt = 0;
}
@@ -1387,19 +1629,42 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
}
}
-static void make_fullscreen(Fl_Window *w, Window xid, int X, int Y, int W, int H) {
+void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
+ int top, bottom, left, right;
int sx, sy, sw, sh;
- Fl::screen_xywh(sx, sy, sw, sh, X, Y, W, H);
+
+ top = w->fullscreen_screen_top;
+ bottom = w->fullscreen_screen_bottom;
+ left = w->fullscreen_screen_left;
+ right = w->fullscreen_screen_right;
+
+ if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
+ top = Fl::screen_num(X, Y, W, H);
+ bottom = top;
+ left = top;
+ right = top;
+ }
+
+ Fl::screen_xywh(sx, sy, sw, sh, top);
+ Y = sy;
+ Fl::screen_xywh(sx, sy, sw, sh, bottom);
+ H = sy + sh - Y;
+ Fl::screen_xywh(sx, sy, sw, sh, left);
+ X = sx;
+ Fl::screen_xywh(sx, sy, sw, sh, right);
+ W = sx + sw - X;
+
DWORD flags = GetWindowLong(xid, GWL_STYLE);
flags = flags & ~(WS_THICKFRAME|WS_CAPTION);
SetWindowLong(xid, GWL_STYLE, flags);
+
// SWP_NOSENDCHANGING is so that we can override size limits
- SetWindowPos(xid, HWND_TOP, sx, sy, sw, sh, SWP_NOSENDCHANGING | SWP_FRAMECHANGED);
+ SetWindowPos(xid, HWND_TOP, X, Y, W, H, SWP_NOSENDCHANGING | SWP_FRAMECHANGED);
}
void Fl_Window::fullscreen_x() {
_set_fullscreen();
- make_fullscreen(this, fl_xid(this), x(), y(), w(), h());
+ i->make_fullscreen(x(), y(), w(), h());
Fl::handle(FL_FULLSCREEN, this);
}
@@ -1477,13 +1742,14 @@ void fl_fix_focus(); // in Fl.cxx
char fl_show_iconic; // hack for Fl_Window::iconic()
// int fl_background_pixel = -1; // color to use for background
-HCURSOR fl_default_cursor;
UINT fl_wake_msg = 0;
int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
Fl_X* Fl_X::make(Fl_Window* w) {
Fl_Group::current(0); // get rid of very common user bug: forgot end()
+ fl_open_display();
+
// if the window is a subwindow and our parent is not mapped yet, we
// mark this window visible, so that mapping the parent at a later
// point in time will call this function again to finally map the subwindow.
@@ -1526,7 +1792,7 @@ Fl_X* Fl_X::make(Fl_Window* w) {
if (!w->icon())
w->icon((void *)LoadIcon(NULL, IDI_APPLICATION));
wcw.hIcon = wcw.hIconSm = (HICON)w->icon();
- wcw.hCursor = fl_default_cursor = LoadCursor(NULL, IDC_ARROW);
+ wcw.hCursor = LoadCursor(NULL, IDC_ARROW);
//uchar r,g,b; Fl::get_color(FL_GRAY,r,g,b);
//wc.hbrBackground = (HBRUSH)CreateSolidBrush(RGB(r,g,b));
wcw.hbrBackground = NULL;
@@ -1618,7 +1884,8 @@ Fl_X* Fl_X::make(Fl_Window* w) {
x->setwindow(w);
x->region = 0;
x->private_dc = 0;
- x->cursor = fl_default_cursor;
+ x->cursor = LoadCursor(NULL, IDC_ARROW);
+ x->custom_cursor = 0;
if (!fl_codepage) fl_get_codepage();
WCHAR *lab = NULL;
@@ -1644,6 +1911,11 @@ Fl_X* Fl_X::make(Fl_Window* w) {
);
if (lab) free(lab);
+ x->next = Fl_X::first;
+ Fl_X::first = x;
+
+ x->set_icons();
+
if (w->fullscreen_active()) {
/* We need to make sure that the fullscreen is created on the
default monitor, ie the desktop where the shortcut is located
@@ -1652,12 +1924,14 @@ Fl_X* Fl_X::make(Fl_Window* w) {
monitor the window was placed on. */
RECT rect;
GetWindowRect(x->xid, &rect);
- make_fullscreen(w, x->xid, rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top);
+ x->make_fullscreen(rect.left, rect.top,
+ rect.right - rect.left, rect.bottom - rect.top);
}
- x->next = Fl_X::first;
- Fl_X::first = x;
+ // Setup clipboard monitor target if there are registered handlers and
+ // no window is targeted.
+ if (!fl_clipboard_notify_empty() && clipboard_wnd == NULL)
+ fl_clipboard_notify_target(x->xid);
x->wait_for_expose = 1;
if (fl_show_iconic) {showit = 0; fl_show_iconic = 0;}
@@ -1668,24 +1942,22 @@ Fl_X* Fl_X::make(Fl_Window* w) {
Fl::e_number = old_event;
w->redraw(); // force draw to happen
}
+
+ // Needs to be done before ShowWindow() to get the correct behaviour
+ // when we get WM_SETFOCUS.
+ if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
+
// If we've captured the mouse, we dont want to activate any
// other windows from the code, or we lose the capture.
ShowWindow(x->xid, !showit ? SW_SHOWMINNOACTIVE :
(Fl::grab() || (styleEx & WS_EX_TOOLWINDOW)) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL);
// Register all windows for potential drag'n'drop operations
- fl_OleInitialize();
RegisterDragDrop(x->xid, flIDropTarget);
- if (!fl_aimm) {
- CoCreateInstance(CLSID_CActiveIMM, NULL, CLSCTX_INPROC_SERVER,
- IID_IActiveIMMApp, (void**) &fl_aimm);
- if (fl_aimm) {
- fl_aimm->Activate(TRUE);
- }
- }
+ if (!im_enabled)
+ flImmAssociateContextEx(x->xid, 0, 0);
- if (w->modal()) {Fl::modal_ = w; fl_fix_focus();}
return x;
}
@@ -1867,6 +2139,329 @@ void Fl_Window::label(const char *name,const char *iname) {
}
////////////////////////////////////////////////////////////////
+
+static HICON image_to_icon(const Fl_RGB_Image *image, bool is_icon,
+ int hotx, int hoty) {
+ BITMAPV5HEADER bi;
+ HBITMAP bitmap, mask;
+ DWORD *bits;
+ HICON icon;
+
+ if (!is_icon) {
+ if ((hotx < 0) || (hotx >= image->w()))
+ return NULL;
+ if ((hoty < 0) || (hoty >= image->h()))
+ return NULL;
+ }
+
+ memset(&bi, 0, sizeof(BITMAPV5HEADER));
+
+ bi.bV5Size = sizeof(BITMAPV5HEADER);
+ bi.bV5Width = image->w();
+ bi.bV5Height = -image->h(); // Negative for top-down
+ bi.bV5Planes = 1;
+ bi.bV5BitCount = 32;
+ bi.bV5Compression = BI_BITFIELDS;
+ bi.bV5RedMask = 0x00FF0000;
+ bi.bV5GreenMask = 0x0000FF00;
+ bi.bV5BlueMask = 0x000000FF;
+ bi.bV5AlphaMask = 0xFF000000;
+
+ HDC hdc;
+
+ hdc = GetDC(NULL);
+ bitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bi, DIB_RGB_COLORS, (void**)&bits, NULL, 0);
+ ReleaseDC(NULL, hdc);
+
+ if (bits == NULL)
+ return NULL;
+
+ const uchar *i = (const uchar*)*image->data();
+ for (int y = 0;y < image->h();y++) {
+ for (int x = 0;x < image->w();x++) {
+ switch (image->d()) {
+ case 1:
+ *bits = (0xff<<24) | (i[0]<<16) | (i[0]<<8) | i[0];
+ break;
+ case 2:
+ *bits = (i[1]<<24) | (i[0]<<16) | (i[0]<<8) | i[0];
+ break;
+ case 3:
+ *bits = (0xff<<24) | (i[0]<<16) | (i[1]<<8) | i[2];
+ break;
+ case 4:
+ *bits = (i[3]<<24) | (i[0]<<16) | (i[1]<<8) | i[2];
+ break;
+ }
+ i += image->d();
+ bits++;
+ }
+ i += image->ld();
+ }
+
+ // A mask bitmap is still needed even though it isn't used
+ mask = CreateBitmap(image->w(),image->h(),1,1,NULL);
+ if (mask == NULL) {
+ DeleteObject(bitmap);
+ return NULL;
+ }
+
+ ICONINFO ii;
+
+ ii.fIcon = is_icon;
+ ii.xHotspot = hotx;
+ ii.yHotspot = hoty;
+ ii.hbmMask = mask;
+ ii.hbmColor = bitmap;
+
+ icon = CreateIconIndirect(&ii);
+
+ DeleteObject(bitmap);
+ DeleteObject(mask);
+
+ if (icon == NULL)
+ return NULL;
+
+ return icon;
+}
+
+////////////////////////////////////////////////////////////////
+
+static HICON default_big_icon = NULL;
+static HICON default_small_icon = NULL;
+
+static const Fl_RGB_Image *find_best_icon(int ideal_width,
+ const Fl_RGB_Image *icons[],
+ int count) {
+ const Fl_RGB_Image *best;
+
+ best = NULL;
+
+ for (int i = 0;i < count;i++) {
+ if (best == NULL)
+ best = icons[i];
+ else {
+ if (best->w() < ideal_width) {
+ if (icons[i]->w() > best->w())
+ best = icons[i];
+ } else {
+ if ((icons[i]->w() >= ideal_width) &&
+ (icons[i]->w() < best->w()))
+ best = icons[i];
+ }
+ }
+ }
+
+ return best;
+}
+
+void Fl_X::set_default_icons(const Fl_RGB_Image *icons[], int count) {
+ const Fl_RGB_Image *best_big, *best_small;
+
+ if (default_big_icon != NULL)
+ DestroyIcon(default_big_icon);
+ if (default_small_icon != NULL)
+ DestroyIcon(default_small_icon);
+
+ default_big_icon = NULL;
+ default_small_icon = NULL;
+
+ best_big = find_best_icon(GetSystemMetrics(SM_CXICON), icons, count);
+ best_small = find_best_icon(GetSystemMetrics(SM_CXSMICON), icons, count);
+
+ if (best_big != NULL)
+ default_big_icon = image_to_icon(best_big, true, 0, 0);
+
+ if (best_small != NULL)
+ default_small_icon = image_to_icon(best_small, true, 0, 0);
+}
+
+void Fl_X::set_default_icons(HICON big_icon, HICON small_icon) {
+ if (default_big_icon != NULL)
+ DestroyIcon(default_big_icon);
+ if (default_small_icon != NULL)
+ DestroyIcon(default_small_icon);
+
+ default_big_icon = NULL;
+ default_small_icon = NULL;
+
+ if (big_icon != NULL)
+ default_big_icon = CopyIcon(big_icon);
+ if (small_icon != NULL)
+ default_small_icon = CopyIcon(small_icon);
+}
+
+void Fl_X::set_icons() {
+ HICON big_icon, small_icon;
+
+ // Windows doesn't copy the icons, so we have to "leak" them when
+ // setting, and clean up when we change to some other icons.
+ big_icon = (HICON)SendMessage(xid, WM_GETICON, ICON_BIG, 0);
+ if ((big_icon != NULL) && (big_icon != default_big_icon))
+ DestroyIcon(big_icon);
+ small_icon = (HICON)SendMessage(xid, WM_GETICON, ICON_SMALL, 0);
+ if ((small_icon != NULL) && (small_icon != default_small_icon))
+ DestroyIcon(small_icon);
+
+ big_icon = NULL;
+ small_icon = NULL;
+
+ if (w->icon_->count) {
+ const Fl_RGB_Image *best_big, *best_small;
+
+ best_big = find_best_icon(GetSystemMetrics(SM_CXICON),
+ (const Fl_RGB_Image **)w->icon_->icons,
+ w->icon_->count);
+ best_small = find_best_icon(GetSystemMetrics(SM_CXSMICON),
+ (const Fl_RGB_Image **)w->icon_->icons,
+ w->icon_->count);
+
+ if (best_big != NULL)
+ big_icon = image_to_icon(best_big, true, 0, 0);
+ if (best_small != NULL)
+ small_icon = image_to_icon(best_small, true, 0, 0);
+ } else {
+ if ((w->icon_->big_icon != NULL) || (w->icon_->small_icon != NULL)) {
+ big_icon = w->icon_->big_icon;
+ small_icon = w->icon_->small_icon;
+ } else {
+ big_icon = default_big_icon;
+ small_icon = default_small_icon;
+ }
+ }
+
+ SendMessage(xid, WM_SETICON, ICON_BIG, (LPARAM)big_icon);
+ SendMessage(xid, WM_SETICON, ICON_SMALL, (LPARAM)small_icon);
+}
+
+/** Sets the default window icons.
+
+ Convenience function to set the default icons using Windows'
+ native HICON icon handles.
+
+ The given icons are copied. You can free the icons immediately after
+ this call.
+
+ \param[in] big_icon default large icon for all windows
+ subsequently created
+ \param[in] small_icon default small icon for all windows
+ subsequently created
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::icons(HICON, HICON)
+ */
+void Fl_Window::default_icons(HICON big_icon, HICON small_icon) {
+ Fl_X::set_default_icons(big_icon, small_icon);
+}
+
+/** Sets the window icons.
+
+ Convenience function to set this window's icons using Windows'
+ native HICON icon handles.
+
+ The given icons are copied. You can free the icons immediately after
+ this call.
+
+ \param[in] big_icon large icon for this window
+ \param[in] small_icon small icon for this windows
+
+ \see Fl_Window::default_icon(const Fl_RGB_Image *)
+ \see Fl_Window::default_icons(const Fl_RGB_Image *[], int)
+ \see Fl_Window::default_icons(HICON, HICON)
+ \see Fl_Window::icon(const Fl_RGB_Image *)
+ \see Fl_Window::icons(const Fl_RGB_Image *[], int)
+ */
+void Fl_Window::icons(HICON big_icon, HICON small_icon) {
+ free_icons();
+
+ if (big_icon != NULL)
+ icon_->big_icon = CopyIcon(big_icon);
+ if (small_icon != NULL)
+ icon_->small_icon = CopyIcon(small_icon);
+
+ if (i)
+ i->set_icons();
+}
+
+////////////////////////////////////////////////////////////////
+
+#ifndef IDC_HAND
+# define IDC_HAND MAKEINTRESOURCE(32649)
+#endif // !IDC_HAND
+
+int Fl_X::set_cursor(Fl_Cursor c) {
+ LPSTR n;
+ HCURSOR new_cursor;
+
+ if (c == FL_CURSOR_NONE)
+ new_cursor = NULL;
+ else {
+ switch (c) {
+ case FL_CURSOR_ARROW: n = IDC_ARROW; break;
+ case FL_CURSOR_CROSS: n = IDC_CROSS; break;
+ case FL_CURSOR_WAIT: n = IDC_WAIT; break;
+ case FL_CURSOR_INSERT: n = IDC_IBEAM; break;
+ case FL_CURSOR_HAND: n = IDC_HAND; break;
+ case FL_CURSOR_HELP: n = IDC_HELP; break;
+ case FL_CURSOR_MOVE: n = IDC_SIZEALL; break;
+ case FL_CURSOR_N:
+ case FL_CURSOR_S:
+ // FIXME: Should probably have fallbacks for these instead
+ case FL_CURSOR_NS: n = IDC_SIZENS; break;
+ case FL_CURSOR_NE:
+ case FL_CURSOR_SW:
+ // FIXME: Dito.
+ case FL_CURSOR_NESW: n = IDC_SIZENESW; break;
+ case FL_CURSOR_E:
+ case FL_CURSOR_W:
+ // FIXME: Dito.
+ case FL_CURSOR_WE: n = IDC_SIZEWE; break;
+ case FL_CURSOR_SE:
+ case FL_CURSOR_NW:
+ // FIXME: Dito.
+ case FL_CURSOR_NWSE: n = IDC_SIZENWSE; break;
+ default:
+ return 0;
+ }
+
+ new_cursor = LoadCursor(NULL, n);
+ if (new_cursor == NULL)
+ return 0;
+ }
+
+ if ((cursor != NULL) && custom_cursor)
+ DestroyIcon(cursor);
+
+ cursor = new_cursor;
+ custom_cursor = 0;
+
+ SetCursor(cursor);
+
+ return 1;
+}
+
+int Fl_X::set_cursor(const Fl_RGB_Image *image, int hotx, int hoty) {
+ HCURSOR new_cursor;
+
+ new_cursor = image_to_icon(image, false, hotx, hoty);
+ if (new_cursor == NULL)
+ return 0;
+
+ if ((cursor != NULL) && custom_cursor)
+ DestroyIcon(cursor);
+
+ cursor = new_cursor;
+ custom_cursor = 1;
+
+ SetCursor(cursor);
+
+ return 1;
+}
+
+////////////////////////////////////////////////////////////////
// Implement the virtual functions for the base Fl_Window class:
// If the box is a filled rectangle, we can make the redisplay *look*
@@ -2166,5 +2761,5 @@ void preparePrintFront(void)
#endif // FL_DOXYGEN
//
-// End of "$Id: Fl_win32.cxx 9624 2012-06-21 08:52:29Z manolo $".
+// End of "$Id: Fl_win32.cxx 10387 2014-10-20 15:14:12Z ossman $".
//
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 5d8a8af..11d1b2f 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx 9699 2012-10-16 15:35:34Z manolo $"
+// "$Id: Fl_x.cxx 10412 2014-10-29 20:25:46Z cand $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -19,7 +19,7 @@
#ifdef WIN32
//# include "Fl_win32.cxx"
#elif defined(__APPLE__)
-//# include "Fl_mac.cxx"
+//# include "Fl_mac.cxx" // now Fl_cocoa.mm
#elif !defined(FL_DOXYGEN)
# define CONSOLIDATE_MOTION 1
@@ -34,15 +34,20 @@
# include <FL/Fl_Tooltip.H>
# include <FL/fl_draw.H>
# include <FL/Fl_Paged_Device.H>
+# include <FL/Fl_Shared_Image.H>
+# include <FL/fl_ask.H>
+# include <FL/filename.H>
# include <stdio.h>
# include <stdlib.h>
# include "flstring.h"
# include <unistd.h>
+# include <time.h>
# include <sys/time.h>
# include <X11/Xmd.h>
# include <X11/Xlocale.h>
# include <X11/Xlib.h>
# include <X11/keysym.h>
+# include "Xutf8.h"
#define USE_XRANDR (HAVE_DLSYM && HAVE_DLFCN_H) // means attempt to dynamically load libXrandr.so
#if USE_XRANDR
#include <dlfcn.h>
@@ -53,6 +58,17 @@ static XRRUpdateConfiguration_type XRRUpdateConfiguration_f;
static int randrEventBase; // base of RandR-defined events
#endif
+# if HAVE_XFIXES
+# include <X11/extensions/Xfixes.h>
+static int xfixes_event_base = 0;
+static bool have_xfixes = false;
+# endif
+
+# include <X11/cursorfont.h>
+
+# if HAVE_XCURSOR
+# include <X11/Xcursor/Xcursor.h>
+# endif
static Fl_Xlib_Graphics_Driver fl_xlib_driver;
static Fl_Display_Device fl_xlib_display(&fl_xlib_driver);
Fl_Display_Device *Fl_Display_Device::_display = &fl_xlib_display;// the platform display
@@ -177,6 +193,8 @@ void Fl::remove_fd(int n) {
remove_fd(n, -1);
}
+extern int fl_send_system_handlers(void *e);
+
#if CONSOLIDATE_MOTION
static Fl_Window* send_motion;
extern Fl_Window* fl_xmousewin;
@@ -187,6 +205,8 @@ static void do_queued_events() {
while (XEventsQueued(fl_display,QueuedAfterReading)) {
XEvent xevent;
XNextEvent(fl_display, &xevent);
+ if (fl_send_system_handlers(&xevent))
+ continue;
fl_handle(xevent);
}
// we send FL_LEAVE only if the mouse did not enter some other window:
@@ -296,9 +316,10 @@ Window fl_message_window = 0;
int fl_screen;
XVisualInfo *fl_visual;
Colormap fl_colormap;
-XIM fl_xim_im = 0;
+static XIM fl_xim_im = 0;
XIC fl_xim_ic = 0;
-char fl_is_over_the_spot = 0;
+static Window fl_xim_win = 0;
+static char fl_is_over_the_spot = 0;
static XRectangle status_area;
static Atom WM_DELETE_WINDOW;
@@ -306,6 +327,9 @@ static Atom WM_PROTOCOLS;
static Atom fl_MOTIF_WM_HINTS;
static Atom TARGETS;
static Atom CLIPBOARD;
+static Atom TIMESTAMP;
+static Atom PRIMARY_TIMESTAMP;
+static Atom CLIPBOARD_TIMESTAMP;
Atom fl_XdndAware;
Atom fl_XdndSelection;
Atom fl_XdndEnter;
@@ -318,19 +342,25 @@ Atom fl_XdndActionCopy;
Atom fl_XdndFinished;
//Atom fl_XdndProxy;
Atom fl_XdndURIList;
-Atom fl_Xatextplainutf;
-Atom fl_Xatextplainutf2; // STR#2930
-Atom fl_Xatextplain;
+static Atom fl_Xatextplainutf;
+static Atom fl_Xatextplainutf2; // STR#2930
+static Atom fl_Xatextplain;
static Atom fl_XaText;
-Atom fl_XaCompoundText;
+static Atom fl_XaCompoundText;
Atom fl_XaUtf8String;
-Atom fl_XaTextUriList;
-Atom fl_NET_WM_NAME; // utf8 aware window label
-Atom fl_NET_WM_ICON_NAME; // utf8 aware window icon name
-Atom fl_NET_SUPPORTING_WM_CHECK;
-Atom fl_NET_WM_STATE;
-Atom fl_NET_WM_STATE_FULLSCREEN;
-Atom fl_NET_WORKAREA;
+static Atom fl_XaTextUriList;
+static Atom fl_XaImageBmp;
+static Atom fl_XaImagePNG;
+static Atom fl_INCR;
+static Atom fl_NET_WM_NAME; // utf8 aware window label
+static Atom fl_NET_WM_ICON_NAME; // utf8 aware window icon name
+static Atom fl_NET_SUPPORTING_WM_CHECK;
+static Atom fl_NET_WM_STATE;
+static Atom fl_NET_WM_STATE_FULLSCREEN;
+static Atom fl_NET_WM_FULLSCREEN_MONITORS;
+static Atom fl_NET_WORKAREA;
+static Atom fl_NET_WM_ICON;
+static Atom fl_NET_ACTIVE_WINDOW;
/*
X defines 32-bit-entities to have a format value of max. 32,
@@ -362,14 +392,14 @@ extern "C" {
extern char *fl_get_font_xfld(int fnum, int size);
-void fl_new_ic()
+static void fl_new_ic()
{
XVaNestedList preedit_attr = NULL;
XVaNestedList status_attr = NULL;
static XFontSet fs = NULL;
char *fnt;
- char **missing_list;
- int missing_count;
+ char **missing_list = 0;
+ int missing_count = 0;
char *def_string;
static XRectangle spot;
int predit = 0;
@@ -397,6 +427,9 @@ void fl_new_ic()
if (must_free_fnt) free(fnt);
}
#endif
+
+ if (missing_list) XFreeStringList(missing_list);
+
preedit_attr = XVaCreateNestedList(0,
XNSpotLocation, &spot,
XNFontSet, fs, NULL);
@@ -539,7 +572,7 @@ void fl_set_status(int x, int y, int w, int h)
XFree(status_attr);
}
-void fl_init_xim() {
+static void fl_init_xim() {
static int xim_warning = 2;
if (xim_warning > 0) xim_warning--;
@@ -584,6 +617,55 @@ void fl_init_xim() {
if(xim_styles) XFree(xim_styles);
}
+void fl_xim_deactivate(void);
+
+void fl_xim_activate(Window xid) {
+ if (!fl_xim_im)
+ return;
+
+ // If the focused window has changed, then use the brute force method
+ // of completely recreating the input context.
+ if (fl_xim_win != xid) {
+ fl_xim_deactivate();
+
+ fl_new_ic();
+ fl_xim_win = xid;
+
+ XSetICValues(fl_xim_ic,
+ XNFocusWindow, fl_xim_win,
+ XNClientWindow, fl_xim_win,
+ NULL);
+ }
+
+ fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
+}
+
+void fl_xim_deactivate(void) {
+ if (!fl_xim_ic)
+ return;
+
+ XDestroyIC(fl_xim_ic);
+ fl_xim_ic = NULL;
+
+ fl_xim_win = 0;
+}
+
+void Fl::enable_im() {
+ Fl_Window *win;
+
+ win = Fl::first_window();
+ if (win && win->shown()) {
+ fl_xim_activate(fl_xid(win));
+ XSetICFocus(fl_xim_ic);
+ } else {
+ fl_new_ic();
+ }
+}
+
+void Fl::disable_im() {
+ fl_xim_deactivate();
+}
+
void fl_open_display() {
if (fl_display) return;
@@ -608,6 +690,9 @@ void fl_open_display(Display* d) {
fl_MOTIF_WM_HINTS = XInternAtom(d, "_MOTIF_WM_HINTS", 0);
TARGETS = XInternAtom(d, "TARGETS", 0);
CLIPBOARD = XInternAtom(d, "CLIPBOARD", 0);
+ TIMESTAMP = XInternAtom(d, "TIMESTAMP", 0);
+ PRIMARY_TIMESTAMP = XInternAtom(d, "PRIMARY_TIMESTAMP", 0);
+ CLIPBOARD_TIMESTAMP = XInternAtom(d, "CLIPBOARD_TIMESTAMP", 0);
fl_XdndAware = XInternAtom(d, "XdndAware", 0);
fl_XdndSelection = XInternAtom(d, "XdndSelection", 0);
fl_XdndEnter = XInternAtom(d, "XdndEnter", 0);
@@ -628,12 +713,18 @@ void fl_open_display(Display* d) {
fl_XaCompoundText = XInternAtom(d, "COMPOUND_TEXT", 0);
fl_XaUtf8String = XInternAtom(d, "UTF8_STRING", 0);
fl_XaTextUriList = XInternAtom(d, "text/uri-list", 0);
+ fl_XaImageBmp = XInternAtom(d, "image/bmp", 0);
+ fl_XaImagePNG = XInternAtom(d, "image/png", 0);
+ fl_INCR = XInternAtom(d, "INCR", 0);
fl_NET_WM_NAME = XInternAtom(d, "_NET_WM_NAME", 0);
fl_NET_WM_ICON_NAME = XInternAtom(d, "_NET_WM_ICON_NAME", 0);
fl_NET_SUPPORTING_WM_CHECK = XInternAtom(d, "_NET_SUPPORTING_WM_CHECK", 0);
fl_NET_WM_STATE = XInternAtom(d, "_NET_WM_STATE", 0);
fl_NET_WM_STATE_FULLSCREEN = XInternAtom(d, "_NET_WM_STATE_FULLSCREEN", 0);
+ fl_NET_WM_FULLSCREEN_MONITORS = XInternAtom(d, "_NET_WM_FULLSCREEN_MONITORS", 0);
fl_NET_WORKAREA = XInternAtom(d, "_NET_WORKAREA", 0);
+ fl_NET_WM_ICON = XInternAtom(d, "_NET_WM_ICON", 0);
+ fl_NET_ACTIVE_WINDOW = XInternAtom(d, "_NET_ACTIVE_WINDOW", 0);
if (sizeof(Atom) < 4)
atom_bits = sizeof(Atom) * 8;
@@ -655,6 +746,15 @@ void fl_open_display(Display* d) {
#if !USE_COLORMAP
Fl::visual(FL_RGB);
#endif
+
+#if HAVE_XFIXES
+ int error_base;
+ if (XFixesQueryExtension(fl_display, &xfixes_event_base, &error_base))
+ have_xfixes = true;
+ else
+ have_xfixes = false;
+#endif
+
#if USE_XRANDR
void *libxrandr_addr = dlopen("libXrandr.so.2", RTLD_LAZY);
if (!libxrandr_addr) libxrandr_addr = dlopen("libXrandr.so", RTLD_LAZY);
@@ -688,7 +788,7 @@ static void fl_init_workarea() {
Atom actual;
unsigned long count, remaining;
int format;
- unsigned *xywh;
+ long *xywh = 0;
/* If there are several screens, the _NET_WORKAREA property
does not give the work area of the main screen, but that of all screens together.
@@ -696,7 +796,7 @@ static void fl_init_workarea() {
and fall back to the main screen full area when there are several screens.
*/
if (Fl::screen_count() > 1 || XGetWindowProperty(fl_display, RootWindow(fl_display, fl_screen),
- fl_NET_WORKAREA, 0, 4 * sizeof(unsigned), False,
+ fl_NET_WORKAREA, 0, 4, False,
XA_CARDINAL, &actual, &format, &count, &remaining,
(unsigned char **)&xywh) || !xywh || !xywh[2] ||
!xywh[3])
@@ -712,8 +812,8 @@ static void fl_init_workarea() {
fl_workarea_xywh[1] = (int)xywh[1];
fl_workarea_xywh[2] = (int)xywh[2];
fl_workarea_xywh[3] = (int)xywh[3];
- XFree(xywh);
}
+ if ( xywh ) { XFree(xywh); xywh = 0; }
}
int Fl::x() {
@@ -751,15 +851,18 @@ void Fl::get_mouse(int &xx, int &yy) {
Fl_Widget *fl_selection_requestor;
char *fl_selection_buffer[2];
int fl_selection_length[2];
+const char * fl_selection_type[2];
int fl_selection_buffer_length[2];
char fl_i_own_selection[2] = {0,0};
// Call this when a "paste" operation happens:
-void Fl::paste(Fl_Widget &receiver, int clipboard) {
+void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) {
if (fl_i_own_selection[clipboard]) {
// We already have it, do it quickly without window server.
// Notice that the text is clobbered if set_selection is
// called in response to FL_PASTE!
+ // However, for now, we only paste text in this function
+ if (fl_selection_type[clipboard] != Fl::clipboard_plain_text) return; //TODO: allow copy/paste of image within same app
Fl::e_text = fl_selection_buffer[clipboard];
Fl::e_length = fl_selection_length[clipboard];
if (!Fl::e_text) Fl::e_text = (char *)"";
@@ -769,15 +872,65 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) {
// otherwise get the window server to return it:
fl_selection_requestor = &receiver;
Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
+ Fl::e_clipboard_type = type;
XConvertSelection(fl_display, property, TARGETS, property,
fl_xid(Fl::first_window()), fl_event_time);
}
-Window fl_dnd_source_window;
-Atom *fl_dnd_source_types; // null-terminated list of data types being supplied
-Atom fl_dnd_type;
-Atom fl_dnd_source_action;
-Atom fl_dnd_action;
+int Fl::clipboard_contains(const char *type)
+{
+ XEvent event;
+ Atom actual; int format; unsigned long count, remaining, i = 0;
+ unsigned char* portion = NULL;
+ Fl_Window *win = Fl::first_window();
+ if (!win || !fl_xid(win)) return 0;
+ XConvertSelection(fl_display, CLIPBOARD, TARGETS, CLIPBOARD, fl_xid(win), CurrentTime);
+ XFlush(fl_display);
+ do {
+ XNextEvent(fl_display, &event);
+ if (event.type == SelectionNotify && event.xselection.property == None) return 0;
+ i++;
+ }
+ while (i < 10 && event.type != SelectionNotify);
+ if (i >= 10) return 0;
+ XGetWindowProperty(fl_display,
+ event.xselection.requestor,
+ event.xselection.property,
+ 0, 4000, 0, 0,
+ &actual, &format, &count, &remaining, &portion);
+ if (actual != XA_ATOM) return 0;
+ Atom t;
+ int retval = 0;
+ if (strcmp(type, Fl::clipboard_plain_text) == 0) {
+ for (i = 0; i<count; i++) { // searching for text data
+ t = ((Atom*)portion)[i];
+ if (t == fl_Xatextplainutf ||
+ t == fl_Xatextplainutf2 ||
+ t == fl_Xatextplain ||
+ t == fl_XaUtf8String) {
+ retval = 1;
+ break;
+ }
+ }
+ }
+ else if (strcmp(type, Fl::clipboard_image) == 0) {
+ for (i = 0; i<count; i++) { // searching for image data
+ t = ((Atom*)portion)[i];
+ if (t == fl_XaImageBmp || t == fl_XaImagePNG) {
+ retval = 1;
+ break;
+ }
+ }
+ }
+ XFree(portion);
+ return retval;
+}
+
+static Window fl_dnd_source_window;
+static Atom *fl_dnd_source_types; // null-terminated list of data types being supplied
+static Atom fl_dnd_type;
+static Atom fl_dnd_source_action;
+static Atom fl_dnd_action;
void fl_sendClientMessage(Window window, Atom message,
unsigned long d0,
@@ -800,9 +953,19 @@ void fl_sendClientMessage(Window window, Atom message,
}
-/*
- Get window property value (32 bit format)
+/*
+ Get window property value (32 bit format)
Returns zero on success, -1 on error
+
+ 'data' should be freed with XFree() using this pattern:
+
+ unsigned long *data = 0;
+ if (0 == get_xwinprop(....., &nitems, &data) ) { ..success.. }
+ else { ..fail.. }
+ if ( data ) { XFree(data); data=0; }
+
+ Note: 'data' can be non-zero, even if the return value is -1 (error) and
+ should hence be XFree'd *after* the if/else statement, as described above.
*/
static int get_xwinprop(Window wnd, Atom prop, long max_length,
unsigned long *nitems, unsigned long **data) {
@@ -827,7 +990,7 @@ static int get_xwinprop(Window wnd, Atom prop, long max_length,
////////////////////////////////////////////////////////////////
// Code for copying to clipboard and DnD out of the program:
-void Fl::copy(const char *stuff, int len, int clipboard) {
+void Fl::copy(const char *stuff, int len, int clipboard, const char *type) {
if (!stuff || len<0) return;
if (len+1 > fl_selection_buffer_length[clipboard]) {
delete[] fl_selection_buffer[clipboard];
@@ -838,11 +1001,183 @@ void Fl::copy(const char *stuff, int len, int clipboard) {
fl_selection_buffer[clipboard][len] = 0; // needed for direct paste
fl_selection_length[clipboard] = len;
fl_i_own_selection[clipboard] = 1;
+ fl_selection_type[clipboard] = Fl::clipboard_plain_text;
+ Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
+ XSetSelectionOwner(fl_display, property, fl_message_window, fl_event_time);
+}
+
+static void write_short(unsigned char **cp,short i){
+ unsigned char *c=*cp;
+ *c++=i&0xFF;i>>=8;
+ *c++=i&0xFF;i>>=8;
+ *cp=c;
+}
+
+static void write_int(unsigned char **cp,int i){
+ unsigned char *c=*cp;
+ *c++=i&0xFF;i>>=8;
+ *c++=i&0xFF;i>>=8;
+ *c++=i&0xFF;i>>=8;
+ *c++=i&0xFF;i>>=8;
+ *cp=c;
+}
+
+static unsigned char *create_bmp(const unsigned char *data, int W, int H, int *return_size){
+ int R=(3*W+3)/4 * 4; // the number of bytes per row, rounded up to multiple of 4
+ int s=H*R;
+ int fs=14+40+s;
+ unsigned char *b=new unsigned char[fs];
+ unsigned char *c=b;
+ // BMP header
+ *c++='B';
+ *c++='M';
+ write_int(&c,fs);
+ write_int(&c,0);
+ write_int(&c,14+40);
+ // DIB header:
+ write_int(&c,40);
+ write_int(&c,W);
+ write_int(&c,H);
+ write_short(&c,1);
+ write_short(&c,24);//bits ber pixel
+ write_int(&c,0);//RGB
+ write_int(&c,s);
+ write_int(&c,0);// horizontal resolution
+ write_int(&c,0);// vertical resolution
+ write_int(&c,0);//number of colors. 0 -> 1<<bits_per_pixel
+ write_int(&c,0);
+ // Pixel data
+ data+=3*W*H;
+ for (int y=0;y<H;++y){
+ data-=3*W;
+ const unsigned char *s=data;
+ unsigned char *p=c;
+ for (int x=0;x<W;++x){
+ *p++=s[2];
+ *p++=s[1];
+ *p++=s[0];
+ s+=3;
+ }
+ c+=R;
+ }
+ *return_size = fs;
+ return b;
+}
+
+void Fl::copy_image(const unsigned char *data, int W, int H, int clipboard){
+ if(!data || W<=0 || H<=0) return;
+ delete[] fl_selection_buffer[clipboard];
+ fl_selection_buffer[clipboard] = (char *) create_bmp(data,W,H,&fl_selection_length[clipboard]);
+ fl_selection_buffer_length[clipboard] = fl_selection_length[clipboard];
+ fl_i_own_selection[clipboard] = 1;
+ fl_selection_type[clipboard] = Fl::clipboard_image;
+
Atom property = clipboard ? CLIPBOARD : XA_PRIMARY;
XSetSelectionOwner(fl_display, property, fl_message_window, fl_event_time);
}
////////////////////////////////////////////////////////////////
+// Code for tracking clipboard changes:
+
+static Time primary_timestamp = (Time)-1;
+static Time clipboard_timestamp = (Time)-1;
+
+extern bool fl_clipboard_notify_empty(void);
+extern void fl_trigger_clipboard_notify(int source);
+
+static void poll_clipboard_owner(void) {
+ Window xid;
+
+#if HAVE_XFIXES
+ // No polling needed with Xfixes
+ if (have_xfixes)
+ return;
+#endif
+
+ // No one is interested, so no point polling
+ if (fl_clipboard_notify_empty())
+ return;
+
+ // We need a window for this to work
+ if (!Fl::first_window())
+ return;
+ xid = fl_xid(Fl::first_window());
+ if (!xid)
+ return;
+
+ // Request an update of the selection time for both the primary and
+ // clipboard selections. Magic continues when we get a SelectionNotify.
+ if (!fl_i_own_selection[0])
+ XConvertSelection(fl_display, XA_PRIMARY, TIMESTAMP, PRIMARY_TIMESTAMP,
+ xid, fl_event_time);
+ if (!fl_i_own_selection[1])
+ XConvertSelection(fl_display, CLIPBOARD, TIMESTAMP, CLIPBOARD_TIMESTAMP,
+ xid, fl_event_time);
+}
+
+static void clipboard_timeout(void *data)
+{
+ // No one is interested, so stop polling
+ if (fl_clipboard_notify_empty())
+ return;
+
+ poll_clipboard_owner();
+
+ Fl::repeat_timeout(0.5, clipboard_timeout);
+}
+
+static void handle_clipboard_timestamp(int clipboard, Time time)
+{
+ Time *timestamp;
+
+ timestamp = clipboard ? &clipboard_timestamp : &primary_timestamp;
+
+#if HAVE_XFIXES
+ if (!have_xfixes)
+#endif
+ {
+ // Initial scan, just store the value
+ if (*timestamp == (Time)-1) {
+ *timestamp = time;
+ return;
+ }
+ }
+
+ // Same selection
+ if (time == *timestamp)
+ return;
+
+ *timestamp = time;
+
+ // The clipboard change is the event that caused us to request
+ // the clipboard data, so use that time as the latest event.
+ if (time > fl_event_time)
+ fl_event_time = time;
+
+ // Something happened! Let's tell someone!
+ fl_trigger_clipboard_notify(clipboard);
+}
+
+void fl_clipboard_notify_change() {
+ // Reset the timestamps if we've going idle so that you don't
+ // get a bogus immediate trigger next time they're activated.
+ if (fl_clipboard_notify_empty()) {
+ primary_timestamp = (Time)-1;
+ clipboard_timestamp = (Time)-1;
+ } else {
+#if HAVE_XFIXES
+ if (!have_xfixes)
+#endif
+ {
+ poll_clipboard_owner();
+
+ if (!Fl::has_timeout(clipboard_timeout))
+ Fl::add_timeout(0.5, clipboard_timeout);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////
const XEvent* fl_xevent; // the current x event
ulong fl_event_time; // the last timestamp from an x event
@@ -914,16 +1249,78 @@ static int wasXExceptionRaised() {
}
+static bool getNextEvent(XEvent *event_return)
+{
+ time_t t = time(NULL);
+ while(!XPending(fl_display))
+ {
+ if(time(NULL) - t > 10.0)
+ {
+ //fprintf(stderr,"Error: The XNextEvent never came...\n");
+ return false;
+ }
+ }
+ XNextEvent(fl_display, event_return);
+ return true;
+}
+
+static long getIncrData(uchar* &data, const XSelectionEvent& selevent, long lower_bound)
+{
+//fprintf(stderr,"Incremental transfer starting due to INCR property\n");
+ size_t total = 0;
+ XEvent event;
+ XDeleteProperty(fl_display, selevent.requestor, selevent.property);
+ data = (uchar*)realloc(data, lower_bound);
+ for (;;)
+ {
+ if (!getNextEvent(&event)) break;
+ if (event.type == PropertyNotify)
+ {
+ if (event.xproperty.state != PropertyNewValue) continue;
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems;
+ unsigned long bytes_after;
+ unsigned char* prop = 0;
+ long offset = 0;
+ size_t num_bytes;
+ //size_t slice_size = 0;
+ do
+ {
+ XGetWindowProperty(fl_display, selevent.requestor, selevent.property, offset, 70000, True,
+ AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, &prop);
+ num_bytes = nitems * (actual_format / 8);
+ offset += num_bytes/4;
+ //slice_size += num_bytes;
+ if (total + num_bytes > (size_t)lower_bound) data = (uchar*)realloc(data, total + num_bytes);
+ memcpy(data + total, prop, num_bytes); total += num_bytes;
+ if (prop) XFree(prop);
+ } while (bytes_after != 0);
+//fprintf(stderr,"INCR data size:%ld\n", slice_size);
+ if (num_bytes == 0) break;
+ }
+ else break;
+ }
+ XDeleteProperty(fl_display, selevent.requestor, selevent.property);
+ return (long)total;
+}
+
+/* Internal function to reduce "deprecated" warnings for XKeycodeToKeysym().
+ This way we get only one warning. The option to use XkbKeycodeToKeysym()
+ instead would not help much - see STR #2913 for more information.
+*/
+static KeySym fl_KeycodeToKeysym(Display *d, KeyCode k, unsigned i) {
+ return XKeycodeToKeysym(d, k, i);
+}
int fl_handle(const XEvent& thisevent)
{
XEvent xevent = thisevent;
fl_xevent = &thisevent;
Window xid = xevent.xany.window;
- static Window xim_win = 0;
if (fl_xim_ic && xevent.type == DestroyNotify &&
- xid != xim_win && !fl_find(xid))
+ xid != fl_xim_win && !fl_find(xid))
{
XIM xim_im;
xim_im = XOpenIM(fl_display, NULL, NULL, NULL);
@@ -939,46 +1336,9 @@ int fl_handle(const XEvent& thisevent)
}
if (fl_xim_ic && (xevent.type == FocusIn))
- {
-#define POOR_XIM
-#ifdef POOR_XIM
- if (xim_win != xid)
- {
- xim_win = xid;
- XDestroyIC(fl_xim_ic);
- fl_xim_ic = NULL;
- fl_new_ic();
- XSetICValues(fl_xim_ic,
- XNFocusWindow, xevent.xclient.window,
- XNClientWindow, xid,
- NULL);
- }
- fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
-#else
- if (Fl::first_window() && Fl::first_window()->modal()) {
- Window x = fl_xid(Fl::first_window());
- if (x != xim_win) {
- xim_win = x;
- XSetICValues(fl_xim_ic,
- XNFocusWindow, xim_win,
- XNClientWindow, xim_win,
- NULL);
- fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
- }
- } else if (xim_win != xid && xid) {
- xim_win = xid;
- XSetICValues(fl_xim_ic,
- XNFocusWindow, xevent.xclient.window,
- XNClientWindow, xid,
- //XNFocusWindow, xim_win,
- //XNClientWindow, xim_win,
- NULL);
- fl_set_spot(spotf, spots, spot.x, spot.y, spot.width, spot.height);
- }
-#endif
- }
+ fl_xim_activate(xid);
- if ( XFilterEvent((XEvent *)&xevent, 0) )
+ if (fl_xim_ic && XFilterEvent((XEvent *)&xevent, 0))
return(1);
#if USE_XRANDR
@@ -1005,9 +1365,9 @@ int fl_handle(const XEvent& thisevent)
return 0;
case SelectionNotify: {
- if (!fl_selection_requestor) return 0;
- static unsigned char* buffer = 0;
- if (buffer) {XFree(buffer); buffer = 0;}
+ static unsigned char* sn_buffer = 0;
+ //static const char *buffer_format = 0;
+ if (sn_buffer) {XFree(sn_buffer); sn_buffer = 0;}
long bytesread = 0;
if (fl_xevent->xselection.property) for (;;) {
// The Xdnd code pastes 64K chunks together, possibly to avoid
@@ -1018,13 +1378,42 @@ int fl_handle(const XEvent& thisevent)
if (XGetWindowProperty(fl_display,
fl_xevent->xselection.requestor,
fl_xevent->xselection.property,
- bytesread/4, 65536, 1, 0,
+ bytesread/4, 65536, 1, AnyPropertyType,
&actual, &format, &count, &remaining,
&portion)) break; // quit on error
+
+ if ((fl_xevent->xselection.property == PRIMARY_TIMESTAMP) ||
+ (fl_xevent->xselection.property == CLIPBOARD_TIMESTAMP)) {
+ if (portion && format == 32 && count == 1) {
+ Time t = *(unsigned int*)portion;
+ if (fl_xevent->xselection.property == CLIPBOARD_TIMESTAMP)
+ handle_clipboard_timestamp(1, t);
+ else
+ handle_clipboard_timestamp(0, t);
+ }
+ XFree(portion); portion = 0;
+ return true;
+ }
+
if (actual == TARGETS || actual == XA_ATOM) {
- Atom type = XA_STRING;
- for (unsigned i = 0; i<count; i++) {
- Atom t = ((Atom*)portion)[i];
+/*for (unsigned i = 0; i<count; i++) {
+ fprintf(stderr," %s", XGetAtomName(fl_display, ((Atom*)portion)[i]) );
+ }
+fprintf(stderr,"\n");*/
+ Atom t, type = XA_STRING;
+ if (Fl::e_clipboard_type == Fl::clipboard_image) { // searching for image data
+ for (unsigned i = 0; i<count; i++) {
+ t = ((Atom*)portion)[i];
+ if (t == fl_XaImageBmp || t == fl_XaImagePNG) {
+ type = t;
+ goto found;
+ }
+ }
+ XFree(portion);
+ return true;
+ }
+ for (unsigned i = 0; i<count; i++) { // searching for text data
+ t = ((Atom*)portion)[i];
if (t == fl_Xatextplainutf ||
t == fl_Xatextplainutf2 ||
t == fl_Xatextplain ||
@@ -1037,39 +1426,84 @@ int fl_handle(const XEvent& thisevent)
t == fl_XaTextUriList ||
t == fl_XaCompoundText) type = t;
}
- XFree(portion);
+ found:
+ XFree(portion); portion = 0;
Atom property = xevent.xselection.property;
XConvertSelection(fl_display, property, type, property,
fl_xid(Fl::first_window()),
fl_event_time);
+ if (type == fl_XaImageBmp) {
+ Fl::e_clipboard_type = Fl::clipboard_image;
+ //buffer_format = "image/bmp";
+ }
+ else if (type == fl_XaImagePNG) {
+ Fl::e_clipboard_type = Fl::clipboard_image;
+ //buffer_format = "image/png";
+ }
+ else {
+ Fl::e_clipboard_type = Fl::clipboard_plain_text;
+ //buffer_format = Fl::clipboard_plain_text;
+ }
+//fprintf(stderr,"used format=%s\n", buffer_format);
return true;
}
- // Make sure we got something sane...
+ if (actual == fl_INCR) {
+ bytesread = getIncrData(sn_buffer, xevent.xselection, *(long*)portion);
+ XFree(portion);
+ break;
+ }
+ // Make sure we got something sane...
if ((portion == NULL) || (format != 8) || (count == 0)) {
- if (portion) XFree(portion);
+ if (portion) { XFree(portion); portion = 0; }
return true;
- }
- buffer = (unsigned char*)realloc(buffer, bytesread+count+remaining+1);
- memcpy(buffer+bytesread, portion, count);
- XFree(portion);
+ }
+ sn_buffer = (unsigned char*)realloc(sn_buffer, bytesread+count+remaining+1);
+ memcpy(sn_buffer+bytesread, portion, count);
+ if (portion) { XFree(portion); portion = 0; }
bytesread += count;
// Cannot trust data to be null terminated
- buffer[bytesread] = '\0';
+ sn_buffer[bytesread] = '\0';
if (!remaining) break;
}
- if (buffer) {
- buffer[bytesread] = 0;
- convert_crlf(buffer, bytesread);
+ if (sn_buffer && Fl::e_clipboard_type == Fl::clipboard_plain_text) {
+ sn_buffer[bytesread] = 0;
+ convert_crlf(sn_buffer, bytesread);
+ }
+ if (Fl::e_clipboard_type == Fl::clipboard_image) {
+ if (bytesread == 0) return 0;
+ Fl_Image *image = 0;
+ static char tmp_fname[21];
+ static Fl_Shared_Image *shared = 0;
+ strcpy(tmp_fname, "/tmp/clipboardXXXXXX");
+ int fd = mkstemp(tmp_fname);
+ if (fd == -1) return 0;
+ uchar *p = sn_buffer; ssize_t towrite = bytesread, written;
+ while (towrite) {
+ written = write(fd, p, towrite);
+ p += written; towrite -= written;
+ }
+ close(fd);
+ free(sn_buffer); sn_buffer = 0;
+ shared = Fl_Shared_Image::get(tmp_fname);
+ unlink(tmp_fname);
+ if (!shared) return 0;
+ image = shared->copy();
+ shared->release();
+ Fl::e_clipboard_data = (void*)image;
}
- Fl::e_text = buffer ? (char*)buffer : (char *)"";
- Fl::e_length = bytesread;
+ if (!fl_selection_requestor) return 0;
+
+ if (Fl::e_clipboard_type == Fl::clipboard_plain_text) {
+ Fl::e_text = sn_buffer ? (char*)sn_buffer : (char *)"";
+ Fl::e_length = bytesread;
+ }
int old_event = Fl::e_number;
fl_selection_requestor->handle(Fl::e_number = FL_PASTE);
Fl::e_number = old_event;
// Detect if this paste is due to Xdnd by the property name (I use
// XA_SECONDARY for that) and send an XdndFinished message. It is not
// clear if this has to be delayed until now or if it can be done
- // immediatly after calling XConvertSelection.
+ // immediately after calling XConvertSelection.
if (fl_xevent->xselection.property == XA_SECONDARY &&
fl_dnd_source_window) {
fl_sendClientMessage(fl_dnd_source_window, fl_XdndFinished,
@@ -1081,6 +1515,7 @@ int fl_handle(const XEvent& thisevent)
case SelectionClear: {
int clipboard = fl_xevent->xselectionclear.selection == CLIPBOARD;
fl_i_own_selection[clipboard] = 0;
+ poll_clipboard_owner();
return 1;}
case SelectionRequest: {
@@ -1092,32 +1527,51 @@ int fl_handle(const XEvent& thisevent)
e.target = fl_xevent->xselectionrequest.target;
e.time = fl_xevent->xselectionrequest.time;
e.property = fl_xevent->xselectionrequest.property;
- if (e.target == TARGETS) {
- Atom a[3] = {fl_XaUtf8String, XA_STRING, fl_XaText};
- XChangeProperty(fl_display, e.requestor, e.property,
- XA_ATOM, atom_bits, 0, (unsigned char*)a, 3);
- } else if (/*e.target == XA_STRING &&*/ fl_selection_length[clipboard]) {
- if (e.target == fl_XaUtf8String ||
- e.target == XA_STRING ||
- e.target == fl_XaCompoundText ||
- e.target == fl_XaText ||
- e.target == fl_Xatextplain ||
- e.target == fl_Xatextplainutf ||
- e.target == fl_Xatextplainutf2) {
- // clobber the target type, this seems to make some applications
- // behave that insist on asking for XA_TEXT instead of UTF8_STRING
- // Does not change XA_STRING as that breaks xclipboard.
- if (e.target != XA_STRING) e.target = fl_XaUtf8String;
+ if (fl_selection_type[clipboard] == Fl::clipboard_plain_text) {
+ if (e.target == TARGETS) {
+ Atom a[3] = {fl_XaUtf8String, XA_STRING, fl_XaText};
+ XChangeProperty(fl_display, e.requestor, e.property,
+ XA_ATOM, atom_bits, 0, (unsigned char*)a, 3);
+ } else {
+ if (/*e.target == XA_STRING &&*/ fl_selection_length[clipboard]) {
+ if (e.target == fl_XaUtf8String ||
+ e.target == XA_STRING ||
+ e.target == fl_XaCompoundText ||
+ e.target == fl_XaText ||
+ e.target == fl_Xatextplain ||
+ e.target == fl_Xatextplainutf ||
+ e.target == fl_Xatextplainutf2) {
+ // clobber the target type, this seems to make some applications
+ // behave that insist on asking for XA_TEXT instead of UTF8_STRING
+ // Does not change XA_STRING as that breaks xclipboard.
+ if (e.target != XA_STRING) e.target = fl_XaUtf8String;
+ XChangeProperty(fl_display, e.requestor, e.property,
+ e.target, 8, 0,
+ (unsigned char *)fl_selection_buffer[clipboard],
+ fl_selection_length[clipboard]);
+ }
+ } else {
+ // char* x = XGetAtomName(fl_display,e.target);
+ // fprintf(stderr,"selection request of %s\n",x);
+ // XFree(x);
+ e.property = 0;
+ }
+ }
+ } else { // image in clipboard
+ if (e.target == TARGETS) {
+ Atom a[1] = {fl_XaImageBmp};
XChangeProperty(fl_display, e.requestor, e.property,
- e.target, 8, 0,
- (unsigned char *)fl_selection_buffer[clipboard],
- fl_selection_length[clipboard]);
+ XA_ATOM, atom_bits, 0, (unsigned char*)a, 1);
+ } else {
+ if (e.target == fl_XaImageBmp && fl_selection_length[clipboard]) {
+ XChangeProperty(fl_display, e.requestor, e.property,
+ e.target, 8, 0,
+ (unsigned char *)fl_selection_buffer[clipboard],
+ fl_selection_length[clipboard]);
+ } else {
+ e.property = 0;
+ }
}
- } else {
-// char* x = XGetAtomName(fl_display,e.target);
-// fprintf(stderr,"selection request of %s\n",x);
-// XFree(x);
- e.property = 0;
}
XSendEvent(fl_display, e.requestor, 0, 0, (XEvent *)&e);}
return 1;
@@ -1170,18 +1624,21 @@ int fl_handle(const XEvent& thisevent)
if (data[1]&1) {
// get list of data types:
Atom actual; int format; unsigned long count, remaining;
- unsigned char *buffer = 0;
+ unsigned char *cm_buffer = 0;
XGetWindowProperty(fl_display, fl_dnd_source_window, fl_XdndTypeList,
0, 0x8000000L, False, XA_ATOM, &actual, &format,
- &count, &remaining, &buffer);
- if (actual != XA_ATOM || format != 32 || count<4 || !buffer)
+ &count, &remaining, &cm_buffer);
+ if (actual != XA_ATOM || format != 32 || count<4 || !cm_buffer) {
+ if ( cm_buffer ) { XFree(cm_buffer); cm_buffer = 0; }
goto FAILED;
+ }
delete [] fl_dnd_source_types;
fl_dnd_source_types = new Atom[count+1];
for (unsigned i = 0; i < count; i++) {
- fl_dnd_source_types[i] = ((Atom*)buffer)[i];
+ fl_dnd_source_types[i] = ((Atom*)cm_buffer)[i];
}
fl_dnd_source_types[count] = 0;
+ XFree(cm_buffer); cm_buffer = 0;
} else {
FAILED:
// less than four data types, or if the above messes up:
@@ -1258,6 +1715,7 @@ int fl_handle(const XEvent& thisevent)
Fl::e_length = unknown_len;
if (Fl::handle(FL_DND_RELEASE, window)) {
fl_selection_requestor = Fl::belowmouse();
+ Fl::e_clipboard_type = Fl::clipboard_plain_text;
XConvertSelection(fl_display, fl_XdndSelection,
fl_dnd_type, XA_SECONDARY,
to_window, fl_event_time);
@@ -1295,6 +1753,9 @@ int fl_handle(const XEvent& thisevent)
case FocusIn:
if (fl_xim_ic) XSetICFocus(fl_xim_ic);
event = FL_FOCUS;
+ // If the user has toggled from another application to this one,
+ // then it's a good time to check for clipboard changes.
+ poll_clipboard_owner();
break;
case FocusOut:
@@ -1307,13 +1768,13 @@ int fl_handle(const XEvent& thisevent)
KEYPRESS:
int keycode = xevent.xkey.keycode;
fl_key_vector[keycode/8] |= (1 << (keycode%8));
- static char *buffer = NULL;
- static int buffer_len = 0;
+ static char *kp_buffer = NULL;
+ static int kp_buffer_len = 0;
int len=0;
KeySym keysym;
- if (buffer_len == 0) {
- buffer_len = 4096;
- buffer = (char*) malloc(buffer_len);
+ if (kp_buffer_len == 0) {
+ kp_buffer_len = 4096;
+ kp_buffer = (char*) malloc(kp_buffer_len);
}
if (xevent.type == KeyPress) {
event = FL_KEYDOWN;
@@ -1322,34 +1783,31 @@ int fl_handle(const XEvent& thisevent)
if (fl_xim_ic) {
Status status;
len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
- buffer, buffer_len, &keysym, &status);
+ kp_buffer, kp_buffer_len, &keysym, &status);
- while (status == XBufferOverflow && buffer_len < 50000) {
- buffer_len = buffer_len * 5 + 1;
- buffer = (char*)realloc(buffer, buffer_len);
+ while (status == XBufferOverflow && kp_buffer_len < 50000) {
+ kp_buffer_len = kp_buffer_len * 5 + 1;
+ kp_buffer = (char*)realloc(kp_buffer, kp_buffer_len);
len = XUtf8LookupString(fl_xim_ic, (XKeyPressedEvent *)&xevent.xkey,
- buffer, buffer_len, &keysym, &status);
+ kp_buffer, kp_buffer_len, &keysym, &status);
}
- keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+ keysym = fl_KeycodeToKeysym(fl_display, keycode, 0);
} else {
//static XComposeStatus compose;
len = XLookupString((XKeyEvent*)&(xevent.xkey),
- buffer, buffer_len, &keysym, 0/*&compose*/);
+ kp_buffer, kp_buffer_len, &keysym, 0/*&compose*/);
if (keysym && keysym < 0x400) { // a character in latin-1,2,3,4 sets
// force it to type a character (not sure if this ever is needed):
- // if (!len) {buffer[0] = char(keysym); len = 1;}
- len = fl_utf8encode(XKeysymToUcs(keysym), buffer);
+ // if (!len) {kp_buffer[0] = char(keysym); len = 1;}
+ len = fl_utf8encode(XKeysymToUcs(keysym), kp_buffer);
if (len < 1) len = 1;
// ignore all effects of shift on the keysyms, which makes it a lot
// easier to program shortcuts and is Windoze-compatible:
- keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+ keysym = fl_KeycodeToKeysym(fl_display, keycode, 0);
}
}
- // MRS: Can't use Fl::event_state(FL_CTRL) since the state is not
- // set until set_event_xy() is called later...
- if ((xevent.xkey.state & ControlMask) && keysym == '-') buffer[0] = 0x1f; // ^_
- buffer[len] = 0;
- Fl::e_text = buffer;
+ kp_buffer[len] = 0;
+ Fl::e_text = kp_buffer;
Fl::e_length = len;
} else {
// Stupid X sends fake key-up events when a repeating key is held
@@ -1357,17 +1815,17 @@ int fl_handle(const XEvent& thisevent)
// we can detect this because the repeating KeyPress event is in
// the queue, get it and execute it instead:
- // Bool XkbSetDetectableAutorepeat ( display, detectable, supported_rtrn )
+ // Bool XkbSetDetectableAutoRepeat ( display, detectable, supported_rtrn )
// Display * display ;
// Bool detectable ;
// Bool * supported_rtrn ;
- // ...would be the easy way to corrct this isuue. Unfortunatly, this call is also
+ // ...would be the easy way to correct this issue. Unfortunately, this call is also
// broken on many Unix distros including Ubuntu and Solaris (as of Dec 2009)
// Bogus KeyUp events are generated by repeated KeyDown events. One
- // neccessary condition is an identical key event pending right after
+ // necessary condition is an identical key event pending right after
// the bogus KeyUp.
- // The new code introduced Dec 2009 differs in that it only check the very
+ // The new code introduced Dec 2009 differs in that it only checks the very
// next event in the queue, not the entire queue of events.
// This function wrongly detects a repeat key if a software keyboard
// sends a burst of events containing two consecutive equal keys. However,
@@ -1388,7 +1846,7 @@ int fl_handle(const XEvent& thisevent)
event = FL_KEYUP;
fl_key_vector[keycode/8] &= ~(1 << (keycode%8));
// keyup events just get the unshifted keysym:
- keysym = XKeycodeToKeysym(fl_display, keycode, 0);
+ keysym = fl_KeycodeToKeysym(fl_display, keycode, 0);
}
# ifdef __sgi
// You can plug a microsoft keyboard into an sgi but the extra shift
@@ -1481,14 +1939,14 @@ int fl_handle(const XEvent& thisevent)
if (keysym >= 0xff91 && keysym <= 0xff9f) {
// Map keypad keysym to character or keysym depending on
// numlock state...
- unsigned long keysym1 = XKeycodeToKeysym(fl_display, keycode, 1);
+ unsigned long keysym1 = fl_KeycodeToKeysym(fl_display, keycode, 1);
if (keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))
Fl::e_original_keysym = (int)(keysym1 | FL_KP);
if ((xevent.xkey.state & Mod2Mask) &&
(keysym1 <= 0x7f || (keysym1 > 0xff9f && keysym1 <= FL_KP_Last))) {
// Store ASCII numeric keypad value...
keysym = keysym1 | FL_KP;
- buffer[0] = char(keysym1) & 0x7F;
+ kp_buffer[0] = char(keysym1) & 0x7F;
len = 1;
} else {
// Map keypad to special key...
@@ -1551,6 +2009,7 @@ int fl_handle(const XEvent& thisevent)
}
}
}
+ if ( words ) { XFree(words); words = 0; }
}
if (window->fullscreen_active() && !fullscreen_state) {
window->_clear_fullscreen();
@@ -1663,6 +2122,25 @@ int fl_handle(const XEvent& thisevent)
}
}
+#if HAVE_XFIXES
+ switch (xevent.type - xfixes_event_base) {
+ case XFixesSelectionNotify: {
+ // Someone feeding us bogus events?
+ if (!have_xfixes)
+ return true;
+
+ XFixesSelectionNotifyEvent *selection_notify = (XFixesSelectionNotifyEvent *)&xevent;
+
+ if ((selection_notify->selection == XA_PRIMARY) && !fl_i_own_selection[0])
+ handle_clipboard_timestamp(0, selection_notify->selection_timestamp);
+ else if ((selection_notify->selection == CLIPBOARD) && !fl_i_own_selection[1])
+ handle_clipboard_timestamp(1, selection_notify->selection_timestamp);
+
+ return true;
+ }
+ }
+#endif
+
return Fl::handle(event, window);
}
@@ -1705,22 +2183,30 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
#define _NET_WM_STATE_ADD 1 /* add/set property */
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
-static void send_wm_state_event(Window wnd, int add, Atom prop) {
+static void send_wm_event(Window wnd, Atom message,
+ unsigned long d0, unsigned long d1=0,
+ unsigned long d2=0, unsigned long d3=0,
+ unsigned long d4=0) {
XEvent e;
e.xany.type = ClientMessage;
e.xany.window = wnd;
- e.xclient.message_type = fl_NET_WM_STATE;
+ e.xclient.message_type = message;
e.xclient.format = 32;
- e.xclient.data.l[0] = add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
- e.xclient.data.l[1] = prop;
- e.xclient.data.l[2] = 0;
- e.xclient.data.l[3] = 0;
- e.xclient.data.l[4] = 0;
+ e.xclient.data.l[0] = d0;
+ e.xclient.data.l[1] = d1;
+ e.xclient.data.l[2] = d2;
+ e.xclient.data.l[3] = d3;
+ e.xclient.data.l[4] = d4;
XSendEvent(fl_display, RootWindow(fl_display, fl_screen),
0, SubstructureNotifyMask | SubstructureRedirectMask,
&e);
}
+static void send_wm_state_event(Window wnd, int add, Atom prop) {
+ send_wm_event(wnd, fl_NET_WM_STATE,
+ add ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE, prop);
+}
+
int Fl_X::ewmh_supported() {
static int result = -1;
@@ -1731,19 +2217,56 @@ int Fl_X::ewmh_supported() {
if (0 == get_xwinprop(XRootWindow(fl_display, fl_screen), fl_NET_SUPPORTING_WM_CHECK, 64,
&nitems, &words) && nitems == 1) {
Window child = words[0];
+ if ( words ) { XFree(words); words = 0; }
if (0 == get_xwinprop(child, fl_NET_SUPPORTING_WM_CHECK, 64,
- &nitems, &words) && nitems == 1) {
- result = (child == words[0]);
+ &nitems, &words) ) {
+ if ( nitems == 1) result = (child == words[0]);
}
}
+ if ( words ) { XFree(words); words = 0; }
}
return result;
}
+extern Fl_Window *fl_xfocus;
+
+void Fl_X::activate_window(Window w) {
+ if (!ewmh_supported())
+ return;
+
+ Window prev = 0;
+
+ if (fl_xfocus) {
+ Fl_X *x = Fl_X::i(fl_xfocus);
+ if (!x)
+ return;
+ prev = x->xid;
+ }
+
+ send_wm_event(w, fl_NET_ACTIVE_WINDOW, 1 /* application */,
+ 0 /* timestamp */, prev /* previously active window */);
+}
+
/* Change an existing window to fullscreen */
void Fl_Window::fullscreen_x() {
if (Fl_X::ewmh_supported()) {
+ int top, bottom, left, right;
+
+ top = fullscreen_screen_top;
+ bottom = fullscreen_screen_bottom;
+ left = fullscreen_screen_left;
+ right = fullscreen_screen_right;
+
+ if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
+ top = Fl::screen_num(x(), y(), w(), h());
+ bottom = top;
+ left = top;
+ right = top;
+ }
+
+ send_wm_event(fl_xid(this), fl_NET_WM_FULLSCREEN_MONITORS,
+ top, bottom, left, right);
send_wm_state_event(fl_xid(this), 1, fl_NET_WM_STATE_FULLSCREEN);
} else {
_set_fullscreen();
@@ -1830,7 +2353,7 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
// force the window to be on-screen. Usually the X window manager
// does this, but a few don't, so we do it here for consistency:
int scr_x, scr_y, scr_w, scr_h;
- Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y);
+ Fl::screen_xywh(scr_x, scr_y, scr_w, scr_h, X, Y, W, H);
if (win->border()) {
// ensure border is on screen:
@@ -1859,6 +2382,23 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
return;
}
+ // Compute which screen(s) we should be on if we want to go fullscreen
+ int fullscreen_top, fullscreen_bottom, fullscreen_left, fullscreen_right;
+
+ fullscreen_top = win->fullscreen_screen_top;
+ fullscreen_bottom = win->fullscreen_screen_bottom;
+ fullscreen_left = win->fullscreen_screen_left;
+ fullscreen_right = win->fullscreen_screen_right;
+
+ if ((fullscreen_top < 0) || (fullscreen_bottom < 0) ||
+ (fullscreen_left < 0) || (fullscreen_right < 0)) {
+ fullscreen_top = Fl::screen_num(X, Y, W, H);
+ fullscreen_bottom = fullscreen_top;
+ fullscreen_left = fullscreen_top;
+ fullscreen_right = fullscreen_top;
+ }
+
+
ulong root = win->parent() ?
fl_xid(win->window()) : RootWindow(fl_display, fl_screen);
@@ -1882,9 +2422,17 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
// border, and cannot grab without an existing window. Besides,
// there is no clear_override().
if (win->fullscreen_active() && !Fl_X::ewmh_supported()) {
+ int sx, sy, sw, sh;
attr.override_redirect = 1;
mask |= CWOverrideRedirect;
- Fl::screen_xywh(X, Y, W, H, X, Y, W, H);
+ Fl::screen_xywh(sx, sy, sw, sh, fullscreen_left);
+ X = sx;
+ Fl::screen_xywh(sx, sy, sw, sh, fullscreen_right);
+ W = sx + sw - X;
+ Fl::screen_xywh(sx, sy, sw, sh, fullscreen_top);
+ Y = sy;
+ Fl::screen_xywh(sx, sy, sw, sh, fullscreen_bottom);
+ H = sy + sh - Y;
}
if (fl_background_pixel >= 0) {
@@ -1937,6 +2485,12 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
while (wp->parent()) wp = wp->window();
XSetTransientForHint(fl_display, xp->xid, fl_xid(wp));
if (!wp->visible()) showit = 0; // guess that wm will not show it
+ if (win->modal()) {
+ Atom net_wm_state = XInternAtom (fl_display, "_NET_WM_STATE", 0);
+ Atom net_wm_state_skip_taskbar = XInternAtom (fl_display, "_NET_WM_STATE_MODAL", 0);
+ XChangeProperty (fl_display, xp->xid, net_wm_state, XA_ATOM, 32,
+ PropModeAppend, (unsigned char*) &net_wm_state_skip_taskbar, 1);
+ }
}
// Make sure that borderless windows do not show in the task bar
@@ -1949,6 +2503,13 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
// If asked for, create fullscreen
if (win->fullscreen_active() && Fl_X::ewmh_supported()) {
+ unsigned long data[4];
+ data[0] = fullscreen_top;
+ data[1] = fullscreen_bottom;
+ data[2] = fullscreen_left;
+ data[3] = fullscreen_right;
+ XChangeProperty (fl_display, xp->xid, fl_NET_WM_FULLSCREEN_MONITORS, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*) data, 4);
XChangeProperty (fl_display, xp->xid, fl_NET_WM_STATE, XA_ATOM, 32,
PropModeAppend, (unsigned char*) &fl_NET_WM_STATE_FULLSCREEN, 1);
}
@@ -1967,12 +2528,14 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
fl_show_iconic = 0;
showit = 0;
}
- if (win->icon()) {
- hints->icon_pixmap = (Pixmap)win->icon();
+ if (win->icon_->legacy_icon) {
+ hints->icon_pixmap = (Pixmap)win->icon_->legacy_icon;
hints->flags |= IconPixmapHint;
}
XSetWMHints(fl_display, xp->xid, hints);
XFree(hints);
+
+ xp->set_icons();
}
// set the window type for menu and tooltip windows to avoid animations (compiz)
@@ -1982,6 +2545,19 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
XChangeProperty(fl_display, xp->xid, net_wm_type, XA_ATOM, 32, PropModeReplace, (unsigned char*)&net_wm_type_kind, 1);
}
+#if HAVE_XFIXES
+ // register for clipboard change notifications
+ if (have_xfixes && !win->parent()) {
+ XFixesSelectSelectionInput(fl_display, xp->xid, XA_PRIMARY,
+ XFixesSetSelectionOwnerNotifyMask);
+ XFixesSelectSelectionInput(fl_display, xp->xid, CLIPBOARD,
+ XFixesSetSelectionOwnerNotifyMask);
+ }
+#endif
+
+ if (win->shape_data_) {
+ win->combine_mask();
+ }
XMapWindow(fl_display, xp->xid);
if (showit) {
win->set_visible();
@@ -2082,6 +2658,207 @@ void Fl_Window::size_range_() {
////////////////////////////////////////////////////////////////
+static unsigned long *default_net_wm_icons = 0L;
+static size_t default_net_wm_icons_size = 0;
+
+static void icons_to_property(const Fl_RGB_Image *icons[], int count,
+ unsigned long **property, size_t *len) {
+ size_t sz;
+ unsigned long *data;
+
+ sz = 0;
+ for (int i = 0;i < count;i++)
+ sz += 2 + icons[i]->w() * icons[i]->h();
+
+ // FIXME: Might want to sort the icons
+
+ *property = data = new unsigned long[sz];
+ *len = sz;
+
+ for (int i = 0;i < count;i++) {
+ const Fl_RGB_Image *image;
+
+ image = icons[i];
+
+ data[0] = image->w();
+ data[1] = image->h();
+ data += 2;
+
+ const uchar *in = (const uchar*)*image->data();
+ for (int y = 0;y < image->h();y++) {
+ for (int x = 0;x < image->w();x++) {
+ switch (image->d()) {
+ case 1:
+ *data = ( 0xff<<24) | (in[0]<<16) | (in[0]<<8) | in[0];
+ break;
+ case 2:
+ *data = (in[1]<<24) | (in[0]<<16) | (in[0]<<8) | in[0];
+ break;
+ case 3:
+ *data = ( 0xff<<24) | (in[0]<<16) | (in[1]<<8) | in[2];
+ break;
+ case 4:
+ *data = (in[3]<<24) | (in[0]<<16) | (in[1]<<8) | in[2];
+ break;
+ }
+ in += image->d();
+ data++;
+ }
+ in += image->ld();
+ }
+ }
+}
+
+void Fl_X::set_default_icons(const Fl_RGB_Image *icons[], int count) {
+ if (default_net_wm_icons) {
+ delete [] default_net_wm_icons;
+ default_net_wm_icons = 0L;
+ default_net_wm_icons_size = 0;
+ }
+
+ if (count > 0)
+ icons_to_property(icons, count,
+ &default_net_wm_icons, &default_net_wm_icons_size);
+}
+
+void Fl_X::set_icons() {
+ unsigned long *net_wm_icons;
+ size_t net_wm_icons_size;
+
+ if (w->icon_->count) {
+ icons_to_property((const Fl_RGB_Image **)w->icon_->icons, w->icon_->count,
+ &net_wm_icons, &net_wm_icons_size);
+ } else {
+ net_wm_icons = default_net_wm_icons;
+ net_wm_icons_size = default_net_wm_icons_size;
+ }
+
+ XChangeProperty (fl_display, xid, fl_NET_WM_ICON, XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char*) net_wm_icons, net_wm_icons_size);
+
+ if (w->icon_->count) {
+ delete [] net_wm_icons;
+ net_wm_icons = 0L;
+ net_wm_icons_size = 0;
+ }
+}
+
+////////////////////////////////////////////////////////////////
+
+int Fl_X::set_cursor(Fl_Cursor c) {
+
+ /* The cursors are cached, because creating one takes 0.5ms including
+ opening, reading, and closing theme files. They are kept until program
+ exit by design, which valgrind will note as reachable. */
+ static Cursor xc_arrow = None;
+ static Cursor xc_cross = None;
+ static Cursor xc_wait = None;
+ static Cursor xc_insert = None;
+ static Cursor xc_hand = None;
+ static Cursor xc_help = None;
+ static Cursor xc_move = None;
+ static Cursor xc_ns = None;
+ static Cursor xc_we = None;
+ static Cursor xc_ne = None;
+ static Cursor xc_n = None;
+ static Cursor xc_nw = None;
+ static Cursor xc_e = None;
+ static Cursor xc_w = None;
+ static Cursor xc_se = None;
+ static Cursor xc_s = None;
+ static Cursor xc_sw = None;
+
+ Cursor xc;
+
+#define cache_cursor(name, var) if (var == None) { \
+ var = XCreateFontCursor(fl_display, name); \
+ } \
+ xc = var
+
+ switch (c) {
+ case FL_CURSOR_ARROW: cache_cursor(XC_left_ptr, xc_arrow); break;
+ case FL_CURSOR_CROSS: cache_cursor(XC_tcross, xc_cross); break;
+ case FL_CURSOR_WAIT: cache_cursor(XC_watch, xc_wait); break;
+ case FL_CURSOR_INSERT: cache_cursor(XC_xterm, xc_insert); break;
+ case FL_CURSOR_HAND: cache_cursor(XC_hand2, xc_hand); break;
+ case FL_CURSOR_HELP: cache_cursor(XC_question_arrow, xc_help); break;
+ case FL_CURSOR_MOVE: cache_cursor(XC_fleur, xc_move); break;
+ case FL_CURSOR_NS: cache_cursor(XC_sb_v_double_arrow, xc_ns); break;
+ case FL_CURSOR_WE: cache_cursor(XC_sb_h_double_arrow, xc_we); break;
+ case FL_CURSOR_NE: cache_cursor(XC_top_right_corner, xc_ne); break;
+ case FL_CURSOR_N: cache_cursor(XC_top_side, xc_n); break;
+ case FL_CURSOR_NW: cache_cursor(XC_top_left_corner, xc_nw); break;
+ case FL_CURSOR_E: cache_cursor(XC_right_side, xc_e); break;
+ case FL_CURSOR_W: cache_cursor(XC_left_side, xc_w); break;
+ case FL_CURSOR_SE: cache_cursor(XC_bottom_right_corner, xc_se); break;
+ case FL_CURSOR_S: cache_cursor(XC_bottom_side, xc_s); break;
+ case FL_CURSOR_SW: cache_cursor(XC_bottom_left_corner, xc_sw); break;
+ default:
+ return 0;
+ }
+
+#undef cache_cursor
+
+ XDefineCursor(fl_display, xid, xc);
+
+ return 1;
+}
+
+int Fl_X::set_cursor(const Fl_RGB_Image *image, int hotx, int hoty) {
+#if ! HAVE_XCURSOR
+ return 0;
+#else
+ XcursorImage *cursor;
+ Cursor xc;
+
+ if ((hotx < 0) || (hotx >= image->w()))
+ return 0;
+ if ((hoty < 0) || (hoty >= image->h()))
+ return 0;
+
+ cursor = XcursorImageCreate(image->w(), image->h());
+ if (!cursor)
+ return 0;
+
+ const uchar *i = (const uchar*)*image->data();
+ XcursorPixel *o = cursor->pixels;
+ for (int y = 0;y < image->h();y++) {
+ for (int x = 0;x < image->w();x++) {
+ switch (image->d()) {
+ case 1:
+ *o = (0xff<<24) | (i[0]<<16) | (i[0]<<8) | i[0];
+ break;
+ case 2:
+ *o = (i[1]<<24) | (i[0]<<16) | (i[0]<<8) | i[0];
+ break;
+ case 3:
+ *o = (0xff<<24) | (i[0]<<16) | (i[1]<<8) | i[2];
+ break;
+ case 4:
+ *o = (i[3]<<24) | (i[0]<<16) | (i[1]<<8) | i[2];
+ break;
+ }
+ i += image->d();
+ o++;
+ }
+ i += image->ld();
+ }
+
+ cursor->xhot = hotx;
+ cursor->yhot = hoty;
+
+ xc = XcursorImageLoadCursor(fl_display, cursor);
+ XDefineCursor(fl_display, xid, xc);
+ XFreeCursor(fl_display, xc);
+
+ XcursorImageDestroy(cursor);
+
+ return 1;
+#endif
+}
+
+////////////////////////////////////////////////////////////////
+
// returns pointer to the filename, or null if name ends with '/'
const char *fl_filename_name(const char *name) {
const char *p,*q;
@@ -2132,7 +2909,7 @@ void Fl_Window::show() {
if (!shown()) {
fl_open_display();
// Don't set background pixel for double-buffered windows...
- if (type() == FL_WINDOW && can_boxcheat(box())) {
+ if (type() != FL_DOUBLE_WINDOW && can_boxcheat(box())) {
fl_background_pixel = int(fl_xpixel(color()));
}
Fl_X::make_xid(this);
@@ -2152,6 +2929,10 @@ GC fl_gc;
// make X drawing go into this window (called by subclass flush() impl.)
void Fl_Window::make_current() {
static GC gc; // the GC used by all X windows
+ if (!shown()) {
+ fl_alert("Fl_Window::make_current(), but window is not shown().");
+ Fl::fatal("Fl_Window::make_current(), but window is not shown().");
+ }
if (!gc) gc = XCreateGC(fl_display, i->xid, 0, 0);
fl_window = i->xid;
fl_gc = gc;
@@ -2164,7 +2945,7 @@ void Fl_Window::make_current() {
#endif
}
-Window fl_xid_(const Fl_Window *w) {
+FL_EXPORT Window fl_xid_(const Fl_Window *w) {
Fl_X *temp = Fl_X::i(w);
return temp ? temp->xid : 0;
}
@@ -2309,5 +3090,5 @@ void preparePrintFront(void)
#endif
//
-// End of "$Id: Fl_x.cxx 9699 2012-10-16 15:35:34Z manolo $".
+// End of "$Id: Fl_x.cxx 10412 2014-10-29 20:25:46Z cand $".
//
diff --git a/src/Makefile b/src/Makefile
index c80a016..672cb60 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,9 +1,9 @@
#
-# "$Id: Makefile 9707 2012-11-06 21:13:54Z matt $"
+# "$Id: Makefile 10419 2014-10-30 16:05:22Z AlbrechtS $"
#
# Library makefile for the Fast Light Tool Kit (FLTK).
#
-# Copyright 1998-2010 by Bill Spitzak and others.
+# Copyright 1998-2014 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -31,6 +31,7 @@ CPPFILES = \
Fl_Choice.cxx \
Fl_Clock.cxx \
Fl_Color_Chooser.cxx \
+ Fl_Copy_Surface.cxx \
Fl_Counter.cxx \
Fl_Dial.cxx \
Fl_Device.cxx \
@@ -43,13 +44,13 @@ CPPFILES = \
Fl_Group.cxx \
Fl_Help_View.cxx \
Fl_Image.cxx \
+ Fl_Image_Surface.cxx \
Fl_Input.cxx \
Fl_Input_.cxx \
Fl_Light_Button.cxx \
Fl_Menu.cxx \
Fl_Menu_.cxx \
Fl_Menu_Bar.cxx \
- Fl_Sys_Menu_Bar.cxx \
Fl_Menu_Button.cxx \
Fl_Menu_Window.cxx \
Fl_Menu_add.cxx \
@@ -60,6 +61,7 @@ CPPFILES = \
Fl_Pack.cxx \
Fl_Paged_Device.cxx \
Fl_Pixmap.cxx \
+ Fl_PostScript.cxx \
Fl_Positioner.cxx \
Fl_Preferences.cxx \
Fl_Printer.cxx \
@@ -95,6 +97,7 @@ CPPFILES = \
Fl_Window_fullscreen.cxx \
Fl_Window_hotspot.cxx \
Fl_Window_iconize.cxx \
+ Fl_Window_shape.cxx \
Fl_Wizard.cxx \
Fl_XBM_Image.cxx \
Fl_XPM_Image.cxx \
@@ -134,6 +137,7 @@ CPPFILES = \
fl_engraved_label.cxx \
fl_file_dir.cxx \
fl_font.cxx \
+ fl_gleam.cxx \
fl_gtk.cxx \
fl_labeltype.cxx \
fl_line_style.cxx \
@@ -157,12 +161,13 @@ CPPFILES = \
screen_xywh.cxx \
fl_utf8.cxx \
ps_image.cxx
-
+
OBJCPPFILES = \
Fl_cocoa.mm \
Fl_Quartz_Printer.mm \
- Fl_Native_File_Chooser_MAC.mm
-
+ Fl_Native_File_Chooser_MAC.mm \
+ Fl_Sys_Menu_Bar.mm
+
FLCPPFILES = \
forms_compatability.cxx \
forms_bitmap.cxx \
@@ -248,7 +253,7 @@ libfltk.1.3.dylib: $(OBJECTS)
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
- -current_version 1.3.1 \
+ -current_version 1.3.3 \
-compatibility_version 1.3.0 \
$(OBJECTS) $(LDLIBS)
$(RM) libfltk.dylib
@@ -270,7 +275,7 @@ $(FLLIBNAME): $(FLOBJECTS)
libfltk_forms.so.1.3: $(FLOBJECTS) libfltk.so.1.3
echo $(DSOCOMMAND) $@ ...
- $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk
+ $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk $(LDLIBS)
$(RM) libfltk_forms.so
$(LN) libfltk_forms.so.1.3 libfltk_forms.so
@@ -284,7 +289,7 @@ libfltk_forms.1.3.dylib: $(FLOBJECTS) libfltk.1.3.dylib
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
- -current_version 1.3.1 \
+ -current_version 1.3.3 \
-compatibility_version 1.3.0 \
$(FLOBJECTS) -L. $(LDLIBS) -lfltk
$(RM) libfltk_forms.dylib
@@ -320,7 +325,7 @@ libfltk_gl.1.3.dylib: $(GLOBJECTS) libfltk.1.3.dylib
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
- -current_version 1.3.1 \
+ -current_version 1.3.3 \
-compatibility_version 1.3.0 \
$(GLOBJECTS) -L. $(GLDLIBS) -lfltk
$(RM) libfltk_gl.dylib
@@ -342,7 +347,7 @@ $(IMGLIBNAME): $(IMGOBJECTS)
libfltk_images.so.1.3: $(IMGOBJECTS) libfltk.so.1.3
echo $(DSOCOMMAND) $@ ...
- $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) -lfltk
+ $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) -lfltk $(LDLIBS)
$(RM) libfltk_images.so
$(LN) libfltk_images.so.1.3 libfltk_images.so
@@ -356,7 +361,7 @@ libfltk_images.1.3.dylib: $(IMGOBJECTS) libfltk.1.3.dylib
echo $(DSOCOMMAND) $@ ...
$(DSOCOMMAND) $@ \
-install_name $(libdir)/$@ \
- -current_version 1.3.1 \
+ -current_version 1.3.3 \
-compatibility_version 1.3.0 \
$(IMGOBJECTS) -L. $(LDLIBS) $(IMAGELIBS) -lfltk
$(RM) libfltk_images.dylib
@@ -800,5 +805,5 @@ uninstall:
fi
#
-# End of "$Id: Makefile 9707 2012-11-06 21:13:54Z matt $".
+# End of "$Id: Makefile 10419 2014-10-30 16:05:22Z AlbrechtS $".
#
diff --git a/FL/Xutf8.h b/src/Xutf8.h
index b4826bd..7e5d357 100644
--- a/FL/Xutf8.h
+++ b/src/Xutf8.h
@@ -1,4 +1,4 @@
-/* "$Id: Xutf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+/* "$Id: Xutf8.h 10248 2014-08-23 08:41:58Z cand $"
*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2010 by O'ksi'D.
@@ -14,7 +14,7 @@
* http://www.fltk.org/str.php
*/
-#ifndef _Xutf8_h
+#if ! ( defined(_Xutf8_h) || defined(FL_DOXYGEN) )
#define _Xutf8_h
# ifdef __cplusplus
@@ -142,6 +142,9 @@ long
XKeysymToUcs(
KeySym keysym);
+#ifdef X_HAVE_UTF8_STRING
+#define XUtf8LookupString Xutf8LookupString
+#else
int
XUtf8LookupString(
XIC ic,
@@ -150,6 +153,7 @@ XUtf8LookupString(
int bytes_buffer,
KeySym* keysym,
Status* status_return);
+#endif
unsigned short
XUtf8IsNonSpacing(
@@ -176,5 +180,5 @@ XUtf8Toupper(
#endif
/*
- * End of "$Id: Xutf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+ * End of "$Id: Xutf8.h 10248 2014-08-23 08:41:58Z cand $".
*/
diff --git a/src/aimm.h b/src/aimm.h
deleted file mode 100644
index b7de2d9..0000000
--- a/src/aimm.h
+++ /dev/null
@@ -1,422 +0,0 @@
-//
-// "$Id: aimm.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
-//
-// Standard dialog header file for the UTF-8 Fast Light Tool Kit (FLTK-UTF8).
-//
-// Copyright 2009-2010 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// http://www.fltk.org/COPYING.php
-//
-// Please report all bugs and problems on the following page:
-//
-// http://www.fltk.org/str.php
-//
-
-#ifndef AIMM_H
-# define AIMM_H
-//# define HANDLE_PTR HANDLE*
-//# define DWORD_PTR DWORD*
-//# define CLSCTX_INPROC_SERVER 0x1
-const GUID IID_IActiveIMMApp = { 0x8c0e040, 0x62d1, 0x11d1, {0x93, 0x26, 0x00, 0x60, 0xb0, 0x67, 0xb8, 0x6e}};
-const GUID CLSID_CActiveIMM = { 0x4955dd33, 0xb159, 0x11d0, {0x8f, 0xcf, 0x00, 0xaa, 0x00, 0x6b, 0xcc, 0x59}};
-/*
- class IUnknown
- {
- public:
-
- virtual long __stdcall QueryInterface(
- const GUID & riid,
- void **ppvObject) = 0;
-
- virtual ULONG __stdcall AddRef( void) = 0;
-
- virtual ULONG __stdcall Release( void) = 0;
- };
-
-extern "C" __declspec(dllimport) long __stdcall CoInitialize(void far *pvReserved);
-extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID & rclsid, IUnknown * pUnkOuter,
- DWORD dwClsContext, const GUID & riid, LPVOID FAR* ppv);
-
-*/
-
- class IActiveIMMApp : public IUnknown
- {
- public:
- virtual long __stdcall AssociateContext(
- HWND hWnd,
- HIMC hIME,
- HIMC *phPrev) = 0;
-
- virtual long __stdcall ConfigureIMEA(
- HKL hKL,
- HWND hWnd,
- DWORD dwMode,
- void *pData) = 0;
-
- virtual long __stdcall ConfigureIMEW(
- HKL hKL,
- HWND hWnd,
- DWORD dwMode,
- void *pData) = 0;
-
- virtual long __stdcall CreateContext(
- HIMC *phIMC) = 0;
-
- virtual long __stdcall DestroyContext(
- HIMC hIME) = 0;
-
- virtual long __stdcall EnumRegisterWordA(
- HKL hKL,
- LPSTR szReading,
- DWORD dwStyle,
- LPSTR szRegister,
- LPVOID pData,
- void **pEnum) = 0;
-
- virtual long __stdcall EnumRegisterWordW(
- HKL hKL,
- LPWSTR szReading,
- DWORD dwStyle,
- LPWSTR szRegister,
- LPVOID pData,
- void **pEnum) = 0;
-
- virtual long __stdcall EscapeA(
- HKL hKL,
- HIMC hIMC,
- UINT uEscape,
- /* [out][in] */ LPVOID pData,
- LRESULT *plResult) = 0;
-
- virtual long __stdcall EscapeW(
- HKL hKL,
- HIMC hIMC,
- UINT uEscape,
- /* [out][in] */ LPVOID pData,
- LRESULT *plResult) = 0;
-
- virtual long __stdcall GetCandidateListA(
- HIMC hIMC,
- DWORD dwIndex,
- UINT uBufLen,
- void *pCandList,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetCandidateListW(
- HIMC hIMC,
- DWORD dwIndex,
- UINT uBufLen,
- void *pCandList,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetCandidateListCountA(
- HIMC hIMC,
- DWORD *pdwListSize,
- DWORD *pdwBufLen) = 0;
-
- virtual long __stdcall GetCandidateListCountW(
- HIMC hIMC,
- DWORD *pdwListSize,
- DWORD *pdwBufLen) = 0;
-
- virtual long __stdcall GetCandidateWindow(
- HIMC hIMC,
- DWORD dwIndex,
- void *pCandidate) = 0;
-
- virtual long __stdcall GetCompositionFontA(
- HIMC hIMC,
- LOGFONTA *plf) = 0;
-
- virtual long __stdcall GetCompositionFontW(
- HIMC hIMC,
- LOGFONTW *plf) = 0;
-
- virtual long __stdcall GetCompositionStringA(
- HIMC hIMC,
- DWORD dwIndex,
- DWORD dwBufLen,
- LONG *plCopied,
- LPVOID pBuf) = 0;
-
- virtual long __stdcall GetCompositionStringW(
- HIMC hIMC,
- DWORD dwIndex,
- DWORD dwBufLen,
- LONG *plCopied,
- LPVOID pBuf) = 0;
-
- virtual long __stdcall GetCompositionWindow(
- HIMC hIMC,
- void *pCompForm) = 0;
-
- virtual long __stdcall GetContext(
- HWND hWnd,
- HIMC *phIMC) = 0;
-
- virtual long __stdcall GetConversionListA(
- HKL hKL,
- HIMC hIMC,
- LPSTR pSrc,
- UINT uBufLen,
- UINT uFlag,
- void *pDst,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetConversionListW(
- HKL hKL,
- HIMC hIMC,
- LPWSTR pSrc,
- UINT uBufLen,
- UINT uFlag,
- void *pDst,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetConversionStatus(
- HIMC hIMC,
- DWORD *pfdwConversion,
- DWORD *pfdwSentence) = 0;
-
- virtual long __stdcall GetDefaultIMEWnd(
- HWND hWnd,
- HWND *phDefWnd) = 0;
-
- virtual long __stdcall GetDescriptionA(
- HKL hKL,
- UINT uBufLen,
- LPSTR szDescription,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetDescriptionW(
- HKL hKL,
- UINT uBufLen,
- LPWSTR szDescription,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetGuideLineA(
- HIMC hIMC,
- DWORD dwIndex,
- DWORD dwBufLen,
- LPSTR pBuf,
- DWORD *pdwResult) = 0;
-
- virtual long __stdcall GetGuideLineW(
- HIMC hIMC,
- DWORD dwIndex,
- DWORD dwBufLen,
- LPWSTR pBuf,
- DWORD *pdwResult) = 0;
-
- virtual long __stdcall GetIMEFileNameA(
- HKL hKL,
- UINT uBufLen,
- LPSTR szFileName,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetIMEFileNameW(
- HKL hKL,
- UINT uBufLen,
- LPWSTR szFileName,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetOpenStatus(
- HIMC hIMC) = 0;
-
- virtual long __stdcall GetProperty(
- HKL hKL,
- DWORD fdwIndex,
- DWORD *pdwProperty) = 0;
-
- virtual long __stdcall GetRegisterWordStyleA(
- HKL hKL,
- UINT nItem,
- STYLEBUFA *pStyleBuf,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetRegisterWordStyleW(
- HKL hKL,
- UINT nItem,
- STYLEBUFW *pStyleBuf,
- UINT *puCopied) = 0;
-
- virtual long __stdcall GetStatusWindowPos(
- HIMC hIMC,
- POINT *pptPos) = 0;
-
- virtual long __stdcall GetVirtualKey(
- HWND hWnd,
- UINT *puVirtualKey) = 0;
-
- virtual long __stdcall InstallIMEA(
- LPSTR szIMEFileName,
- LPSTR szLayoutText,
- HKL *phKL) = 0;
-
- virtual long __stdcall InstallIMEW(
- LPWSTR szIMEFileName,
- LPWSTR szLayoutText,
- HKL *phKL) = 0;
-
- virtual long __stdcall IsIME(
- HKL hKL) = 0;
-
- virtual long __stdcall IsUIMessageA(
- HWND hWndIME,
- UINT msg,
- WPARAM wParam,
- LPARAM lParam) = 0;
-
- virtual long __stdcall IsUIMessageW(
- HWND hWndIME,
- UINT msg,
- WPARAM wParam,
- LPARAM lParam) = 0;
-
- virtual long __stdcall NotifyIME(
- HIMC hIMC,
- DWORD dwAction,
- DWORD dwIndex,
- DWORD dwValue) = 0;
-
- virtual long __stdcall RegisterWordA(
- HKL hKL,
- LPSTR szReading,
- DWORD dwStyle,
- LPSTR szRegister) = 0;
-
- virtual long __stdcall RegisterWordW(
- HKL hKL,
- LPWSTR szReading,
- DWORD dwStyle,
- LPWSTR szRegister) = 0;
-
- virtual long __stdcall ReleaseContext(
- HWND hWnd,
- HIMC hIMC) = 0;
-
- virtual long __stdcall SetCandidateWindow(
- HIMC hIMC,
- void *pCandidate) = 0;
-
- virtual long __stdcall SetCompositionFontA(
- HIMC hIMC,
- LOGFONTA *plf) = 0;
-
- virtual long __stdcall SetCompositionFontW(
- HIMC hIMC,
- LOGFONTW *plf) = 0;
-
- virtual long __stdcall SetCompositionStringA(
- HIMC hIMC,
- DWORD dwIndex,
- LPVOID pComp,
- DWORD dwCompLen,
- LPVOID pRead,
- DWORD dwReadLen) = 0;
-
- virtual long __stdcall SetCompositionStringW(
- HIMC hIMC,
- DWORD dwIndex,
- LPVOID pComp,
- DWORD dwCompLen,
- LPVOID pRead,
- DWORD dwReadLen) = 0;
-
- virtual long __stdcall SetCompositionWindow(
- HIMC hIMC,
- void *pCompForm) = 0;
-
- virtual long __stdcall SetConversionStatus(
- HIMC hIMC,
- DWORD fdwConversion,
- DWORD fdwSentence) = 0;
-
- virtual long __stdcall SetOpenStatus(
- HIMC hIMC,
- BOOL fOpen) = 0;
-
- virtual long __stdcall SetStatusWindowPos(
- HIMC hIMC,
- POINT *pptPos) = 0;
-
- virtual long __stdcall SimulateHotKey(
- HWND hWnd,
- DWORD dwHotKeyID) = 0;
-
- virtual long __stdcall UnregisterWordA(
- HKL hKL,
- LPSTR szReading,
- DWORD dwStyle,
- LPSTR szUnregister) = 0;
-
- virtual long __stdcall UnregisterWordW(
- HKL hKL,
- LPWSTR szReading,
- DWORD dwStyle,
- LPWSTR szUnregister) = 0;
-
- virtual long __stdcall Activate(
- BOOL fRestoreLayout) = 0;
-
- virtual long __stdcall Deactivate( void) = 0;
-
- virtual long __stdcall OnDefWindowProc(
- HWND hWnd,
- UINT Msg,
- WPARAM wParam,
- LPARAM lParam,
- LRESULT *plResult) = 0;
-
- virtual long __stdcall FilterClientWindows(
- ATOM *aaClassList,
- UINT uSize) = 0;
-
- virtual long __stdcall GetCodePageA(
- HKL hKL,
- UINT *uCodePage) = 0;
-
- virtual long __stdcall GetLangId(
- HKL hKL,
- WORD *plid) = 0;
-
- virtual long __stdcall AssociateContextEx(
- HWND hWnd,
- HIMC hIMC,
- DWORD dwFlags) = 0;
-
- virtual long __stdcall DisableIME(
- DWORD idThread) = 0;
-
- virtual long __stdcall GetImeMenuItemsA(
- HIMC hIMC,
- DWORD dwFlags,
- DWORD dwType,
- void *pImeParentMenu,
- void *pImeMenu,
- DWORD dwSize,
- DWORD *pdwResult) = 0;
-
- virtual long __stdcall GetImeMenuItemsW(
- HIMC hIMC,
- DWORD dwFlags,
- DWORD dwType,
- void *pImeParentMenu,
- void *pImeMenu,
- DWORD dwSize,
- DWORD *pdwResult) = 0;
-
- virtual long __stdcall EnumInputContext(
- DWORD idThread,
- void **ppEnum) = 0;
-
- };
-
-#endif
-
-//
-// End of "$Id: aimm.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
-//
diff --git a/src/fastarrow.h b/src/fastarrow.h
index e381acd..9af76dd 100644
--- a/src/fastarrow.h
+++ b/src/fastarrow.h
@@ -1,6 +1,6 @@
#define fastarrow_width 16
#define fastarrow_height 16
-static unsigned char fastarrow_bits[] = {
+static const unsigned char fastarrow_bits[] = {
0x00, 0x00, 0x00, 0x07, 0xe0, 0x07, 0xfc, 0x03, 0xff, 0xff, 0xfc, 0x03,
0xe0, 0x07, 0x00, 0x07, 0xe0, 0x00, 0xe0, 0x07, 0xc0, 0x3f, 0xff, 0xff,
0xc0, 0x3f, 0xe0, 0x07, 0xe0, 0x00, 0x00, 0x00};
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx
index cd9de23..051b67f 100644
--- a/src/fl_ask.cxx
+++ b/src/fl_ask.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_ask.cxx 9373 2012-04-22 02:45:09Z fabien $"
+// "$Id: fl_ask.cxx 10232 2014-08-21 12:13:47Z cand $"
//
// Standard dialog functions for the Fast Light Tool Kit (FLTK).
//
@@ -16,6 +16,11 @@
// http://www.fltk.org/str.php
//
+/**
+ \file fl_ask.cxx
+ \brief Utility functions for common dialogs.
+ */
+
// Implementation of fl_message, fl_ask, fl_choice, fl_input
// The three-message fl_show_x functions are for forms compatibility
// mostly. In most cases it is easier to get a multi-line message
@@ -61,8 +66,8 @@ static char avoidRecursion = 0;
// The first argument (Fl_Widget *) can either be an Fl_Button*
// pointer to one of the buttons or an Fl_Window* pointer to the
// message window (message_form).
-static void button_cb(Fl_Widget *, void *val) {
- ret_val = (int) (fl_intptr_t)val;
+static void button_cb(Fl_Widget *, long val) {
+ ret_val = (int) val;
message_form->hide();
}
@@ -77,7 +82,7 @@ static Fl_Window *makeform() {
Fl_Group::current(0);
// create a new top level window
Fl_Window *w = message_form = new Fl_Window(410,103);
- message_form->callback(button_cb,(void *)0);
+ message_form->callback(button_cb);
// w->clear_border();
// w->box(FL_UP_BOX);
(message = new Fl_Box(60, 25, 340, 20))
@@ -99,11 +104,7 @@ static Fl_Window *makeform() {
else
button[b] = new Fl_Button(x, 70, 90, 23);
button[b]->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
-#if defined (__LP64__)
- button[b]->callback(button_cb,(void *)(long long) b);
-#else
- button[b]->callback(button_cb,(void *)b);
-#endif
+ button[b]->callback(button_cb, b);
}
}
button[0]->shortcut(FL_Escape);
@@ -125,7 +126,7 @@ static Fl_Window *makeform() {
* that is asked of them...
*/
-void resizeform() {
+static void resizeform() {
int i;
int message_w, message_h;
int text_height;
@@ -272,6 +273,7 @@ const char* fl_close= "Close"; ///< string pointer used in common dialogs, you
// fltk functions:
/**
Emits a system beep message.
+ \param[in] type The beep type from the \ref Fl_Beep enumeration.
\note \#include <FL/fl_ask.H>
*/
void fl_beep(int type) {
@@ -566,5 +568,5 @@ void fl_message_title_default(const char *title) {
/** @} */
//
-// End of "$Id: fl_ask.cxx 9373 2012-04-22 02:45:09Z fabien $".
+// End of "$Id: fl_ask.cxx 10232 2014-08-21 12:13:47Z cand $".
//
diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx
index fadd3b5..6d688b5 100644
--- a/src/fl_boxtype.cxx
+++ b/src/fl_boxtype.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_boxtype.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_boxtype.cxx 10253 2014-08-23 09:27:30Z cand $"
//
// Box drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -32,14 +32,14 @@
////////////////////////////////////////////////////////////////
-static uchar active_ramp[24] = {
+static const uchar active_ramp[24] = {
FL_GRAY_RAMP+0, FL_GRAY_RAMP+1, FL_GRAY_RAMP+2, FL_GRAY_RAMP+3,
FL_GRAY_RAMP+4, FL_GRAY_RAMP+5, FL_GRAY_RAMP+6, FL_GRAY_RAMP+7,
FL_GRAY_RAMP+8, FL_GRAY_RAMP+9, FL_GRAY_RAMP+10,FL_GRAY_RAMP+11,
FL_GRAY_RAMP+12,FL_GRAY_RAMP+13,FL_GRAY_RAMP+14,FL_GRAY_RAMP+15,
FL_GRAY_RAMP+16,FL_GRAY_RAMP+17,FL_GRAY_RAMP+18,FL_GRAY_RAMP+19,
FL_GRAY_RAMP+20,FL_GRAY_RAMP+21,FL_GRAY_RAMP+22,FL_GRAY_RAMP+23};
-static uchar inactive_ramp[24] = {
+static const uchar inactive_ramp[24] = {
43, 43, 44, 44,
44, 45, 45, 46,
46, 46, 47, 47,
@@ -54,7 +54,7 @@ static int draw_it_active = 1;
*/
int Fl::draw_box_active() { return draw_it_active; }
-uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
+const uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
/**
Draws a series of line segments around the given box.
@@ -69,7 +69,7 @@ uchar *fl_gray_ramp() {return (draw_it_active?active_ramp:inactive_ramp)-'A';}
\param[in] x, y, w, h position and size
*/
void fl_frame(const char* s, int x, int y, int w, int h) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
if (h > 0 && w > 0) for (;*s;) {
// draw top line:
fl_color(g[(int)*s++]);
@@ -103,7 +103,7 @@ void fl_frame(const char* s, int x, int y, int w, int h) {
\param[in] x, y, w, h position and size
*/
void fl_frame2(const char* s, int x, int y, int w, int h) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
if (h > 0 && w > 0) for (;*s;) {
// draw bottom line:
fl_color(g[(int)*s++]);
@@ -416,5 +416,5 @@ void Fl_Widget::draw_box(Fl_Boxtype t, int X, int Y, int W, int H, Fl_Color c) c
}
//
-// End of "$Id: fl_boxtype.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_boxtype.cxx 10253 2014-08-23 09:27:30Z cand $".
//
diff --git a/src/fl_call_main.c b/src/fl_call_main.c
index 4476c38..b300696 100644
--- a/src/fl_call_main.c
+++ b/src/fl_call_main.c
@@ -1,5 +1,5 @@
/*
- * "$Id: fl_call_main.c 9325 2012-04-05 05:12:30Z fabien $"
+ * "$Id: fl_call_main.c 9984 2013-09-22 17:20:48Z greg.ercolano $"
*
* Copyright 1998-2010 by Bill Spitzak and others.
*
@@ -123,12 +123,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
return rc;
}
-#elif defined(__hpux)
-/* This code to prevent "empty translation unit" or similar warnings... */
-static void dummy(void) {}
+#else
+/* STR# 2973: solves "empty translation unit" error (Sun, HP-UX..) */
+typedef int dummy;
#endif /* WIN32 && !FL_DLL && !__GNUC__ */
/*
- * End of "$Id: fl_call_main.c 9325 2012-04-05 05:12:30Z fabien $".
+ * End of "$Id: fl_call_main.c 9984 2013-09-22 17:20:48Z greg.ercolano $".
*/
diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx
index c9b6c98..d563fce 100644
--- a/src/fl_cursor.cxx
+++ b/src/fl_cursor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_cursor.cxx 9278 2012-03-12 11:55:50Z manolo $"
+// "$Id: fl_cursor.cxx 10405 2014-10-29 15:53:52Z manolo $"
//
// Mouse cursor support for the Fast Light Tool Kit (FLTK).
//
@@ -24,298 +24,173 @@
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
+#include <FL/Fl_Pixmap.H>
+#include <FL/Fl_RGB_Image.H>
#include <FL/x.H>
-#if !defined(WIN32) && !defined(__APPLE__)
-# include <X11/cursorfont.h>
-#endif
#include <FL/fl_draw.H>
+#include "fl_cursor_wait.xpm"
+#include "fl_cursor_help.xpm"
+#include "fl_cursor_nwse.xpm"
+#include "fl_cursor_nesw.xpm"
+#include "fl_cursor_none.xpm"
+
/**
Sets the cursor for the current window to the specified shape and colors.
The cursors are defined in the <FL/Enumerations.H> header file.
*/
+void fl_cursor(Fl_Cursor c) {
+ if (Fl::first_window()) Fl::first_window()->cursor(c);
+}
+
+/* For back compatibility only. */
void fl_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
- if (Fl::first_window()) Fl::first_window()->cursor(c,fg,bg);
+ fl_cursor(c);
}
+
+
/**
- Sets the default window cursor as well as its color.
+ Sets the default window cursor. This is the cursor that will be used
+ after the mouse pointer leaves a widget with a custom cursor set.
- For back compatibility only.
+ \see cursor(const Fl_RGB_Image*, int, int), default_cursor()
*/
-void Fl_Window::default_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
-// if (c == FL_CURSOR_DEFAULT) c = FL_CURSOR_ARROW;
-
+void Fl_Window::default_cursor(Fl_Cursor c) {
cursor_default = c;
- cursor_fg = fg;
- cursor_bg = bg;
+ cursor(c);
+}
+
+
+static void fallback_cursor(Fl_Window *w, Fl_Cursor c) {
+ const char **xpm;
+ int hotx, hoty;
+
+ // The standard arrow is our final fallback, so something is broken
+ // if we get called back here with that as an argument.
+ if (c == FL_CURSOR_ARROW)
+ return;
+
+ switch (c) {
+ case FL_CURSOR_WAIT:
+ xpm = (const char**)fl_cursor_wait_xpm;
+ hotx = 7;
+ hoty = 9;
+ break;
+ case FL_CURSOR_HELP:
+ xpm = (const char**)fl_cursor_help_xpm;
+ hotx = 1;
+ hoty = 3;
+ break;
+ case FL_CURSOR_NWSE:
+ xpm = (const char**)fl_cursor_nwse_xpm;
+ hotx = 7;
+ hoty = 7;
+ break;
+ case FL_CURSOR_NESW:
+ xpm = (const char**)fl_cursor_nesw_xpm;
+ hotx = 7;
+ hoty = 7;
+ break;
+ case FL_CURSOR_NONE:
+ xpm = (const char**)fl_cursor_none_xpm;
+ hotx = 0;
+ hoty = 0;
+ break;
+ default:
+ w->cursor(FL_CURSOR_ARROW);
+ return;
+ }
+
+ Fl_Pixmap pxm(xpm);
+ Fl_RGB_Image image(&pxm);
- cursor(c, fg, bg);
+ w->cursor(&image, hotx, hoty);
}
-#ifdef WIN32
-# ifndef IDC_HAND
-# define IDC_HAND MAKEINTRESOURCE(32649)
-# endif // !IDC_HAND
+void Fl_Window::cursor(Fl_Cursor c) {
+ int ret;
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) {
- if (!shown()) return;
// the cursor must be set for the top level window, not for subwindows
Fl_Window *w = window(), *toplevel = this;
- while (w) { toplevel = w; w = w->window(); }
- if (toplevel != this) { toplevel->cursor(c, c1, c2); return; }
- // now set the actual cursor
- if (c == FL_CURSOR_DEFAULT) {
- c = cursor_default;
+
+ while (w) {
+ toplevel = w;
+ w = w->window();
}
- if (c > FL_CURSOR_NESW) {
- i->cursor = 0;
- } else if (c == FL_CURSOR_DEFAULT) {
- i->cursor = fl_default_cursor;
- } else {
- LPSTR n;
- switch (c) {
- case FL_CURSOR_ARROW: n = IDC_ARROW; break;
- case FL_CURSOR_CROSS: n = IDC_CROSS; break;
- case FL_CURSOR_WAIT: n = IDC_WAIT; break;
- case FL_CURSOR_INSERT: n = IDC_IBEAM; break;
- case FL_CURSOR_HELP: n = IDC_HELP; break;
- case FL_CURSOR_HAND: {
- OSVERSIONINFO osvi;
-
- // Get the OS version: Windows 98 and 2000 have a standard
- // hand cursor.
- memset(&osvi, 0, sizeof(OSVERSIONINFO));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&osvi);
-
- if (osvi.dwMajorVersion > 4 ||
- (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion > 0 &&
- osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)) n = IDC_HAND;
- else n = IDC_UPARROW;
- } break;
- case FL_CURSOR_MOVE: n = IDC_SIZEALL; break;
- case FL_CURSOR_N:
- case FL_CURSOR_S:
- case FL_CURSOR_NS: n = IDC_SIZENS; break;
- case FL_CURSOR_NE:
- case FL_CURSOR_SW:
- case FL_CURSOR_NESW: n = IDC_SIZENESW; break;
- case FL_CURSOR_E:
- case FL_CURSOR_W:
- case FL_CURSOR_WE: n = IDC_SIZEWE; break;
- case FL_CURSOR_SE:
- case FL_CURSOR_NW:
- case FL_CURSOR_NWSE: n = IDC_SIZENWSE; break;
- default: n = IDC_NO; break;
- }
- i->cursor = LoadCursor(NULL, n);
+
+ if (toplevel != this) {
+ toplevel->cursor(c);
+ return;
}
- SetCursor(i->cursor);
-}
-#elif defined(__APPLE__)
-
-#ifdef __BIG_ENDIAN__
-# define E(x) x
-#elif defined __LITTLE_ENDIAN__
-// Don't worry. This will be resolved at compile time
-# define E(x) (x>>8)|((x<<8)&0xff00)
-#else
-# error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined"
-#endif
-
-CGContextRef Fl_X::help_cursor_image(void)
-{
- int w = 20, h = 20;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, h);
- fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,w,h);
- fl_color(FL_BLACK);
- fl_font(FL_COURIER_BOLD, 20);
- fl_draw("?", 1, h-1);
- fl_end_offscreen();
- return (CGContextRef)off;
-}
+ if (c == FL_CURSOR_DEFAULT)
+ c = cursor_default;
-CGContextRef Fl_X::none_cursor_image(void)
-{
- int w = 20, h = 20;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, h);
- fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,w,h);
- fl_end_offscreen();
- return (CGContextRef)off;
-}
+ if (!i)
+ return;
-CGContextRef Fl_X::watch_cursor_image(void)
-{
- int w, h, r = 5;
- w = 2*r+6;
- h = 4*r;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, h);
- fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,w,h);
- CGContextTranslateCTM( (CGContextRef)off, w/2, h/2);
- fl_color(FL_WHITE);
- fl_circle(0, 0, r+1);
- fl_color(FL_BLACK);
- fl_rectf(int(-r*0.7), int(-r*1.7), int(1.4*r), int(3.4*r));
- fl_rectf(r-1, -1, 3, 3);
- fl_color(FL_WHITE);
- fl_pie(-r, -r, 2*r, 2*r, 0, 360);
- fl_color(FL_BLACK);
- fl_circle(0,0,r);
- fl_xyline(0, 0, int(-r*.7));
- fl_xyline(0, 0, 0, int(-r*.7));
- fl_end_offscreen();
- return (CGContextRef)off;
-}
+ ret = i->set_cursor(c);
+ if (ret)
+ return;
-CGContextRef Fl_X::nesw_cursor_image(void)
-{
- int c = 7, r = 2*c;
- int w = r, h = r;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, h);
- fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,w,h);
- CGContextTranslateCTM( (CGContextRef)off, 0, h);
- CGContextScaleCTM( (CGContextRef)off, 1, -1);
- fl_color(FL_BLACK);
- fl_polygon(0, 0, c, 0, 0, c);
- fl_polygon(r, r, r, r-c, r-c, r);
- fl_line_style(FL_SOLID, 2, 0);
- fl_line(0,1, r,r+1);
- fl_line_style(FL_SOLID, 0, 0);
- fl_end_offscreen();
- return (CGContextRef)off;
+ fallback_cursor(this, c);
}
-CGContextRef Fl_X::nwse_cursor_image(void)
-{
- int c = 7, r = 2*c;
- int w = r, h = r;
- Fl_Offscreen off = Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(w, h);
- fl_begin_offscreen(off);
- CGContextSetRGBFillColor( (CGContextRef)off, 0,0,0,0);
- fl_rectf(0,0,w,h);
- CGContextTranslateCTM( (CGContextRef)off, 0, h);
- CGContextScaleCTM( (CGContextRef)off, 1, -1);
- fl_color(FL_BLACK);
- fl_polygon(r-1, 0, r-1, c, r-1-c, 0);
- fl_polygon(-1, r, c-1, r, -1, r-c);
- fl_line_style(FL_SOLID, 2, 0);
- fl_line(r-1,1, -1,r+1);
- fl_line_style(FL_SOLID, 0, 0);
- fl_end_offscreen();
- return (CGContextRef)off;
-}
+/**
+ Changes the cursor for this window. This always calls the system, if
+ you are changing the cursor a lot you may want to keep track of how
+ you set it in a static variable and call this only if the new cursor
+ is different.
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
- if (c == FL_CURSOR_DEFAULT) {
- c = cursor_default;
- }
- if (i) i->set_cursor(c);
-}
+ The default cursor will be used if the provided image cannot be used
+ as a cursor.
-#else
-
-// I like the MSWindows resize cursors, so I duplicate them here:
-
-#define CURSORSIZE 16
-#define HOTXY 7
-static struct TableEntry {
- uchar bits[CURSORSIZE*CURSORSIZE/8];
- uchar mask[CURSORSIZE*CURSORSIZE/8];
- Cursor cursor;
-} table[] = {
- {{ // FL_CURSOR_NS
- 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0x80, 0x01, 0x80, 0x01,
- 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
- 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00},
- {
- 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0xf0, 0x0f, 0xc0, 0x03,
- 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xf0, 0x0f,
- 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01}},
- {{ // FL_CURSOR_EW
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10,
- 0x0c, 0x30, 0xfe, 0x7f, 0xfe, 0x7f, 0x0c, 0x30, 0x08, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1c, 0x38,
- 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0x1c, 0x38, 0x18, 0x18,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
- {{ // FL_CURSOR_NWSE
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x38, 0x00, 0x78, 0x00,
- 0xe8, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x17, 0x00, 0x1e, 0x00, 0x1c,
- 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {
- 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x7c, 0x00, 0xfc, 0x00,
- 0xfc, 0x01, 0xec, 0x03, 0xc0, 0x37, 0x80, 0x3f, 0x00, 0x3f, 0x00, 0x3e,
- 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00}},
- {{ // FL_CURSOR_NESW
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1c, 0x00, 0x1e,
- 0x00, 0x17, 0x80, 0x03, 0xc0, 0x01, 0xe8, 0x00, 0x78, 0x00, 0x38, 0x00,
- 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
- {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3f,
- 0x80, 0x3f, 0xc0, 0x37, 0xec, 0x03, 0xfc, 0x01, 0xfc, 0x00, 0x7c, 0x00,
- 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00}},
- {{0}, {0}} // FL_CURSOR_NONE & unknown
-};
+ \see cursor(Fl_Cursor), default_cursor()
+*/
+void Fl_Window::cursor(const Fl_RGB_Image *image, int hotx, int hoty) {
+ int ret;
-void Fl_Window::cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
- if (!shown()) return;
- Cursor xc;
- int deleteit = 0;
- if (c == FL_CURSOR_DEFAULT) {
- c = cursor_default;
- fg = cursor_fg;
- bg = cursor_bg;
+ // the cursor must be set for the top level window, not for subwindows
+ Fl_Window *w = window(), *toplevel = this;
+
+ while (w) {
+ toplevel = w;
+ w = w->window();
}
- if (!c) {
- xc = None;
- } else {
- if (c >= FL_CURSOR_NS) {
- TableEntry *q = (c > FL_CURSOR_NESW) ? table+4 : table+(c-FL_CURSOR_NS);
- if (!(q->cursor)) {
- XColor dummy = { 0 };
- Pixmap p = XCreateBitmapFromData(fl_display,
- RootWindow(fl_display, fl_screen), (const char*)(q->bits),
- CURSORSIZE, CURSORSIZE);
- Pixmap m = XCreateBitmapFromData(fl_display,
- RootWindow(fl_display, fl_screen), (const char*)(q->mask),
- CURSORSIZE, CURSORSIZE);
- q->cursor = XCreatePixmapCursor(fl_display, p,m,&dummy, &dummy,
- HOTXY, HOTXY);
- XFreePixmap(fl_display, m);
- XFreePixmap(fl_display, p);
- }
- xc = q->cursor;
- } else {
- xc = XCreateFontCursor(fl_display, (c-1)*2);
- deleteit = 1;
- }
- XColor fgc;
- uchar r,g,b;
- Fl::get_color(fg,r,g,b);
- fgc.red = r<<8; fgc.green = g<<8; fgc.blue = b<<8;
- XColor bgc;
- Fl::get_color(bg,r,g,b);
- bgc.red = r<<8; bgc.green = g<<8; bgc.blue = b<<8;
- XRecolorCursor(fl_display, xc, &fgc, &bgc);
+ if (toplevel != this) {
+ toplevel->cursor(image, hotx, hoty);
+ return;
}
- XDefineCursor(fl_display, fl_xid(this), xc);
- if (deleteit) XFreeCursor(fl_display, xc);
+
+ if (!i)
+ return;
+
+ ret = i->set_cursor(image, hotx, hoty);
+ if (ret)
+ return;
+
+ cursor(FL_CURSOR_DEFAULT);
}
-#endif
+/**
+ For back compatibility only.
+ Same as Fl_Window::cursor(Fl_Cursor)
+*/
+void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
+ cursor(c);
+};
+
+/**
+ For back compatibility only.
+ same as Fl_Window::default_cursor(Fl_Cursor)
+*/
+void Fl_Window::default_cursor(Fl_Cursor c, Fl_Color, Fl_Color) {
+ default_cursor(c);
+};
+
//
-// End of "$Id: fl_cursor.cxx 9278 2012-03-12 11:55:50Z manolo $".
+// End of "$Id: fl_cursor.cxx 10405 2014-10-29 15:53:52Z manolo $".
//
diff --git a/src/fl_cursor_help.xpm b/src/fl_cursor_help.xpm
new file mode 100644
index 0000000..2c21983
--- /dev/null
+++ b/src/fl_cursor_help.xpm
@@ -0,0 +1,39 @@
+/* XPM */
+static const char * const fl_cursor_help_xpm[] = {
+"16 27 9 1",
+" c None",
+". c #FFFFFF",
+"+ c #DBDBDB",
+"@ c #242424",
+"# c #000000",
+"$ c #494949",
+"% c #6D6D6D",
+"& c #929292",
+"* c #B6B6B6",
+" ",
+". ",
+".+ ",
+".@+ ",
+".#@+ ",
+".##@. ",
+".###@. ",
+".####@. ",
+".#####$. ",
+".######$. ",
+".#######$. ",
+".#####@@@%. ",
+".#####+..... ",
+".##$%#%. ",
+".#$..@#. ",
+".$. .&#%. ",
+".. .##. .... ",
+". .&#.+%$%&. ",
+" ...*#@##%.",
+" ++.*#@.",
+" .%#$.",
+" .%#@. ",
+" .##+ ",
+" .++. ",
+" +##. ",
+" +##. ",
+" .... "};
diff --git a/src/fl_cursor_nesw.xpm b/src/fl_cursor_nesw.xpm
new file mode 100644
index 0000000..4fbdcc9
--- /dev/null
+++ b/src/fl_cursor_nesw.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static const char * const fl_cursor_nesw_xpm[] = {
+"15 15 28 1",
+" c None",
+". c #FFFFFF",
+"+ c #767676",
+"@ c #000000",
+"# c #4E4E4E",
+"$ c #0C0C0C",
+"% c #494949",
+"& c #4D4D4D",
+"* c #1B1B1B",
+"= c #515151",
+"- c #646464",
+"; c #363636",
+"> c #6A6A6A",
+", c #545454",
+"' c #585858",
+") c #242424",
+"! c #797979",
+"~ c #2E2E2E",
+"{ c #444444",
+"] c #3B3B3B",
+"^ c #0A0A0A",
+"/ c #595959",
+"( c #F7F7F7",
+"_ c #080808",
+": c #6B6B6B",
+"< c #FDFDFD",
+"[ c #FCFCFC",
+"} c #FEFEFE",
+" ..........",
+" .+@@@@@@.",
+" .#@@@@@.",
+" .$@@@@.",
+" .%@@@@@.",
+". .&@@@*@@.",
+".. .=@@@-.;@.",
+".>. .,@@@'. .).",
+".@!.'@@@#. ..",
+".@@~@@@{. .",
+".@@@@@]. ",
+".@@@@^. ",
+".@@@@@/( ",
+".______:( ",
+"<[[[[[[[[} "};
diff --git a/src/fl_cursor_none.xpm b/src/fl_cursor_none.xpm
new file mode 100644
index 0000000..fb53c6d
--- /dev/null
+++ b/src/fl_cursor_none.xpm
@@ -0,0 +1,19 @@
+/* XPM */
+static const char * const fl_cursor_none_xpm[] = {
+"15 15 1 1",
+" c None",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
diff --git a/src/fl_cursor_nwse.xpm b/src/fl_cursor_nwse.xpm
new file mode 100644
index 0000000..f5e4ebb
--- /dev/null
+++ b/src/fl_cursor_nwse.xpm
@@ -0,0 +1,46 @@
+/* XPM */
+static const char * const fl_cursor_nwse_xpm[] = {
+"15 15 28 1",
+" c None",
+". c #FFFFFF",
+"+ c #000000",
+"@ c #767676",
+"# c #4E4E4E",
+"$ c #0C0C0C",
+"% c #494949",
+"& c #1B1B1B",
+"* c #4D4D4D",
+"= c #363636",
+"- c #646464",
+"; c #515151",
+"> c #242424",
+", c #585858",
+"' c #545454",
+") c #6A6A6A",
+"! c #797979",
+"~ c #444444",
+"{ c #2E2E2E",
+"] c #3B3B3B",
+"^ c #0A0A0A",
+"/ c #F7F7F7",
+"( c #595959",
+"_ c #6B6B6B",
+": c #080808",
+"< c #FEFEFE",
+"[ c #FCFCFC",
+"} c #FDFDFD",
+".......... ",
+".++++++@. ",
+".+++++#. ",
+".++++$. ",
+".+++++%. ",
+".++&+++*. .",
+".+=.-+++;. ..",
+".>. .,+++'. .).",
+".. .#+++,.!+.",
+". .~+++{++.",
+" .]+++++.",
+" .^++++.",
+" /(+++++.",
+" /_::::::.",
+" <[[[[[[[[}"};
diff --git a/src/fl_cursor_wait.xpm b/src/fl_cursor_wait.xpm
new file mode 100644
index 0000000..da02784
--- /dev/null
+++ b/src/fl_cursor_wait.xpm
@@ -0,0 +1,28 @@
+/* XPM */
+static const char * const fl_cursor_wait_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"13 18 3 1",
+/* colors */
+" c None",
+". c #FFFFFF",
+"B c #000000",
+/* pixels */
+" ........ ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" .B......B. ",
+".B....B...B. ",
+".B....B...B. ",
+".B....B...BB.",
+".B.BBBB...BB.",
+".B........B. ",
+".B........B. ",
+" .B......B. ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" .BBBBBB. ",
+" ........ ",
+};
diff --git a/src/fl_diamond_box.cxx b/src/fl_diamond_box.cxx
index b775e05..db2bfb2 100644
--- a/src/fl_diamond_box.cxx
+++ b/src/fl_diamond_box.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_diamond_box.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_diamond_box.cxx 10306 2014-09-13 16:49:47Z manolo $"
//
// Diamond box code for the Fast Light Tool Kit (FLTK).
//
@@ -25,7 +25,7 @@
#include <FL/Fl.H>
#include <FL/fl_draw.H>
-extern uchar* fl_gray_ramp();
+extern const uchar* fl_gray_ramp();
static void fl_diamond_up_box(int x,int y,int w,int h,Fl_Color bgcolor) {
w &= -2;
@@ -33,14 +33,14 @@ static void fl_diamond_up_box(int x,int y,int w,int h,Fl_Color bgcolor) {
int x1 = x+w/2;
int y1 = y+h/2;
fl_color(bgcolor); fl_polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
- uchar *g = fl_gray_ramp();
- fl_color(g['W']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
- fl_color(g['U']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
- fl_color(g['S']); fl_line(x+3, y1, x1, y+3, x+w-3, y1);
- fl_color(g['P']); fl_line(x+3, y1, x1, y+h-3, x+w-3, y1);
- fl_color(g['N']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
- fl_color(g['H']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
- fl_color(g['A']); fl_loop(x, y1, x1, y, x+w, y1, x1, y+h);
+ const uchar *g = fl_gray_ramp();
+ fl_color(g[(int)'W']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
+ fl_color(g[(int)'U']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
+ fl_color(g[(int)'S']); fl_line(x+3, y1, x1, y+3, x+w-3, y1);
+ fl_color(g[(int)'P']); fl_line(x+3, y1, x1, y+h-3, x+w-3, y1);
+ fl_color(g[(int)'N']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
+ fl_color(g[(int)'H']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
+ fl_color(g[(int)'A']); fl_loop(x, y1, x1, y, x+w, y1, x1, y+h);
}
static void fl_diamond_down_box(int x,int y,int w,int h,Fl_Color bgcolor) {
@@ -48,15 +48,15 @@ static void fl_diamond_down_box(int x,int y,int w,int h,Fl_Color bgcolor) {
h &= -2;
int x1 = x+w/2;
int y1 = y+h/2;
- uchar *g = fl_gray_ramp();
- fl_color(g['P']); fl_line(x+0, y1, x1, y+0, x+w-0, y1);
- fl_color(g['N']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
- fl_color(g['H']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
- fl_color(g['W']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
- fl_color(g['U']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
- fl_color(g['S']); fl_line(x+0, y1, x1, y+h-0, x+w-0, y1);
+ const uchar *g = fl_gray_ramp();
+ fl_color(g[(int)'P']); fl_line(x+0, y1, x1, y+0, x+w-0, y1);
+ fl_color(g[(int)'N']); fl_line(x+1, y1, x1, y+1, x+w-1, y1);
+ fl_color(g[(int)'H']); fl_line(x+2, y1, x1, y+2, x+w-2, y1);
+ fl_color(g[(int)'W']); fl_line(x+2, y1, x1, y+h-2, x+w-2, y1);
+ fl_color(g[(int)'U']); fl_line(x+1, y1, x1, y+h-1, x+w-1, y1);
+ fl_color(g[(int)'S']); fl_line(x+0, y1, x1, y+h-0, x+w-0, y1);
fl_color(bgcolor); fl_polygon(x+3, y1, x1,y+3, x+w-3,y1, x1,y+h-3);
- fl_color(g['A']); fl_loop(x+3, y1, x1, y+3, x+w-3, y1, x1, y+h-3);
+ fl_color(g[(int)'A']); fl_loop(x+3, y1, x1, y+3, x+w-3, y1, x1, y+h-3);
}
extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
@@ -67,5 +67,5 @@ Fl_Boxtype fl_define_FL_DIAMOND_BOX() {
}
//
-// End of "$Id: fl_diamond_box.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_diamond_box.cxx 10306 2014-09-13 16:49:47Z manolo $".
//
diff --git a/src/fl_dnd_x.cxx b/src/fl_dnd_x.cxx
index 6d47a46..b5fe857 100644
--- a/src/fl_dnd_x.cxx
+++ b/src/fl_dnd_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_dnd_x.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_dnd_x.cxx 9979 2013-09-20 03:36:02Z greg.ercolano $"
//
// Drag & Drop code for the Fast Light Tool Kit (FLTK).
//
@@ -55,9 +55,11 @@ static int dnd_aware(Window& window) {
0, 4, False, XA_ATOM,
&actual, &format,
&count, &remaining, &data);
+ int ret = 0;
if (actual == XA_ATOM && format==32 && count && data)
- return int(*(Atom*)data);
- return 0;
+ ret = int(*(Atom*)data);
+ if (data) { XFree(data); data = 0; }
+ return ret;
}
static int grabfunc(int event) {
@@ -189,5 +191,5 @@ int Fl::dnd() {
//
-// End of "$Id: fl_dnd_x.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_dnd_x.cxx 9979 2013-09-20 03:36:02Z greg.ercolano $".
//
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx
index 2fa499b..355b04a 100644
--- a/src/fl_draw.cxx
+++ b/src/fl_draw.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $"
+// "$Id: fl_draw.cxx 10265 2014-09-03 10:07:33Z AlbrechtS $"
//
// Label drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -32,83 +32,28 @@
#include <ctype.h>
#include <math.h>
-#define MAXBUF 1024
char fl_draw_shortcut; // set by fl_labeltypes.cxx
static char* underline_at;
-/**
- utf8 multibyte char seq. detection an pass-thru routine.
- \retval false if no utf8 seq detected, no change made. true if utf8 and d copied with s seq.
- note that for n bytes copied dest incremented of n, but s of n-1 for compatible loop use see below.
-*/
-#define C_IN(c,a,b) ((c)>=(a) && (c)<=(b))
-#define C_UTF8(c) C_IN(c,0x80,0xBF)
-
-static bool handle_utf8_seq(const char * &s,char * &d) {
- register const unsigned char* p=(const unsigned char*)s;
- if (p[0] < 0xc2 || p[0] > 0xf4)
- return false; // not adressed in this function
- else if ( C_IN(p[0], 0xc2, 0xdf) && C_UTF8(p[1]) ) {
- d[0]=s[0]; d[1]=s[1];
- d+=2; s++;
- // non-overlong 2-byte
- }
- else if ( p[0]==0xe0 && C_IN(p[1], 0xa0, 0xbf) && C_UTF8(p[2]) ) {
- d[0]=s[0]; d[1]=s[1];d[2]=s[2];
- d+=3; s+=2;
- // excluding overlongs
- }
- else if (p[0]==0xed && C_IN(p[1], 0x80, 0x9f) && C_UTF8(p[2]) ) {
- d[0]=s[0]; d[1]=s[1];d[2]=s[2];
- d+=3; s+=2;
- // excluding surrogates
- }
- else if (p[0]!=0xed && C_IN(p[0], 0xe1, 0xef) && C_UTF8(p[1]) && C_UTF8(p[2]) ) {
- d[0]=s[0]; d[1]=s[1];d[2]=s[2];
- d+=3; s+=2;
- // straight 3-byte
- }
- else if (p[0]==0xf0 && C_IN(p[1], 0x90, 0xbf) && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
- d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
- d+=4; s+=3;
- // planes 1-3
- }
- else if (C_IN(p[0], 0xf1, 0xf3) && C_UTF8(p[1]) && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
- d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
- d+=4; s+=3;
- // planes 4-15
- }
- else if (p[0]==0xf4 && C_IN(p[1], 0x80, 0x8f) && C_UTF8(p[2]) && C_UTF8(p[3]) ) {
- d[0]=s[0]; d[1]=s[1]; d[2]=s[2]; d[3]=s[3];
- d+=4; s+=3;
- // planes 16
- } else { // non utf8 compliant, maybe CP125x or broken utf8 string
- // fprintf(stderr, "Not UTF8 char \n");
- return false;
- }
- return true; // we did handled and copied the utf8 multibyte char seq.
-}
-
-/**
- Copy \p from to \p buf, replacing unprintable characters with ^X and \\nnn.
-
- Stop at a newline or if MAXBUF characters written to buffer.
- Also word-wrap if width exceeds maxw.
- Returns a pointer to the start of the next line of characters.
- Sets n to the number of characters put into the buffer.
- Sets width to the width of the string in the current font.
-*/
-const char*
-fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n,
- double &width, int wrap, int draw_symbols) {
- char* o = buf;
+/* If called with maxbuf==0, use an internally allocated buffer and enlarge it as needed.
+ Otherwise, use buf as buffer but don't go beyond its length of maxbuf.
+ */
+static const char* expand_text_(const char* from, char*& buf, int maxbuf, double maxw, int& n,
+ double &width, int wrap, int draw_symbols) {
char* e = buf+(maxbuf-4);
underline_at = 0;
+ double w = 0;
+ static int l_local_buff = 500;
+ static char *local_buf = (char*)malloc(l_local_buff); // initial buffer allocation
+ if (maxbuf == 0) {
+ buf = local_buf;
+ e = buf + l_local_buff - 4;
+ }
+ char* o = buf;
char* word_end = o;
const char* word_start = from;
- double w = 0;
const char* p = from;
for (;; p++) {
@@ -132,10 +77,18 @@ fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n,
word_start = p+1;
}
- if (o > e) break; // don't overflow buffer
+ if (o > e) {
+ if (maxbuf) break; // don't overflow buffer
+ l_local_buff += (o - e) + 200; // enlarge buffer
+ buf = (char*)realloc(local_buf, l_local_buff);
+ e = buf + l_local_buff - 4; // update pointers to buffer content
+ o = buf + (o - local_buf);
+ word_end = buf + (word_end - local_buf);
+ local_buf = buf;
+ }
if (c == '\t') {
- for (c = fl_utf_nb_char((uchar*)buf, (int) (o-buf) )%8; c<8 && o<e; c++)
+ for (c = fl_utf_nb_char((uchar*)buf, (int) (o-buf) )%8; c<8 && o<e; c++)
*o++ = ' ';
} else if (c == '&' && fl_draw_shortcut && *(p+1)) {
if (*(p+1) == '&') {p++; *o++ = '&';}
@@ -143,14 +96,17 @@ fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n,
} else if (c < ' ' || c == 127) { // ^X
*o++ = '^';
*o++ = c ^ 0x40;
- } else if (handle_utf8_seq(p, o)) { // figure out if we have an utf8 valid sequence before we determine the nbsp test validity:
+/* This is in fact not useful: the point is that a valid UTF-8 sequence for a non-ascii char contains no ascii char,
+ thus no tab, space, control, & or @ we want to process differently.
+ Also, invalid UTF-8 sequences are copied unchanged by this procedure.
+ Therefore, checking for tab, space, control, & or @, and copying the byte otherwise, is enough.
+ } else if (handle_utf8_seq(p, o)) { // figure out if we have an utf8 valid sequence before we determine the nbsp test validity:
#ifdef __APPLE__
} else if (c == 0xCA) { // non-breaking space in MacRoman
#else
} else if (c == 0xA0) { // non-breaking space in ISO 8859
#endif
- *o++ = ' ';
-
+ *o++ = ' ';*/
} else if (c == '@' && draw_symbols) { // Symbol???
if (p[1] && p[1] != '@') break;
*o++ = c;
@@ -167,6 +123,21 @@ fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n,
}
/**
+ Copy \p from to \p buf, replacing control characters with ^X.
+
+ Stop at a newline or if \p maxbuf characters written to buffer.
+ Also word-wrap if width exceeds maxw.
+ Returns a pointer to the start of the next line of characters.
+ Sets n to the number of characters put into the buffer.
+ Sets width to the width of the string in the current font.
+ */
+const char*
+fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n,
+ double &width, int wrap, int draw_symbols) {
+ return expand_text_(from, buf, maxbuf, maxw, n, width, wrap, draw_symbols);
+}
+
+/**
The same as fl_draw(const char*,int,int,int,int,Fl_Align,Fl_Image*,int) with
the addition of the \p callthis parameter, which is a pointer to a text drawing
function such as fl_draw(const char*, int, int, int) to do the real work
@@ -176,11 +147,11 @@ void fl_draw(
int x, int y, int w, int h, // bounding box
Fl_Align align,
void (*callthis)(const char*,int,int,int),
- Fl_Image* img, int draw_symbols)
+ Fl_Image* img, int draw_symbols)
{
+ char *linebuf = NULL;
const char* p;
const char* e;
- char buf[MAXBUF];
int buflen;
char symbol[2][255], *symptr;
int symwidth[2], symoffset, symtotal, imgtotal;
@@ -191,7 +162,7 @@ void fl_draw(
// if the image is set as a backdrop, ignore it here
if (img && (align & FL_ALIGN_IMAGE_BACKDROP)) img = 0;
-
+
symbol[0][0] = '\0';
symwidth[0] = 0;
@@ -217,13 +188,13 @@ void fl_draw(
symtotal = symwidth[0] + symwidth[1];
imgtotal = (img && (align&FL_ALIGN_IMAGE_NEXT_TO_TEXT)) ? img->w() : 0;
-
+
int strw = 0;
int strh;
if (str) {
for (p = str, lines=0; p;) {
- e = fl_expand_text(p, buf, MAXBUF, w - symtotal - imgtotal, buflen, width,
+ e = expand_text_(p, linebuf, 0, w - symtotal - imgtotal, buflen, width,
align&FL_ALIGN_WRAP, draw_symbols);
if (strw<width) strw = (int)width;
lines++;
@@ -231,7 +202,7 @@ void fl_draw(
p = e;
}
} else lines = 0;
-
+
if ((symwidth[0] || symwidth[1]) && lines) {
if (symwidth[0]) symwidth[0] = lines * fl_height();
if (symwidth[1]) symwidth[1] = lines * fl_height();
@@ -239,7 +210,7 @@ void fl_draw(
symtotal = symwidth[0] + symwidth[1];
strh = lines * fl_height();
-
+
// figure out vertical position of the first line:
int xpos;
int ypos;
@@ -285,12 +256,12 @@ void fl_draw(
else yimg += (strh - img->h() - 1) / 2;
img->draw(xpos, yimg);
}
-
+
// now draw all the lines:
if (str) {
int desc = fl_descent();
for (p=str; ; ypos += height) {
- if (lines>1) e = fl_expand_text(p, buf, MAXBUF, w - symtotal - imgtotal, buflen,
+ if (lines>1) e = expand_text_(p, linebuf, 0, w - symtotal - imgtotal, buflen,
width, align&FL_ALIGN_WRAP, draw_symbols);
else e = "";
@@ -300,10 +271,10 @@ void fl_draw(
else if (align & FL_ALIGN_RIGHT) xpos = x + w - (int)(width + .5) - symwidth[1] - imgw[1];
else xpos = x + (w - (int)(width + .5) - symtotal - imgw[0] - imgw[1]) / 2 + symwidth[0] + imgw[0];
- callthis(buf,buflen,xpos,ypos-desc);
+ callthis(linebuf,buflen,xpos,ypos-desc);
- if (underline_at && underline_at >= buf && underline_at < (buf + buflen))
- callthis("_",1,xpos+int(fl_width(buf,(int) (underline_at-buf))),ypos-desc);
+ if (underline_at && underline_at >= linebuf && underline_at < (linebuf + buflen))
+ callthis("_",1,xpos+int(fl_width(linebuf,(int) (underline_at-linebuf))),ypos-desc);
if (!*e || (*e == '@' && e[1] != '@')) break;
p = e;
@@ -361,7 +332,6 @@ void fl_draw(
below the text as specified by the \p align value.
The \p draw_symbols argument specifies whether or not to look for symbol
names starting with the '\@' character'
- The text length is limited to 1024 characters per line.
*/
void fl_draw(
const char* str,
@@ -372,10 +342,10 @@ void fl_draw(
{
if ((!str || !*str) && !img) return;
if (w && h && !fl_not_clipped(x, y, w, h) && (align & FL_ALIGN_INSIDE)) return;
- if (align & FL_ALIGN_CLIP)
+ if (align & FL_ALIGN_CLIP)
fl_push_clip(x, y, w, h);
fl_draw(str, x, y, w, h, align, fl_draw, img, draw_symbols);
- if (align & FL_ALIGN_CLIP)
+ if (align & FL_ALIGN_CLIP)
fl_pop_clip();
}
@@ -383,7 +353,7 @@ void fl_draw(
Measure how wide and tall the string will be when printed by the
fl_draw() function with \p align parameter. If the incoming \p w
is non-zero it will wrap to that width.
-
+
The 'current font' is used to do the width/height calculations,
so unless its value is known at the time fl_measure() is called,
it is advised to first set the current font with fl_font().
@@ -406,45 +376,38 @@ void fl_draw(
void fl_measure(const char* str, int& w, int& h, int draw_symbols) {
if (!str || !*str) {w = 0; h = 0; return;}
h = fl_height();
+ char *linebuf = NULL;
const char* p;
const char* e;
- char buf[MAXBUF];
int buflen;
int lines;
double width=0;
int W = 0;
- char symbol[2][255], *symptr;
int symwidth[2], symtotal;
- // count how many lines and put the last one into the buffer:
- symbol[0][0] = '\0';
- symwidth[0] = 0;
-
- symbol[1][0] = '\0';
- symwidth[1] = 0;
+ symwidth[0] = 0; // size of symbol at beginning of string (if any)
+ symwidth[1] = 0; // size of symbol at end of string (if any)
if (draw_symbols) {
- if (str && str[0] == '@' && str[1] && str[1] != '@') {
- // Start with a symbol...
- for (symptr = symbol[0];
- *str && !isspace(*str) && symptr < (symbol[0] + sizeof(symbol[0]) - 1);
- *symptr++ = *str++);
- *symptr = '\0';
- if (isspace(*str)) str++;
+ // Symbol at beginning of string?
+ const char *sym2 = (str[0]=='@' && str[1]=='@') ? str+2 : str; // sym2 check will skip leading @@
+ if (str[0] == '@' && str[1] != '@') {
+ while (*str && !isspace(*str)) { ++str; } // skip over symbol
+ if (isspace(*str)) ++str; // skip over trailing space
+ sym2 = str; // sym2 check will skip leading symbol
symwidth[0] = h;
}
-
- if (str && (p = strrchr(str, '@')) != NULL && p > (str + 1) && p[-1]!='@') {
- strlcpy(symbol[1], p, sizeof(symbol[1]));
+ // Symbol at end of string?
+ if ((p=strchr(sym2,'@')) != NULL && p[1] != '@') {
symwidth[1] = h;
}
}
symtotal = symwidth[0] + symwidth[1];
-
+
for (p = str, lines=0; p;) {
-// e = expand(p, buf, w - symtotal, buflen, width, w != 0, draw_symbols);
- e = fl_expand_text(p, buf, MAXBUF, w - symtotal, buflen, width,
+// e = expand(p, linebuf, w - symtotal, buflen, width, w != 0, draw_symbols);
+ e = expand_text_(p, linebuf, 0, w - symtotal, buflen, width,
w != 0, draw_symbols);
if ((int)ceil(width) > W) W = (int)ceil(width);
lines++;
@@ -469,13 +432,13 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) {
but with the advent of XFT, there are (currently) complexities
that seem to only be solved by asking the font what its actual
font height is. (See STR#2115)
-
+
This function was originally undocumented in 1.1.x, and was used
only by Fl_Text_Display. We're now documenting it in 1.3.x so that
apps that need precise height info can get it with this function.
\returns the height of the font in pixels.
-
+
\todo In the future, when the XFT issues are resolved, this function
should simply return the 'size' value.
*/
@@ -489,5 +452,5 @@ int fl_height(int font, int size) {
}
//
-// End of "$Id: fl_draw.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $".
+// End of "$Id: fl_draw.cxx 10265 2014-09-03 10:07:33Z AlbrechtS $".
//
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index 7a85b76..8440d55 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw_pixmap.cxx 9375 2012-04-22 03:09:31Z fabien $"
+// "$Id: fl_draw_pixmap.cxx 10242 2014-08-22 10:28:50Z AlbrechtS $"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -16,6 +16,9 @@
// http://www.fltk.org/str.php
//
+// NOTE: I believe many of the following comments (between the dash markers)
+// are no longer accurate:
+// --------------------------------------------------------------------
// Implemented without using the xpm library (which I can't use because
// it interferes with the color cube used by fl_draw_image).
// Current implementation is cheap and slow, and works best on a full-color
@@ -25,6 +28,9 @@
// Notice that there is no pixmap file interface. This is on purpose,
// as I want to discourage programs that require support files to work.
// All data needed by a program ui should be compiled in!!!
+// --------------------------------------------------------------------
+// The above comments were checked in as r2, and much has changed since then;
+// transparency added, color cube not required, etc. -erco Oct 20 2013
#include <FL/Fl.H>
#include <FL/fl_draw.H>
@@ -37,7 +43,7 @@ static int ncolors, chars_per_pixel;
/**
Get the dimensions of a pixmap.
An XPM image contains the dimensions in its data. This function
- returns te width and height.
+ returns the width and height.
\param[in] data pointer to XPM image data.
\param[out] w,h width and height of image
\returns non-zero if the dimensions were parsed OK
@@ -58,99 +64,6 @@ int fl_measure_pixmap(const char * const *cdata, int &w, int &h) {
return 1;
}
-#ifdef U64
-
-// The callback from fl_draw_image to get a row of data passes this:
-struct pixmap_data {
- int w, h;
- const uchar*const* data;
- union {
- U64 colors[256];
- U64* byte1[256];
- };
-};
-
-// callback for 1 byte per pixel:
-static void cb1(void*v, int x, int y, int w, uchar* buf) {
- pixmap_data& d = *(pixmap_data*)v;
- const uchar* p = d.data[y]+x;
- U64* q = (U64*)buf;
- for (int X=w; X>0; X-=2, p += 2) {
- if (X>1) {
-# if WORDS_BIGENDIAN
- *q++ = (d.colors[p[0]]<<32) | d.colors[p[1]];
-# else
- *q++ = (d.colors[p[1]]<<32) | d.colors[p[0]];
-# endif
- } else {
-# if WORDS_BIGENDIAN
- *q++ = d.colors[p[0]]<<32;
-# else
- *q++ = d.colors[p[0]];
-# endif
- }
- }
-}
-
-// callback for 2 bytes per pixel:
-static void cb2(void*v, int x, int y, int w, uchar* buf) {
- pixmap_data& d = *(pixmap_data*)v;
- const uchar* p = d.data[y]+2*x;
- U64* q = (U64*)buf;
- for (int X=w; X>0; X-=2) {
- U64* colors = d.byte1[*p++];
- int index = *p++;
- if (X>1) {
- U64* colors1 = d.byte1[*p++];
- int index1 = *p++;
-# if WORDS_BIGENDIAN
- *q++ = (colors[index]<<32) | colors1[index1];
-# else
- *q++ = (colors1[index1]<<32) | colors[index];
-# endif
- } else {
-# if WORDS_BIGENDIAN
- *q++ = colors[index]<<32;
-# else
- *q++ = colors[index];
-# endif
- }
- }
-}
-
-#else // U32
-
-// The callback from fl_draw_image to get a row of data passes this:
-struct pixmap_data {
- int w, h;
- const uchar*const* data;
- union {
- U32 colors[256];
- U32* byte1[256];
- };
-};
-
-// callback for 1 byte per pixel:
-static void cb1(void*v, int x, int y, int w, uchar* buf) {
- pixmap_data& d = *(pixmap_data*)v;
- const uchar* p = d.data[y]+x;
- U32* q = (U32*)buf;
- for (int X=w; X--;) *q++ = d.colors[*p++];
-}
-
-// callback for 2 bytes per pixel:
-static void cb2(void*v, int x, int y, int w, uchar* buf) {
- pixmap_data& d = *(pixmap_data*)v;
- const uchar* p = d.data[y]+2*x;
- U32* q = (U32*)buf;
- for (int X=w; X--;) {
- U32* colors = d.byte1[*p++];
- *q++ = colors[*p++];
- }
-}
-
-#endif // U64 else U32
-
uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
/**
@@ -169,50 +82,58 @@ int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color bg) {
#ifdef WIN32
// to compute an unused color to be used for the pixmap background
FL_EXPORT UINT win_pixmap_bg_color; // the RGB() of the pixmap background color
-static int color_count; // # of non-transparent colors used in pixmap
-static uchar *used_colors; // used_colors[3*i+j] j=0,1,2 are the RGB values of the ith used color
+static int color_count; // # of non-transparent colors used in pixmap
+typedef struct { uchar r; uchar g; uchar b; } UsedColor;
+static UsedColor *used_colors;
-static void make_unused_color(uchar &r, uchar &g, uchar &b)
-// makes an RGB triplet different from all the colors used in the pixmap
+// Makes an RGB triplet different from all the colors used in the pixmap
// and compute win_pixmap_bg_color from this triplet
-{
+static void make_unused_color(uchar &r, uchar &g, uchar &b) {
int i;
r = 2; g = 3; b = 4;
while (1) {
- for ( i = 0; i < color_count; i++) {
- if(used_colors[3*i] == r && used_colors[3*i+1] == g && used_colors[3*i+2] == b) break;
- }
+ for ( i=0; i<color_count; i++ )
+ if ( used_colors[i].r == r &&
+ used_colors[i].g == g &&
+ used_colors[i].b == b )
+ break;
if (i >= color_count) {
- free(used_colors);
+ free((void*)used_colors); used_colors = NULL;
win_pixmap_bg_color = RGB(r, g, b);
return;
- }
- if (r < 255) r++;
- else {
+ }
+ if (r < 255) {
+ r++;
+ } else {
r = 0;
- if (g < 255) g++;
- else {
+ if (g < 255) {
+ g++;
+ } else {
g = 0;
b++;
- }
}
}
+ }
}
#endif
-/**
- Draw XPM image data, with the top-left corner at the given position.
- \see fl_draw_pixmap(char* const* data, int x, int y, Fl_Color bg)
- */
-int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
- pixmap_data d;
- if (!fl_measure_pixmap(cdata, d.w, d.h)) return 0;
+int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) {
+ int w, h;
const uchar*const* data = (const uchar*const*)(cdata+1);
- int transparent_index = -1;
+
+ if (!fl_measure_pixmap(cdata, w, h))
+ return 0;
+
+ if ((chars_per_pixel < 1) || (chars_per_pixel > 2))
+ return 0;
+
+ typedef uchar uchar4[4];
+ uchar4 *colors = new uchar4[1<<(chars_per_pixel*8)];
+
#ifdef WIN32
uchar *transparent_c = (uchar *)0; // such that transparent_c[0,1,2] are the RGB of the transparent color
color_count = 0;
- used_colors = (uchar *)malloc(abs(ncolors)*3*sizeof(uchar));
+ used_colors = (UsedColor*)malloc(abs(ncolors) * sizeof(UsedColor));
#endif
if (ncolors < 0) { // FLTK (non standard) compressed colormap
@@ -221,14 +142,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
// if first color is ' ' it is transparent (put it later to make
// it not be transparent):
if (*p == ' ') {
- uchar* c = (uchar*)&d.colors[(int)' '];
-#ifdef U64
- *(U64*)c = 0;
-# if WORDS_BIGENDIAN
- c += 4;
-# endif
-#endif
- transparent_index = ' ';
+ uchar* c = colors[(int)' '];
Fl::get_color(bg, c[0], c[1], c[2]); c[3] = 0;
#ifdef WIN32
transparent_c = c;
@@ -238,48 +152,27 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
}
// read all the rest of the colors:
for (int i=0; i < ncolors; i++) {
- uchar* c = (uchar*)&d.colors[*p++];
-#ifdef U64
- *(U64*)c = 0;
-# if WORDS_BIGENDIAN
- c += 4;
-# endif
-#endif
+ uchar* c = colors[*p++];
#ifdef WIN32
- used_colors[3*color_count] = *p;
- used_colors[3*color_count+1] = *(p+1);
- used_colors[3*color_count+2] = *(p+2);
+ used_colors[color_count].r = *(p+0);
+ used_colors[color_count].g = *(p+1);
+ used_colors[color_count].b = *(p+2);
color_count++;
#endif
*c++ = *p++;
*c++ = *p++;
*c++ = *p++;
-#ifdef __APPLE_QUARTZ__
*c = 255;
-#else
- *c = 0;
-#endif
}
} else { // normal XPM colormap with names
- if (chars_per_pixel>1) memset(d.byte1, 0, sizeof(d.byte1));
for (int i=0; i<ncolors; i++) {
const uchar *p = *data++;
// the first 1 or 2 characters are the color index:
int ind = *p++;
uchar* c;
- if (chars_per_pixel>1) {
-#ifdef U64
- U64* colors = d.byte1[ind];
- if (!colors) colors = d.byte1[ind] = new U64[256];
-#else
- U32* colors = d.byte1[ind];
- if (!colors) colors = d.byte1[ind] = new U32[256];
-#endif
- c = (uchar*)&colors[*p];
+ if (chars_per_pixel>1)
ind = (ind<<8)|*p++;
- } else {
- c = (uchar *)&d.colors[ind];
- }
+ c = colors[ind];
// look for "c word", or last word if none:
const uchar *previous_word = p;
for (;;) {
@@ -292,122 +185,109 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
previous_word = p;
while (*p && !isspace(*p)) p++;
}
-#ifdef U64
- *(U64*)c = 0;
-# if WORDS_BIGENDIAN
- c += 4;
-# endif
-#endif
-#ifdef __APPLE_QUARTZ__
- c[3] = 255;
-#endif
int parse = fl_parse_color((const char*)p, c[0], c[1], c[2]);
+ c[3] = 255;
if (parse) {
#ifdef WIN32
- used_colors[3*color_count] = c[0];
- used_colors[3*color_count+1] = c[1];
- used_colors[3*color_count+2] = c[2];
+ used_colors[color_count].r = c[0];
+ used_colors[color_count].g = c[1];
+ used_colors[color_count].b = c[2];
color_count++;
#endif
- }
- else {
+ } else {
// assume "None" or "#transparent" for any errors
// "bg" should be transparent...
Fl::get_color(bg, c[0], c[1], c[2]);
-#ifdef __APPLE_QUARTZ__
c[3] = 0;
-#endif
- transparent_index = ind;
#ifdef WIN32
transparent_c = c;
#endif
- }
- }
- }
- d.data = data;
+ } // if parse
+ } // for ncolors
+ } // if ncolors
#ifdef WIN32
if (transparent_c) {
make_unused_color(transparent_c[0], transparent_c[1], transparent_c[2]);
- }
- else {
+ } else {
uchar r, g, b;
make_unused_color(r, g, b);
}
#endif
-
-#ifdef __APPLE_QUARTZ__
- if (Fl_Surface_Device::surface() == Fl_Display_Device::display_device()) {
- U32 *array = new U32[d.w * d.h], *q = array;
- for (int Y = 0; Y < d.h; Y++) {
+
+ U32 *q = (U32*)out;
+ for (int Y = 0; Y < h; Y++) {
const uchar* p = data[Y];
if (chars_per_pixel <= 1) {
- for (int X = 0; X < d.w; X++) {
- *q++ = d.colors[*p++];
- }
+ for (int X = 0; X < w; X++)
+ memcpy(q++, colors[*p++], 4);
} else {
- for (int X = 0; X < d.w; X++) {
- U32* colors = (U32*)d.byte1[*p++];
- *q++ = colors[*p++];
+ for (int X = 0; X < w; X++) {
+ int ind = (*p++)<<8;
+ ind |= *p++;
+ memcpy(q++, colors[ind], 4);
}
}
}
- Fl_RGB_Image* rgb = new Fl_RGB_Image((uchar*)array, d.w, d.h, 4);
+ delete[] colors;
+ return 1;
+}
+
+/**
+ Draw XPM image data, with the top-left corner at the given position.
+ \see fl_draw_pixmap(char* const* data, int x, int y, Fl_Color bg)
+ */
+int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
+ int w, h;
+
+ if (!fl_measure_pixmap(cdata, w, h))
+ return 0;
+
+ uchar *buffer = new uchar[w*h*4];
+
+ if (!fl_convert_pixmap(cdata, buffer, bg)) {
+ delete[] buffer;
+ return 0;
+ }
+
+ // FIXME: Hack until fl_draw_image() supports alpha properly
+#ifdef __APPLE_QUARTZ__
+ if (Fl_Surface_Device::surface() == Fl_Display_Device::display_device()) {
+ Fl_RGB_Image* rgb = new Fl_RGB_Image(buffer, w, h, 4);
rgb->draw(x, y);
delete rgb;
- delete[] array;
- }
- else {
+ } else {
#endif // __APPLE_QUARTZ__
-
// build the mask bitmap used by Fl_Pixmap:
- if (fl_mask_bitmap && transparent_index >= 0) {
- int W = (d.w+7)/8;
- uchar* bitmap = new uchar[W * d.h];
+ if (fl_mask_bitmap) {
+ int W = (w+7)/8;
+ uchar* bitmap = new uchar[W * h];
*fl_mask_bitmap = bitmap;
- for (int Y = 0; Y < d.h; Y++) {
- const uchar* p = data[Y];
- if (chars_per_pixel <= 1) {
- int dw = d.w;
- for (int X = 0; X < W; X++) {
- uchar b = (dw-->0 && *p++ != transparent_index);
- if (dw-->0 && *p++ != transparent_index) b |= 2;
- if (dw-->0 && *p++ != transparent_index) b |= 4;
- if (dw-->0 && *p++ != transparent_index) b |= 8;
- if (dw-->0 && *p++ != transparent_index) b |= 16;
- if (dw-->0 && *p++ != transparent_index) b |= 32;
- if (dw-->0 && *p++ != transparent_index) b |= 64;
- if (dw-->0 && *p++ != transparent_index) b |= 128;
- *bitmap++ = b;
- }
- } else {
- uchar b = 0, bit = 1;
- for (int X = 0; X < d.w; X++) {
- int ind = *p++;
- ind = (ind<<8) | (*p++);
- if (ind != transparent_index) b |= bit;
-
- if (bit < 128) bit <<= 1;
- else {
+ const uchar *p = &buffer[3];
+ uchar b = 0;
+ for (int Y = 0; Y < h; Y++) {
+ b = 0;
+ for (int X = 0, bit = 1; X < w; X++, p += 4) {
+ if (*p > 127)
+ b |= bit;
+ bit <<= 1;
+ if (bit > 0x80 || X == w-1) {
*bitmap++ = b;
+ bit = 1;
b = 0;
- bit = 1;
}
- }
-
- if (bit > 1) *bitmap++ = b;
- }
- }
+ } // if chars_per_pixel
+ } // for Y
}
- fl_draw_image(chars_per_pixel==1 ? cb1 : cb2, &d, x, y, d.w, d.h, 4);
+ fl_draw_image(buffer, x, y, w, h, 4);
+
#ifdef __APPLE_QUARTZ__
- }
+ }
#endif
-
- if (chars_per_pixel > 1) for (int i = 0; i < 256; i++) delete[] d.byte1[i];
+ delete[] buffer;
return 1;
}
//
-// End of "$Id: fl_draw_pixmap.cxx 9375 2012-04-22 03:09:31Z fabien $".
+// End of "$Id: fl_draw_pixmap.cxx 10242 2014-08-22 10:28:50Z AlbrechtS $".
//
diff --git a/src/fl_engraved_label.cxx b/src/fl_engraved_label.cxx
index 9a95daf..c94bfb6 100644
--- a/src/fl_engraved_label.cxx
+++ b/src/fl_engraved_label.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_engraved_label.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_engraved_label.cxx 10252 2014-08-23 09:22:17Z cand $"
//
// Engraved label drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -26,7 +26,7 @@
static void innards(
const Fl_Label* o, int X, int Y, int W, int H, Fl_Align align,
- int data[][3], int n)
+ const int data[][3], int n)
{
Fl_Align a1 = align;
if (a1 & FL_ALIGN_CLIP) {
@@ -42,14 +42,14 @@ static void innards(
static void fl_shadow_label(
const Fl_Label* o, int X, int Y, int W, int H, Fl_Align align)
{
- static int data[2][3] = {{2,2,FL_DARK3},{0,0,0}};
+ static const int data[2][3] = {{2,2,FL_DARK3},{0,0,0}};
innards(o, X, Y, W, H, align, data, 2);
}
static void fl_engraved_label(
const Fl_Label* o, int X, int Y, int W, int H, Fl_Align align)
{
- static int data[7][3] = {
+ static const int data[7][3] = {
{1,0,FL_LIGHT3},{1,1,FL_LIGHT3},{0,1,FL_LIGHT3},
{-1,0,FL_DARK3},{-1,-1,FL_DARK3},{0,-1,FL_DARK3},
{0,0,0}};
@@ -59,7 +59,7 @@ static void fl_engraved_label(
static void fl_embossed_label(
const Fl_Label* o, int X, int Y, int W, int H, Fl_Align align)
{
- static int data[7][3] = {
+ static const int data[7][3] = {
{-1,0,FL_LIGHT3},{-1,-1,FL_LIGHT3},{0,-1,FL_LIGHT3},
{1,0,FL_DARK3},{1,1,FL_DARK3},{0,1,FL_DARK3},
{0,0,0}};
@@ -80,5 +80,5 @@ Fl_Labeltype fl_define_FL_EMBOSSED_LABEL() {
}
//
-// End of "$Id: fl_engraved_label.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_engraved_label.cxx 10252 2014-08-23 09:22:17Z cand $".
//
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx
index 624c98d..dac6f81 100644
--- a/src/fl_font_mac.cxx
+++ b/src/fl_font_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font_mac.cxx 9120 2011-10-03 09:22:57Z manolo $"
+// "$Id: fl_font_mac.cxx 10193 2014-06-14 11:06:42Z manolo $"
//
// MacOS font selection routines for the Fast Light Tool Kit (FLTK).
//
@@ -26,6 +26,8 @@ static CGAffineTransform font_mx = { 1, 0, 0, -1, 0, 0 };
static CFMutableDictionaryRef attributes = NULL;
#endif
+const int Fl_X::CoreText_threshold = 100500; // this represents Mac OS 10.5
+
Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
next = 0;
# if HAVE_GL
@@ -34,10 +36,9 @@ Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
// knowWidths = 0;
// OpenGL needs those for its font handling
- q_name = strdup(name);
size = Size;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-if (fl_mac_os_version >= 100500) {//unfortunately, CTFontCreateWithName != NULL on 10.4 also!
+if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
CFStringRef str = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
fontref = CTFontCreateWithName(str, size, NULL);
CGGlyph glyph[2];
@@ -88,22 +89,9 @@ else {
#if ! __LP64__
OSStatus err;
// fill our structure with a few default values
- ascent = Size*3/4;
+ ascent = Size*3/4.;
descent = Size-ascent;
- q_width = Size*2/3;
- // now use ATS to get the actual Glyph size information
- // say that our passed-in name is encoded as UTF-8, since this works for plain ASCII names too...
- CFStringRef cfname = CFStringCreateWithCString(0L, name, kCFStringEncodingUTF8);
- ATSFontRef font = ATSFontFindFromName(cfname, kATSOptionFlagsDefault);
- if (font) {
- ATSFontMetrics m = { 0 };
- ATSFontGetHorizontalMetrics(font, kATSOptionFlagsDefault, &m);
- if (m.avgAdvanceWidth) q_width = int(m.avgAdvanceWidth*Size);
- // playing with the offsets a little to make standard sizes fit
- if (m.ascent) ascent = int(m.ascent*Size-0.5f);
- if (m.descent) descent = -int(m.descent*Size-1.5f);
- }
- CFRelease(cfname);
+ q_width = Size*2/3.;
// now we allocate everything needed to render text in this font later
// get us the default layout and style
err = ATSUCreateTextLayout(&layout);
@@ -115,15 +103,15 @@ else {
// render our font up-side-down, so when rendered through our inverted CGContext,
// text will appear normal again.
Fixed fsize = IntToFixed(Size);
-// ATSUFontID fontID = FMGetFontFromATSFontRef(font);
ATSUFontID fontID;
- ATSUFindFontFromName(name, strlen(name), kFontFullName, kFontMacintoshPlatform, kFontRomanScript, kFontEnglishLanguage, &fontID);
+ ATSUFindFontFromName(name, strlen(name), kFontFullName, kFontMacintoshPlatform, kFontNoScriptCode, kFontEnglishLanguage, &fontID);
// draw the font upside-down... Compensate for fltk/OSX origin differences
ATSUAttributeTag sTag[] = { kATSUFontTag, kATSUSizeTag, kATSUFontMatrixTag };
ByteCount sBytes[] = { sizeof(ATSUFontID), sizeof(Fixed), sizeof(CGAffineTransform) };
ATSUAttributeValuePtr sAttr[] = { &fontID, &fsize, &font_mx };
- err = ATSUSetAttributes(style, 3, sTag, sBytes, sAttr);
+ if (fontID != kATSUInvalidFontID) err = ATSUSetAttributes(style, 1, sTag, sBytes, sAttr); // set the font attribute
+ err = ATSUSetAttributes(style, 2, sTag + 1, sBytes + 1, sAttr + 1); // then the size and matrix attributes
// next, make sure that Quartz will only render at integer coordinates
ATSLineLayoutOptions llo = kATSLineUseDeviceMetrics | kATSLineDisableAllLayoutOperations;
ATSUAttributeTag aTag[] = { kATSULineLayoutOptionsTag };
@@ -176,7 +164,7 @@ Fl_Font_Descriptor::~Fl_Font_Descriptor() {
*/
if (this == fl_graphics_driver->font_descriptor()) fl_graphics_driver->font_descriptor(NULL);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- if (fl_mac_os_version >= 100500) {
+ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
CFRelease(fontref);
for (unsigned i = 0; i < sizeof(width)/sizeof(float*); i++) {
if (width[i]) free(width[i]);
@@ -187,23 +175,44 @@ Fl_Font_Descriptor::~Fl_Font_Descriptor() {
////////////////////////////////////////////////////////////////
-static Fl_Fontdesc built_in_table[] = {
-{"Arial"},
-{"Arial Bold"},
-{"Arial Italic"},
-{"Arial Bold Italic"},
-{"Courier New"},
-{"Courier New Bold"},
-{"Courier New Italic"},
-{"Courier New Bold Italic"},
-{"Times New Roman"},
-{"Times New Roman Bold"},
-{"Times New Roman Italic"},
-{"Times New Roman Bold Italic"},
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+static Fl_Fontdesc built_in_table_PS[] = { // PostScript font names preferred when Mac OS ≥ 10.5
+{"ArialMT"},
+{"Arial-BoldMT"},
+{"Arial-ItalicMT"},
+{"Arial-BoldItalicMT"},
+{"CourierNewPSMT"},
+{"CourierNewPS-BoldMT"},
+{"CourierNewPS-ItalicMT"},
+{"CourierNewPS-BoldItalicMT"},
+{"TimesNewRomanPSMT"},
+{"TimesNewRomanPS-BoldMT"},
+{"TimesNewRomanPS-ItalicMT"},
+{"TimesNewRomanPS-BoldItalicMT"},
{"Symbol"},
{"Monaco"},
-{"Andale Mono"}, // there is no bold Monaco font on standard Mac
-{"Webdings"},
+{"AndaleMono"}, // there is no bold Monaco font on standard Mac
+{"ZapfDingbatsITC"}
+};
+#endif
+
+static Fl_Fontdesc built_in_table_full[] = { // full font names used before 10.5
+ {"Arial"},
+ {"Arial Bold"},
+ {"Arial Italic"},
+ {"Arial Bold Italic"},
+ {"Courier New"},
+ {"Courier New Bold"},
+ {"Courier New Italic"},
+ {"Courier New Bold Italic"},
+ {"Times New Roman"},
+ {"Times New Roman Bold"},
+ {"Times New Roman Italic"},
+ {"Times New Roman Bold Italic"},
+ {"Symbol"},
+ {"Monaco"},
+ {"Andale Mono"}, // there is no bold Monaco font on standard Mac
+ {"Webdings"}
};
static UniChar *utfWbuf = 0;
@@ -223,7 +232,14 @@ static UniChar *mac_Utf8_to_Utf16(const char *txt, int len, int *new_len)
return utfWbuf;
} // mac_Utf8_to_Utf16
-Fl_Fontdesc* fl_fonts = built_in_table;
+Fl_Fontdesc* Fl_X::calc_fl_fonts(void)
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ return (fl_mac_os_version >= Fl_X::CoreText_threshold ? built_in_table_PS : built_in_table_full);
+#else
+ return built_in_table_full;
+#endif
+}
static Fl_Font_Descriptor* find(Fl_Font fnum, Fl_Fontsize size) {
Fl_Fontdesc* s = fl_fonts+fnum;
@@ -287,7 +303,7 @@ static CGFloat surrogate_width(const UniChar *txt, Fl_Font_Descriptor *fl_fontsi
static double fl_mac_width(const UniChar* txt, int n, Fl_Font_Descriptor *fl_fontsize) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-if (fl_mac_os_version >= 100500) {
+if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
double retval = 0;
UniChar uni;
int i;
@@ -302,7 +318,7 @@ if (fl_mac_os_version >= 100500) {
// r: index of the character block containing uni
unsigned int r = uni >> 7; // change 7 if sizeof(width) is changed
if (!fl_fontsize->width[r]) { // this character block has not been hit yet
- //fprintf(stderr,"r=%d size=%d name=%s\n",r,fl_fontsize->size, fl_fontsize->q_name);
+ //fprintf(stderr,"r=%d size=%d name=%s\n",r,fl_fontsize->size,fl_fonts[fl_font()].name);
// allocate memory to hold width of each character in the block
fl_fontsize->width[r] = (float*) malloc(sizeof(float) * block);
UniChar ii = r * block;
@@ -406,7 +422,7 @@ void Fl_Quartz_Graphics_Driver::text_extents(const char *str8, int n, int &dx, i
Fl_Font_Descriptor *fl_fontsize = font_descriptor();
UniChar *txt = mac_Utf8_to_Utf16(str8, n, &n);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-if (fl_mac_os_version >= 100500) {
+if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
CFStringRef str16 = CFStringCreateWithCharactersNoCopy(NULL, txt, n, kCFAllocatorNull);
CFDictionarySetValue (attributes, kCTFontAttributeName, fl_fontsize->fontref);
CFAttributedStringRef mastr = CFAttributedStringCreate(kCFAllocatorDefault, str16, attributes);
@@ -474,7 +490,7 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Graphics_Dr
// convert to UTF-16 first
UniChar *uniStr = mac_Utf8_to_Utf16(str, n, &n);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- if (fl_mac_os_version >= 100500) {
+ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
CFStringRef str16 = CFStringCreateWithCharactersNoCopy(NULL, uniStr, n, kCFAllocatorNull);
if (str16 == NULL) return; // shd not happen
CGColorRef color = flcolortocgcolor(driver->color());
@@ -540,5 +556,5 @@ void Fl_Quartz_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
}
//
-// End of "$Id: fl_font_mac.cxx 9120 2011-10-03 09:22:57Z manolo $".
+// End of "$Id: fl_font_mac.cxx 10193 2014-06-14 11:06:42Z manolo $".
//
diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx
index f526105..3970f08 100644
--- a/src/fl_font_win32.cxx
+++ b/src/fl_font_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font_win32.cxx 9293 2012-03-18 18:48:29Z manolo $"
+// "$Id: fl_font_win32.cxx 10226 2014-08-19 12:36:12Z AlbrechtS $"
//
// WIN32 font selection routines for the Fast Light Tool Kit (FLTK).
//
@@ -55,7 +55,7 @@ Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize fsize) {
// ...would be the right call, but is not implemented into Window95! (WinNT?)
//GetCharWidth(fl_gc, 0, 255, width);
int i;
- for (i = 0; i < 64; i++) width[i] = NULL;
+ memset(width, 0, 64 * sizeof(int*));
#if HAVE_GL
listbase = 0;
for (i = 0; i < 64; i++) glok[i] = 0;
@@ -77,8 +77,9 @@ Fl_Font_Descriptor::~Fl_Font_Descriptor() {
#endif
if (this == fl_graphics_driver->font_descriptor()) fl_graphics_driver->font_descriptor(NULL);
DeleteObject(fid);
- int i;
- for (i = 0; i < 64; i++) free(width[i]);
+ for (int i = 0; i < 64; i++) {
+ if ( width[i] ) free(width[i]);
+ }
}
////////////////////////////////////////////////////////////////
@@ -203,30 +204,32 @@ double Fl_GDI_Graphics_Driver::width(unsigned int c) {
r = (c & 0xFC00) >> 10;
if (!fl_fontsize->width[r]) {
fl_fontsize->width[r] = (int*) malloc(sizeof(int) * 0x0400);
- unsigned short i = 0, ii = r * 0x400;
- // The following code makes a best effort attempt to obtain a valid fl_gc.
- // If no fl_gc is available at the time we call fl_width(), then we first
- // try to obtain a gc from the first fltk window.
- // If that is null then we attempt to obtain the gc from the current screen
- // using (GetDC(NULL)).
- // This should resolve STR #2086
- HDC gc = fl_gc;
- HWND hWnd = 0;
- if (!gc) { // We have no valid gc, try and obtain one
- // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
- hWnd = Fl::first_window() ? fl_xid(Fl::first_window()) : NULL;
- gc = GetDC(hWnd);
- }
- if (!gc)
- Fl::fatal("Invalid graphic context: fl_width() failed because no valid HDC was found!");
- SelectObject(gc, fl_fontsize->fid);
- for (; i < 0x400; i++) {
- GetTextExtentPoint32W(gc, (WCHAR*)&ii, 1, &s);
- fl_fontsize->width[r][i] = s.cx;
- ii++;
+ for (int i = 0; i < 0x0400; i++) fl_fontsize->width[r][i] = -1;
+ } else {
+ if ( fl_fontsize->width[r][c&0x03FF] >= 0 ) { // already cached
+ return (double) fl_fontsize->width[r][c & 0x03FF];
}
- if (gc && gc!=fl_gc) ReleaseDC(hWnd, gc);
}
+ unsigned short ii = r * 0x400;
+ // The following code makes a best effort attempt to obtain a valid fl_gc.
+ // If no fl_gc is available at the time we call fl_width(), then we first
+ // try to obtain a gc from the first fltk window.
+ // If that is null then we attempt to obtain the gc from the current screen
+ // using (GetDC(NULL)).
+ // This should resolve STR #2086
+ HDC gc = fl_gc;
+ HWND hWnd = 0;
+ if (!gc) { // We have no valid gc, try and obtain one
+ // Use our first fltk window, or fallback to using the screen via GetDC(NULL)
+ hWnd = Fl::first_window() ? fl_xid(Fl::first_window()) : NULL;
+ gc = GetDC(hWnd);
+ }
+ if (!gc) Fl::fatal("Invalid graphic context: fl_width() failed because no valid HDC was found!");
+ SelectObject(gc, fl_fontsize->fid);
+ ii += c &0x03FF;
+ GetTextExtentPoint32W(gc, (WCHAR*)&ii, 1, &s);
+ fl_fontsize->width[r][c&0x03FF] = s.cx;
+ if (gc && gc!=fl_gc) ReleaseDC(hWnd, gc);
return (double) fl_fontsize->width[r][c & 0x03FF];
}
@@ -439,5 +442,5 @@ void Fl_GDI_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
}
#endif
//
-// End of "$Id: fl_font_win32.cxx 9293 2012-03-18 18:48:29Z manolo $".
+// End of "$Id: fl_font_win32.cxx 10226 2014-08-19 12:36:12Z AlbrechtS $".
//
diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx
index 7e4824c..1f2bbda 100644
--- a/src/fl_font_xft.cxx
+++ b/src/fl_font_xft.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font_xft.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_font_xft.cxx 10232 2014-08-21 12:13:47Z cand $"
//
// Xft font code for the Fast Light Tool Kit (FLTK).
//
@@ -101,8 +101,8 @@ Fl_Fontdesc* fl_fonts = built_in_table;
Fl_XFont_On_Demand fl_xfont;
void *fl_xftfont = 0;
-//const char* fl_encoding_ = "iso8859-1";
-const char* fl_encoding_ = "iso10646-1";
+//static const char* fl_encoding_ = "iso8859-1";
+static const char* fl_encoding_ = "iso10646-1";
static void fl_xft_font(Fl_Xlib_Graphics_Driver *driver, Fl_Font fnum, Fl_Fontsize size, int angle) {
if (fnum==-1) { // special case to stop font caching
@@ -153,7 +153,7 @@ static XftFont* fontopen(const char* name, Fl_Fontsize size, bool core, int angl
fl_open_display();
if(!is_xlfd) { // Not an XLFD - open as a XFT style name
- XftFont *the_font; // the font we will return;
+ XftFont *the_font = NULL; // the font we will return;
XftPattern *fnt_pat = XftPatternCreate(); // the pattern we will use for matching
int slant = XFT_SLANT_ROMAN;
int weight = XFT_WEIGHT_MEDIUM;
@@ -270,7 +270,10 @@ static XftFont* fontopen(const char* name, Fl_Fontsize size, bool core, int angl
free(picked_name);
#endif
- if (!match_pat) {
+ // open the matched font
+ if (match_pat) the_font = XftFontOpenPattern(fl_display, match_pat);
+
+ if (!match_pat || !the_font) {
// last chance, just open any font in the right size
the_font = XftFontOpen (fl_display, fl_screen,
XFT_FAMILY, XftTypeString, "sans",
@@ -284,9 +287,6 @@ static XftFont* fontopen(const char* name, Fl_Fontsize size, bool core, int angl
return the_font;
}
- // open the matched font
- the_font = XftFontOpenPattern(fl_display, match_pat);
-
#if 0 // diagnostic to print the "full name" of the font we actually opened. This works.
FcChar8 *picked_name2 = FcNameUnparse(the_font->pattern);
printf("Open : %s\n", picked_name2);
@@ -673,9 +673,9 @@ void Fl_Xlib_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
if (num_chars < n) n = num_chars; // limit drawing to usable characters in input array
FcChar32 *ucs_txt = new FcChar32[n+1];
FcChar32* pu;
- int in, out, sz;
+ int out, sz;
ucs_txt[n] = 0;
- in = 0; out = n-1;
+ out = n-1;
while ((out >= 0) && (utf_len > 0))
{
pu = &ucs_txt[out];
@@ -693,5 +693,5 @@ void Fl_Xlib_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
#endif
//
-// End of "$Id: fl_font_xft.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// End of "$Id: fl_font_xft.cxx 10232 2014-08-21 12:13:47Z cand $"
//
diff --git a/src/fl_gleam.cxx b/src/fl_gleam.cxx
new file mode 100644
index 0000000..b1c3bc5
--- /dev/null
+++ b/src/fl_gleam.cxx
@@ -0,0 +1,137 @@
+//
+// "$Id: fl_gleam.cxx 10143 2014-05-02 09:13:29Z ianmacarthur $"
+//
+// "Gleam" drawing routines for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+// These box types provide a sort of Clearlooks Glossy scheme
+// for FLTK.
+//
+// Copyright 2001-2005 by Colin Jones.
+//
+// Modified 2012-2013 by Edmanuel Torres
+// This is a new version of the fl_gleam. The gradients are on the top
+// an the bottom, the text area looks like in the classic FLTK way.
+//
+
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+
+static void gleam_color(Fl_Color c) {
+ if (Fl::draw_box_active()) fl_color(c);
+ else fl_color(fl_inactive(c));
+}
+
+static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, float th) {
+ // Draws the shiny using maximum limits
+ int h_top = ((h/2) < (20) ? (h/2) : (20)); // min(h/2,20);
+ int h_bottom = ((h/6) < (15) ? (h/6) : (15)); // min(h/6,15);
+ int h_flat = h-(h_top+h_bottom);
+ int j = 0;
+ float step_size_top = h_top>1?(0.999/(float)(h_top)):1;
+ float step_size_bottom = h_bottom>1?(0.999/(float)(h_bottom)):1;
+ // This loop generates the gradient at the top of the widget
+ for (float k = 1; k >= 0; k -= step_size_top){
+ gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k));
+ fl_line(x, y+j, x+w, y+j);
+ j++;
+ }
+ gleam_color(fg1);
+ fl_rectf(x, y+h_top, w+1, h_flat);
+ // This loop generates the gradient at the bottom of the widget
+ for (float k = 1; k >= 0; k -= step_size_bottom){
+ gleam_color(fl_color_average(fg1,fl_color_average(fg1, fg2, th), k));
+ fl_line(x, y+j+h_flat-1, x+w, y+j+h_flat-1);
+ j++;
+ }
+}
+
+static void shade_rect_top_bottom_up(int x, int y, int w, int h, Fl_Color bc, float th) {
+ shade_rect_top_bottom(x,y,w,h,bc,FL_WHITE,th);
+}
+
+static void shade_rect_top_bottom_down(int x, int y, int w, int h, Fl_Color bc, float th) {
+ shade_rect_top_bottom(x,y,w,h,bc,FL_BLACK,th);
+}
+
+static void frame_rect(int x, int y, int w, int h, Fl_Color fg1, Fl_Color fg2, Fl_Color lc) {
+ gleam_color(fg1);
+ fl_line(x, y+h-1, x, y+1); //Go from bottom to top left side
+ fl_line(x+w, y+h-1, x+w, y+1); //Go from bottom to top right side
+ fl_line(x+1, y, x+w-1, y); //Go across the top
+ fl_line(x+1, y+h, x+w-1, y+h); //Go across the bottom
+ gleam_color(fg2);
+ fl_line(x+1, y+h-2, x+1, y+2); //Go from bottom to top left side
+ fl_line(x+w-1, y+h-2, x+w-1, y+2); //Go from bottom to top right side
+ gleam_color(lc);
+ fl_line(x+2, y+1, x+w-3, y+1); //Go across the top
+ fl_line(x+2, y+h-1, x+w-3, y+h-1); //Go across the bottom
+}
+
+static void frame_rect_up(int x, int y, int w, int h, Fl_Color bc, Fl_Color lc, float th1, float th2) {
+ frame_rect(x,y,w,h,fl_color_average(fl_darker(bc), FL_BLACK, th1),fl_color_average(bc, FL_WHITE, th2),lc);
+}
+
+static void frame_rect_down(int x, int y, int w, int h, Fl_Color bc, Fl_Color lc, float th1, float th2) {
+ frame_rect(x,y,w,h,fl_color_average(bc, FL_WHITE, th1),fl_color_average(FL_BLACK, bc, th2),lc);
+}
+
+static void up_frame(int x, int y, int w, int h, Fl_Color c) {
+ frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .25f), .55f, .05f);
+}
+
+static void up_box(int x, int y, int w, int h, Fl_Color c) {
+ shade_rect_top_bottom_up(x+2, y+1, w-5, h-3, c, .15f);
+ frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .05f), .15f, .05f);
+}
+
+static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
+ shade_rect_top_bottom_up(x+2, y+1, w-5, h-3, c, .25f);
+ frame_rect_up(x, y, w-1, h-1, c, fl_color_average(c, FL_WHITE, .45f), .25f, .15f);
+}
+
+static void down_frame(int x, int y, int w, int h, Fl_Color c) {
+ frame_rect_down(x, y, w-1, h-1, fl_darker(c), fl_darker(c), .25f, .95f);
+}
+
+static void down_box(int x, int y, int w, int h, Fl_Color c) {
+ shade_rect_top_bottom_down(x+1, y+1, w-3, h-3, c, .65f);
+ frame_rect_down(x, y, w-1, h-1, c, fl_color_average(c, FL_BLACK, .05f), .05f, .95f);
+}
+
+static void thin_down_box(int x, int y, int w, int h, Fl_Color c) {
+ shade_rect_top_bottom_down(x+1, y+1, w-3, h-3, c, .85f);
+ frame_rect_down(x, y, w-1, h-1, c, fl_color_average(c, FL_BLACK, .45f), .35f, 0.85f);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+
+Fl_Boxtype fl_define_FL_GLEAM_UP_BOX() {
+ fl_internal_boxtype(_FL_GLEAM_UP_BOX, up_box);
+ fl_internal_boxtype(_FL_GLEAM_DOWN_BOX, down_box);
+ fl_internal_boxtype(_FL_GLEAM_UP_FRAME, up_frame);
+ fl_internal_boxtype(_FL_GLEAM_DOWN_FRAME, down_frame);
+ fl_internal_boxtype(_FL_GLEAM_THIN_UP_BOX, thin_up_box);
+ fl_internal_boxtype(_FL_GLEAM_THIN_DOWN_BOX, thin_down_box);
+ fl_internal_boxtype(_FL_GLEAM_ROUND_UP_BOX, up_box);
+ fl_internal_boxtype(_FL_GLEAM_ROUND_DOWN_BOX, down_box);
+ return _FL_GLEAM_UP_BOX;
+}
+
+
+//
+// End of "$Id: fl_gleam.cxx 10143 2014-05-02 09:13:29Z ianmacarthur $".
+//
+
diff --git a/src/fl_gtk.cxx b/src/fl_gtk.cxx
index ce44136..ac7780d 100644
--- a/src/fl_gtk.cxx
+++ b/src/fl_gtk.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_gtk.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_gtk.cxx 10232 2014-08-21 12:13:47Z cand $"
//
// "GTK" drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -203,7 +203,7 @@ static void draw(int which, int x,int y,int w,int h, int inset)
}
}
-void gtk_round_up_box(int x, int y, int w, int h, Fl_Color c) {
+static void gtk_round_up_box(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);
draw(FILL, x, y, w, h, 2);
@@ -234,7 +234,7 @@ void gtk_round_up_box(int x, int y, int w, int h, Fl_Color c) {
draw(CLOSED, x, y, w, h, 0);
}
-void gtk_round_down_box(int x, int y, int w, int h, Fl_Color c) {
+static void gtk_round_down_box(int x, int y, int w, int h, Fl_Color c) {
fl_color(c);
draw(FILL, x, y, w, h, 2);
@@ -291,5 +291,5 @@ Fl_Boxtype fl_define_FL_GTK_UP_BOX() {
//
-// End of "$Id: fl_gtk.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_gtk.cxx 10232 2014-08-21 12:13:47Z cand $".
//
diff --git a/src/fl_open_uri.cxx b/src/fl_open_uri.cxx
index c5b7fd0..cff26b8 100644
--- a/src/fl_open_uri.cxx
+++ b/src/fl_open_uri.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_open_uri.cxx 9580 2012-06-10 09:24:33Z manolo $"
+// "$Id: fl_open_uri.cxx 9995 2013-10-04 16:48:08Z greg.ercolano $"
//
// fl_open_uri() code for FLTK.
//
@@ -68,6 +68,14 @@ static int run_program(const char *program, char **argv, char *msg, int msglen);
*
* On failure, the msg buffer is filled with an English error message.
*
+ * \note
+ * \b Platform \b Specific \b Issues: \b Windows \n
+ * With "file:" based URIs on Windows, you may encounter issues with
+ * anchors being ignored. Example: "file:///c:/some/index.html#anchor"
+ * may open in the browser without the "#anchor" suffix. The behavior
+ * seems to vary across different Windows versions. Workaround: open a link
+ * to a separate html file that redirects to the desired "file:" URI.
+ *
* \b Example
* \code
* #include <FL/filename.H>
@@ -395,5 +403,5 @@ int main(int argc, char **argv) {
//
-// End of "$Id: fl_open_uri.cxx 9580 2012-06-10 09:24:33Z manolo $".
+// End of "$Id: fl_open_uri.cxx 9995 2013-10-04 16:48:08Z greg.ercolano $".
//
diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx
index 1b1df7e..e749b54 100644
--- a/src/fl_plastic.cxx
+++ b/src/fl_plastic.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_plastic.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $"
+// "$Id: fl_plastic.cxx 10307 2014-09-13 17:04:20Z manolo $"
//
// "Plastic" drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -35,7 +35,7 @@
//#define USE_OLD_PLASTIC_BOX
#define USE_OLD_PLASTIC_COLOR
-extern uchar *fl_gray_ramp();
+extern const uchar *fl_gray_ramp();
inline Fl_Color shade_color(uchar gc, Fl_Color bc) {
#ifdef USE_OLD_PLASTIC_COLOR
@@ -71,7 +71,7 @@ inline Fl_Color shade_color(uchar gc, Fl_Color bc) {
static void frame_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
int b = ((int) strlen(c)) / 4 + 1;
for (x += b, y += b, w -= 2 * b, h -= 2 * b; b > 1; b --)
@@ -91,7 +91,7 @@ static void frame_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
size_t b = strlen(c) / 4 + 1;
if (w==h) {
@@ -145,7 +145,7 @@ static void frame_round(int x, int y, int w, int h, const char *c, Fl_Color bc)
static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
int i, j;
int clen = (int) strlen(c) - 1;
int chalf = clen / 2;
@@ -217,7 +217,7 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc) {
}
static void shade_round(int x, int y, int w, int h, const char *c, Fl_Color bc) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
int i;
int clen = (int) (strlen(c) - 1);
int chalf = clen / 2;
@@ -277,10 +277,10 @@ static void up_frame(int x, int y, int w, int h, Fl_Color c) {
static void narrow_thin_box(int x, int y, int w, int h, Fl_Color c) {
if (h<=0 || w<=0) return;
- uchar *g = fl_gray_ramp();
- fl_color(shade_color(g['R'], c));
+ const uchar *g = fl_gray_ramp();
+ fl_color(shade_color(g[(int)'R'], c));
fl_rectf(x+1, y+1, w-2, h-2);
- fl_color(shade_color(g['I'], c));
+ fl_color(shade_color(g[(int)'I'], c));
if (w > 1) {
fl_xyline(x+1, y, x+w-2);
fl_xyline(x+1, y+h-1, x+w-2);
@@ -368,5 +368,5 @@ Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() {
//
-// End of "$Id: fl_plastic.cxx 9326 2012-04-05 14:30:19Z AlbrechtS $".
+// End of "$Id: fl_plastic.cxx 10307 2014-09-13 17:04:20Z manolo $".
//
diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx
index 41d5458..9a12aa0 100644
--- a/src/fl_read_image.cxx
+++ b/src/fl_read_image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_read_image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_read_image.cxx 10388 2014-10-22 16:27:20Z manolo $"
//
// X11 image reading routines for the Fast Light Tool Kit (FLTK).
//
@@ -70,8 +70,10 @@ fl_subimage_offsets(int a, int aw, int b, int bw, int &obw)
// this handler will catch and ignore exceptions during XGetImage
// to avoid an application crash
-static int xgetimageerrhandler(Display *display, XErrorEvent *error) {
- return 0;
+extern "C" {
+ static int xgetimageerrhandler(Display *display, XErrorEvent *error) {
+ return 0;
+ }
}
//
@@ -135,7 +137,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
// screen dimensions
Fl::screen_xywh(sx, sy, sw, sh, fl_screen);
}
- if (!win || (dx >= sx && dy >= sy && dx + w <= sw && dy + h <= sh)) {
+ if (!win || (dx >= sx && dy >= sy && dx + w <= sx+sw && dy + h <= sy+sh)) {
// the image is fully contained, we can use the traditional method
// however, if the window is obscured etc. the function will still fail. Make sure we
// catch the error and continue, otherwise an exception will be thrown.
@@ -496,5 +498,5 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
#endif
//
-// End of "$Id: fl_read_image.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_read_image.cxx 10388 2014-10-22 16:27:20Z manolo $".
//
diff --git a/src/fl_read_image_mac.cxx b/src/fl_read_image_mac.cxx
index ae2963f..d9a20df 100644
--- a/src/fl_read_image_mac.cxx
+++ b/src/fl_read_image_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_read_image_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_read_image_mac.cxx 10078 2014-01-22 20:39:21Z manolo $"
//
// WIN32 image reading routines for the Fast Light Tool Kit (FLTK).
//
@@ -45,6 +45,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
Fl_Window *window = Fl_Window::current();
while(window->window()) window = window->window();
base = Fl_X::bitmap_from_window_rect(window,x,y,w,h,&delta);
+ if (!base) return NULL;
rowBytes = delta*w;
x = y = 0;
}
@@ -69,5 +70,5 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate
//
-// End of "$Id: fl_read_image_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_read_image_mac.cxx 10078 2014-01-22 20:39:21Z manolo $".
//
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index e63ca13..d96b35f 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_rect.cxx 9293 2012-03-18 18:48:29Z manolo $"
+// "$Id: fl_rect.cxx 10401 2014-10-28 13:44:09Z manolo $"
//
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -188,7 +188,7 @@ void Fl_Graphics_Driver::rectf(int x, int y, int w, int h) {
rect.right = x + w; rect.bottom = y + h;
FillRect(fl_gc, &rect, fl_brush());
#elif defined(__APPLE_QUARTZ__)
- CGRect rect = CGRectMake(x, y, w - 0.9 , h - 0.9);
+ CGRect rect = CGRectMake(x - 0.5, y - 0.5, w , h);
CGContextFillRect(fl_gc, rect);
#else
# error unsupported platform
@@ -708,5 +708,5 @@ int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int& X, int& Y, int
}
//
-// End of "$Id: fl_rect.cxx 9293 2012-03-18 18:48:29Z manolo $".
+// End of "$Id: fl_rect.cxx 10401 2014-10-28 13:44:09Z manolo $".
//
diff --git a/src/fl_round_box.cxx b/src/fl_round_box.cxx
index e143e0b..eb0b31a 100644
--- a/src/fl_round_box.cxx
+++ b/src/fl_round_box.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_round_box.cxx 9211 2011-12-21 12:01:50Z AlbrechtS $"
+// "$Id: fl_round_box.cxx 10307 2014-09-13 17:04:20Z manolo $"
//
// Round box drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -71,34 +71,34 @@ static void draw(int which, int x,int y,int w,int h, int inset, Fl_Color color)
}
}
-extern uchar* fl_gray_ramp();
+extern const uchar* fl_gray_ramp();
void fl_round_down_box(int x, int y, int w, int h, Fl_Color bgcolor) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
- draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g['N']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g['H']);
- draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g['N']);
- draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g['H']);
- draw(LOWER_RIGHT, x, y, w, h, 0, (Fl_Color)g['S']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['U']);
- draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g['U']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['W']);
- draw(CLOSED, x, y, w, h, 2, (Fl_Color)g['A']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'N']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'H']);
+ draw(UPPER_LEFT, x, y, w, h, 0, (Fl_Color)g[(int)'N']);
+ draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g[(int)'H']);
+ draw(LOWER_RIGHT, x, y, w, h, 0, (Fl_Color)g[(int)'S']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'U']);
+ draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g[(int)'U']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'W']);
+ draw(CLOSED, x, y, w, h, 2, (Fl_Color)g[(int)'A']);
}
void fl_round_up_box(int x, int y, int w, int h, Fl_Color bgcolor) {
- uchar *g = fl_gray_ramp();
+ const uchar *g = fl_gray_ramp();
draw(FILL, x, y, w, h, 2, bgcolor);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g['H']);
- draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g['N']);
- draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g['H']);
- draw(LOWER_RIGHT, x, y, w, h, 2, (Fl_Color)g['N']);
- draw(UPPER_LEFT, x, y, w, h, 2, (Fl_Color)g['U']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g['S']);
- draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g['W']);
- draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g['U']);
- draw(CLOSED, x, y, w, h, 0, (Fl_Color)g['A']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'H']);
+ draw(LOWER_RIGHT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'N']);
+ draw(LOWER_RIGHT, x, y, w, h, 1, (Fl_Color)g[(int)'H']);
+ draw(LOWER_RIGHT, x, y, w, h, 2, (Fl_Color)g[(int)'N']);
+ draw(UPPER_LEFT, x, y, w, h, 2, (Fl_Color)g[(int)'U']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 1, (Fl_Color)g[(int)'S']);
+ draw(UPPER_LEFT, x, y, w, h, 1, (Fl_Color)g[(int)'W']);
+ draw(UPPER_LEFT, x+1, y, w-2, h, 0, (Fl_Color)g[(int)'U']);
+ draw(CLOSED, x, y, w, h, 0, (Fl_Color)g[(int)'A']);
}
extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
@@ -109,5 +109,5 @@ Fl_Boxtype fl_define_FL_ROUND_UP_BOX() {
}
//
-// End of "$Id: fl_round_box.cxx 9211 2011-12-21 12:01:50Z AlbrechtS $".
+// End of "$Id: fl_round_box.cxx 10307 2014-09-13 17:04:20Z manolo $".
//
diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx
index 99d0640..a694da2 100644
--- a/src/fl_scroll_area.cxx
+++ b/src/fl_scroll_area.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_scroll_area.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_scroll_area.cxx 10078 2014-01-22 20:39:21Z manolo $"
//
// Scrolling routines for the Fast Light Tool Kit (FLTK).
//
@@ -143,11 +143,13 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
#elif defined(__APPLE_QUARTZ__)
CGImageRef img = Fl_X::CGImage_from_window_rect(Fl_Window::current(), src_x, src_y, src_w, src_h);
- CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
- Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
- CGContextDrawImage(fl_gc, rect, img);
- Fl_X::q_end_image();
- CFRelease(img);
+ if (img) {
+ CGRect rect = { { dest_x, dest_y }, { src_w, src_h } };
+ Fl_X::q_begin_image(rect, 0, 0, src_w, src_h);
+ CGContextDrawImage(fl_gc, rect, img);
+ Fl_X::q_end_image();
+ CFRelease(img);
+ }
#else
# error unsupported platform
#endif
@@ -156,5 +158,5 @@ void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
}
//
-// End of "$Id: fl_scroll_area.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_scroll_area.cxx 10078 2014-01-22 20:39:21Z manolo $".
//
diff --git a/src/fl_set_fonts_mac.cxx b/src/fl_set_fonts_mac.cxx
index 43a5fcb..81f4207 100644
--- a/src/fl_set_fonts_mac.cxx
+++ b/src/fl_set_fonts_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_set_fonts_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_set_fonts_mac.cxx 10014 2013-10-30 13:36:16Z manolo $"
//
// MacOS font utilities for the Fast Light Tool Kit (FLTK).
//
@@ -20,27 +20,35 @@
// #inclde <SFNTTypes.h>
-// This function fills in the fltk font table with all the fonts that
-// are found on the X server. It tries to place the fonts into families
-// and to sort them so the first 4 in a family are normal, bold, italic,
-// and bold italic.
// Bug: older versions calculated the value for *ap as a side effect of
// making the name, and then forgot about it. To avoid having to change
// the header files I decided to store this value in the last character
// of the font name array.
-#define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
+#define ENDOFBUFFER sizeof(fl_fonts->fontname)-1
// turn a stored font name into a pretty name:
const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
Fl_Fontdesc *f = fl_fonts + fnum;
if (!f->fontname[0]) {
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if (fl_mac_os_version >= Fl_X::CoreText_threshold) {
+ CFStringRef cfname = CFStringCreateWithCString(NULL, f->name, kCFStringEncodingUTF8);
+ CTFontRef ctfont = CTFontCreateWithName(cfname, 0, NULL);
+ CFRelease(cfname);
+ cfname = CTFontCopyFullName(ctfont);
+ CFRelease(ctfont);
+ CFStringGetCString(cfname, f->fontname, ENDOFBUFFER, kCFStringEncodingUTF8);
+ CFRelease(cfname);
+ }
+ else
+#endif
+ strlcpy(f->fontname, f->name, ENDOFBUFFER);
const char* p = f->name;
if (!p || !*p) {if (ap) *ap = 0; return "";}
- strlcpy(f->fontname, p, ENDOFBUFFER);
int type = 0;
if (strstr(f->name, "Bold")) type |= FL_BOLD;
- if (strstr(f->name, "Italic")) type |= FL_ITALIC;
+ if (strstr(f->name, "Italic") || strstr(f->name, "Oblique")) type |= FL_ITALIC;
f->fontname[ENDOFBUFFER] = (char)type;
}
if (ap) *ap = f->fontname[ENDOFBUFFER];
@@ -48,21 +56,55 @@ const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+
+static char *skip(char *p, int& derived)
+{
+ if (memcmp(p, "-BoldItalic", 11) == 0) { p += 11; derived = 3; }
+ else if (memcmp(p, "-BoldOblique", 12) == 0) { p += 12; derived = 3; }
+ else if (memcmp(p, "-Bold", 5) == 0) {p += 5; derived = 1; }
+ else if (memcmp(p, "-Italic", 7) == 0) {p += 7; derived = 2; }
+ else if (memcmp(p, "-Oblique", 8) == 0) {p += 8; derived = 2; }
+ else if (memcmp(p, "-Regular", 8) == 0) {p += 8; }
+ else if (memcmp(p, "-Roman", 6) == 0) {p += 6; }
+ return p;
+}
+
static int name_compare(const void *a, const void *b)
{
- return strcmp(*(char**)a, *(char**)b);
+ /* Compare PostScript font names.
+ First compare font family names ignoring bold, italic and oblique qualifiers.
+ When families are identical, order them according to regular, bold, italic, bolditalic.
+ */
+ char *n1 = *(char**)a;
+ char *n2 = *(char**)b;
+ int derived1 = 0;
+ int derived2 = 0;
+ while (true) {
+ if (*n1 == '-') n1 = skip(n1, derived1);
+ if (*n2 == '-') n2 = skip(n2, derived2);
+ if (*n1 < *n2) return -1;
+ if (*n1 > *n2) return +1;
+ if (*n1 == 0) {
+ return derived1 - derived2;
+ }
+ n1++; n2++;
+ }
}
#endif
static int fl_free_font = FL_FREE_FONT;
+// This function fills in the fltk font table with all the fonts that
+// are found on the X server. It tries to place the fonts into families
+// and to sort them so the first 4 in a family are normal, bold, italic,
+// and bold italic.
+
Fl_Font Fl::set_fonts(const char* xstarname) {
#pragma unused ( xstarname )
if (fl_free_font > FL_FREE_FONT) return (Fl_Font)fl_free_font; // if already called
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-if(fl_mac_os_version >= 100500) {
-//if(CTFontCreateWithFontDescriptor != NULL) {// CTFontCreateWithFontDescriptor != NULL on 10.4 also!
+if(fl_mac_os_version >= Fl_X::CoreText_threshold) {
int value[1] = {1};
CFDictionaryRef dict = CFDictionaryCreate(NULL,
(const void **)kCTFontCollectionRemoveDuplicatesOption,
@@ -77,9 +119,9 @@ if(fl_mac_os_version >= 100500) {
for (i = 0; i < count; i++) {
CTFontDescriptorRef fdesc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(arrayref, i);
CTFontRef font = CTFontCreateWithFontDescriptor(fdesc, 0., NULL);
- CFStringRef cfname = CTFontCopyFullName(font);
+ CFStringRef cfname = CTFontCopyPostScriptName(font);
CFRelease(font);
- static char fname[100];
+ static char fname[200];
CFStringGetCString(cfname, fname, sizeof(fname), kCFStringEncodingUTF8);
tabfontnames[i] = strdup(fname); // never free'ed
CFRelease(cfname);
@@ -151,5 +193,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
}
//
-// End of "$Id: fl_set_fonts_mac.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_set_fonts_mac.cxx 10014 2013-10-30 13:36:16Z manolo $".
//
diff --git a/src/fl_set_fonts_xft.cxx b/src/fl_set_fonts_xft.cxx
index dbaf1b9..87dfeed 100644
--- a/src/fl_set_fonts_xft.cxx
+++ b/src/fl_set_fonts_xft.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_set_fonts_xft.cxx 9396 2012-04-24 03:52:00Z fabien $"
+// "$Id: fl_set_fonts_xft.cxx 10041 2014-01-03 16:17:05Z AlbrechtS $"
//
// More font utilities for the Fast Light Tool Kit (FLTK).
//
@@ -29,7 +29,7 @@
// of the font name array.
#define ENDOFBUFFER 127 // sizeof(Fl_Font.fontname)-1
-// turn a stored font name into a pretty name:
+// turn a stored font name in "fltk format" into a pretty name:
const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
Fl_Fontdesc *f = fl_fonts + fnum;
if (!f->fontname[0]) {
@@ -82,7 +82,6 @@ static void make_raw_name(char *raw, char *pretty)
// italic, bold, bold italic or normal - this seems to be the fltk way...
char *style = strchr(pretty, ':');
- char *last = style + strlen(style) - 2;
if (style)
{
@@ -102,12 +101,16 @@ static void make_raw_name(char *raw, char *pretty)
nm2 = strchr(nm1, ',');
}
raw[0] = ' '; raw[1] = 0; // Default start of "raw name" text
- strncat(raw, nm1, LOCAL_RAW_NAME_MAX);
+ strncat(raw, nm1, LOCAL_RAW_NAME_MAX-1); // only copy MAX-1 chars, we have already set cell 0
+ // Ensure raw is terminated, just in case the given name is infeasibly long...
+ raw[LOCAL_RAW_NAME_MAX-1] = 0;
#else // keep the first remaining name entry
char *nm2 = strchr(pretty, ',');
if(nm2) *nm2 = 0; // terminate name after first entry
raw[0] = ' '; raw[1] = 0; // Default start of "raw name" text
- strncat(raw, pretty, LOCAL_RAW_NAME_MAX-1);
+ strncat(raw, pretty, LOCAL_RAW_NAME_MAX-1); // only copy MAX-1 chars, we have already set cell 0
+ // Ensure raw is terminated, just in case the given name is infeasibly long...
+ raw[LOCAL_RAW_NAME_MAX-1] = 0;
#endif
// At this point, the name is "marked" as regular...
if (style)
@@ -116,7 +119,10 @@ static void make_raw_name(char *raw, char *pretty)
#define BOLD 1
#define ITALIC 2
#define BITALIC (BOLD | ITALIC)
+
int mods = PLAIN;
+ char *last = style + strlen(style) - 2;
+
// Now try and parse the style string - look for the "=" sign
style = strchr(style, '=');
while ((style) && (style < last))
@@ -153,14 +159,14 @@ static void make_raw_name(char *raw, char *pretty)
mods |= ITALIC;
}
goto NEXT_STYLE;
-
- case 's':
+
+ case 'S':
if (strncasecmp(style, "SuperBold", 9) == 0)
{
mods |= BOLD;
}
goto NEXT_STYLE;
-
+
default: // find the next gap
goto NEXT_STYLE;
} // switch end
@@ -202,17 +208,17 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
{
FcFontSet *fnt_set; // Will hold the list of fonts we find
FcPattern *fnt_pattern; // Holds the generic "match all names" pattern
- FcObjectSet *fnt_obj_set = 0; // Holds the generic "match all objects"
-
+ FcObjectSet *fnt_obj_set = 0; // Holds the generic "match all objects"
+
int j; // loop iterator variable
int font_count; // Total number of fonts found to process
char **full_list; // The list of font names we build
if (fl_free_font > FL_FREE_FONT) // already been here
return (Fl_Font)fl_free_font;
-
+
fl_open_display(); // Just in case...
-
+
// Make sure fontconfig is ready... is this necessary? The docs say it is
// safe to call it multiple times, so just go for it anyway!
if (!FcInit())
@@ -228,10 +234,10 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
// "pattern_name"?
fnt_pattern = FcPatternCreate();
fnt_obj_set = FcObjectSetBuild(FC_FAMILY, FC_STYLE, (void *)0);
-
+
// Hopefully, this is a set of all the fonts...
fnt_set = FcFontList(0, fnt_pattern, fnt_obj_set);
-
+
// We don't need the fnt_pattern and fnt_obj_set any more, release them
FcPatternDestroy(fnt_pattern);
FcObjectSetDestroy(fnt_obj_set);
@@ -242,22 +248,22 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
char *stop;
char *start;
char *first;
-
+
font_count = fnt_set->nfont; // How many fonts?
-
+
// Allocate array of char*'s to hold the name strings
full_list = (char **)malloc(sizeof(char *) * font_count);
-
+
// iterate through all the font patterns and get the names out...
for (j = 0; j < font_count; j++)
{
// NOTE: FcChar8 is a typedef of "unsigned char"...
FcChar8 *font; // String to hold the font's name
-
+
// Convert from fontconfig internal pattern to human readable name
// NOTE: This WILL malloc storage, so we need to free it later...
font = FcNameUnparse(fnt_set->fonts[j]);
-
+
// The returned strings look like this...
// Century Schoolbook:style=Bold Italic,fed kursiv,Fett Kursiv,...
// So the bit we want is up to the first comma - BUT some strings have
@@ -300,13 +306,13 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
if (reg) reg[1]='.';
}
}
-
+
// Release the fnt_set - we don't need it any more
FcFontSetDestroy(fnt_set);
-
+
// Sort the list into alphabetic order
qsort(full_list, font_count, sizeof(*full_list), name_sort);
-
+
// Now let us add the names we got to fltk's font list...
for (j = 0; j < font_count; j++)
{
@@ -321,7 +327,7 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
stored_name = strdup(xft_name);
Fl::set_font((Fl_Font)(j + FL_FREE_FONT), stored_name);
fl_free_font ++;
-
+
free(full_list[j]); // release that name from our internal array
}
}
@@ -374,5 +380,5 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
}
//
-// End of "$Id: fl_set_fonts_xft.cxx 9396 2012-04-24 03:52:00Z fabien $".
+// End of "$Id: fl_set_fonts_xft.cxx 10041 2014-01-03 16:17:05Z AlbrechtS $".
//
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx
index 4c91c6e..28e59a9 100644
--- a/src/fl_shortcut.cxx
+++ b/src/fl_shortcut.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_shortcut.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: fl_shortcut.cxx 10250 2014-08-23 09:10:50Z cand $"
//
// Shortcut support routines for the Fast Light Tool Kit (FLTK).
//
@@ -179,7 +179,7 @@ const char* fl_shortcut_label(unsigned int shortcut) {
\see fl_shortcut_label(unsigned int shortcut)
*/
const char* fl_shortcut_label(unsigned int shortcut, const char **eom) {
- static char buf[20];
+ static char buf[40];
char *p = buf;
if (eom) *eom = p;
if (!shortcut) {*p = 0; return buf;}
@@ -189,11 +189,11 @@ const char* fl_shortcut_label(unsigned int shortcut, const char **eom) {
shortcut |= FL_SHIFT;
}
#ifdef __APPLE__
- // this column contains utf8 characters - v
- if (shortcut & FL_SHIFT) {strcpy(p,"\xe2\x87\xa7"); p += 3;} // upwards white arrow
- if (shortcut & FL_CTRL) {strcpy(p,"\xe2\x8c\x83"); p += 3;} // up arrowhead
- if (shortcut & FL_ALT) {strcpy(p,"\xe2\x8c\xa5"); p += 3;} // alternative key symbol
- if (shortcut & FL_META) {strcpy(p,"\xe2\x8c\x98"); p += 3;} // place of interest sign
+ // this column contains utf8 characters - v
+ if (shortcut & FL_SHIFT) {strcpy(p,"\xe2\x87\xa7"); p += 3;} // U+21E7 (upwards white arrow)
+ if (shortcut & FL_CTRL) {strcpy(p,"\xe2\x8c\x83"); p += 3;} // U+2303 (up arrowhead)
+ if (shortcut & FL_ALT) {strcpy(p,"\xe2\x8c\xa5"); p += 3;} // U+2325 (option key)
+ if (shortcut & FL_META) {strcpy(p,"\xe2\x8c\x98"); p += 3;} // U+2318 (place of interest sign)
#else
if (shortcut & FL_META) {strcpy(p,"Meta+"); p += 5;}
if (shortcut & FL_ALT) {strcpy(p,"Alt+"); p += 4;}
@@ -270,14 +270,73 @@ const char* fl_shortcut_label(unsigned int shortcut, const char **eom) {
# - Alt
+ - Shift
^ - Control
+ ! - Meta
+ @ - Command (Ctrl on linux/win, Meta on OSX)
\endverbatim
+
+ These special characters can be combined to form chords of modifier
+ keys. (See 'Remarks' below)
+
+ After the optional modifier key prefixes listed above, one can either
+ specify a single keyboard character to use as the shortcut, or a
+ numeric sequence in hex, decimal or octal.
+
+ Examples:
+ \verbatim
+ "c" -- Uses 'c' as the shortcut
+ "#^c" -- Same as FL_ALT|FL_CTRL|'c'
+ "#^!c" -- Same as FL_ALT|FL_CTRL|FL_META|'c'
+ "@c" -- Same as FL_COMMAND|'c' (see FL_COMMAND for platform specific behavior)
+ "0x63" -- Same as "c" (hex 63=='c')
+ "99" -- Same as "c" (dec 99=='c')
+ "0143" -- Same as "c" (octal 0143=='c')
+ "^0x63" -- Same as (FL_CTRL|'c'), or (FL_CTRL|0x63)
+ "^99" -- Same as (FL_CTRL|'c'), or (FL_CTRL|99)
+ "^0143" -- Same as (FL_CTRL|'c'), or (FL_CTRL|0143)
+ \endverbatim
+
+ \remarks
+ Due to XForms legacy, there are some odd things to consider
+ when using the modifier characters.
+ \remarks
+ (1) You can use the special modifier keys for chords *only*
+ if the modifiers are provided in this order: #, +, ^, !, \@.
+ Other ordering can yield undefined results.
+ \remarks
+ So for instance, Ctrl-Alt-c must be specified as "#^c" (and not
+ "^#c"), due to the above ordering rule.
+ \remarks
+ (2) If you want to make a shortcut that uses one of the special
+ modifier characters (as the character being modified), then to
+ avoid confusion, specify the numeric equivalent, e.g.
+ \remarks
+ \verbatim
+ If you want.. Then use..
+ ----------------------------- ------------------------------
+ '#' as the shortcut.. "0x23" (instead of just "#").
+ '+' as the shortcut.. "0x2b" (instead of just "+").
+ '^' as the shortcut.. "0x5e" (instead of just "^").
+ Alt-+ as the shortcut.. "#0x2b" (instead of "#+").
+ Alt-^ as the shortcut.. "#0x5e" (instead of "#^").
+ ..etc..
+ \endverbatim
+ \remarks
+ As a general rule that's easy to remember, unless the shortcut
+ key to be modified is a single alpha-numeric character [A-Z,a-z,0-9),
+ it's probably best to use the numeric equivalents.
+
+ \todo Fix these silly legacy issues in a future release
+ to support more predictable behavior for the modifier keys.
*/
unsigned int fl_old_shortcut(const char* s) {
if (!s || !*s) return 0;
+ if (s[1]==0 && strchr("@!",s[0])) return s[0]; // maintain legacy behavior for "!" and "@"
unsigned int n = 0;
if (*s == '#') {n |= FL_ALT; s++;}
if (*s == '+') {n |= FL_SHIFT; s++;}
if (*s == '^') {n |= FL_CTRL; s++;}
+ if (*s == '!') {n |= FL_META; s++;} // added in 1.3.3
+ if (*s == '@') {n |= FL_COMMAND; s++;} // added in 1.3.3
if (*s && s[1]) return n | (int)strtol(s,0,0); // allow 0xf00 to get any key
return n | *s;
}
@@ -373,5 +432,5 @@ int Fl_Widget::test_shortcut() {
}
//
-// End of "$Id: fl_shortcut.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: fl_shortcut.cxx 10250 2014-08-23 09:10:50Z cand $".
//
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index 857642f..8ad2f3b 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_utf8.cxx 9704 2012-10-19 11:23:51Z manolo $"
+// "$Id: fl_utf8.cxx 10248 2014-08-23 08:41:58Z cand $"
//
// Unicode to UTF-8 conversion functions.
//
@@ -58,7 +58,7 @@ extern "C" {
#else // X-windows platform
-# include <FL/Xutf8.h>
+# include "Xutf8.h"
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
@@ -609,7 +609,7 @@ int fl_execvp(const char *file, char *const *argv)
return _execvp(fl_utf2mbcs(file), argv);
#else
size_t l = strlen(file);
- int i, n, ret;
+ int i, n;
xchar **ar;
// wbuf = (xchar*)realloc(wbuf, sizeof(xchar) * (l+1));
// wbuf[fl_utf2unicode((const unsigned char*)file, l, wbuf)] = 0;
@@ -634,14 +634,14 @@ int fl_execvp(const char *file, char *const *argv)
i++;
}
ar[n] = NULL;
- ret = _wexecvp(wbuf, ar);
+ _wexecvp(wbuf, ar); // STR #3040
i = 0;
while (i <= n) {
free(ar[i]);
i++;
}
free(ar);
- return ret;
+ return -1; // STR #3040
#endif
#else
return execvp(file, argv);
@@ -825,5 +825,5 @@ void fl_make_path_for_file( const char *path )
/** @} */
//
-// End of "$Id: fl_utf8.cxx 9704 2012-10-19 11:23:51Z manolo $".
+// End of "$Id: fl_utf8.cxx 10248 2014-08-23 08:41:58Z cand $".
//
diff --git a/src/flstring.h b/src/flstring.h
index cc0e1ee..2c6aff4 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -1,5 +1,5 @@
/*
- * "$Id: flstring.h 9573 2012-06-06 03:38:02Z fabien $"
+ * "$Id: flstring.h 10074 2014-01-21 11:07:43Z AlbrechtS $"
*
* Common string header file for the Fast Light Tool Kit (FLTK).
*
@@ -39,7 +39,7 @@
# undef index
# endif /* index */
-# if defined(WIN32) && !defined(__CYGWIN__)
+# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define strcasecmp(s,t) _stricmp((s), (t))
# define strncasecmp(s,t,n) _strnicmp((s), (t), (n))
/* Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
@@ -97,5 +97,5 @@ FL_EXPORT extern int fl_ascii_strcasecmp(const char *s, const char *t);
#endif /* !flstring_h */
/*
- * End of "$Id: flstring.h 9573 2012-06-06 03:38:02Z fabien $".
+ * End of "$Id: flstring.h 10074 2014-01-21 11:07:43Z AlbrechtS $".
*/
diff --git a/src/forms_timer.cxx b/src/forms_timer.cxx
index 6fad755..6b66eeb 100644
--- a/src/forms_timer.cxx
+++ b/src/forms_timer.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: forms_timer.cxx 9325 2012-04-05 05:12:30Z fabien $"
+// "$Id: forms_timer.cxx 10413 2014-10-30 09:16:49Z cand $"
//
// Forms timer object for the Fast Light Tool Kit (FLTK).
//
@@ -23,6 +23,7 @@
#include <FL/Fl.H>
#include <FL/Fl_Timer.H>
#include <FL/fl_draw.H>
+#include <FL/forms.H>
#ifdef WIN32
# ifdef __MWERKS__
# include <time.h>
@@ -173,5 +174,5 @@ void Fl_Timer::suspended(char d) {
}
//
-// End of "$Id: forms_timer.cxx 9325 2012-04-05 05:12:30Z fabien $".
+// End of "$Id: forms_timer.cxx 10413 2014-10-30 09:16:49Z cand $".
//
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 2bc8c7b..5f78902 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: gl_draw.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: gl_draw.cxx 10414 2014-10-30 09:18:45Z cand $"
//
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
//
@@ -24,6 +24,7 @@
#include <FL/Fl.H>
#include <FL/gl.h>
+#include <FL/gl_draw.H>
#include <FL/x.H>
#include <FL/fl_draw.H>
#include <FL/Fl_Device.H>
@@ -32,7 +33,7 @@
#include <FL/fl_utf8.h>
#if !defined(WIN32) && !defined(__APPLE__)
-#include <FL/Xutf8.h>
+#include "Xutf8.h"
#endif
#if USE_XFT
@@ -101,8 +102,9 @@ void gl_font(int fontid, int size) {
//http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/Carbon64BitGuide/OtherAPIChanges/OtherAPIChanges.html
short font, face, size;
uchar fn[256];
- fn[0]=strlen(fl_fontsize->q_name);
- strcpy((char*)(fn+1), fl_fontsize->q_name);
+ const char *pname = Fl::get_font_name(fontid, NULL);
+ fn[0]=strlen(pname);
+ strcpy((char*)(fn+1), pname);
GetFNum(fn, &font);
face = 0;
size = fl_fontsize->size;
@@ -472,6 +474,7 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
void *base = calloc(4*fifo[current].width, fifo[current].height);
if (base == NULL) return -1;
+ CGContextRef save_gc = fl_gc;
fl_gc = CGBitmapContextCreate(base, fifo[current].width, fifo[current].height, 8, fifo[current].width*4, lut, kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease(lut);
fl_graphics_driver->font_descriptor(gl_fontsize);
@@ -487,7 +490,7 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, fifo[current].width, fifo[current].height, 0, GL_RGBA, GL_UNSIGNED_BYTE, base);
glPopAttrib();
CGContextRelease(fl_gc);
- fl_gc = NULL;
+ fl_gc = save_gc;
free(base);
fifo[current].fdesc = gl_fontsize;
return current;
@@ -567,5 +570,5 @@ void gl_texture_reset()
#endif // HAVE_GL
//
-// End of "$Id: gl_draw.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: gl_draw.cxx 10414 2014-10-30 09:18:45Z cand $".
//
diff --git a/src/gl_start.cxx b/src/gl_start.cxx
index 515d95c..416b3f6 100644
--- a/src/gl_start.cxx
+++ b/src/gl_start.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: gl_start.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: gl_start.cxx 10414 2014-10-30 09:18:45Z cand $"
//
// OpenGL context routines for the Fast Light Tool Kit (FLTK).
//
@@ -35,6 +35,7 @@
#include <FL/Fl_Window.H>
#include <FL/x.H>
#include <FL/fl_draw.H>
+#include <FL/gl.h>
#include "Fl_Gl_Choice.H"
static GLContext context;
@@ -119,5 +120,5 @@ int Fl::gl_visual(int mode, int *alist) {
#endif
//
-// End of "$Id: gl_start.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: gl_start.cxx 10414 2014-10-30 09:18:45Z cand $".
//
diff --git a/src/makedepend b/src/makedepend
index 74c05fb..32d5ff0 100644
--- a/src/makedepend
+++ b/src/makedepend
@@ -1,98 +1,102 @@
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+# DO NOT DELETE
Fl.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
-Fl.o: ../FL/x.H ../FL/Fl_Window.H flstring.h ../FL/Fl_Export.H
-Fl.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Device.H
-Fl.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl.o: ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H ../FL/x.H ../FL/Fl_Window.H
+Fl.o: flstring.h ../FL/Fl_Export.H ../FL/fl_draw.H ../FL/Enumerations.H
+Fl.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl.o: ../FL/Fl_RGB_Image.H
Fl_Adjuster.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Adjuster.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Adjuster.H
-Fl_Adjuster.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
-Fl_Adjuster.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Adjuster.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Adjuster.o: ../FL/Enumerations.H ../FL/Fl_Adjuster.H ../FL/Fl_Valuator.H
+Fl_Adjuster.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/x.H
+Fl_Adjuster.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Adjuster.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
Fl_Adjuster.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
Fl_Adjuster.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Adjuster.o: fastarrow.h mediumarrow.h slowarrow.h
Fl_Bitmap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Bitmap.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Bitmap.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Bitmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-Fl_Bitmap.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Bitmap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Bitmap.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
+Fl_Bitmap.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Bitmap.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Bitmap.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Bitmap.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Bitmap.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
Fl_Bitmap.o: ../FL/Fl_Printer.H ../FL/Fl_Paged_Device.H ../FL/Fl_PostScript.H
Fl_Bitmap.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_Browser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Browser.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Browser.H
-Fl_Browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Browser.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_Browser.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Browser.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_Browser.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Browser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Browser.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Browser.o: ../FL/Enumerations.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+Fl_Browser.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
+Fl_Browser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Image.H
+Fl_Browser.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Browser.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+Fl_Browser.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Browser.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Browser.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Browser.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H
+Fl_Browser.o: ../FL/Fl_Multi_Browser.H ../FL/Fl_Select_Browser.H
Fl_Browser_.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Browser_.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H
-Fl_Browser_.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Browser_.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_Browser_.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Browser_.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_Browser_.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Browser_.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Browser_.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/Fl_Browser_.H
+Fl_Browser_.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
+Fl_Browser_.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H
+Fl_Browser_.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Browser_.o: ../FL/Fl_Window.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Browser_.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Browser_.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Browser_.o: ../FL/Fl_RGB_Image.H
Fl_Browser_load.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Browser_load.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Browser_load.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Group.H
-Fl_Browser_load.o: ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Browser_load.o: ../FL/Fl_Valuator.H ../FL/Fl_Image.H ../FL/fl_utf8.h
+Fl_Browser_load.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Browser.H
+Fl_Browser_load.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Browser_load.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Browser_load.o: ../FL/Fl_Image.H ../FL/fl_utf8.h
Fl_Box.o: ../FL/Fl_Widget.H ../FL/Fl_Box.H ../FL/Fl_Widget.H
Fl_Box.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
Fl_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Button.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Button.H
-Fl_Button.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/Fl_Window.H
-Fl_Button.o: ../FL/Fl_Group.H
+Fl_Button.o: ../FL/Enumerations.H ../FL/Fl_Button.H ../FL/Fl_Widget.H
+Fl_Button.o: ../FL/Fl_Group.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Button.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Radio_Button.H
+Fl_Button.o: ../FL/Fl_Button.H ../FL/Fl_Toggle_Button.H
Fl_Chart.o: ../FL/math.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Chart.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Chart.o: ../FL/Fl_Chart.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Chart.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Chart.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Chart.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Chart.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Chart.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Chart.H
+Fl_Chart.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Chart.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Chart.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Chart.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Chart.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Chart.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_Check_Browser.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/fl_draw.H
Fl_Check_Browser.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-Fl_Check_Browser.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-Fl_Check_Browser.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Check_Browser.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Check_Browser.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Check_Browser.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Check_Browser.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Check_Browser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Check_Browser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Check_Browser.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Check_Browser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Check_Browser.o: ../FL/Fl_Check_Browser.H ../FL/Fl.H ../FL/fl_utf8.h
Fl_Check_Browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
Fl_Check_Browser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H
Fl_Check_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Check_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Check_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Check_Button.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
-Fl_Check_Button.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H
+Fl_Check_Button.o: ../FL/Fl_Button.H
Fl_Choice.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Choice.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Choice.H
-Fl_Choice.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-Fl_Choice.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Choice.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Choice.o: ../FL/Enumerations.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+Fl_Choice.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+Fl_Choice.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Choice.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
Fl_Choice.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
Fl_Choice.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Choice.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_Clock.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Clock.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Clock.H
-Fl_Clock.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Clock.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Clock.o: ../FL/Enumerations.H ../FL/Fl_Clock.H ../FL/Fl_Widget.H
+Fl_Clock.o: ../FL/Fl_Round_Clock.H ../FL/Fl_Clock.H ../FL/fl_draw.H ../FL/x.H
+Fl_Clock.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Clock.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
Fl_Clock.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Clock.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_Clock.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Clock.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Clock.o: ../FL/Fl_RGB_Image.H
Fl_Color_Chooser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Color_Chooser.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Color_Chooser.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Color_Chooser.o: ../FL/Fl_Color_Chooser.H ../FL/Fl_Group.H ../FL/Fl_Box.H
Fl_Color_Chooser.o: ../FL/Fl_Widget.H ../FL/Fl_Return_Button.H
Fl_Color_Chooser.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
@@ -100,210 +104,238 @@ Fl_Color_Chooser.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
Fl_Color_Chooser.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
Fl_Color_Chooser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_draw.H
Fl_Color_Chooser.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Color_Chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Device.H
-Fl_Color_Chooser.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Color_Chooser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Color_Chooser.o: ../FL/math.h
+Fl_Color_Chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+Fl_Color_Chooser.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Color_Chooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Color_Chooser.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/math.h
+Fl_Copy_Surface.o: ../FL/Fl_Copy_Surface.H ../FL/Fl_Paged_Device.H
+Fl_Copy_Surface.o: ../FL/Fl_Device.H ../FL/x.H ../FL/Enumerations.H
+Fl_Copy_Surface.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
+Fl_Copy_Surface.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Copy_Surface.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_Image.H
+Fl_Copy_Surface.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Copy_Surface.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Printer.H
+Fl_Copy_Surface.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_PostScript.H
+Fl_Copy_Surface.o: ../FL/Fl.H ../FL/fl_utf8.h
Fl_Counter.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Counter.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Counter.H
-Fl_Counter.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Counter.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Counter.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Counter.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Counter.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Counter.o: ../FL/Enumerations.H ../FL/Fl_Counter.H ../FL/Fl_Valuator.H
+Fl_Counter.o: ../FL/Fl_Widget.H ../FL/Fl_Simple_Counter.H ../FL/Fl_Counter.H
+Fl_Counter.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Counter.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Counter.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Counter.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Counter.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Dial.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Dial.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Dial.H
-Fl_Dial.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Dial.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Dial.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Dial.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Dial.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Dial.o: ../FL/Enumerations.H ../FL/Fl_Dial.H ../FL/Fl_Valuator.H
+Fl_Dial.o: ../FL/Fl_Widget.H ../FL/Fl_Fill_Dial.H ../FL/Fl_Dial.H
+Fl_Dial.o: ../FL/Fl_Line_Dial.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Dial.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Dial.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Dial.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Dial.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Dial.o: ../FL/math.h
Fl_Device.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Device.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/x.H
+Fl_Device.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/x.H
Fl_Device.o: ../FL/Fl_Window.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Device.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_Device.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Device.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Device.o: ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
Fl_Double_Window.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Double_Window.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Double_Window.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Double_Window.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+Fl_Double_Window.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
Fl_Double_Window.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Fl_Paged_Device.H
Fl_Double_Window.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_Double_Window.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Double_Window.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Double_Window.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
Fl_Double_Window.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Double_Window.o: ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_Double_Window.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/Enumerations.H
Fl_Double_Window.o: ../FL/Fl_PostScript.H
Fl_File_Browser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-Fl_File_Browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_File_Browser.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_File_Browser.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_File_Browser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Xutf8.h ../FL/Fl_Image.H
-Fl_File_Browser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
-Fl_File_Browser.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_File_Browser.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_File_Browser.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_File_Browser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_File_Browser.o: ../FL/filename.H flstring.h ../FL/Fl_Export.H ../config.h
+Fl_File_Browser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/fl_utf8.h
+Fl_File_Browser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_File_Browser.o: ../FL/filename.H ../FL/fl_draw.H ../FL/x.H
+Fl_File_Browser.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_File_Browser.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_File_Browser.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_File_Browser.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_File_Browser.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/filename.H
+Fl_File_Browser.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_File_Chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_File_Chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_File_Chooser.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-Fl_File_Chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
-Fl_File_Chooser.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-Fl_File_Chooser.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
+Fl_File_Chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_File_Chooser.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+Fl_File_Chooser.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+Fl_File_Chooser.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+Fl_File_Chooser.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
Fl_File_Chooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_Group.H
Fl_File_Chooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-Fl_File_Chooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_File_Chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-Fl_File_Chooser.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
+Fl_File_Chooser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
+Fl_File_Chooser.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
Fl_File_Chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
Fl_File_Chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
Fl_File_Chooser.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/fl_draw.H
Fl_File_Chooser.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_File_Chooser.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_File_Chooser.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
-Fl_File_Chooser.o: ../FL/Fl_RGB_Image.H
+Fl_File_Chooser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_File_Chooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_File_Chooser.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_File_Chooser2.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_File_Chooser2.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_File_Chooser2.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-Fl_File_Chooser2.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
-Fl_File_Chooser2.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-Fl_File_Chooser2.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
+Fl_File_Chooser2.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_File_Chooser2.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+Fl_File_Chooser2.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+Fl_File_Chooser2.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+Fl_File_Chooser2.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
Fl_File_Chooser2.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_Group.H
Fl_File_Chooser2.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-Fl_File_Chooser2.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-Fl_File_Chooser2.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
Fl_File_Chooser2.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
Fl_File_Chooser2.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
Fl_File_Chooser2.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
Fl_File_Chooser2.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
Fl_File_Chooser2.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/filename.H
Fl_File_Chooser2.o: ../FL/x.H ../FL/Fl_Shared_Image.H ../FL/fl_draw.H
-Fl_File_Chooser2.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_File_Chooser2.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_File_Chooser2.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_File_Chooser2.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_File_Chooser2.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+Fl_File_Chooser2.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_File_Chooser2.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_File_Chooser2.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
+Fl_File_Chooser2.o: ../FL/Fl_Export.H ../config.h
Fl_File_Icon.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_File_Icon.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_File_Icon.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_File_Icon.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/fl_draw.H
-Fl_File_Icon.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_File_Icon.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_File_Icon.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_File_Icon.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_File_Icon.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_File_Icon.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
Fl_File_Icon.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_File_Icon.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_File_Icon.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/filename.H
+Fl_File_Icon.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_File_Icon.o: ../FL/Fl_RGB_Image.H ../FL/filename.H
Fl_File_Input.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_File_Input.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_File_Input.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-Fl_File_Input.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_File_Input.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_File_Input.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_File_Input.H
+Fl_File_Input.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Window.H
+Fl_File_Input.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_File_Input.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
Fl_File_Input.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_File_Input.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_File_Input.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_File_Input.o: ../FL/filename.H flstring.h ../FL/Fl_Export.H ../config.h
+Fl_File_Input.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/filename.H
+Fl_File_Input.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_Group.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Group.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Group.H
-Fl_Group.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Group.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Group.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Group.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_Group.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Group.o: ../FL/Enumerations.H ../FL/Fl_Group.H ../FL/Fl_Window.H
+Fl_Group.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_Group.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Group.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Group.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Group.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Input_Choice.H
+Fl_Group.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Menu_Button.H
+Fl_Group.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Spinner.H
+Fl_Group.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Button.H
Fl_Help_View.o: ../FL/Fl_Help_View.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_Help_View.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_Help_View.o: ../FL/Enumerations.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Help_View.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-Fl_Help_View.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Help_View.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-Fl_Help_View.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Help_View.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Help_View.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_Help_View.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H
+Fl_Help_View.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H
+Fl_Help_View.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Help_View.o: ../FL/Fl_Window.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Help_View.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Help_View.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Help_View.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H ../FL/filename.H
Fl_Help_View.o: ../FL/fl_utf8.h ../FL/filename.H flstring.h ../FL/Fl_Export.H
Fl_Help_View.o: ../config.h
Fl_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
-Fl_Image.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Image.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-Fl_Image.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Image.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Image.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Image.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Image.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Image.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Image.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
Fl_Image.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Image_Surface.o: ../FL/Fl_Image_Surface.H ../FL/Fl_Copy_Surface.H
+Fl_Image_Surface.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/x.H
+Fl_Image_Surface.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
+Fl_Image_Surface.o: ../FL/Fl_Window.H ../FL/Fl_Plugin.H
+Fl_Image_Surface.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Image_Surface.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
+Fl_Image_Surface.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Image_Surface.o: ../FL/Fl_Bitmap.H ../FL/Fl_Printer.H ../FL/fl_draw.H
+Fl_Image_Surface.o: ../FL/Enumerations.H ../FL/Fl_PostScript.H ../FL/Fl.H
+Fl_Image_Surface.o: ../FL/fl_utf8.h
Fl_Input.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Input.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Input.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Input.H
-Fl_Input.o: ../FL/Fl_Input_.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Input.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Input.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Input.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Input.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Input.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Input.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_draw.H ../FL/x.H
+Fl_Input.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Device.H
+Fl_Input.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Input.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Input.o: ../FL/fl_ask.H flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Input.o: ../FL/Fl_Float_Input.H ../FL/Fl_Input.H ../FL/Fl_Int_Input.H
+Fl_Input.o: ../FL/Fl_Multiline_Input.H ../FL/Fl_Output.H
+Fl_Input.o: ../FL/Fl_Multiline_Output.H ../FL/Fl_Output.H
+Fl_Input.o: ../FL/Fl_Secret_Input.H
Fl_Input_.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Input_.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Input_.H
-Fl_Input_.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Input_.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Input_.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Input_.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Input_.o: ../FL/Enumerations.H ../FL/Fl_Input_.H ../FL/Fl_Widget.H
+Fl_Input_.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+Fl_Input_.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Input_.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Input_.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
Fl_Input_.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/fl_ask.H
Fl_Input_.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_Light_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Light_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Light_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Light_Button.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-Fl_Light_Button.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Light_Button.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Light_Button.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Light_Button.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Light_Button.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Light_Button.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Light_Button.o: ../FL/Fl_Radio_Light_Button.H ../FL/Fl_Light_Button.H
+Fl_Light_Button.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Light_Button.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Light_Button.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Light_Button.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Light_Button.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Light_Button.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H
+Fl_Light_Button.o: ../config.h
Fl_Menu.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Menu.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Menu_Window.H
+Fl_Menu.o: ../FL/Enumerations.H ../FL/Fl_Menu_Window.H
Fl_Menu.o: ../FL/Fl_Single_Window.H ../FL/Fl_Window.H ../FL/Fl_Menu_.H
Fl_Menu.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
Fl_Menu.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Menu.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Menu.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Menu.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
-Fl_Menu.o: ../FL/Fl_Export.H ../config.h
+Fl_Menu.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Device.H
+Fl_Menu.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Menu.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Menu.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_Menu_.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Menu_.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Menu_.H
-Fl_Menu_.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
-Fl_Menu_.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Menu_.o: ../FL/Enumerations.H ../FL/Fl_Menu_.H ../FL/Fl_Widget.H
+Fl_Menu_.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H flstring.h
+Fl_Menu_.o: ../FL/Fl_Export.H ../config.h
Fl_Menu_Bar.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Menu_Bar.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Menu_Bar.H
-Fl_Menu_Bar.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-Fl_Menu_Bar.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Menu_Bar.o: ../FL/Enumerations.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H
+Fl_Menu_Bar.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+Fl_Menu_Bar.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
Fl_Menu_Bar.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Menu_Bar.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Menu_Bar.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
-Fl_Menu_Bar.o: ../FL/Fl_RGB_Image.H
+Fl_Menu_Bar.o: ../FL/Fl_Bitmap.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Menu_Bar.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Menu_Bar.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Menu_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Menu_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Menu_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Menu_Button.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Widget.H
Fl_Menu_Button.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/fl_draw.H
Fl_Menu_Button.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Menu_Button.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Device.H
-Fl_Menu_Button.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Menu_Button.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Menu_Button.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+Fl_Menu_Button.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Menu_Button.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Menu_Button.o: ../FL/Fl_RGB_Image.H
Fl_Menu_Window.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Menu_Window.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Menu_Window.o: ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
-Fl_Menu_Window.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Menu_Window.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Menu_Window.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Menu_Window.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Menu_Window.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+Fl_Menu_Window.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_Menu_Window.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Menu_Window.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Menu_Window.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Menu_Window.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Menu_Window.o: ../FL/Fl_Menu_Window.H ../FL/Fl_Single_Window.H
Fl_Menu_add.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Enumerations.H
Fl_Menu_add.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Menu_Item.H
Fl_Menu_add.o: ../FL/Fl_Image.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_Menu_global.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Menu_global.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Menu_global.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-Fl_Menu_global.o: ../FL/Fl_Image.H
+Fl_Menu_global.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Menu_.H
+Fl_Menu_global.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
Fl_Multi_Label.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Multi_Label.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Multi_Label.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H
-Fl_Multi_Label.o: ../FL/Fl_Image.H ../FL/Fl_Multi_Label.H
-Fl_Native_File_Chooser.o: Fl_Native_File_Chooser_FLTK.cxx
+Fl_Multi_Label.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Widget.H
+Fl_Multi_Label.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
+Fl_Multi_Label.o: ../FL/Fl_Multi_Label.H
+Fl_Native_File_Chooser.o: Fl_Native_File_Chooser_FLTK.cxx ../config.h
Fl_Native_File_Chooser.o: ../FL/Fl_Native_File_Chooser.H
Fl_Native_File_Chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_Native_File_Chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
+Fl_Native_File_Chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h
Fl_Native_File_Chooser.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
Fl_Native_File_Chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H
Fl_Native_File_Chooser.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
@@ -312,8 +344,6 @@ Fl_Native_File_Chooser.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H
Fl_Native_File_Chooser.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H
Fl_Native_File_Chooser.o: ../FL/Fl_Tile.H ../FL/Fl_Group.H
Fl_Native_File_Chooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-Fl_Native_File_Chooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-Fl_Native_File_Chooser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
Fl_Native_File_Chooser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
Fl_Native_File_Chooser.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
Fl_Native_File_Chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
@@ -321,355 +351,381 @@ Fl_Native_File_Chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H
Fl_Native_File_Chooser.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
Fl_Native_File_Chooser.o: ../FL/fl_ask.H ../FL/Fl_File_Icon.H
Fl_Native_File_Chooser.o: Fl_Native_File_Chooser_common.cxx
-Fl_Native_File_Chooser.o: ../FL/Enumerations.H
+Fl_Native_File_Chooser.o: ../FL/Enumerations.H Fl_Native_File_Chooser_GTK.cxx
+Fl_Native_File_Chooser.o: ../FL/x.H
Fl_Overlay_Window.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Overlay_Window.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Overlay_Window.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Overlay_Window.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
Fl_Overlay_Window.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/x.H
Fl_Overlay_Window.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Overlay_Window.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Overlay_Window.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Overlay_Window.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_Overlay_Window.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Overlay_Window.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Overlay_Window.o: ../FL/Fl_RGB_Image.H
+Fl_Overlay_Window.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Pack.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Pack.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Pack.H
-Fl_Pack.o: ../FL/Fl_Group.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Pack.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Pack.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Pack.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Pack.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Pack.o: ../FL/Enumerations.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
+Fl_Pack.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Pack.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Pack.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Pack.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Pack.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Paged_Device.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/x.H
Fl_Paged_Device.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Paged_Device.o: ../FL/Fl_Window.H ../FL/Xutf8.h ../FL/Fl_Plugin.H
-Fl_Paged_Device.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Paged_Device.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Paged_Device.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Paged_Device.o: ../FL/Fl_Window.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Paged_Device.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Paged_Device.o: ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H
+Fl_Paged_Device.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
Fl_Paged_Device.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/fl_draw.H
Fl_Paged_Device.o: ../FL/Enumerations.H
Fl_Pixmap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Pixmap.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
-Fl_Pixmap.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Pixmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-Fl_Pixmap.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Pixmap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Pixmap.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Pixmap.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Pixmap.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Pixmap.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Pixmap.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Pixmap.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
Fl_Pixmap.o: ../FL/Fl_Printer.H ../FL/Fl_Paged_Device.H ../FL/Fl_PostScript.H
Fl_Pixmap.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_PostScript.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Enumerations.H
+Fl_PostScript.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
+Fl_PostScript.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_PostScript.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_PostScript.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
+Fl_PostScript.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_PostScript.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_PostScript.o: ../FL/Fl_PostScript.H ../config.h ../FL/Fl.H ../FL/fl_utf8.h
+Fl_PostScript.o: ../FL/fl_ask.H ../FL/Fl_Native_File_Chooser.H
+Fl_PostScript.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+Fl_PostScript.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+Fl_PostScript.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H
+Fl_PostScript.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+Fl_PostScript.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
+Fl_PostScript.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
+Fl_PostScript.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
+Fl_PostScript.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+Fl_PostScript.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+Fl_PostScript.o: ../FL/Fl_Return_Button.H Fl_Font.H print_panel.cxx
+Fl_PostScript.o: print_panel.h ../FL/Fl_Round_Button.H ../FL/Fl_Spinner.H
+Fl_PostScript.o: ../FL/Fl_Repeat_Button.H ../FL/Fl_Progress.H
+Fl_PostScript.o: ../src/flstring.h ../FL/Fl_Export.H ../FL/Fl_Int_Input.H
+Fl_PostScript.o: ../FL/Fl_Input.H
Fl_Positioner.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Positioner.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Positioner.o: ../FL/Fl_Positioner.H ../FL/Fl_Widget.H ../FL/fl_draw.H
-Fl_Positioner.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Positioner.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Device.H
-Fl_Positioner.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Positioner.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Positioner.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Positioner.H
+Fl_Positioner.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
+Fl_Positioner.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Positioner.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Positioner.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Positioner.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Positioner.o: ../FL/Fl_RGB_Image.H
Fl_Preferences.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Preferences.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Preferences.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Preferences.o: ../FL/Fl_Preferences.H ../FL/Fl_Plugin.H
Fl_Preferences.o: ../FL/Fl_Preferences.H ../FL/filename.H ../FL/fl_utf8.h
Fl_Preferences.o: flstring.h ../FL/Fl_Export.H ../config.h
Fl_Printer.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Enumerations.H
Fl_Printer.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
-Fl_Printer.o: ../FL/Xutf8.h ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H
-Fl_Printer.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Printer.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Printer.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Printer.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/Enumerations.H
-Fl_Printer.o: ../FL/Fl_PostScript.H Fl_PostScript.cxx ../config.h ../FL/Fl.H
-Fl_Printer.o: ../FL/fl_utf8.h ../FL/fl_ask.H ../FL/Fl_Native_File_Chooser.H
-Fl_Printer.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
-Fl_Printer.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-Fl_Printer.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
-Fl_Printer.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
-Fl_Printer.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-Fl_Printer.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H
-Fl_Printer.o: ../FL/Fl.H ../FL/filename.H ../FL/Fl_Box.H
-Fl_Printer.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
-Fl_Printer.o: ../FL/Fl_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
-Fl_Printer.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H Fl_Font.H
-Fl_Printer.o: print_panel.cxx print_panel.h ../FL/Fl_Round_Button.H
-Fl_Printer.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl_Progress.H
-Fl_Printer.o: ../src/flstring.h ../FL/Fl_Export.H ../FL/Fl_Int_Input.H
-Fl_Printer.o: ../FL/Fl_Input.H
+Fl_Printer.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Printer.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Printer.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
+Fl_Printer.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Printer.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_Printer.o: ../FL/Fl_PostScript.H
Fl_Progress.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Progress.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Progress.H
-Fl_Progress.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Progress.o: ../FL/Enumerations.H ../FL/Fl_Progress.H ../FL/Fl_Widget.H
+Fl_Progress.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
Fl_Progress.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Progress.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Progress.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_Progress.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Progress.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Progress.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Progress.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Repeat_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Repeat_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Repeat_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Repeat_Button.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Button.H
-Fl_Repeat_Button.o: ../FL/Fl_Widget.H
Fl_Return_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Return_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Return_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Return_Button.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
-Fl_Return_Button.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Return_Button.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Return_Button.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Return_Button.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Return_Button.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Return_Button.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Return_Button.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_Return_Button.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Return_Button.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Return_Button.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Roller.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Roller.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Roller.H
-Fl_Roller.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Roller.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Roller.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Roller.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Roller.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Roller.o: ../FL/Enumerations.H ../FL/Fl_Roller.H ../FL/Fl_Valuator.H
+Fl_Roller.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Roller.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Roller.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Roller.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Roller.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Round_Button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Round_Button.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Round_Button.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Round_Button.o: ../FL/Fl_Round_Button.H ../FL/Fl_Light_Button.H
-Fl_Round_Button.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H
+Fl_Round_Button.o: ../FL/Fl_Button.H ../FL/Fl_Radio_Round_Button.H
+Fl_Round_Button.o: ../FL/Fl_Round_Button.H
Fl_Scroll.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Scroll.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Tiled_Image.H
-Fl_Scroll.o: ../FL/Fl_Image.H ../FL/Fl_Scroll.H ../FL/Fl_Group.H
-Fl_Scroll.o: ../FL/Fl_Widget.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Scroll.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Scroll.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
+Fl_Scroll.o: ../FL/Enumerations.H ../FL/Fl_Tiled_Image.H ../FL/Fl_Image.H
+Fl_Scroll.o: ../FL/Fl_Scroll.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Scroll.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Scroll.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Scroll.o: ../FL/Fl_Window.H ../FL/Fl_Bitmap.H ../FL/Fl_Device.H
Fl_Scroll.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
Fl_Scroll.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Scrollbar.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Scrollbar.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Scrollbar.H
-Fl_Scrollbar.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Widget.H
-Fl_Scrollbar.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Scrollbar.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Scrollbar.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Scrollbar.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Scrollbar.o: ../FL/Enumerations.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+Fl_Scrollbar.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H
+Fl_Scrollbar.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Scrollbar.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+Fl_Scrollbar.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Scrollbar.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
Fl_Scrollbar.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
Fl_Scrollbar.o: ../FL/Fl_Export.H ../config.h
Fl_Shared_Image.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_Shared_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Shared_Image.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Shared_Image.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Shared_Image.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H
Fl_Shared_Image.o: ../FL/Fl_XBM_Image.H ../FL/Fl_Bitmap.H
Fl_Shared_Image.o: ../FL/Fl_XPM_Image.H ../FL/Fl_Pixmap.H
Fl_Single_Window.o: ../FL/Fl_Single_Window.H ../FL/Fl_Window.H
Fl_Slider.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Slider.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Slider.H
-Fl_Slider.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Slider.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Slider.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Slider.o: ../FL/Enumerations.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Slider.o: ../FL/Fl_Widget.H ../FL/Fl_Fill_Slider.H ../FL/Fl_Slider.H
+Fl_Slider.o: ../FL/Fl_Hor_Slider.H ../FL/Fl_Hor_Fill_Slider.H
+Fl_Slider.o: ../FL/Fl_Hor_Nice_Slider.H ../FL/Fl_Nice_Slider.H
+Fl_Slider.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Slider.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Bitmap.H
+Fl_Slider.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_Slider.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Slider.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Slider.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_Slider.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
+Fl_Slider.o: ../FL/Fl_Export.H ../config.h
Fl_Table.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-Fl_Table.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-Fl_Table.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Table.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Table.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Table.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Table.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Table.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Table.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Table.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Table.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Table.o: ../FL/Fl_Table.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Group.H
Fl_Table.o: ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
Fl_Table.o: ../FL/Fl_Valuator.H ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
Fl_Table_Row.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Table_Row.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+Fl_Table_Row.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
Fl_Table_Row.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Table_Row.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-Fl_Table_Row.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Table_Row.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Table_Row.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Table_Row.H ../FL/Fl_Table.H
-Fl_Table_Row.o: ../FL/Fl_Group.H ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H
-Fl_Table_Row.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
-Fl_Table_Row.o: ../FL/Fl_Scrollbar.H
+Fl_Table_Row.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_Table_Row.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Table_Row.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Table_Row.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Table_Row.H
+Fl_Table_Row.o: ../FL/Fl_Table.H ../FL/Fl_Group.H ../FL/Fl_Scroll.H
+Fl_Table_Row.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Table_Row.o: ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
Fl_Tabs.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Tabs.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Tabs.H
-Fl_Tabs.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Tabs.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Tabs.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Tabs.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Tabs.o: ../FL/Enumerations.H ../FL/Fl_Tabs.H ../FL/Fl_Group.H
+Fl_Tabs.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Tabs.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+Fl_Tabs.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Tabs.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
Fl_Tabs.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Tooltip.H
Fl_Tabs.o: ../FL/Fl_Widget.H
Fl_Text_Buffer.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_Text_Buffer.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Text_Buffer.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Text_Buffer.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Text_Buffer.o: ../FL/Fl_Text_Buffer.H ../FL/fl_ask.H
Fl_Text_Display.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_Text_Display.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Text_Display.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Text_Display.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Text_Display.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
Fl_Text_Display.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
Fl_Text_Display.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Text_Display.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Text_Display.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Text_Display.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Text_Display.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Text_Display.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Text_Display.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Text_Display.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Text_Display.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H
+Fl_Text_Display.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
Fl_Text_Display.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Printer.H
Fl_Text_Display.o: ../FL/Fl_Paged_Device.H ../FL/fl_draw.H
Fl_Text_Display.o: ../FL/Fl_PostScript.H
Fl_Text_Editor.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
Fl_Text_Editor.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Text_Editor.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Text_Editor.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Text_Editor.H
-Fl_Text_Editor.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/x.H
-Fl_Text_Editor.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Device.H
-Fl_Text_Editor.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Text_Editor.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Text_Editor.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Text_Editor.o: ../FL/Fl_Valuator.H ../FL/Fl_Text_Buffer.H ../FL/fl_ask.H
+Fl_Text_Editor.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Text_Editor.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Text_Editor.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
+Fl_Text_Editor.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Text_Editor.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Text_Editor.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Text_Editor.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Scrollbar.H
+Fl_Text_Editor.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Text_Editor.o: ../FL/Fl_Text_Buffer.H ../FL/fl_ask.H
Fl_Tile.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Tile.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Tile.H
-Fl_Tile.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Window.H
+Fl_Tile.o: ../FL/Enumerations.H ../FL/Fl_Tile.H ../FL/Fl_Group.H
+Fl_Tile.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+Fl_Tile.o: ../FL/Fl_Image.H
Fl_Tiled_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Tiled_Image.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Tiled_Image.o: ../FL/Fl_Tiled_Image.H ../FL/Fl_Image.H ../FL/fl_draw.H
-Fl_Tiled_Image.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Tiled_Image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Tiled_Image.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Tiled_Image.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
-Fl_Tiled_Image.o: ../FL/Fl_RGB_Image.H
+Fl_Tiled_Image.o: ../FL/fl_types.h ../FL/Enumerations.H
+Fl_Tiled_Image.o: ../FL/Fl_Tiled_Image.H ../FL/Fl_Image.H ../FL/Fl_Window.H
+Fl_Tiled_Image.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_Tiled_Image.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Tiled_Image.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Tiled_Image.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+Fl_Tiled_Image.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Tree.o: ../FL/Fl_Tree.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Tree.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Tree.o: ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Tree.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_Tree.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Tree.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Tree.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Tree.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Tree.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+Fl_Tree.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Tree.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Tree.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Tree.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Tree.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Tree.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Tree.o: ../FL/Fl_Tree_Item.H ../FL/Fl_Widget.H ../FL/Fl_Tree_Item_Array.H
Fl_Tree.o: ../FL/Fl_Tree_Prefs.H ../FL/Fl_Preferences.H
Fl_Tree_Item.o: ../FL/Fl_Widget.H ../FL/Fl_Tree_Item.H ../FL/Fl.H
Fl_Tree_Item.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Tree_Item.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Image.H
-Fl_Tree_Item.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_Tree_Item.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Tree_Item.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Tree_Item.o: ../FL/Fl_Preferences.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Tree_Item.o: ../FL/Enumerations.H ../FL/Fl_Image.H ../FL/fl_draw.H
+Fl_Tree_Item.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Tree_Item.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Tree_Item.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Tree_Item.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Bitmap.H
Fl_Tree_Item.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Tree_Item.o: ../FL/Fl_Tree_Item_Array.H ../FL/Fl_Tree_Prefs.H
-Fl_Tree_Item_Array.o: ../FL/Fl_Tree_Item_Array.H ../FL/Fl_Export.H
-Fl_Tree_Item_Array.o: ../FL/Fl_Tree_Item.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_Tree_Item_Array.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Tree_Item_Array.o: ../FL/Fl_Widget.H ../FL/Fl_Image.H ../FL/fl_draw.H
-Fl_Tree_Item_Array.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Tree_Item_Array.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Tree_Item.o: ../FL/Fl_Tree.H ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H
+Fl_Tree_Item.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+Fl_Tree_Item_Array.o: ../FL/Fl_Tree_Item_Array.H ../FL/Fl.H ../FL/fl_utf8.h
+Fl_Tree_Item_Array.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_Tree_Item_Array.o: ../FL/Fl_Tree_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
+Fl_Tree_Item_Array.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Tree_Item_Array.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Tree_Item_Array.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
Fl_Tree_Item_Array.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
Fl_Tree_Item_Array.o: ../FL/Fl_Preferences.H ../FL/Fl_Bitmap.H
-Fl_Tree_Item_Array.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Tree_Item_Array.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Tree_Item_Array.o: ../FL/Fl_Tree_Prefs.H
Fl_Tree_Prefs.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Tree_Prefs.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Tree_Prefs.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_Tree_Prefs.H
+Fl_Tree_Prefs.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Pixmap.H
+Fl_Tree_Prefs.o: ../FL/Fl_Image.H ../FL/Fl_Tree_Prefs.H
Fl_Tooltip.o: ../FL/Fl_Tooltip.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Tooltip.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Tooltip.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Tooltip.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Widget.H
+Fl_Tooltip.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
Fl_Tooltip.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Tooltip.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Tooltip.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Tooltip.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-Fl_Tooltip.o: ../FL/Fl_Menu_Window.H ../FL/Fl_Single_Window.H
+Fl_Tooltip.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Tooltip.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Tooltip.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Tooltip.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Menu_Window.H
+Fl_Tooltip.o: ../FL/Fl_Single_Window.H
Fl_Valuator.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Valuator.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Valuator.H
-Fl_Valuator.o: ../FL/Fl_Widget.H ../FL/math.h flstring.h ../FL/Fl_Export.H
-Fl_Valuator.o: ../config.h
+Fl_Valuator.o: ../FL/Enumerations.H ../FL/Fl_Valuator.H ../FL/Fl_Widget.H
+Fl_Valuator.o: ../FL/math.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_Value_Input.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Value_Input.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Value_Input.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Value_Input.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
Fl_Value_Input.o: ../FL/Fl_Widget.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
Fl_Value_Input.o: ../FL/Fl_Group.H ../FL/math.h
Fl_Value_Output.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Value_Output.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Value_Output.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Value_Output.o: ../FL/Fl_Value_Output.H ../FL/Fl_Valuator.H
Fl_Value_Output.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
Fl_Value_Output.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Value_Output.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-Fl_Value_Output.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-Fl_Value_Output.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Value_Output.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Value_Output.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Value_Output.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Value_Output.o: ../FL/Fl_RGB_Image.H
Fl_Value_Slider.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Value_Slider.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_Value_Slider.o: ../FL/fl_types.h ../FL/Enumerations.H
Fl_Value_Slider.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
-Fl_Value_Slider.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H ../FL/fl_draw.H
-Fl_Value_Slider.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-Fl_Value_Slider.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Device.H
+Fl_Value_Slider.o: ../FL/Fl_Valuator.H ../FL/Fl_Widget.H
+Fl_Value_Slider.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
+Fl_Value_Slider.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Value_Slider.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Value_Slider.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
Fl_Value_Slider.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Value_Slider.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Value_Slider.o: ../FL/Fl_RGB_Image.H
+Fl_Value_Slider.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_Widget.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Widget.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H
-Fl_Widget.o: ../FL/Fl_Group.H ../FL/Fl_Tooltip.H ../FL/fl_draw.H ../FL/x.H
-Fl_Widget.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_Widget.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-Fl_Widget.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Widget.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_Widget.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
+Fl_Widget.o: ../FL/Fl_Tooltip.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Widget.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Widget.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Widget.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_Widget.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_Widget.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_Window.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Window.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
-Fl_Window.o: ../FL/Fl_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_Window.o: ../FL/Fl_Widget.H flstring.h ../FL/Fl_Export.H
+Fl_Window.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+Fl_Window.o: ../FL/Fl_Window.H ../FL/Fl_RGB_Image.H ../FL/Fl_Image.H
+Fl_Window.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Window.o: ../FL/Fl_Bitmap.H flstring.h ../FL/Fl_Export.H
Fl_Window_fullscreen.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Window_fullscreen.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Window_fullscreen.o: ../FL/x.H ../FL/Fl_Window.H ../config.h
+Fl_Window_fullscreen.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+Fl_Window_fullscreen.o: ../FL/Fl_Window.H ../config.h
Fl_Window_hotspot.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Window_hotspot.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Window_hotspot.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Window_hotspot.o: ../FL/x.H ../FL/Fl_Window.H
+Fl_Window_hotspot.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Window_hotspot.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_Window_hotspot.o: ../FL/Fl_Image.H ../FL/x.H ../FL/Fl_Window.H
Fl_Window_iconize.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-Fl_Window_iconize.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
+Fl_Window_iconize.o: ../FL/fl_types.h ../FL/Fl_Window.H
+Fl_Window_shape.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
+Fl_Window_shape.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+Fl_Window_shape.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_Window_shape.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_Window_shape.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+Fl_Window_shape.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+Fl_Window_shape.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Window_shape.o: ../config.h
Fl_Wizard.o: ../FL/Fl_Wizard.H ../FL/Fl_Group.H ../FL/Fl_Window.H
Fl_Wizard.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Enumerations.H
-Fl_Wizard.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/fl_draw.H ../FL/x.H
-Fl_Wizard.o: ../FL/Fl_Window.H ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Wizard.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Wizard.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+Fl_Wizard.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Bitmap.H
+Fl_Wizard.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Wizard.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+Fl_Wizard.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
Fl_Wizard.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_XBM_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_XBM_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_XBM_Image.H
-Fl_XBM_Image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h
-Fl_XBM_Image.o: ../FL/Fl_Export.H ../config.h
+Fl_XBM_Image.o: ../FL/Enumerations.H ../FL/Fl_XBM_Image.H ../FL/Fl_Bitmap.H
+Fl_XBM_Image.o: ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H
+Fl_XBM_Image.o: ../config.h
Fl_XPM_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_XPM_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_XPM_Image.H
-Fl_XPM_Image.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h
-Fl_XPM_Image.o: ../FL/Fl_Export.H ../config.h
+Fl_XPM_Image.o: ../FL/Enumerations.H ../FL/Fl_XPM_Image.H ../FL/Fl_Pixmap.H
+Fl_XPM_Image.o: ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H
+Fl_XPM_Image.o: ../config.h
Fl_abort.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_abort.o: ../FL/Xutf8.h ../FL/Enumerations.H flstring.h ../FL/Fl_Export.H
-Fl_abort.o: ../config.h
+Fl_abort.o: ../FL/Enumerations.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_add_idle.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_add_idle.o: ../FL/Xutf8.h ../FL/Enumerations.H
+Fl_add_idle.o: ../FL/Enumerations.H
Fl_arg.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_arg.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
-Fl_arg.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_arg.o: ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H ../FL/filename.H
-Fl_arg.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Device.H
-Fl_arg.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_arg.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+Fl_arg.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Window.H
+Fl_arg.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+Fl_arg.o: ../FL/Fl_Image.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
+Fl_arg.o: ../FL/filename.H ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_arg.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+Fl_arg.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
Fl_arg.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_compose.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_compose.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
+Fl_compose.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
Fl_display.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_display.o: ../FL/Xutf8.h ../FL/Enumerations.H flstring.h ../FL/Fl_Export.H
-Fl_display.o: ../config.h
+Fl_display.o: ../FL/Enumerations.H flstring.h ../FL/Fl_Export.H ../config.h
Fl_get_key.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_get_key.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
+Fl_get_key.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
Fl_get_system_colors.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_get_system_colors.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_get_system_colors.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-Fl_get_system_colors.o: ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_get_system_colors.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
+Fl_get_system_colors.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+Fl_get_system_colors.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+Fl_get_system_colors.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_get_system_colors.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
Fl_get_system_colors.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_get_system_colors.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_get_system_colors.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/math.h
-Fl_get_system_colors.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H
-Fl_get_system_colors.o: ../config.h ../FL/Fl_Tiled_Image.H tile.xpm
+Fl_get_system_colors.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_get_system_colors.o: ../FL/Fl_RGB_Image.H ../FL/math.h ../FL/fl_utf8.h
+Fl_get_system_colors.o: flstring.h ../FL/Fl_Export.H ../config.h
+Fl_get_system_colors.o: ../FL/Fl_Tiled_Image.H tile.xpm
Fl_grab.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_grab.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
-Fl_grab.o: ../FL/Fl_Window.H
+Fl_grab.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
Fl_lock.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_lock.o: ../FL/Xutf8.h ../FL/Enumerations.H ../config.h
+Fl_lock.o: ../FL/Enumerations.H ../config.h
Fl_own_colormap.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_own_colormap.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_own_colormap.o: ../FL/x.H ../FL/Fl_Window.H
+Fl_own_colormap.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+Fl_own_colormap.o: ../FL/Fl_Window.H
Fl_visual.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_visual.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
+Fl_visual.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
Fl_visual.o: ../FL/Fl_Window.H
Fl_x.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_x.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
-Fl_x.o: ../FL/Fl_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-Fl_x.o: ../FL/Fl_Widget.H ../FL/fl_utf8.h ../FL/Fl_Tooltip.H
+Fl_x.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
+Fl_x.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+Fl_x.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_utf8.h ../FL/Fl_Tooltip.H
Fl_x.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/Enumerations.H
Fl_x.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_x.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_x.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Paged_Device.H flstring.h
-Fl_x.o: ../FL/Fl_Export.H
+Fl_x.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_x.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Paged_Device.H ../FL/Fl_Shared_Image.H
+Fl_x.o: ../FL/fl_ask.H ../FL/filename.H flstring.h ../FL/Fl_Export.H Xutf8.h
filename_absolute.o: ../FL/filename.H ../FL/fl_utf8.h flstring.h
filename_absolute.o: ../FL/Fl_Export.H ../config.h
filename_expand.o: ../FL/filename.H ../FL/fl_utf8.h flstring.h
@@ -682,305 +738,313 @@ filename_list.o: ../FL/Fl_Export.H ../config.h
filename_match.o: ../FL/filename.H
filename_setext.o: ../FL/filename.H flstring.h ../FL/Fl_Export.H ../config.h
fl_arc.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-fl_arc.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-fl_arc.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_arc.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_arc.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_arc.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_arc.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_arc.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_arc.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_arc.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_arc.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_arc.o: ../FL/math.h
fl_arci.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-fl_arci.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-fl_arci.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_arci.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_arci.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_arci.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_arci.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_arci.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_arci.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_arci.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_arci.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_arci.o: ../config.h
fl_ask.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H ../FL/fl_utf8.h
-fl_ask.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-fl_ask.o: ../FL/Enumerations.H ../FL/fl_ask.H ../FL/Fl_Box.H
-fl_ask.o: ../FL/Fl_Widget.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
-fl_ask.o: ../FL/Fl_Button.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_ask.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+fl_ask.o: ../FL/fl_ask.H ../FL/Fl_Box.H ../FL/Fl_Widget.H ../FL/Fl_Button.H
+fl_ask.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Window.H
+fl_ask.o: ../FL/Fl_Group.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
fl_ask.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Secret_Input.H
fl_ask.o: ../FL/Fl_Input.H ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
fl_ask.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
fl_ask.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_ask.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_ask.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_boxtype.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_boxtype.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H
-fl_boxtype.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_boxtype.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_boxtype.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_boxtype.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_boxtype.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_boxtype.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/fl_draw.H
+fl_boxtype.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_boxtype.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_boxtype.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_boxtype.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_boxtype.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_boxtype.o: ../config.h
-fl_color.o: Fl_XColor.H ../config.h ../FL/Enumerations.H ../FL/Fl.H
-fl_color.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-fl_color.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
-fl_color.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_color.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_color.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_color.o: Fl_XColor.H ../config.h ../FL/Enumerations.H ../FL/Fl_Export.H
+fl_color.o: ../FL/fl_types.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Enumerations.H
+fl_color.o: ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Fl_Window.H
+fl_color.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_color.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_color.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
fl_color.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H fl_cmap.h
fl_cursor.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_cursor.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_cursor.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/x.H ../FL/Fl_Window.H
-fl_cursor.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Device.H
-fl_cursor.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_cursor.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_cursor.o: ../FL/Fl_RGB_Image.H
+fl_cursor.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_cursor.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_cursor.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/x.H
+fl_cursor.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Enumerations.H
+fl_cursor.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_cursor.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H fl_cursor_wait.xpm
+fl_cursor.o: fl_cursor_help.xpm fl_cursor_nwse.xpm fl_cursor_nesw.xpm
+fl_cursor.o: fl_cursor_none.xpm
fl_curve.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-fl_curve.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-fl_curve.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_curve.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_curve.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_curve.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_curve.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_curve.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_curve.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_curve.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_curve.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_diamond_box.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_diamond_box.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_diamond_box.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_diamond_box.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_diamond_box.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_diamond_box.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_diamond_box.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_diamond_box.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_diamond_box.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_diamond_box.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_diamond_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_diamond_box.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_diamond_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_dnd.o: fl_dnd_x.cxx ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_dnd.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_dnd.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/x.H
-fl_dnd.o: ../FL/Fl_Window.H flstring.h ../FL/Fl_Export.H ../config.h
+fl_dnd.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+fl_dnd.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_dnd.o: ../FL/Fl_Image.H ../FL/x.H ../FL/Fl_Window.H flstring.h
+fl_dnd.o: ../FL/Fl_Export.H ../config.h
fl_draw.o: ../FL/fl_utf8.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_draw.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_draw.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
-fl_draw.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_draw.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_draw.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_draw.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+fl_draw.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
+fl_draw.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_draw.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_draw.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
fl_draw.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
fl_draw.o: ../FL/Fl_Export.H ../config.h
fl_draw_image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_draw_image.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_draw_image.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_draw_image.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_draw_image.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_draw_image.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_draw_image.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_draw_image.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_draw_image.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_draw_image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_draw_image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_draw_image.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_draw_image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_draw_image.o: Fl_XColor.H ../config.h flstring.h ../FL/Fl_Export.H
fl_draw_pixmap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_draw_pixmap.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_draw_pixmap.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_draw_pixmap.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_draw_pixmap.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_draw_pixmap.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_draw_pixmap.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_draw_pixmap.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_draw_pixmap.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_draw_pixmap.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_draw_pixmap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_draw_pixmap.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_draw_pixmap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_draw_pixmap.o: flstring.h ../FL/Fl_Export.H ../config.h
fl_encoding_latin1.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
fl_encoding_latin1.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
-fl_encoding_latin1.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_encoding_latin1.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_encoding_latin1.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_encoding_latin1.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-fl_encoding_latin1.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
-fl_encoding_latin1.o: ../FL/Fl_Export.H ../config.h
+fl_encoding_latin1.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_encoding_latin1.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_encoding_latin1.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_encoding_latin1.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_encoding_latin1.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+fl_encoding_latin1.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H
+fl_encoding_latin1.o: ../config.h
fl_encoding_mac_roman.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
fl_encoding_mac_roman.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
-fl_encoding_mac_roman.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_encoding_mac_roman.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_encoding_mac_roman.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_encoding_mac_roman.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-fl_encoding_mac_roman.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
-fl_encoding_mac_roman.o: ../FL/Fl_Export.H ../config.h
+fl_encoding_mac_roman.o: ../FL/Enumerations.H ../FL/Fl_Window.H
+fl_encoding_mac_roman.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_encoding_mac_roman.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_encoding_mac_roman.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_encoding_mac_roman.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+fl_encoding_mac_roman.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H
+fl_encoding_mac_roman.o: ../config.h
fl_engraved_label.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_engraved_label.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_engraved_label.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-fl_engraved_label.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_engraved_label.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_engraved_label.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_engraved_label.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-fl_engraved_label.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_engraved_label.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Widget.H
+fl_engraved_label.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+fl_engraved_label.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_engraved_label.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_engraved_label.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_engraved_label.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_engraved_label.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_file_dir.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/filename.H
fl_file_dir.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/fl_utf8.h
-fl_file_dir.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-fl_file_dir.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-fl_file_dir.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
-fl_file_dir.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
-fl_file_dir.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
-fl_file_dir.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_Group.H
-fl_file_dir.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-fl_file_dir.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+fl_file_dir.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+fl_file_dir.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_file_dir.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Widget.H
+fl_file_dir.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H
+fl_file_dir.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+fl_file_dir.o: ../FL/Fl_Group.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
fl_file_dir.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
fl_file_dir.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
fl_file_dir.o: ../FL/Fl_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
fl_file_dir.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H ../FL/fl_ask.H
fl_font.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
-fl_font.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
+fl_font.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
fl_font.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
fl_font.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_font.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_font.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_font.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H Fl_Font.H
-fl_font.o: fl_font_xft.cxx
+fl_font.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_font.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_font.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+fl_font.o: ../FL/Fl_RGB_Image.H Fl_Font.H fl_font_xft.cxx
+fl_gleam.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
+fl_gleam.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+fl_gleam.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_gleam.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_gleam.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_gleam.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+fl_gleam.o: ../FL/Fl_RGB_Image.H
fl_gtk.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_gtk.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
-fl_gtk.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_gtk.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_gtk.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_gtk.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+fl_gtk.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+fl_gtk.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_gtk.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_gtk.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_gtk.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
fl_gtk.o: ../FL/Fl_RGB_Image.H
fl_labeltype.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_labeltype.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H
-fl_labeltype.o: ../FL/Fl_Group.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+fl_labeltype.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
+fl_labeltype.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
fl_labeltype.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_labeltype.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_labeltype.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_labeltype.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-fl_labeltype.o: ../FL/Fl_Input_.H
+fl_labeltype.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_labeltype.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_labeltype.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+fl_labeltype.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Input_.H
fl_line_style.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_line_style.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_line_style.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_line_style.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_line_style.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_line_style.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_line_style.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_line_style.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_line_style.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_line_style.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_line_style.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_line_style.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_line_style.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_line_style.o: ../FL/Fl_Printer.H ../FL/Fl_Paged_Device.H
fl_line_style.o: ../FL/Fl_PostScript.H flstring.h ../FL/Fl_Export.H
fl_line_style.o: ../config.h
fl_open_uri.o: ../FL/filename.H flstring.h ../FL/Fl_Export.H ../config.h
fl_oval_box.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_oval_box.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+fl_oval_box.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
fl_oval_box.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_oval_box.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_oval_box.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_oval_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_oval_box.o: ../FL/Fl_RGB_Image.H
+fl_oval_box.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_oval_box.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_oval_box.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fl_oval_box.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_overlay.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-fl_overlay.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
-fl_overlay.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_overlay.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_overlay.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_overlay.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+fl_overlay.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/fl_draw.H
+fl_overlay.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_overlay.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_overlay.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_overlay.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
fl_overlay.o: ../FL/Fl_RGB_Image.H
fl_overlay_visual.o: ../config.h
fl_plastic.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_plastic.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+fl_plastic.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
fl_plastic.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_plastic.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_plastic.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_plastic.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_plastic.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
+fl_plastic.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_plastic.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_plastic.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fl_plastic.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
+fl_plastic.o: ../FL/Fl_Export.H ../config.h
fl_read_image.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H
-fl_read_image.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h ../FL/Fl.H
+fl_read_image.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Fl.H
fl_read_image.o: ../FL/fl_utf8.h ../FL/fl_draw.H ../FL/Enumerations.H
fl_read_image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_read_image.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-fl_read_image.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-fl_read_image.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
-fl_read_image.o: ../FL/Fl_Export.H ../config.h
+fl_read_image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_read_image.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_read_image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_read_image.o: flstring.h ../FL/Fl_Export.H ../config.h
fl_rect.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_rect.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_rect.o: ../FL/Fl_Widget.H ../FL/Fl_Printer.H ../FL/x.H ../FL/Fl_Window.H
+fl_rect.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Widget.H
+fl_rect.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Fl_Window.H
fl_rect.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
fl_rect.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_rect.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_rect.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
fl_rect.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_rect.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_PostScript.H
+fl_rect.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/Enumerations.H
+fl_rect.o: ../FL/Fl_PostScript.H
fl_round_box.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_round_box.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+fl_round_box.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
fl_round_box.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_round_box.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_round_box.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_round_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_round_box.o: ../FL/Fl_RGB_Image.H
+fl_round_box.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_round_box.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_round_box.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fl_round_box.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_rounded_box.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_rounded_box.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_rounded_box.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_rounded_box.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_rounded_box.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_rounded_box.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_rounded_box.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_rounded_box.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_rounded_box.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_rounded_box.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_rounded_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_rounded_box.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_rounded_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_set_font.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_set_font.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
+fl_set_font.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
fl_set_font.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_set_font.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_set_font.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_set_font.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_set_font.o: ../FL/Fl_RGB_Image.H flstring.h ../FL/Fl_Export.H ../config.h
-fl_set_font.o: Fl_Font.H
+fl_set_font.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_set_font.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_set_font.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fl_set_font.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H flstring.h
+fl_set_font.o: ../FL/Fl_Export.H ../config.h Fl_Font.H
fl_set_fonts.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_set_fonts.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
-fl_set_fonts.o: ../FL/Fl_Window.H Fl_Font.H ../config.h flstring.h
-fl_set_fonts.o: ../FL/Fl_Export.H fl_set_fonts_xft.cxx
+fl_set_fonts.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H Fl_Font.H
+fl_set_fonts.o: ../config.h flstring.h ../FL/Fl_Export.H fl_set_fonts_xft.cxx
fl_scroll_area.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_scroll_area.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_scroll_area.o: ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
-fl_scroll_area.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_scroll_area.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_scroll_area.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_scroll_area.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_scroll_area.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+fl_scroll_area.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Enumerations.H
+fl_scroll_area.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_scroll_area.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_scroll_area.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_scroll_area.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_shadow_box.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_shadow_box.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fl_shadow_box.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
-fl_shadow_box.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fl_shadow_box.o: ../FL/Fl_Widget.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_shadow_box.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_shadow_box.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_shadow_box.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_draw.H
+fl_shadow_box.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Enumerations.H
+fl_shadow_box.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fl_shadow_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_shadow_box.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_shadow_box.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_shortcut.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_shortcut.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Widget.H
-fl_shortcut.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-fl_shortcut.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_shortcut.o: ../FL/Fl_Group.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_shortcut.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_shortcut.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_shortcut.o: ../FL/Enumerations.H ../FL/Fl_Widget.H ../FL/Fl_Button.H
+fl_shortcut.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+fl_shortcut.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_shortcut.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_shortcut.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_shortcut.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_shortcut.o: flstring.h ../FL/Fl_Export.H ../config.h
fl_show_colormap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fl_show_colormap.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
+fl_show_colormap.o: ../FL/fl_types.h ../FL/Enumerations.H
fl_show_colormap.o: ../FL/Fl_Single_Window.H ../FL/Fl_Window.H
fl_show_colormap.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
fl_show_colormap.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-fl_show_colormap.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-fl_show_colormap.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-fl_show_colormap.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+fl_show_colormap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+fl_show_colormap.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+fl_show_colormap.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
fl_show_colormap.o: ../FL/fl_show_colormap.H ../config.h
fl_symbols.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fl_symbols.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
+fl_symbols.o: ../FL/Enumerations.H ../FL/fl_draw.H ../FL/x.H
fl_symbols.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_symbols.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_symbols.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_symbols.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-fl_symbols.o: ../FL/Fl_RGB_Image.H ../FL/math.h flstring.h ../FL/Fl_Export.H
-fl_symbols.o: ../config.h
+fl_symbols.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fl_symbols.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+fl_symbols.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+fl_symbols.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/math.h flstring.h
+fl_symbols.o: ../FL/Fl_Export.H ../config.h
fl_vertex.o: ../config.h ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
fl_vertex.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Window.H
-fl_vertex.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-fl_vertex.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
-fl_vertex.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-fl_vertex.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+fl_vertex.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+fl_vertex.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+fl_vertex.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+fl_vertex.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
fl_vertex.o: ../FL/Fl_RGB_Image.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/math.h
screen_xywh.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-screen_xywh.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
-screen_xywh.o: ../config.h
-fl_utf8.o: ../config.h ../FL/filename.H ../FL/Xutf8.h ../FL/fl_utf8.h
+screen_xywh.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H ../config.h
+fl_utf8.o: ../config.h ../FL/filename.H Xutf8.h ../FL/fl_utf8.h
ps_image.o: ../FL/Fl_PostScript.H ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H
ps_image.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
-ps_image.o: ../FL/Fl_Window.H ../FL/Xutf8.h ../FL/Fl_Plugin.H
-ps_image.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-ps_image.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-ps_image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+ps_image.o: ../FL/Fl_Window.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+ps_image.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+ps_image.o: ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H
+ps_image.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
ps_image.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl.H ../FL/fl_utf8.h
forms_compatability.o: ../FL/forms.H ../FL/Fl.H ../FL/fl_utf8.h
-forms_compatability.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
+forms_compatability.o: ../FL/Fl_Export.H ../FL/fl_types.h
forms_compatability.o: ../FL/Enumerations.H ../FL/Fl_Group.H
forms_compatability.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/fl_draw.H
forms_compatability.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
-forms_compatability.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-forms_compatability.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-forms_compatability.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+forms_compatability.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+forms_compatability.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+forms_compatability.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
forms_compatability.o: ../FL/Fl_RGB_Image.H ../FL/Fl_FormsBitmap.H
-forms_compatability.o: ../FL/Fl_Bitmap.H ../FL/Fl_FormsPixmap.H
-forms_compatability.o: ../FL/Fl_Pixmap.H ../FL/Fl_Box.H ../FL/Fl_Browser.H
-forms_compatability.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-forms_compatability.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H
-forms_compatability.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
-forms_compatability.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H
-forms_compatability.o: ../FL/Fl_Chart.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+forms_compatability.o: ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H
+forms_compatability.o: ../FL/Fl_Box.H ../FL/Fl_Browser.H ../FL/Fl_Button.H
+forms_compatability.o: ../FL/Fl_Light_Button.H ../FL/Fl_Round_Button.H
+forms_compatability.o: ../FL/Fl_Check_Button.H ../FL/Fl_Chart.H
+forms_compatability.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
forms_compatability.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H
forms_compatability.o: ../FL/Fl_Counter.H ../FL/Fl_Dial.H ../FL/Fl_Free.H
forms_compatability.o: ../FL/fl_ask.H ../FL/fl_show_colormap.H
-forms_compatability.o: ../FL/filename.H ../FL/Fl_File_Chooser.H
+forms_compatability.o: ../FL/filename.H ../FL/Fl_File_Chooser.H ../FL/Fl.H
forms_compatability.o: ../FL/Fl_Double_Window.H ../FL/Fl_Group.H
forms_compatability.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
forms_compatability.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H
@@ -990,230 +1054,238 @@ forms_compatability.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H
forms_compatability.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H
forms_compatability.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H
forms_compatability.o: ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H
-forms_compatability.o: ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H
+forms_compatability.o: ../FL/Fl_Positioner.H ../FL/Fl_Slider.H
+forms_compatability.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Slider.H
forms_compatability.o: ../FL/Fl_Timer.H ../FL/Fl_Repeat_Button.H
forms_bitmap.o: ../FL/forms.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-forms_bitmap.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-forms_bitmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Window.H
-forms_bitmap.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
-forms_bitmap.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+forms_bitmap.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+forms_bitmap.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/x.H
+forms_bitmap.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+forms_bitmap.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
forms_bitmap.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-forms_bitmap.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-forms_bitmap.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_Bitmap.H
+forms_bitmap.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_FormsBitmap.H
forms_bitmap.o: ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H ../FL/Fl_Box.H
-forms_bitmap.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-forms_bitmap.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H
-forms_bitmap.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+forms_bitmap.o: ../FL/Fl_Browser.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
forms_bitmap.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H
forms_bitmap.o: ../FL/Fl_Chart.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
forms_bitmap.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H ../FL/Fl_Counter.H
forms_bitmap.o: ../FL/Fl_Dial.H ../FL/Fl_Free.H ../FL/fl_ask.H
forms_bitmap.o: ../FL/fl_show_colormap.H ../FL/filename.H
-forms_bitmap.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+forms_bitmap.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Fl_Double_Window.H
forms_bitmap.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
forms_bitmap.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
forms_bitmap.o: ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H ../FL/Fl_Box.H
forms_bitmap.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H
forms_bitmap.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
forms_bitmap.o: ../FL/fl_ask.H ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H
-forms_bitmap.o: ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H
-forms_bitmap.o: ../FL/Fl_Timer.H
+forms_bitmap.o: ../FL/Fl_Positioner.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+forms_bitmap.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Timer.H
forms_free.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-forms_free.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Free.H
-forms_free.o: ../FL/Fl_Widget.H
+forms_free.o: ../FL/Enumerations.H ../FL/Fl_Free.H ../FL/Fl_Widget.H
forms_fselect.o: ../FL/forms.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-forms_fselect.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-forms_fselect.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Window.H
-forms_fselect.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
-forms_fselect.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-forms_fselect.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-forms_fselect.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-forms_fselect.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_Bitmap.H
-forms_fselect.o: ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H ../FL/Fl_Box.H
-forms_fselect.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-forms_fselect.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H
+forms_fselect.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+forms_fselect.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/fl_draw.H
+forms_fselect.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
+forms_fselect.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+forms_fselect.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+forms_fselect.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+forms_fselect.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_FormsPixmap.H
+forms_fselect.o: ../FL/Fl_Pixmap.H ../FL/Fl_Box.H ../FL/Fl_Browser.H
forms_fselect.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
forms_fselect.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H
forms_fselect.o: ../FL/Fl_Chart.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
forms_fselect.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H ../FL/Fl_Counter.H
forms_fselect.o: ../FL/Fl_Dial.H ../FL/Fl_Free.H ../FL/fl_ask.H
forms_fselect.o: ../FL/fl_show_colormap.H ../FL/filename.H
-forms_fselect.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+forms_fselect.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Fl_Double_Window.H
forms_fselect.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
forms_fselect.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
forms_fselect.o: ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H ../FL/Fl_Box.H
forms_fselect.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H
forms_fselect.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
forms_fselect.o: ../FL/fl_ask.H ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H
-forms_fselect.o: ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H
-forms_fselect.o: ../FL/Fl_Timer.H flstring.h ../FL/Fl_Export.H ../config.h
+forms_fselect.o: ../FL/Fl_Positioner.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+forms_fselect.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Timer.H flstring.h
+forms_fselect.o: ../FL/Fl_Export.H ../config.h
forms_pixmap.o: ../FL/forms.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-forms_pixmap.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-forms_pixmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Window.H
-forms_pixmap.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H
-forms_pixmap.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+forms_pixmap.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Group.H
+forms_pixmap.o: ../FL/Fl_Widget.H ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/x.H
+forms_pixmap.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Bitmap.H
+forms_pixmap.o: ../FL/Fl_Image.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
forms_pixmap.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-forms_pixmap.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-forms_pixmap.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_Bitmap.H
+forms_pixmap.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_FormsBitmap.H
forms_pixmap.o: ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H ../FL/Fl_Box.H
-forms_pixmap.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-forms_pixmap.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H
-forms_pixmap.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+forms_pixmap.o: ../FL/Fl_Browser.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
forms_pixmap.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H
forms_pixmap.o: ../FL/Fl_Chart.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
forms_pixmap.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H ../FL/Fl_Counter.H
forms_pixmap.o: ../FL/Fl_Dial.H ../FL/Fl_Free.H ../FL/fl_ask.H
forms_pixmap.o: ../FL/fl_show_colormap.H ../FL/filename.H
-forms_pixmap.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+forms_pixmap.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/Fl_Double_Window.H
forms_pixmap.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
forms_pixmap.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
forms_pixmap.o: ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H ../FL/Fl_Box.H
forms_pixmap.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H
forms_pixmap.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
forms_pixmap.o: ../FL/fl_ask.H ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H
-forms_pixmap.o: ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H
-forms_pixmap.o: ../FL/Fl_Timer.H
+forms_pixmap.o: ../FL/Fl_Positioner.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+forms_pixmap.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Timer.H
forms_timer.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-forms_timer.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Timer.H
-forms_timer.o: ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+forms_timer.o: ../FL/Enumerations.H ../FL/Fl_Timer.H ../FL/Fl_Widget.H
+forms_timer.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
forms_timer.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-forms_timer.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-forms_timer.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-forms_timer.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+forms_timer.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
+forms_timer.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
+forms_timer.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+forms_timer.o: ../FL/forms.H ../FL/Fl.H ../FL/fl_draw.H
+forms_timer.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_FormsPixmap.H
+forms_timer.o: ../FL/Fl_Pixmap.H ../FL/Fl_Box.H ../FL/Fl_Browser.H
+forms_timer.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+forms_timer.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H
+forms_timer.o: ../FL/Fl_Chart.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+forms_timer.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H ../FL/Fl_Counter.H
+forms_timer.o: ../FL/Fl_Dial.H ../FL/Fl_Free.H ../FL/fl_ask.H
+forms_timer.o: ../FL/fl_show_colormap.H ../FL/filename.H
+forms_timer.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+forms_timer.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H
+forms_timer.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+forms_timer.o: ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H ../FL/Fl_Box.H
+forms_timer.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
+forms_timer.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H ../FL/fl_ask.H
+forms_timer.o: ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H ../FL/Fl_Positioner.H
+forms_timer.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Value_Slider.H
+forms_timer.o: ../FL/Fl_Timer.H
Fl_Gl_Choice.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Gl_Choice.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
+Fl_Gl_Choice.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
Fl_Gl_Choice.o: ../FL/Fl_Window.H Fl_Gl_Choice.H ../FL/gl_draw.H ../FL/gl.h
Fl_Gl_Choice.o: flstring.h ../FL/Fl_Export.H ../FL/fl_utf8.h
Fl_Gl_Overlay.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-Fl_Gl_Overlay.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-Fl_Gl_Overlay.o: ../FL/x.H ../FL/Fl_Window.H Fl_Gl_Choice.H
-Fl_Gl_Overlay.o: ../FL/Fl_Gl_Window.H
+Fl_Gl_Overlay.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/x.H
+Fl_Gl_Overlay.o: ../FL/Fl_Window.H Fl_Gl_Choice.H ../FL/Fl_Gl_Window.H
Fl_Gl_Device_Plugin.o: ../config.h ../FL/Fl_Printer.H ../FL/x.H
Fl_Gl_Device_Plugin.o: ../FL/Enumerations.H ../FL/Fl_Export.H
-Fl_Gl_Device_Plugin.o: ../FL/fl_types.h ../FL/Fl_Window.H ../FL/Xutf8.h
+Fl_Gl_Device_Plugin.o: ../FL/fl_types.h ../FL/Fl_Window.H
Fl_Gl_Device_Plugin.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H
Fl_Gl_Device_Plugin.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-Fl_Gl_Device_Plugin.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-Fl_Gl_Device_Plugin.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Gl_Device_Plugin.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+Fl_Gl_Device_Plugin.o: ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
Fl_Gl_Device_Plugin.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-Fl_Gl_Device_Plugin.o: ../FL/fl_draw.H ../FL/Enumerations.H
+Fl_Gl_Device_Plugin.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H ../FL/Enumerations.H
Fl_Gl_Device_Plugin.o: ../FL/Fl_PostScript.H ../FL/Fl_Gl_Window.H
Fl_Gl_Device_Plugin.o: Fl_Gl_Choice.H ../FL/Fl.H ../FL/fl_utf8.h
Fl_Gl_Window.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
Fl_Gl_Window.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_Gl_Window.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/x.H
-Fl_Gl_Window.o: ../FL/Fl_Window.H Fl_Gl_Choice.H ../FL/Fl_Gl_Window.H
-Fl_Gl_Window.o: ../FL/fl_utf8.h
+Fl_Gl_Window.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H
+Fl_Gl_Window.o: Fl_Gl_Choice.H ../FL/Fl_Gl_Window.H ../FL/fl_utf8.h
freeglut_geometry.o: ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
freeglut_geometry.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
-freeglut_geometry.o: ../FL/fl_utf8.h ../FL/Xutf8.h ../FL/Fl_Gl_Window.H
-freeglut_geometry.o: ../FL/Fl_Window.H ../FL/math.h
+freeglut_geometry.o: ../FL/fl_utf8.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+freeglut_geometry.o: ../FL/math.h
freeglut_stroke_mono_roman.o: ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
freeglut_stroke_mono_roman.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
-freeglut_stroke_mono_roman.o: ../FL/fl_utf8.h ../FL/Xutf8.h
-freeglut_stroke_mono_roman.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+freeglut_stroke_mono_roman.o: ../FL/fl_utf8.h ../FL/Fl_Gl_Window.H
+freeglut_stroke_mono_roman.o: ../FL/Fl_Window.H
freeglut_stroke_roman.o: ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
freeglut_stroke_roman.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
-freeglut_stroke_roman.o: ../FL/fl_utf8.h ../FL/Xutf8.h ../FL/Fl_Gl_Window.H
+freeglut_stroke_roman.o: ../FL/fl_utf8.h ../FL/Fl_Gl_Window.H
freeglut_stroke_roman.o: ../FL/Fl_Window.H
freeglut_teapot.o: ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
freeglut_teapot.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
-freeglut_teapot.o: ../FL/fl_utf8.h ../FL/Xutf8.h ../FL/Fl_Gl_Window.H
-freeglut_teapot.o: ../FL/Fl_Window.H freeglut_teapot_data.h
+freeglut_teapot.o: ../FL/fl_utf8.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+freeglut_teapot.o: freeglut_teapot_data.h
gl_draw.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
-gl_draw.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-gl_draw.o: ../FL/Enumerations.H ../FL/gl.h ../FL/x.H ../FL/Fl_Window.H
-gl_draw.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Window.H
-gl_draw.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
+gl_draw.o: ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
+gl_draw.o: ../FL/Enumerations.H ../FL/gl.h ../FL/gl_draw.H ../FL/gl.h
+gl_draw.o: ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Enumerations.H
+gl_draw.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+gl_draw.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
gl_draw.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-gl_draw.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-gl_draw.o: ../FL/Fl_RGB_Image.H Fl_Gl_Choice.H Fl_Font.H ../FL/fl_utf8.h
-gl_draw.o: ../FL/Xutf8.h
+gl_draw.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+gl_draw.o: Fl_Gl_Choice.H Fl_Font.H ../FL/fl_utf8.h Xutf8.h
gl_start.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-gl_start.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-gl_start.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/x.H
-gl_start.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/Enumerations.H
-gl_start.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-gl_start.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-gl_start.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H Fl_Gl_Choice.H
+gl_start.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+gl_start.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+gl_start.o: ../FL/Fl_Image.H ../FL/x.H ../FL/Fl_Window.H ../FL/fl_draw.H
+gl_start.o: ../FL/Enumerations.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+gl_start.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+gl_start.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/gl.h Fl_Gl_Choice.H
glut_compatability.o: flstring.h ../FL/Fl_Export.H ../config.h ../FL/glut.H
glut_compatability.o: ../FL/gl.h ../FL/Enumerations.H ../FL/Fl_Export.H
glut_compatability.o: ../FL/fl_types.h ../FL/Fl.H ../FL/fl_utf8.h
-glut_compatability.o: ../FL/Xutf8.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+glut_compatability.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
glut_compatability.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
glut_font.o: ../config.h ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
glut_font.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H ../FL/fl_utf8.h
-glut_font.o: ../FL/Xutf8.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+glut_font.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
fl_images_core.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H
+fl_images_core.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
fl_images_core.o: ../FL/Fl_BMP_Image.H ../FL/Fl_GIF_Image.H ../FL/Fl_Pixmap.H
fl_images_core.o: ../FL/Fl_JPEG_Image.H ../FL/Fl_PNG_Image.H
fl_images_core.o: ../FL/Fl_PNM_Image.H flstring.h ../FL/Fl_Export.H
fl_images_core.o: ../config.h
-Fl_BMP_Image.o: ../FL/Fl_BMP_Image.H ../FL/Fl_Image.H ../FL/fl_utf8.h
-Fl_BMP_Image.o: ../config.h
+Fl_BMP_Image.o: ../FL/Fl_BMP_Image.H ../FL/Fl_Image.H ../FL/Enumerations.H
+Fl_BMP_Image.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/fl_utf8.h ../FL/Fl.H
+Fl_BMP_Image.o: ../FL/fl_utf8.h ../config.h
Fl_File_Icon2.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
Fl_File_Icon2.o: ../FL/math.h ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_File_Icon2.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_File_Icon2.o: ../FL/Enumerations.H ../FL/Fl_Shared_Image.H
-Fl_File_Icon2.o: ../FL/Fl_Image.H ../FL/Fl_Widget.H ../FL/fl_draw.H ../FL/x.H
-Fl_File_Icon2.o: ../FL/Fl_Window.H ../FL/Enumerations.H ../FL/Fl_Window.H
-Fl_File_Icon2.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Device.H
+Fl_File_Icon2.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_File_Icon2.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H ../FL/Fl_Widget.H
+Fl_File_Icon2.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H
+Fl_File_Icon2.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_File_Icon2.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Device.H
Fl_File_Icon2.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
Fl_File_Icon2.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
Fl_File_Icon2.o: ../FL/filename.H
Fl_GIF_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_GIF_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_GIF_Image.H
-Fl_GIF_Image.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h
-Fl_GIF_Image.o: ../FL/Fl_Export.H ../config.h
+Fl_GIF_Image.o: ../FL/Enumerations.H ../FL/Fl_GIF_Image.H ../FL/Fl_Pixmap.H
+Fl_GIF_Image.o: ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H
+Fl_GIF_Image.o: ../config.h
Fl_Help_Dialog.o: ../FL/Fl_Help_Dialog.H ../FL/Fl.H ../FL/fl_utf8.h
-Fl_Help_Dialog.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-Fl_Help_Dialog.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-Fl_Help_Dialog.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Button.H
-Fl_Help_Dialog.o: ../FL/Fl_Widget.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-Fl_Help_Dialog.o: ../FL/Fl_Box.H ../FL/Fl_Help_View.H ../FL/Fl.H
-Fl_Help_Dialog.o: ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-Fl_Help_Dialog.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H
-Fl_Help_Dialog.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
+Fl_Help_Dialog.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+Fl_Help_Dialog.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+Fl_Help_Dialog.o: ../FL/Fl_Button.H ../FL/Fl_Widget.H ../FL/Fl_Input.H
+Fl_Help_Dialog.o: ../FL/Fl_Input_.H ../FL/Fl_Box.H ../FL/Fl_Help_View.H
+Fl_Help_Dialog.o: ../FL/Fl.H ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H
+Fl_Help_Dialog.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H
+Fl_Help_Dialog.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
+Fl_Help_Dialog.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Device.H
Fl_Help_Dialog.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-Fl_Help_Dialog.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-Fl_Help_Dialog.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H
-Fl_Help_Dialog.o: ../FL/filename.H flstring.h ../FL/Fl_Export.H ../config.h
-Fl_Help_Dialog.o: ../FL/fl_ask.H
-Fl_JPEG_Image.o: ../FL/Fl_JPEG_Image.H ../FL/Fl_Image.H
-Fl_JPEG_Image.o: ../FL/Fl_Shared_Image.H ../FL/fl_utf8.h ../config.h
+Fl_Help_Dialog.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+Fl_Help_Dialog.o: ../FL/Fl_Shared_Image.H ../FL/filename.H flstring.h
+Fl_Help_Dialog.o: ../FL/Fl_Export.H ../config.h ../FL/fl_ask.H
+Fl_JPEG_Image.o: ../FL/Fl_JPEG_Image.H ../FL/Fl_Image.H ../FL/Enumerations.H
+Fl_JPEG_Image.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Shared_Image.H
+Fl_JPEG_Image.o: ../FL/fl_utf8.h ../FL/Fl.H ../FL/fl_utf8.h ../config.h
Fl_PNG_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_PNG_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_PNG_Image.H
-Fl_PNG_Image.o: ../FL/Fl_Image.H ../FL/Fl_Shared_Image.H ../config.h
-Fl_PNG_Image.o: ../FL/fl_utf8.h
+Fl_PNG_Image.o: ../FL/Enumerations.H ../FL/Fl_PNG_Image.H ../FL/Fl_Image.H
+Fl_PNG_Image.o: ../FL/Fl_Shared_Image.H ../config.h ../FL/fl_utf8.h
Fl_PNM_Image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-Fl_PNM_Image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_PNM_Image.H
-Fl_PNM_Image.o: ../FL/Fl_Image.H ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H
-Fl_PNM_Image.o: ../config.h
+Fl_PNM_Image.o: ../FL/Enumerations.H ../FL/Fl_PNM_Image.H ../FL/Fl_Image.H
+Fl_PNM_Image.o: ../FL/fl_utf8.h flstring.h ../FL/Fl_Export.H ../config.h
flstring.o: flstring.h ../FL/Fl_Export.H ../config.h
-scandir.o: flstring.h ../FL/Fl_Export.H ../config.h
-numericsort.o: ../config.h
+scandir.o: ../config.h
+numericsort.o: ../config.h ../FL/filename.H
vsnprintf.o: flstring.h ../FL/Fl_Export.H ../config.h
fl_utf.o: ../FL/fl_utf8.h xutf8/mk_wcwidth.c
xutf8/case.o: xutf8/headers/case.h
+xutf8/is_right2left.o: Xutf8.h
xutf8/is_spacing.o: xutf8/headers/spacing.h
-xutf8/keysym2Ucs.o: ../FL/Xutf8.h xutf8/imKStoUCS.c xutf8/Xlibint.h
-xutf8/keysym2Ucs.o: xutf8/Ximint.h
-xutf8/utf8Input.o: ../config.h ../FL/Xutf8.h xutf8/lcUniConv/big5.h
+xutf8/keysym2Ucs.o: Xutf8.h xutf8/imKStoUCS.c xutf8/Xlibint.h xutf8/Ximint.h
+xutf8/utf8Input.o: ../config.h Xutf8.h xutf8/lcUniConv/big5.h
xutf8/utf8Input.o: xutf8/lcUniConv/gb2312.h xutf8/lcUniConv/cp936ext.h
xutf8/utf8Input.o: xutf8/lcUniConv/jisx0201.h xutf8/lcUniConv/jisx0208.h
xutf8/utf8Input.o: xutf8/lcUniConv/jisx0212.h xutf8/lcUniConv/ksc5601.h
-xutf8/utf8Utils.o: ../FL/Xutf8.h
-xutf8/utf8Wrap.o: ../FL/Xutf8.h xutf8/ucs2fontmap.c
-xutf8/utf8Wrap.o: xutf8/lcUniConv/cp936ext.h xutf8/lcUniConv/big5.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/gb2312.h xutf8/lcUniConv/iso8859_10.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_11.h xutf8/lcUniConv/iso8859_13.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_14.h xutf8/lcUniConv/iso8859_15.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_2.h xutf8/lcUniConv/iso8859_3.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_4.h xutf8/lcUniConv/iso8859_5.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_6.h xutf8/lcUniConv/iso8859_7.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_8.h xutf8/lcUniConv/iso8859_9.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/jisx0201.h xutf8/lcUniConv/jisx0208.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/jisx0212.h xutf8/lcUniConv/koi8_r.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/koi8_u.h xutf8/lcUniConv/ksc5601.h
-xutf8/utf8Wrap.o: xutf8/lcUniConv/cp1251.h xutf8/headers/symbol_.h
-xutf8/utf8Wrap.o: xutf8/headers/dingbats_.h
+xutf8/utf8Utils.o: Xutf8.h
+xutf8/utf8Wrap.o: Xutf8.h xutf8/ucs2fontmap.c xutf8/lcUniConv/cp936ext.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/big5.h xutf8/lcUniConv/gb2312.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_10.h xutf8/lcUniConv/iso8859_11.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_13.h xutf8/lcUniConv/iso8859_14.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_15.h xutf8/lcUniConv/iso8859_2.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_3.h xutf8/lcUniConv/iso8859_4.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_5.h xutf8/lcUniConv/iso8859_6.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_7.h xutf8/lcUniConv/iso8859_8.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/iso8859_9.h xutf8/lcUniConv/jisx0201.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/jisx0208.h xutf8/lcUniConv/jisx0212.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/koi8_r.h xutf8/lcUniConv/koi8_u.h
+xutf8/utf8Wrap.o: xutf8/lcUniConv/ksc5601.h xutf8/lcUniConv/cp1251.h
+xutf8/utf8Wrap.o: xutf8/headers/symbol_.h xutf8/headers/dingbats_.h
diff --git a/src/mediumarrow.h b/src/mediumarrow.h
index 8a1fe8c..a25f728 100644
--- a/src/mediumarrow.h
+++ b/src/mediumarrow.h
@@ -1,6 +1,6 @@
#define mediumarrow_width 16
#define mediumarrow_height 16
-static unsigned char mediumarrow_bits[] = {
+static const unsigned char mediumarrow_bits[] = {
0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0xfc, 0x3f, 0x78, 0x00,
0x70, 0x00, 0x60, 0x02, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0xfc, 0x3f,
0x00, 0x1e, 0x00, 0x0e, 0x00, 0x06, 0x00, 0x02};
diff --git a/src/numericsort.c b/src/numericsort.c
index 84172a3..bd37d6e 100644
--- a/src/numericsort.c
+++ b/src/numericsort.c
@@ -1,5 +1,5 @@
/*
- * "$Id: numericsort.c 8864 2011-07-19 04:49:30Z greg.ercolano $"
+ * "$Id: numericsort.c 10236 2014-08-21 12:29:48Z cand $"
*
* Numeric sorting routine for the Fast Light Tool Kit (FLTK).
*
@@ -39,10 +39,10 @@
# include <ndir.h>
# endif /* HAVE_NDIR_H */
# endif /* HAVE_DIRENT_H */
-#else /* For WIN32 variants */
-# include <FL/filename.H>
#endif /* !WIN32 || __CYGWIN__ */
+#include <FL/filename.H>
+
/*
* 'numericsort()' - Compare two directory entries, possibly with
* a case-insensitive comparison...
@@ -98,5 +98,5 @@ int fl_numericsort(struct dirent **A, struct dirent **B) {
}
/*
- * End of "$Id: numericsort.c 8864 2011-07-19 04:49:30Z greg.ercolano $".
+ * End of "$Id: numericsort.c 10236 2014-08-21 12:29:48Z cand $".
*/
diff --git a/src/print_panel.cxx b/src/print_panel.cxx
index 478b7b5..ec622ca 100644
--- a/src/print_panel.cxx
+++ b/src/print_panel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: print_panel.cxx 9158 2011-10-29 14:50:04Z manolo $"
+// "$Id: print_panel.cxx 10234 2014-08-21 12:18:32Z cand $"
//
// Print panel for the Fast Light Tool Kit (FLTK).
//
@@ -110,7 +110,7 @@ static void cb_print_properties_panel(Fl_Double_Window*, void*) {
print_update_status();
}
-static Fl_Menu_Item menu_print_page_size[] = {
+static const Fl_Menu_Item menu_print_page_size[] = {
{"Letter", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"A4", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{"Legal", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
@@ -124,7 +124,7 @@ static Fl_Menu_Item menu_print_page_size[] = {
};
#include <FL/Fl_Pixmap.H>
-static const char *idata_print_color[] = {
+static const char * const idata_print_color[] = {
"24 24 17 1",
" \tc None",
".\tc #FFFF00",
@@ -170,7 +170,7 @@ static const char *idata_print_color[] = {
};
static Fl_Pixmap image_print_color(idata_print_color);
-static const char *idata_print_gray[] = {
+static const char * const idata_print_gray[] = {
"24 24 17 1",
" \tc None",
".\tc #E3E3E3",
@@ -591,5 +591,5 @@ void print_update_status() {
}
//
-// End of "$Id: print_panel.cxx 9158 2011-10-29 14:50:04Z manolo $".
+// End of "$Id: print_panel.cxx 10234 2014-08-21 12:18:32Z cand $".
//
diff --git a/src/ps_image.cxx b/src/ps_image.cxx
index 35d0d0e..41dc299 100644
--- a/src/ps_image.cxx
+++ b/src/ps_image.cxx
@@ -185,72 +185,38 @@ static inline uchar swap_byte(const uchar b) {
extern uchar **fl_mask_bitmap;
+struct callback_data {
+ const uchar *data;
+ int D, LD;
+};
-void Fl_PostScript_Graphics_Driver::draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) {
- double x = ix, y = iy, w = iw, h = ih;
- if (D<3){ //mono
- draw_image_mono(data, ix, iy, iw, ih, D, LD);
- return;
- }
+static void draw_image_cb(void *data, int x, int y, int w, uchar *buf) {
+ struct callback_data *cb_data;
+ const uchar *curdata;
+ cb_data = (struct callback_data*)data;
+ curdata = cb_data->data + x*cb_data->D + y*cb_data->LD;
- int i,j, k;
+ memcpy(buf, curdata, w*cb_data->D);
+}
- fprintf(output,"save\n");
- const char * interpol;
- if (lang_level_>1){
- if (interpolate_)
- interpol="true";
- else
- interpol="false";
- if (mask && lang_level_>2)
- fprintf(output, "%g %g %g %g %i %i %i %i %s CIM\n", x , y+h , w , -h , iw , ih, mx, my, interpol);
- else
- fprintf(output, "%g %g %g %g %i %i %s CII\n", x , y+h , w , -h , iw , ih, interpol);
- } else
- fprintf(output , "%g %g %g %g %i %i CI", x , y+h , w , -h , iw , ih);
+void Fl_PostScript_Graphics_Driver::draw_image(const uchar *data, int ix, int iy, int iw, int ih, int D, int LD) {
+ if (D<3){ //mono
+ draw_image_mono(data, ix, iy, iw, ih, D, LD);
+ return;
+ }
+ struct callback_data cb_data;
if (!LD) LD = iw*D;
- uchar *curmask=mask;
-
- for (j=0; j<ih;j++){
- if (mask){
-
- for (k=0;k<my/ih;k++){
- for (i=0; i<((mx+7)/8);i++){
- if (!(i%80)) fprintf(output, "\n");
- fprintf(output, "%.2x",swap_byte(*curmask));
- curmask++;
- }
- fprintf(output,"\n");
- }
- }
- const uchar *curdata=data+j*LD;
- for (i=0 ; i<iw ; i++) {
- uchar r = curdata[0];
- uchar g = curdata[1];
- uchar b = curdata[2];
- if (lang_level_<3 && D>3) { //can do mixing using bg_* colors)
- unsigned int a2 = curdata[3]; //must be int
- unsigned int a = 255-a2;
- r = (a2 * r + bg_r * a)/255;
- g = (a2 * g + bg_g * a)/255;
- b = (a2 * b + bg_b * a)/255;
- }
- if (!(i%40)) fprintf(output, "\n");
- fprintf(output, "%.2x%.2x%.2x", r, g, b);
- curdata +=D;
- }
- fprintf(output,"\n");
-
- }
-
- fprintf(output," >\nrestore\n" );
+ cb_data.data = data;
+ cb_data.D = D;
+ cb_data.LD = LD;
+ draw_image(draw_image_cb, &cb_data, ix, iy, iw, ih, D);
}
void Fl_PostScript_Graphics_Driver::draw_image(Fl_Draw_Image_Cb call, void *data, int ix, int iy, int iw, int ih, int D) {
@@ -325,6 +291,14 @@ void Fl_PostScript_Graphics_Driver::draw_image(Fl_Draw_Image_Cb call, void *data
uchar g = curdata[1];
uchar b = curdata[2];
+ if (lang_level_<3 && D>3) { //can do mixing using bg_* colors)
+ unsigned int a2 = curdata[3]; //must be int
+ unsigned int a = 255-a2;
+ r = (a2 * r + bg_r * a)/255;
+ g = (a2 * g + bg_g * a)/255;
+ b = (a2 * b + bg_b * a)/255;
+ }
+
if (!(i%40)) fputs("\n", output);
fprintf(output, "%.2x%.2x%.2x", r, g, b);
diff --git a/src/scandir.c b/src/scandir.c
index e39c6ca..27d40dc 100644
--- a/src/scandir.c
+++ b/src/scandir.c
@@ -1,10 +1,10 @@
/*
- * "$Id: scandir.c 9210 2011-12-21 10:42:14Z ianmacarthur $"
+ * "$Id: scandir.c 9858 2013-04-05 14:14:08Z manolo $"
*
- * This is a placekeeper stub that puuls in scandir implementations for host
+ * This is a placekeeper stub that pulls in scandir implementations for host
* systems that do not provide a compatible one natively
*
- * Copyright 1998-2010 by Bill Spitzak and others.
+ * Copyright 1998-2013 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
@@ -21,42 +21,12 @@
#if defined(WIN32) && !defined(__CYGWIN__)
# include "scandir_win32.c"
#else
-
-# include "flstring.h"
-
-/* NOTE: Most (all?) modern non-WIN32 hosts DO have a usable scandir */
-# if !HAVE_SCANDIR
-# include <stdlib.h>
-# include <sys/types.h>
-# include <errno.h>
-
-# if HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-# else /* HAVE_DIRENT_H */
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-# endif
-
-/* This warning added to help identify any non-WIN32 hosts that actually try to use
- * our "private" implementation of the scandir function, which was suspect... */
-# if defined(__GNUC__)
-# warning Attempting to use the deprecated scandir() replacement function
-# endif /*__GNUC__*/
-# error No compatible scandir implementation found (STR 2687 applies!)
-
-# endif /* !HAVE_SCANDIR */
+# include <config.h>
+# ifndef HAVE_SCANDIR
+# include "scandir_posix.c"
+# endif /* HAVE_SCANDIR */
#endif
/*
- * End of "$Id: scandir.c 9210 2011-12-21 10:42:14Z ianmacarthur $".
+ * End of "$Id: scandir.c 9858 2013-04-05 14:14:08Z manolo $".
*/
diff --git a/src/scandir_posix.c b/src/scandir_posix.c
new file mode 100644
index 0000000..f032d7f
--- /dev/null
+++ b/src/scandir_posix.c
@@ -0,0 +1,205 @@
+/*
+ * "$Id: scandir_posix.c 9832 2013-03-06 22:15:01Z ianmacarthur $"
+ *
+ * This implementation of 'scandir()' is intended to be POSIX.1-2008 compliant.
+ * A POSIX.1-1990 compliant system is required as minimum base.
+ * Note:
+ * The 'const' declarations were removed to match FLTK 1.3 wrapper (STR #2931)
+ *
+ * Copyright (c) 2013 by Michael Baeuerle
+ *
+ * This library is free software. Distribution and use rights are outlined in
+ * the file "COPYING" which should have been included with this file. If this
+ * file is missing or damaged, see the license at:
+ *
+ * http://www.fltk.org/COPYING.php
+ *
+ * Please report all bugs and problems on the following page:
+ *
+ * http://www.fltk.org/str.php
+ *
+ * It is required that 'SIZE_MAX' is at least 'INT_MAX'.
+ * Don't use a C++ compiler to build this module.
+ *
+ * The build system must define 'HAVE_PTHREAD' and link against a potentially
+ * required library to switch this implementation into thread-safe mode.
+ * The POSIX.1c-1995 extension is required if 'HAVE_PTHREAD' is defined.
+ *
+ * Note:
+ * In theory, a system that provide threads should also provide 'readdir_r()',
+ * a thread-safe version of 'readdir()'. In reality this is not always the case.
+ * In addition there may be a race condition that can lead to a buffer overflow:
+ * http://womble.decadent.org.uk/readdir_r-advisory.html
+ */
+
+#ifndef HAVE_PTHREAD
+ /* Switch system headers into POSIX.1-1990 mode */
+# define _POSIX_SOURCE
+#else /* HAVE_PTHREAD */
+ /* Switch system headers into POSIX.1c-1995 mode */
+# define _POSIX_C_SOURCE 199506L
+#endif /* HAVE_PTHREAD */
+
+#include <sys/types.h> /* XPG2 require this for '*dir()' functions */
+#include <dirent.h>
+#include <errno.h>
+#include <stdlib.h> /* For 'malloc()', 'realloc()' and 'qsort()' */
+#include <stddef.h> /* For 'offsetof()', 'NULL' and 'size_t' */
+#include <limits.h> /* For 'INT_MAX' */
+#include <string.h> /* For 'memcpy()' */
+#if defined(HAVE_PTHREAD) && defined(HAVE_PTHREAD_H)
+# include <pthread.h>
+#endif /* HAVE_PTHREAD */
+
+
+/* ========================================================================== */
+/* At startup allocate memory for this number of result array elements */
+#define ENTRIES_MIN (size_t) 32
+
+
+/* ========================================================================== */
+#ifdef HAVE_PTHREAD
+static pthread_mutex_t scandir_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif /* HAVE_PTHREAD */
+
+
+/* ========================================================================== */
+/*
+ * This function reads the next entry from the directory referenced by 'dirp',
+ * allocate a buffer for the entry and copy it into this buffer.
+ * A pointer to this buffer is written to 'entryp' and the size of the buffer is
+ * written to 'len'.
+ * Success and a NULL pointer is returned for 'entryp' if there are no more
+ * entries in the directory.
+ * On sucess zero is returned and the caller is responsible for 'free()'ing the
+ * buffer after use.
+ * On error the return value is nonzero, 'entryp' and 'len' are invalid.
+ *
+ * Should be declared as 'static inline' if the compiler support that.
+ */
+static int
+readentry(DIR *dirp, struct dirent **entryp, size_t *len)
+{
+ int result = -1;
+ struct dirent *e;
+
+#ifdef HAVE_PTHREAD
+ if (!pthread_mutex_lock(&scandir_mutex))
+ {
+ /* Ensure that there is no code path that bypass the '_unlock()' call! */
+#endif /* HAVE_PTHREAD */
+ errno = 0;
+ e = readdir(dirp);
+ if (NULL == e)
+ {
+ if (!errno)
+ {
+ /* No more entries in directory */
+ *entryp = NULL;
+ *len = 0;
+ result = 0;
+ }
+ }
+ else
+ {
+ /* Entry found, allocate local buffer */
+ *len = offsetof(struct dirent, d_name) + strlen(e->d_name) + (size_t) 1;
+ *entryp = (struct dirent *) malloc(*len);
+ if (NULL != *entryp)
+ {
+ memcpy((void *) *entryp, (void *) e, *len);
+ /* Force NUL termination at end of buffer */
+ ((char *) *entryp)[*len - (size_t) 1] = 0;
+ result = 0;
+ }
+ }
+#ifdef HAVE_PTHREAD
+ /*
+ * In a multithreading environment the systems dirent buffer may be shared
+ * between all threads. Therefore the mutex must stay locked until we have
+ * copied the data to our thread local buffer.
+ */
+ pthread_mutex_unlock(&scandir_mutex);
+ }
+#endif /* HAVE_PTHREAD */
+
+ return result;
+}
+
+
+/* ========================================================================== */
+int
+fl_scandir(const char *dir, struct dirent ***namelist,
+ int (*sel)(struct dirent *),
+ int (*compar)(struct dirent **, struct dirent **))
+{
+ int result = -1;
+ DIR *dirp;
+ size_t len, num = 0, max = ENTRIES_MIN;
+ struct dirent *entryp, **entries, **p;
+
+ entries = (struct dirent **) malloc(sizeof(*entries) * max);
+ if (NULL != entries)
+ {
+ /* Open directory 'dir' (and verify that it really is a directory) */
+ dirp = opendir(dir);
+ if (NULL != dirp)
+ {
+ /* Read next directory entry */
+ while (!readentry(dirp, &entryp, &len))
+ {
+ if (NULL == entryp)
+ {
+ /* EOD => Return number of directory entries */
+ result = (int) num;
+ break;
+ }
+ /* Apply select function if there is one provided */
+ if (NULL != sel) { if (!sel(entryp)) continue; }
+ entries[num++] = entryp;
+ if (num >= max)
+ {
+ /* Allocate exponentially increasing sized memory chunks */
+ if (INT_MAX / 2 >= (int) max) { max *= (size_t) 2; }
+ else
+ {
+ errno = ENOMEM;
+ break;
+ }
+ p = (struct dirent **) realloc((void *) entries,
+ sizeof(*entries) * max);
+ if (NULL != p) { entries = p; }
+ else break;
+ }
+ }
+ closedir(dirp);
+ /*
+ * A standard compliant 'closedir()' is allowed to fail with 'EINTR', but
+ * the state of the directory structure is undefined in this case.
+ * Therefore we ignore the return value because we can't call 'closedir()'
+ * again and must hope that the system has released all ressources.
+ */
+ }
+ /* Sort entries in array if there is a compare function provided */
+ if (NULL != compar)
+ {
+ qsort((void *) entries, num, sizeof(*entries),
+ (int (*)(const void *, const void *)) compar);
+ }
+ *namelist = entries;
+ }
+
+ /* Check for error */
+ if (-1 == result)
+ {
+ /* Free all memory we have allocated */
+ while (num--) { free(entries[num]); }
+ free(entries);
+ }
+
+ return result;
+}
+
+/*
+ * End of "$Id: scandir_posix.c 9832 2013-03-06 22:15:01Z ianmacarthur $".
+ */
diff --git a/src/scandir_win32.c b/src/scandir_win32.c
index 9f2e582..adf21c1 100644
--- a/src/scandir_win32.c
+++ b/src/scandir_win32.c
@@ -1,5 +1,5 @@
/*
- * "$Id: scandir_win32.c 9325 2012-04-05 05:12:30Z fabien $"
+ * "$Id: scandir_win32.c 10082 2014-01-25 23:04:36Z AlbrechtS $"
*
* WIN32 scandir function for the Fast Light Tool Kit (FLTK).
*
@@ -44,7 +44,7 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
/* #warning FIXME This probably needs to be MORE UTF8 aware now */
/* #endif */
for (d = findIn; *d; d++) if (*d=='/') *d='\\';
- if ((len==0)) { strcpy(findIn, ".\\*"); }
+ if (len==0) { strcpy(findIn, ".\\*"); }
if ((len==2)&&findIn[1]==':'&&isalpha(findIn[0])) { *d++ = '\\'; *d = 0; }
if ((len==1)&& (d[-1]=='.')) { strcpy(findIn, ".\\*"); is_dir = 1; }
if ((len>0) && (d[-1]=='\\')) { *d++ = '*'; *d = 0; is_dir = 1; }
@@ -122,5 +122,5 @@ int fl_scandir(const char *dirname, struct dirent ***namelist,
#endif
/*
- * End of "$Id: scandir_win32.c 9325 2012-04-05 05:12:30Z fabien $".
+ * End of "$Id: scandir_win32.c 10082 2014-01-25 23:04:36Z AlbrechtS $".
*/
diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx
index bae6a2f..67f7ed7 100644
--- a/src/screen_xywh.cxx
+++ b/src/screen_xywh.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: screen_xywh.cxx 9299 2012-03-23 16:47:53Z manolo $"
+// "$Id: screen_xywh.cxx 10228 2014-08-21 08:14:19Z cand $"
//
// Screen/monitor bounding box API for the Fast Light Tool Kit (FLTK).
//
@@ -58,7 +58,7 @@ static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) {
mi.cbSize = sizeof(mi);
// GetMonitorInfo(mon, &mi);
-// (but we use our self-aquired function pointer instead)
+// (but we use our self-acquired function pointer instead)
if (fl_gmi(mon, &mi)) {
screens[num_screens] = mi.rcMonitor;
// If we also want to record the work area, we would also store mi.rcWork at this point
@@ -97,7 +97,7 @@ static void screen_init() {
if (fl_gmi) {
// We have GetMonitorInfoA, enumerate all the screens...
// EnumDisplayMonitors(0,0,screen_cb,0);
-// (but we use our self-aquired function pointer instead)
+// (but we use our self-acquired function pointer instead)
// NOTE: num_screens is incremented in screen_cb so we must first reset it here...
num_screens = 0;
fl_edm(0, 0, screen_cb, 0);
@@ -135,10 +135,9 @@ static void screen_init() {
CGSize s = CGDisplayScreenSize(displays[i]); // from 10.3
dpi_h[i] = screens[i].width / (s.width/25.4);
dpi_v[i] = screens[i].height / (s.height/25.4);
- }
- else {
+ } else {
dpi_h[i] = dpi_v[i] = 75.;
- }
+ }
}
num_screens = count;
}
@@ -149,11 +148,11 @@ static void screen_init() {
# include <X11/extensions/Xinerama.h>
#endif
typedef struct {
- short x_org;
- short y_org;
- short width;
- short height;
- } FLScreenInfo;
+ short x_org;
+ short y_org;
+ short width;
+ short height;
+} FLScreenInfo;
static FLScreenInfo screens[MAX_SCREENS];
static float dpi[MAX_SCREENS][2];
@@ -215,21 +214,6 @@ int Fl::screen_count() {
return num_screens ? num_screens : 1;
}
-static int find_screen_with_point(int mx, int my) {
- int screen = 0;
- if (num_screens < 0) screen_init();
-
- for (int i = 0; i < num_screens; i ++) {
- int sx, sy, sw, sh;
- Fl::screen_xywh(sx, sy, sw, sh, i);
- if ((mx >= sx) && (mx < (sx+sw)) && (my >= sy) && (my < (sy+sh))) {
- screen = i;
- break;
- }
- }
- return screen;
-}
-
/**
Gets the bounding box of a screen
that contains the specified screen position \p mx, \p my
@@ -237,7 +221,7 @@ static int find_screen_with_point(int mx, int my) {
\param[in] mx, my the absolute screen position
*/
void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
- screen_xywh(X, Y, W, H, find_screen_with_point(mx, my));
+ screen_xywh(X, Y, W, H, screen_num(mx, my));
}
@@ -248,7 +232,7 @@ void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
\param[in] mx, my the absolute screen position
*/
void Fl::screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my) {
- screen_work_area(X, Y, W, H, find_screen_with_point(mx, my));
+ screen_work_area(X, Y, W, H, screen_num(mx, my));
}
/**
@@ -273,10 +257,9 @@ void Fl::screen_work_area(int &X, int &Y, int &W, int &H, int n) {
Y = Fl::y();
W = Fl::w();
H = Fl::h();
- }
- else { // for other screens, work area is full screen,
+ } else { // for other screens, work area is full screen,
screen_xywh(X, Y, W, H, n);
- }
+ }
#endif
}
@@ -307,10 +290,10 @@ void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
H = GetSystemMetrics(SM_CYSCREEN);
}
#elif defined(__APPLE__)
- X = screens[n].x;
- Y = screens[n].y;
- W = screens[n].width;
- H = screens[n].height;
+ X = screens[n].x;
+ Y = screens[n].y;
+ W = screens[n].width;
+ H = screens[n].height;
#else
if (num_screens > 0) {
X = screens[n].x_org;
@@ -321,8 +304,41 @@ void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
#endif // WIN32
}
+/**
+ Gets the screen bounding rect for the screen
+ which intersects the most with the rectangle
+ defined by \p mx, \p my, \p mw, \p mh.
+ \param[out] X,Y,W,H the corresponding screen bounding box
+ \param[in] mx, my, mw, mh the rectangle to search for intersection with
+ \see void screen_xywh(int &X, int &Y, int &W, int &H, int n)
+ */
+void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
+ screen_xywh(X, Y, W, H, screen_num(mx, my, mw, mh));
+}
+
+/**
+ Gets the screen number of a screen
+ that contains the specified screen position \p x, \p y
+ \param[in] x, y the absolute screen position
+*/
+int Fl::screen_num(int x, int y) {
+ int screen = 0;
+ if (num_screens < 0) screen_init();
+
+ for (int i = 0; i < num_screens; i ++) {
+ int sx, sy, sw, sh;
+ Fl::screen_xywh(sx, sy, sw, sh, i);
+ if ((x >= sx) && (x < (sx+sw)) && (y >= sy) && (y < (sy+sh))) {
+ screen = i;
+ break;
+ }
+ }
+ return screen;
+}
+
+// Return the number of pixels common to the two rectangular areas
static inline float fl_intersection(int x1, int y1, int w1, int h1,
- int x2, int y2, int w2, int h2) {
+ int x2, int y2, int w2, int h2) {
if(x1+w1 < x2 || x2+w2 < x1 || y1+h1 < y2 || y2+h2 < y1)
return 0.;
int int_left = x1 > x2 ? x1 : x2;
@@ -333,30 +349,26 @@ static inline float fl_intersection(int x1, int y1, int w1, int h1,
}
/**
- Gets the screen bounding rect for the screen
+ Gets the screen number for the screen
which intersects the most with the rectangle
- defined by \p mx, \p my, \p mw, \p mh.
- \param[out] X,Y,W,H the corresponding screen bounding box
- \param[in] mx, my, mw, mh the rectangle to search for intersection with
- \see void screen_xywh(int &X, int &Y, int &W, int &H, int n)
+ defined by \p x, \p y, \p w, \p h.
+ \param[in] x, y, w, h the rectangle to search for intersection with
*/
-void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh) {
+int Fl::screen_num(int x, int y, int w, int h) {
int best_screen = 0;
float best_intersection = 0.;
- for(int i = 0; i < Fl::screen_count(); i++) {
+ for (int i = 0; i < Fl::screen_count(); i++) {
int sx, sy, sw, sh;
Fl::screen_xywh(sx, sy, sw, sh, i);
- float sintersection = fl_intersection(mx, my, mw, mh, sx, sy, sw, sh);
- if(sintersection > best_intersection) {
+ float sintersection = fl_intersection(x, y, w, h, sx, sy, sw, sh);
+ if (sintersection > best_intersection) {
best_screen = i;
best_intersection = sintersection;
}
}
- screen_xywh(X, Y, W, H, best_screen);
+ return best_screen;
}
-
-
/**
Gets the screen resolution in dots-per-inch for the given screen.
\param[out] h, v horizontal and vertical resolution
@@ -389,5 +401,5 @@ void Fl::screen_dpi(float &h, float &v, int n)
//
-// End of "$Id: screen_xywh.cxx 9299 2012-03-23 16:47:53Z manolo $".
+// End of "$Id: screen_xywh.cxx 10228 2014-08-21 08:14:19Z cand $".
//
diff --git a/src/slowarrow.h b/src/slowarrow.h
index 46a572c..4ad428a 100644
--- a/src/slowarrow.h
+++ b/src/slowarrow.h
@@ -1,6 +1,6 @@
#define slowarrow_width 16
#define slowarrow_height 16
-static unsigned char slowarrow_bits[] = {
+static const unsigned char slowarrow_bits[] = {
0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x60, 0x00, 0xf0, 0x0f, 0x60, 0x00,
0x60, 0x00, 0x40, 0x02, 0x40, 0x02, 0x00, 0x06, 0x00, 0x06, 0xf0, 0x0f,
0x00, 0x06, 0x00, 0x06, 0x00, 0x02, 0x00, 0x02};
diff --git a/src/tile.xpm b/src/tile.xpm
index 872e0f7..1fa410c 100644
--- a/src/tile.xpm
+++ b/src/tile.xpm
@@ -4,7 +4,7 @@ static char tile_cmap[3][32] = {
"o c #EFEFEF",
". c #E8E8E8"
};
-static const char * tile_xpm[] = {
+static const char * const tile_xpm[] = {
"64 64 3 1",
tile_cmap[0],
tile_cmap[1],
diff --git a/src/vsnprintf.c b/src/vsnprintf.c
index be93ba6..bbf4229 100644
--- a/src/vsnprintf.c
+++ b/src/vsnprintf.c
@@ -1,5 +1,5 @@
/*
- * "$Id: vsnprintf.c 9325 2012-04-05 05:12:30Z fabien $"
+ * "$Id: vsnprintf.c 10229 2014-08-21 12:01:46Z cand $"
*
* snprintf() and vsnprintf() functions for the Fast Light Tool Kit (FLTK).
*
@@ -28,6 +28,9 @@ extern "C" {
#endif
int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
+#if defined(HAVE_VSNPRINTF) && defined(__linux__)
+ return vsnprintf(buffer, bufsize, format, ap);
+#else
char *bufptr, /* Pointer to position in buffer */
*bufend, /* Pointer to end of buffer */
sign, /* Sign of format width */
@@ -251,6 +254,7 @@ int fl_vsnprintf(char* buffer, size_t bufsize, const char* format, va_list ap) {
if (bufptr) *bufptr = '\0';
return (bytes);
+#endif //HAVE_VSNPRINTF
}
int fl_snprintf(char* str, size_t size, const char* fmt, ...) {
@@ -267,6 +271,6 @@ int fl_snprintf(char* str, size_t size, const char* fmt, ...) {
#endif
/*
- * End of "$Id: vsnprintf.c 9325 2012-04-05 05:12:30Z fabien $".
+ * End of "$Id: vsnprintf.c 10229 2014-08-21 12:01:46Z cand $".
*/
diff --git a/src/xutf8/headers/dingbats_.h b/src/xutf8/headers/dingbats_.h
index 9f1f225..a08bbf0 100644
--- a/src/xutf8/headers/dingbats_.h
+++ b/src/xutf8/headers/dingbats_.h
@@ -133,23 +133,23 @@ static const char unicode_to_dingbats_1b_0020[] = {
};
static const char unicode_to_dingbats_1b_2192[] = {
-/* U+2192 */ 0xD5,
+/* U+2192 */ (char)0xD5,
0x00,
-/* U+2194 */ 0xD6,
-/* U+2195 */ 0xD7,
+/* U+2194 */ (char)0xD6,
+/* U+2195 */ (char)0xD7,
};
static const char unicode_to_dingbats_1b_2460[] = {
-/* U+2460 */ 0xAC,
-/* U+2461 */ 0xAD,
-/* U+2462 */ 0xAE,
-/* U+2463 */ 0xAF,
-/* U+2464 */ 0xB0,
-/* U+2465 */ 0xB1,
-/* U+2466 */ 0xB2,
-/* U+2467 */ 0xB3,
-/* U+2468 */ 0xB4,
-/* U+2469 */ 0xB5,
+/* U+2460 */ (char)0xAC,
+/* U+2461 */ (char)0xAD,
+/* U+2462 */ (char)0xAE,
+/* U+2463 */ (char)0xAF,
+/* U+2464 */ (char)0xB0,
+/* U+2465 */ (char)0xB1,
+/* U+2466 */ (char)0xB2,
+/* U+2467 */ (char)0xB3,
+/* U+2468 */ (char)0xB4,
+/* U+2469 */ (char)0xB5,
};
static const char unicode_to_dingbats_1b_25A0[] = {
@@ -345,13 +345,13 @@ static const char unicode_to_dingbats_1b_25A0[] = {
0x00,
0x00,
0x00,
-/* U+2660 */ 0xAB,
+/* U+2660 */ (char)0xAB,
0x00,
0x00,
-/* U+2663 */ 0xA8,
+/* U+2663 */ (char)0xA8,
0x00,
-/* U+2665 */ 0xAA,
-/* U+2666 */ 0xA9,
+/* U+2665 */ (char)0xAA,
+/* U+2666 */ (char)0xA9,
};
static const char unicode_to_dingbats_1b_2701[] = {
@@ -451,115 +451,115 @@ static const char unicode_to_dingbats_1b_2701[] = {
/* U+275E */ 0x7E,
0x00,
0x00,
-/* U+2761 */ 0xA1,
-/* U+2762 */ 0xA2,
-/* U+2763 */ 0xA3,
-/* U+2764 */ 0xA4,
-/* U+2765 */ 0xA5,
-/* U+2766 */ 0xA6,
-/* U+2767 */ 0xA7,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-/* U+2776 */ 0xB6,
-/* U+2777 */ 0xB7,
-/* U+2778 */ 0xB8,
-/* U+2779 */ 0xB9,
-/* U+277A */ 0xBA,
-/* U+277B */ 0xBB,
-/* U+277C */ 0xBC,
-/* U+277D */ 0xBD,
-/* U+277E */ 0xBE,
-/* U+277F */ 0xBF,
-/* U+2780 */ 0xC0,
-/* U+2781 */ 0xC1,
-/* U+2782 */ 0xC2,
-/* U+2783 */ 0xC3,
-/* U+2784 */ 0xC4,
-/* U+2785 */ 0xC5,
-/* U+2786 */ 0xC6,
-/* U+2787 */ 0xC7,
-/* U+2788 */ 0xC8,
-/* U+2789 */ 0xC9,
-/* U+278A */ 0xCA,
-/* U+278B */ 0xCB,
-/* U+278C */ 0xCC,
-/* U+278D */ 0xCD,
-/* U+278E */ 0xCE,
-/* U+278F */ 0xCF,
-/* U+2790 */ 0xD0,
-/* U+2791 */ 0xD1,
-/* U+2792 */ 0xD2,
-/* U+2793 */ 0xD3,
-/* U+2794 */ 0xD4,
-0x00,
-0x00,
-0x00,
-/* U+2798 */ 0xD8,
-/* U+2799 */ 0xD9,
-/* U+279A */ 0xDA,
-/* U+279B */ 0xDB,
-/* U+279C */ 0xDC,
-/* U+279D */ 0xDD,
-/* U+279E */ 0xDE,
-/* U+279F */ 0xDF,
-/* U+27A0 */ 0xE0,
-/* U+27A1 */ 0xE1,
-/* U+27A2 */ 0xE2,
-/* U+27A3 */ 0xE3,
-/* U+27A4 */ 0xE4,
-/* U+27A5 */ 0xE5,
-/* U+27A6 */ 0xE6,
-/* U+27A7 */ 0xE7,
-/* U+27A8 */ 0xE8,
-/* U+27A9 */ 0xE9,
-/* U+27AA */ 0xEA,
-/* U+27AB */ 0xEB,
-/* U+27AC */ 0xEC,
-/* U+27AD */ 0xED,
-/* U+27AE */ 0xEE,
-/* U+27AF */ 0xEF,
-0x00,
-/* U+27B1 */ 0xF1,
-/* U+27B2 */ 0xF2,
-/* U+27B3 */ 0xF3,
-/* U+27B4 */ 0xF4,
-/* U+27B5 */ 0xF5,
-/* U+27B6 */ 0xF6,
-/* U+27B7 */ 0xF7,
-/* U+27B8 */ 0xF8,
-/* U+27B9 */ 0xF9,
-/* U+27BA */ 0xFA,
-/* U+27BB */ 0xFB,
-/* U+27BC */ 0xFC,
-/* U+27BD */ 0xFD,
-/* U+27BE */ 0xFE,
+/* U+2761 */ (char)0xA1,
+/* U+2762 */ (char)0xA2,
+/* U+2763 */ (char)0xA3,
+/* U+2764 */ (char)0xA4,
+/* U+2765 */ (char)0xA5,
+/* U+2766 */ (char)0xA6,
+/* U+2767 */ (char)0xA7,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+0x00,
+/* U+2776 */ (char)0xB6,
+/* U+2777 */ (char)0xB7,
+/* U+2778 */ (char)0xB8,
+/* U+2779 */ (char)0xB9,
+/* U+277A */ (char)0xBA,
+/* U+277B */ (char)0xBB,
+/* U+277C */ (char)0xBC,
+/* U+277D */ (char)0xBD,
+/* U+277E */ (char)0xBE,
+/* U+277F */ (char)0xBF,
+/* U+2780 */ (char)0xC0,
+/* U+2781 */ (char)0xC1,
+/* U+2782 */ (char)0xC2,
+/* U+2783 */ (char)0xC3,
+/* U+2784 */ (char)0xC4,
+/* U+2785 */ (char)0xC5,
+/* U+2786 */ (char)0xC6,
+/* U+2787 */ (char)0xC7,
+/* U+2788 */ (char)0xC8,
+/* U+2789 */ (char)0xC9,
+/* U+278A */ (char)0xCA,
+/* U+278B */ (char)0xCB,
+/* U+278C */ (char)0xCC,
+/* U+278D */ (char)0xCD,
+/* U+278E */ (char)0xCE,
+/* U+278F */ (char)0xCF,
+/* U+2790 */ (char)0xD0,
+/* U+2791 */ (char)0xD1,
+/* U+2792 */ (char)0xD2,
+/* U+2793 */ (char)0xD3,
+/* U+2794 */ (char)0xD4,
+0x00,
+0x00,
+0x00,
+/* U+2798 */ (char)0xD8,
+/* U+2799 */ (char)0xD9,
+/* U+279A */ (char)0xDA,
+/* U+279B */ (char)0xDB,
+/* U+279C */ (char)0xDC,
+/* U+279D */ (char)0xDD,
+/* U+279E */ (char)0xDE,
+/* U+279F */ (char)0xDF,
+/* U+27A0 */ (char)0xE0,
+/* U+27A1 */ (char)0xE1,
+/* U+27A2 */ (char)0xE2,
+/* U+27A3 */ (char)0xE3,
+/* U+27A4 */ (char)0xE4,
+/* U+27A5 */ (char)0xE5,
+/* U+27A6 */ (char)0xE6,
+/* U+27A7 */ (char)0xE7,
+/* U+27A8 */ (char)0xE8,
+/* U+27A9 */ (char)0xE9,
+/* U+27AA */ (char)0xEA,
+/* U+27AB */ (char)0xEB,
+/* U+27AC */ (char)0xEC,
+/* U+27AD */ (char)0xED,
+/* U+27AE */ (char)0xEE,
+/* U+27AF */ (char)0xEF,
+0x00,
+/* U+27B1 */ (char)0xF1,
+/* U+27B2 */ (char)0xF2,
+/* U+27B3 */ (char)0xF3,
+/* U+27B4 */ (char)0xF4,
+/* U+27B5 */ (char)0xF5,
+/* U+27B6 */ (char)0xF6,
+/* U+27B7 */ (char)0xF7,
+/* U+27B8 */ (char)0xF8,
+/* U+27B9 */ (char)0xF9,
+/* U+27BA */ (char)0xFA,
+/* U+27BB */ (char)0xFB,
+/* U+27BC */ (char)0xFC,
+/* U+27BD */ (char)0xFD,
+/* U+27BE */ (char)0xFE,
};
static const char unicode_to_dingbats_1b_F8D7[] = {
-/* U+F8D7 */ 0x80,
-/* U+F8D8 */ 0x81,
-/* U+F8D9 */ 0x82,
-/* U+F8DA */ 0x83,
-/* U+F8DB */ 0x84,
-/* U+F8DC */ 0x85,
-/* U+F8DD */ 0x86,
-/* U+F8DE */ 0x87,
-/* U+F8DF */ 0x88,
-/* U+F8E0 */ 0x89,
-/* U+F8E1 */ 0x8A,
-/* U+F8E2 */ 0x8B,
-/* U+F8E3 */ 0x8C,
-/* U+F8E4 */ 0x8D,
+/* U+F8D7 */ (char)0x80,
+/* U+F8D8 */ (char)0x81,
+/* U+F8D9 */ (char)0x82,
+/* U+F8DA */ (char)0x83,
+/* U+F8DB */ (char)0x84,
+/* U+F8DC */ (char)0x85,
+/* U+F8DD */ (char)0x86,
+/* U+F8DE */ (char)0x87,
+/* U+F8DF */ (char)0x88,
+/* U+F8E0 */ (char)0x89,
+/* U+F8E1 */ (char)0x8A,
+/* U+F8E2 */ (char)0x8B,
+/* U+F8E3 */ (char)0x8C,
+/* U+F8E4 */ (char)0x8D,
};
diff --git a/src/xutf8/headers/symbol_.h b/src/xutf8/headers/symbol_.h
index a9d8fd3..481c5e7 100644
--- a/src/xutf8/headers/symbol_.h
+++ b/src/xutf8/headers/symbol_.h
@@ -141,12 +141,12 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00,
0x00,
0x00,
-/* U+00AC */ 0xD8,
+/* U+00AC */ (char)0xD8,
0x00,
0x00,
0x00,
-/* U+00B0 */ 0xB0,
-/* U+00B1 */ 0xB1,
+/* U+00B0 */ (char)0xB0,
+/* U+00B1 */ (char)0xB1,
0x00,
0x00,
0x00,
@@ -184,7 +184,7 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00,
0x00,
0x00,
-/* U+00D7 */ 0xB4,
+/* U+00D7 */ (char)0xB4,
0x00,
0x00,
0x00,
@@ -216,11 +216,11 @@ static const char unicode_to_symbol_1b_0020[] = {
0x00,
0x00,
0x00,
-/* U+00F7 */ 0xB8,
+/* U+00F7 */ (char)0xB8,
};
static const char unicode_to_symbol_1b_0192[] = {
-/* U+0192 */ 0xA6,
+/* U+0192 */ (char)0xA6,
};
static const char unicode_to_symbol_1b_0391[] = {
@@ -289,7 +289,7 @@ static const char unicode_to_symbol_1b_0391[] = {
0x00,
0x00,
/* U+03D1 */ 0x4A,
-/* U+03D2 */ 0xA1,
+/* U+03D2 */ (char)0xA1,
0x00,
0x00,
/* U+03D5 */ 0x6A,
@@ -297,11 +297,11 @@ static const char unicode_to_symbol_1b_0391[] = {
};
static const char unicode_to_symbol_1b_2022[] = {
-/* U+2022 */ 0xB7,
+/* U+2022 */ (char)0xB7,
0x00,
0x00,
0x00,
-/* U+2026 */ 0xBC,
+/* U+2026 */ (char)0xBC,
0x00,
0x00,
0x00,
@@ -313,8 +313,8 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2032 */ 0xA2,
-/* U+2033 */ 0xB2,
+/* U+2032 */ (char)0xA2,
+/* U+2033 */ (char)0xB2,
0x00,
0x00,
0x00,
@@ -331,7 +331,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2044 */ 0xA4,
+/* U+2044 */ (char)0xA4,
0x00,
0x00,
0x00,
@@ -435,7 +435,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+20AC */ 0xA0,
+/* U+20AC */ (char)0xA0,
0x00,
0x00,
0x00,
@@ -536,18 +536,18 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2111 */ 0xC1,
+/* U+2111 */ (char)0xC1,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
-/* U+2118 */ 0xC3,
+/* U+2118 */ (char)0xC3,
0x00,
0x00,
0x00,
-/* U+211C */ 0xC2,
+/* U+211C */ (char)0xC2,
0x00,
0x00,
0x00,
@@ -572,7 +572,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2135 */ 0xC0,
+/* U+2135 */ (char)0xC0,
0x00,
0x00,
0x00,
@@ -663,11 +663,11 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2190 */ 0xAC,
-/* U+2191 */ 0xAD,
-/* U+2192 */ 0xAE,
-/* U+2193 */ 0xAF,
-/* U+2194 */ 0xAB,
+/* U+2190 */ (char)0xAC,
+/* U+2191 */ (char)0xAD,
+/* U+2192 */ (char)0xAE,
+/* U+2193 */ (char)0xAF,
+/* U+2194 */ (char)0xAB,
0x00,
0x00,
0x00,
@@ -700,7 +700,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+21B5 */ 0xBF,
+/* U+21B5 */ (char)0xBF,
0x00,
0x00,
0x00,
@@ -727,11 +727,11 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+21D0 */ 0xDC,
-/* U+21D1 */ 0xDD,
-/* U+21D2 */ 0xDE,
-/* U+21D3 */ 0xDF,
-/* U+21D4 */ 0xDB,
+/* U+21D0 */ (char)0xDC,
+/* U+21D1 */ (char)0xDD,
+/* U+21D2 */ (char)0xDE,
+/* U+21D3 */ (char)0xDF,
+/* U+21D4 */ (char)0xDB,
0x00,
0x00,
0x00,
@@ -777,48 +777,48 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
/* U+2200 */ 0x22,
0x00,
-/* U+2202 */ 0xB6,
+/* U+2202 */ (char)0xB6,
/* U+2203 */ 0x24,
0x00,
-/* U+2205 */ 0xC6,
+/* U+2205 */ (char)0xC6,
/* U+2206 */ 0x44,
-/* U+2207 */ 0xD1,
-/* U+2208 */ 0xCE,
-/* U+2209 */ 0xCF,
+/* U+2207 */ (char)0xD1,
+/* U+2208 */ (char)0xCE,
+/* U+2209 */ (char)0xCF,
0x00,
/* U+220B */ 0x27,
0x00,
0x00,
0x00,
-/* U+220F */ 0xD5,
+/* U+220F */ (char)0xD5,
0x00,
-/* U+2211 */ 0xE5,
+/* U+2211 */ (char)0xE5,
/* U+2212 */ 0x2D,
0x00,
0x00,
-/* U+2215 */ 0xA4,
+/* U+2215 */ (char)0xA4,
0x00,
/* U+2217 */ 0x2A,
0x00,
0x00,
-/* U+221A */ 0xD6,
+/* U+221A */ (char)0xD6,
0x00,
0x00,
-/* U+221D */ 0xB5,
-/* U+221E */ 0xA5,
+/* U+221D */ (char)0xB5,
+/* U+221E */ (char)0xA5,
0x00,
-/* U+2220 */ 0xD0,
+/* U+2220 */ (char)0xD0,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
-/* U+2227 */ 0xD9,
-/* U+2228 */ 0xDA,
-/* U+2229 */ 0xC7,
-/* U+222A */ 0xC8,
-/* U+222B */ 0xF2,
+/* U+2227 */ (char)0xD9,
+/* U+2228 */ (char)0xDA,
+/* U+2229 */ (char)0xC7,
+/* U+222A */ (char)0xC8,
+/* U+222B */ (char)0xF2,
0x00,
0x00,
0x00,
@@ -847,7 +847,7 @@ static const char unicode_to_symbol_1b_2022[] = {
/* U+2245 */ 0x40,
0x00,
0x00,
-/* U+2248 */ 0xBB,
+/* U+2248 */ (char)0xBB,
0x00,
0x00,
0x00,
@@ -871,12 +871,12 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2260 */ 0xB9,
-/* U+2261 */ 0xBA,
+/* U+2260 */ (char)0xB9,
+/* U+2261 */ (char)0xBA,
0x00,
0x00,
-/* U+2264 */ 0xA3,
-/* U+2265 */ 0xB3,
+/* U+2264 */ (char)0xA3,
+/* U+2265 */ (char)0xB3,
0x00,
0x00,
0x00,
@@ -905,12 +905,12 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2282 */ 0xCC,
-/* U+2283 */ 0xC9,
-/* U+2284 */ 0xCB,
+/* U+2282 */ (char)0xCC,
+/* U+2283 */ (char)0xC9,
+/* U+2284 */ (char)0xCB,
0x00,
-/* U+2286 */ 0xCD,
-/* U+2287 */ 0xCA,
+/* U+2286 */ (char)0xCD,
+/* U+2287 */ (char)0xCA,
0x00,
0x00,
0x00,
@@ -924,9 +924,9 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2295 */ 0xC5,
+/* U+2295 */ (char)0xC5,
0x00,
-/* U+2297 */ 0xC4,
+/* U+2297 */ (char)0xC4,
0x00,
0x00,
0x00,
@@ -972,7 +972,7 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+22C5 */ 0xD7,
+/* U+22C5 */ (char)0xD7,
0x00,
0x00,
0x00,
@@ -1063,8 +1063,8 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2320 */ 0xF3,
-/* U+2321 */ 0xF5,
+/* U+2320 */ (char)0xF3,
+/* U+2321 */ (char)0xF5,
0x00,
0x00,
0x00,
@@ -1072,55 +1072,55 @@ static const char unicode_to_symbol_1b_2022[] = {
0x00,
0x00,
0x00,
-/* U+2329 */ 0xE1,
-/* U+232A */ 0xF1,
+/* U+2329 */ (char)0xE1,
+/* U+232A */ (char)0xF1,
};
static const char unicode_to_symbol_1b_25CA[] = {
-/* U+25CA */ 0xE0,
+/* U+25CA */ (char)0xE0,
};
static const char unicode_to_symbol_1b_2660[] = {
-/* U+2660 */ 0xAA,
+/* U+2660 */ (char)0xAA,
0x00,
0x00,
-/* U+2663 */ 0xA7,
+/* U+2663 */ (char)0xA7,
0x00,
-/* U+2665 */ 0xA9,
-/* U+2666 */ 0xA8,
+/* U+2665 */ (char)0xA9,
+/* U+2666 */ (char)0xA8,
};
static const char unicode_to_symbol_1b_F6D9[] = {
-/* U+F6D9 */ 0xD3,
-/* U+F6DA */ 0xD2,
-/* U+F6DB */ 0xD4,
+/* U+F6D9 */ (char)0xD3,
+/* U+F6DA */ (char)0xD2,
+/* U+F6DB */ (char)0xD4,
};
static const char unicode_to_symbol_1b_F8E5[] = {
/* U+F8E5 */ 0x60,
-/* U+F8E6 */ 0xBD,
-/* U+F8E7 */ 0xBE,
-/* U+F8E8 */ 0xE2,
-/* U+F8E9 */ 0xE3,
-/* U+F8EA */ 0xE4,
-/* U+F8EB */ 0xE6,
-/* U+F8EC */ 0xE7,
-/* U+F8ED */ 0xE8,
-/* U+F8EE */ 0xE9,
-/* U+F8EF */ 0xEA,
-/* U+F8F0 */ 0xEB,
-/* U+F8F1 */ 0xEC,
-/* U+F8F2 */ 0xED,
-/* U+F8F3 */ 0xEE,
-/* U+F8F4 */ 0xEF,
-/* U+F8F5 */ 0xF4,
-/* U+F8F6 */ 0xF6,
-/* U+F8F7 */ 0xF7,
-/* U+F8F8 */ 0xF8,
-/* U+F8F9 */ 0xF9,
-/* U+F8FA */ 0xFA,
-/* U+F8FB */ 0xFB,
-/* U+F8FC */ 0xFC,
-/* U+F8FD */ 0xFD,
-/* U+F8FE */ 0xFE,
+/* U+F8E6 */ (char)0xBD,
+/* U+F8E7 */ (char)0xBE,
+/* U+F8E8 */ (char)0xE2,
+/* U+F8E9 */ (char)0xE3,
+/* U+F8EA */ (char)0xE4,
+/* U+F8EB */ (char)0xE6,
+/* U+F8EC */ (char)0xE7,
+/* U+F8ED */ (char)0xE8,
+/* U+F8EE */ (char)0xE9,
+/* U+F8EF */ (char)0xEA,
+/* U+F8F0 */ (char)0xEB,
+/* U+F8F1 */ (char)0xEC,
+/* U+F8F2 */ (char)0xED,
+/* U+F8F3 */ (char)0xEE,
+/* U+F8F4 */ (char)0xEF,
+/* U+F8F5 */ (char)0xF4,
+/* U+F8F6 */ (char)0xF6,
+/* U+F8F7 */ (char)0xF7,
+/* U+F8F8 */ (char)0xF8,
+/* U+F8F9 */ (char)0xF9,
+/* U+F8FA */ (char)0xFA,
+/* U+F8FB */ (char)0xFB,
+/* U+F8FC */ (char)0xFC,
+/* U+F8FD */ (char)0xFD,
+/* U+F8FE */ (char)0xFE,
};
diff --git a/src/xutf8/imKStoUCS.c b/src/xutf8/imKStoUCS.c
index 0af9a80..aa67020 100644
--- a/src/xutf8/imKStoUCS.c
+++ b/src/xutf8/imKStoUCS.c
@@ -266,7 +266,7 @@ static unsigned short const keysym_to_unicode_20a0_20ac[] = {
0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac /* 0x20a8-0x20af */
};
-unsigned int
+static unsigned int
KeySymToUcs4(KeySym keysym)
{
/* 'Unicode keysym' */
diff --git a/src/xutf8/is_right2left.c b/src/xutf8/is_right2left.c
index 7b49af1..69a612a 100644
--- a/src/xutf8/is_right2left.c
+++ b/src/xutf8/is_right2left.c
@@ -18,7 +18,11 @@
* This file is required on all platforms for utf8 support
*/
-unsigned short
+#if !defined(WIN32) && !defined(__APPLE__)
+# include "../Xutf8.h"
+#endif /* !defined(WIN32) && !defined(__APPLE__) */
+
+unsigned short
XUtf8IsRightToLeft(unsigned int ucs) {
#if 0
@@ -34,7 +38,7 @@ XUtf8IsRightToLeft(unsigned int ucs) {
if (ucs >= 0x0591) return 1;
return 0;
}
-
+
/* ARABIC */
if (ucs <= 0x06ED) {
if (ucs >= 0x060C) return 1;
@@ -56,7 +60,7 @@ XUtf8IsRightToLeft(unsigned int ucs) {
if (ucs >= 0xFB1E) return 1;
return 0;
}
-
+
if (ucs <= 0xFDFB) {
if (ucs >= 0xFB50) return 1;
return 0;
diff --git a/src/xutf8/keysym2Ucs.c b/src/xutf8/keysym2Ucs.c
index 052a7c7..d01a3a7 100644
--- a/src/xutf8/keysym2Ucs.c
+++ b/src/xutf8/keysym2Ucs.c
@@ -18,7 +18,7 @@
#if !defined(WIN32) && !defined(__APPLE__)
-#include "../../FL/Xutf8.h"
+#include "../Xutf8.h"
#include "imKStoUCS.c"
long XKeysymToUcs(KeySym keysym) {
diff --git a/src/xutf8/ucs2fontmap.c b/src/xutf8/ucs2fontmap.c
index da08052..8446b08 100644
--- a/src/xutf8/ucs2fontmap.c
+++ b/src/xutf8/ucs2fontmap.c
@@ -57,13 +57,12 @@ typedef struct {
/*************** conv_gen.c ************/
/*const*/
-int ucs2fontmap(char *s, unsigned int ucs, int enc) {
+static int ucs2fontmap(char *s, unsigned int ucs, int enc) {
switch(enc) {
case 0: /* iso10646-1 */
s[0] = (char) ((ucs & 0xFF00) >> 8);
s[1] = (char) (ucs & 0xFF);
return 0;
- break;
case 1: /* iso8859-1 */
if (ucs <= 0x00FF) {
if (ucs >= 0x0001) {
@@ -299,7 +298,7 @@ int ucs2fontmap(char *s, unsigned int ucs, int enc) {
}
/*const*/
-int encoding_number(const char *enc) {
+static int encoding_number(const char *enc) {
if (!enc || !strncmp(enc, "iso10646-1", 10)) {
return 0;
} else if (!strcmp(enc, "iso8859-1")) {
diff --git a/src/xutf8/utf8Input.c b/src/xutf8/utf8Input.c
index ee2c229..5682ac7 100644
--- a/src/xutf8/utf8Input.c
+++ b/src/xutf8/utf8Input.c
@@ -17,7 +17,7 @@
#if !defined(WIN32) && !defined(__APPLE__)
#include <config.h>
-#include "../../FL/Xutf8.h"
+#include "../Xutf8.h"
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -43,6 +43,7 @@ typedef struct {
unsigned short used;
} Summary16;
+#ifndef X_HAVE_UTF8_STRING
#define NEED_TOWC /* indicates what part of these include files is needed here (avoid compilation warnings) */
#include "lcUniConv/big5.h"
#include "lcUniConv/gb2312.h"
@@ -52,7 +53,7 @@ typedef struct {
#include "lcUniConv/jisx0212.h"
#include "lcUniConv/ksc5601.h"
-int
+static int
XConvertEucTwToUtf8(char* buffer_return, int len) {
/* FIXME */
#if HAVE_LIBC_ICONV
@@ -119,7 +120,7 @@ XConvertEucTwToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertEucKrToUtf8(char* buffer_return, int len) {
int i = 0, l = 0;
char *buf;
@@ -159,7 +160,7 @@ XConvertEucKrToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertBig5ToUtf8(char* buffer_return, int len) {
int i = 0, l = 0;
char *buf;
@@ -188,7 +189,7 @@ XConvertBig5ToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertCp936extToUtf8(char* buffer_return, int len)
{
int i = 0, l = 0;
@@ -225,7 +226,7 @@ XConvertCp936extToUtf8(char* buffer_return, int len)
return l;
}
-int
+static int
XConvertGb2312ToUtf8(char* buffer_return, int len) {
int i = 0, l = 0;
char *buf;
@@ -260,7 +261,7 @@ XConvertGb2312ToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertEucCnToUtf8(char* buffer_return, int len) {
int i = 0, l = 0;
char *buf;
@@ -299,7 +300,7 @@ XConvertEucCnToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertEucJpToUtf8(char* buffer_return, int len) {
int i = 0, l = 0;
char *buf;
@@ -372,7 +373,7 @@ XConvertEucJpToUtf8(char* buffer_return, int len) {
return l;
}
-int
+static int
XConvertEucToUtf8(const char* locale,
char* buffer_return,
int len,
@@ -447,6 +448,7 @@ XUtf8LookupString(XIC ic,
}
return len;
}
+#endif /* X11 has utf-8 */
#endif /* X11 only */
diff --git a/src/xutf8/utf8Utils.c b/src/xutf8/utf8Utils.c
index 1e60b76..54bbccf 100644
--- a/src/xutf8/utf8Utils.c
+++ b/src/xutf8/utf8Utils.c
@@ -20,7 +20,7 @@
#if !defined(WIN32) && !defined(__APPLE__)
-#include "../../FL/Xutf8.h"
+#include "../Xutf8.h"
/*** NOTE : all functions are LIMITED to 24 bits Unicode values !!! ***/
diff --git a/src/xutf8/utf8Wrap.c b/src/xutf8/utf8Wrap.c
index 9c44f47..d26eba1 100644
--- a/src/xutf8/utf8Wrap.c
+++ b/src/xutf8/utf8Wrap.c
@@ -1,4 +1,4 @@
-/* "$Id: utf8Wrap.c 9549 2012-05-26 22:51:07Z greg.ercolano $"
+/* "$Id: utf8Wrap.c 10248 2014-08-23 08:41:58Z cand $"
*
* Author: Jean-Marc Lienher ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
@@ -19,7 +19,7 @@
*/
#if !defined(WIN32) && !defined(__APPLE__)
-#include "../../FL/Xutf8.h"
+#include "../Xutf8.h"
#include <X11/Xlib.h>
#include <ctype.h>
#include <stdlib.h>
@@ -79,7 +79,7 @@ get_font_list(
while (*ptr) {
int l = 0, i = 0;
- while(isspace(*ptr)) ptr++;
+ while(isspace((int)(unsigned char)*ptr)) ptr++;
p = ptr;
while (*ptr && *ptr != ',') { ptr++; l++; }
if (l > 2) {
@@ -203,7 +203,7 @@ get_encodings(char **font_name_list,
/*********************************************************************/
/** find the first font which matches the name and load it. **/
/*********************************************************************/
-XFontStruct *
+static XFontStruct *
find_best_font(Display *dpy,
char **name) {
@@ -1039,5 +1039,5 @@ XFreeUtf8FontStruct(Display *dpy,
#endif /* X11 only */
/*
- * End of "$Id: utf8Wrap.c 9549 2012-05-26 22:51:07Z greg.ercolano $".
+ * End of "$Id: utf8Wrap.c 10248 2014-08-23 08:41:58Z cand $".
*/
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a2cba88..072fb85 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -11,46 +11,6 @@ elseif(HAVE_ALSA_ASOUNDLIB_H)
endif(WIN32)
#######################################################################
-macro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
- set(srcs)
- set(flsrcs)
- foreach(src ${SOURCES})
- if("${src}" MATCHES ".fl$")
- list(APPEND flsrcs ${src})
- else()
- list(APPEND srcs ${src})
- endif("${src}" MATCHES ".fl$")
- endforeach(src)
-
- if(flsrcs)
- fltk_wrap_ui(${NAME} ${flsrcs})
- endif(flsrcs)
-
- add_executable(${NAME} WIN32 ${srcs} ${${NAME}_FLTK_UI_SRCS})
- if(flsrcs)
- add_dependencies(${NAME} ${FLTK_FLUID_EXECUTABLE})
- endif(flsrcs)
- target_link_libraries(${NAME} ${LIBRARIES})
-
- # link in optional libraries
- if(FLTK_HAVE_CAIRO)
- target_link_libraries(${NAME} fltk_cairo)
- endif(FLTK_HAVE_CAIRO)
-
- if(USE_XFT)
- target_link_libraries(${NAME} ${X11_Xft_LIB})
- endif(USE_XFT)
-
- if(HAVE_XINERAMA)
- target_link_libraries(${NAME} ${X11_Xinerama_LIB})
- endif(HAVE_XINERAMA)
-
- install(TARGETS ${NAME}
- DESTINATION ${PREFIX_DOC}/examples
- )
-endmacro(CREATE_EXAMPLE NAME SOURCES LIBRARIES)
-
-#######################################################################
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
@@ -82,6 +42,7 @@ CREATE_EXAMPLE(fonts fonts.cxx fltk)
CREATE_EXAMPLE(forms forms.cxx "fltk;fltk_forms")
CREATE_EXAMPLE(hello hello.cxx fltk)
CREATE_EXAMPLE(help help.cxx "fltk;fltk_images")
+CREATE_EXAMPLE(icon icon.cxx fltk)
CREATE_EXAMPLE(iconize iconize.cxx fltk)
CREATE_EXAMPLE(image image.cxx fltk)
CREATE_EXAMPLE(inactive inactive.fl fltk)
@@ -117,9 +78,11 @@ CREATE_EXAMPLE(threads threads.cxx fltk)
CREATE_EXAMPLE(tile tile.cxx fltk)
CREATE_EXAMPLE(tiled_image tiled_image.cxx fltk)
CREATE_EXAMPLE(tree tree.fl fltk)
+CREATE_EXAMPLE(twowin twowin.cxx fltk)
CREATE_EXAMPLE(utf8 utf8.cxx fltk)
CREATE_EXAMPLE(valuators valuators.fl fltk)
CREATE_EXAMPLE(unittests unittests.cxx fltk)
+CREATE_EXAMPLE(windowfocus windowfocus.cxx fltk)
# OpenGL demos...
if(OPENGL_FOUND)
@@ -134,5 +97,5 @@ endif(OPENGL_FOUND)
# Cairo demo
if(FLTK_HAVE_CAIRO)
- CREATE_EXAMPLE(cairo_test cairo_test.cxx fltk)
+ CREATE_EXAMPLE(cairo_test cairo_test.cxx "fltk;fltk_cairo")
endif(FLTK_HAVE_CAIRO)
diff --git a/test/CubeViewUI.fl b/test/CubeViewUI.fl
index da8e196..899db38 100644
--- a/test/CubeViewUI.fl
+++ b/test/CubeViewUI.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0108
+version 1.0303
header_name {.h}
code_name {.cxx}
class CubeViewUI {open
diff --git a/test/Makefile b/test/Makefile
index 6615e21..5d4e849 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile 9736 2012-12-05 14:53:03Z manolo $"
+# "$Id: Makefile 10339 2014-09-26 23:58:05Z AlbrechtS $"
#
# Test/example program makefile for the Fast Light Tool Kit (FLTK).
#
@@ -63,6 +63,7 @@ CPPFILES =\
glpuzzle.cxx \
hello.cxx \
help.cxx \
+ icon.cxx \
iconize.cxx \
image.cxx \
inactive.cxx \
@@ -100,8 +101,10 @@ CPPFILES =\
tile.cxx \
tiled_image.cxx \
tree.cxx \
+ twowin.cxx \
valuators.cxx \
- utf8.cxx
+ utf8.cxx \
+ windowfocus.cxx
ALL = \
unittests$(EXEEXT) \
@@ -131,6 +134,7 @@ ALL = \
forms$(EXEEXT) \
hello$(EXEEXT) \
help$(EXEEXT) \
+ icon$(EXEEXT) \
iconize$(EXEEXT) \
image$(EXEEXT) \
inactive$(EXEEXT) \
@@ -167,9 +171,11 @@ ALL = \
tile$(EXEEXT) \
tiled_image$(EXEEXT) \
tree$(EXEEXT) \
+ twowin$(EXEEXT) \
valuators$(EXEEXT) \
cairotest$(EXEEXT) \
- utf8$(EXEEXT)
+ utf8$(EXEEXT) \
+ windowfocus$(EXEEXT)
GLALL = \
@@ -194,7 +200,7 @@ include makedepend
clean:
$(RM) $(ALL) $(GLALL) core
for file in $(ALL) $(GLALL); do \
- if [ $$file == "blocks" -o $$file == "checkers" -o $$file == "sudoku" ]; then \
+ if [ $$file = "blocks" -o $$file = "checkers" -o $$file = "sudoku" ]; then \
continue; \
fi; \
$(OSX_ONLY) rm -f -r $$file.app; \
@@ -284,8 +290,9 @@ $(ALL): $(LIBNAME)
# General demos...
unittests$(EXEEXT): unittests.o
-unittests.cxx: unittest_about.cxx unittest_points.cxx unittest_lines.cxx unittest_circles.cxx \
- unittest_rects.cxx unittest_text.cxx unittest_viewport.cxx unittest_images.cxx
+unittests.o: unittests.cxx unittest_about.cxx unittest_points.cxx unittest_lines.cxx unittest_circles.cxx \
+ unittest_rects.cxx unittest_text.cxx unittest_symbol.cxx unittest_viewport.cxx unittest_images.cxx \
+ unittest_schemes.cxx
adjuster$(EXEEXT): adjuster.o
@@ -305,19 +312,19 @@ buttons$(EXEEXT): buttons.o
blocks$(EXEEXT): blocks.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
$(OSX_ONLY) $(INSTALL_BIN) blocks$(EXEEXT) blocks.app/Contents/MacOS
checkers$(EXEEXT): checkers.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
$(OSX_ONLY) $(INSTALL_BIN) checkers$(EXEEXT) checkers.app/Contents/MacOS
clock$(EXEEXT): clock.o
colbrowser$(EXEEXT): colbrowser.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINKFLTKFORMS) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ colbrowser.o $(LINKFLTKFORMS) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
color_chooser$(EXEEXT): color_chooser.o
@@ -330,18 +337,18 @@ curve$(EXEEXT): curve.o
demo$(EXEEXT): demo.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ demo.o $(LINKFLTKFORMS) $(LDLIBS)
device$(EXEEXT): device.o $(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) device.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) device.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
doublebuffer$(EXEEXT): doublebuffer.o
editor$(EXEEXT): editor.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) editor.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
fast_slow$(EXEEXT): fast_slow.o
@@ -349,23 +356,25 @@ fast_slow.cxx: fast_slow.fl ../fluid/fluid$(EXEEXT)
file_chooser$(EXEEXT): file_chooser.o $(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) file_chooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) file_chooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
fonts$(EXEEXT): fonts.o
forms$(EXEEXT): forms.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ forms.o $(LINKFLTKFORMS) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ forms.o $(LINKFLTKFORMS) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
hello$(EXEEXT): hello.o
help$(EXEEXT): help.o $(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) help.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
+icon$(EXEEXT): icon.o
+
iconize$(EXEEXT): iconize.o
image$(EXEEXT): image.o
@@ -381,14 +390,14 @@ input_choice$(EXEEXT): input_choice.o
keyboard$(EXEEXT): keyboard_ui.o keyboard.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ keyboard.o keyboard_ui.o $(LINKFLTK) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ keyboard.o keyboard_ui.o $(LINKFLTK) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
keyboard_ui.o: keyboard_ui.h
keyboard_ui.cxx: keyboard_ui.fl ../fluid/fluid$(EXEEXT)
label$(EXEEXT): label.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ label.o $(LINKFLTKFORMS) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ label.o $(LINKFLTKFORMS) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
line_style$(EXEEXT): line_style.o
@@ -399,7 +408,7 @@ list_visuals$(EXEEXT): list_visuals.o
mandelbrot$(EXEEXT): mandelbrot_ui.o mandelbrot.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ mandelbrot.o mandelbrot_ui.o $(LINKFLTK) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ mandelbrot.o mandelbrot_ui.o $(LINKFLTK) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
mandelbrot_ui.o: mandelbrot_ui.h
mandelbrot_ui.cxx: mandelbrot_ui.fl ../fluid/fluid$(EXEEXT)
@@ -412,14 +421,14 @@ minimum$(EXEEXT): minimum.o
native-filechooser$(EXEEXT): native-filechooser.o $(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) native-filechooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) native-filechooser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
navigation$(EXEEXT): navigation.o
output$(EXEEXT): output.o $(FLLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ output.o $(LINKFLTKFORMS) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ output.o $(LINKFLTKFORMS) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
overlay$(EXEEXT): overlay.o
@@ -430,7 +439,7 @@ pixmap$(EXEEXT): pixmap.o
pixmap_browser$(EXEEXT): pixmap_browser.o $(IMGLIBNAME)
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) pixmap_browser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) pixmap_browser.o -o $@ $(LINKFLTKIMG) $(LDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
preferences$(EXEEXT): preferences.o
@@ -454,13 +463,14 @@ subwindow$(EXEEXT): subwindow.o
sudoku: sudoku.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) sudoku.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) -lX11
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) sudoku.o -o $@ \
+ $(AUDIOLIBS) $(LINKFLTKIMG) -lX11
$(OSX_ONLY) $(INSTALL_BIN) sudoku$(EXEEXT) sudoku.app/Contents/MacOS
sudoku.exe: sudoku.o sudoku.rc
echo Linking $@...
$(RC) sudoku.rc sudokures.o
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) sudoku.o sudokures.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) sudoku.o sudokures.o -o $@ $(AUDIOLIBS) $(LINKFLTKIMG) $(LDLIBS)
symbols$(EXEEXT): symbols.o
@@ -485,6 +495,8 @@ tiled_image$(EXEEXT): tiled_image.o
tree$(EXEEXT): tree.o
tree.cxx: tree.fl ../fluid/fluid$(EXEEXT)
+twowin$(EXEEXT): twowin.o
+
valuators$(EXEEXT): valuators.o
valuators.cxx: valuators.fl ../fluid/fluid$(EXEEXT)
@@ -494,7 +506,7 @@ $(GLALL): $(LIBNAME) $(GLLIBNAME)
# OpenGL demos...
CubeView$(EXEEXT): CubeMain.o CubeView.o CubeViewUI.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ \
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ \
CubeMain.o CubeView.o CubeViewUI.o \
$(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
@@ -505,39 +517,41 @@ CubeViewUI.cxx: CubeViewUI.fl ../fluid/fluid$(EXEEXT)
cube$(EXEEXT): cube.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ cube.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ cube.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
fractals$(EXEEXT): fractals.o fracviewer.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fractals.o fracviewer.o $(LINKFLTKGL) $(LINKFLTK) -lGLU $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ \
+ fractals.o fracviewer.o $(LINKFLTKGL) $(LINKFLTK) -lGLU $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
fullscreen$(EXEEXT): fullscreen.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ fullscreen.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ fullscreen.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
glpuzzle$(EXEEXT): glpuzzle.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ glpuzzle.o $(LINKFLTKGL) $(LINKFLTK) -lGLU $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ glpuzzle.o \
+ $(LINKFLTKGL) $(LINKFLTK) -lGLU $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
gl_overlay$(EXEEXT): gl_overlay.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
shape$(EXEEXT): shape.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ shape.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ shape.o $(LINKFLTKGL) $(LINKFLTK) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
cairo_test$(EXEEXT): cairo_test.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(LINKFLTKCAIRO) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(LINKFLTKCAIRO) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
#
-# End of "$Id: Makefile 9736 2012-12-05 14:53:03Z manolo $".
+# End of "$Id: Makefile 10339 2014-09-26 23:58:05Z AlbrechtS $".
#
diff --git a/test/blocks.app/Contents/Info.plist b/test/blocks.app/Contents/Info.plist
index dcc528a..9448901 100644
--- a/test/blocks.app/Contents/Info.plist
+++ b/test/blocks.app/Contents/Info.plist
@@ -40,5 +40,8 @@
<key>CFBundleGetInfoString</key>
<string>1.0, Copyright 2006 by Michael Sweet</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+
</dict>
</plist>
diff --git a/test/blocks.cxx b/test/blocks.cxx
index 28c6e98..abbee57 100644
--- a/test/blocks.cxx
+++ b/test/blocks.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: blocks.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: blocks.cxx 10127 2014-04-27 13:57:09Z manolo $"
//
// "Block Attack!" scrolling blocks game using the Fast Light Tool Kit (FLTK).
//
@@ -139,6 +139,9 @@ class BlockSound {
// Private, OS-specific data...
#ifdef __APPLE__
AudioDeviceID device;
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceIOProcID audio_proc_id;
# endif
@@ -1017,5 +1020,5 @@ BlockWindow::timeout_cb(BlockWindow *bw) {
//
-// End of "$Id: blocks.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: blocks.cxx 10127 2014-04-27 13:57:09Z manolo $".
//
diff --git a/test/browser.cxx b/test/browser.cxx
index 46d621e..9938485 100644
--- a/test/browser.cxx
+++ b/test/browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: browser.cxx 9736 2012-12-05 14:53:03Z manolo $"
+// "$Id: browser.cxx 9847 2013-03-23 21:32:34Z greg.ercolano $"
//
// Browser test program for the Fast Light Tool Kit (FLTK).
//
@@ -57,6 +57,7 @@ That was a blank line above this.
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Int_Input.H>
+#include <FL/Fl_Choice.H>
#include <FL/fl_ask.H>
#include <stdio.h>
#include <string.h>
@@ -70,6 +71,7 @@ Fl_Button *top,
*visible,
*swap,
*sort;
+Fl_Choice *btype;
Fl_Int_Input *field;
void b_cb(Fl_Widget* o, void*) {
@@ -113,12 +115,22 @@ void sort_cb(Fl_Widget *, void *) {
browser->sort(FL_SORT_ASCENDING);
}
+void btype_cb(Fl_Widget *, void *) {
+ for ( int t=1; t<=browser->size(); t++ ) browser->select(t,0);
+ browser->select(1,0); // leave focus box on first line
+ if ( strcmp(btype->text(),"Normal")==0) browser->type(FL_NORMAL_BROWSER);
+ else if ( strcmp(btype->text(),"Select")==0) browser->type(FL_SELECT_BROWSER);
+ else if ( strcmp(btype->text(),"Hold" )==0) browser->type(FL_HOLD_BROWSER);
+ else if ( strcmp(btype->text(),"Multi" )==0) browser->type(FL_MULTI_BROWSER);
+ browser->redraw();
+}
+
int main(int argc, char **argv) {
int i;
if (!Fl::args(argc,argv,i)) Fl::fatal(Fl::help);
const char* fname = (i < argc) ? argv[i] : "browser.cxx";
- Fl_Double_Window window(480,400,fname);
- browser = new Fl_Select_Browser(0,0,480,350,0);
+ Fl_Double_Window window(560,400,fname);
+ browser = new Fl_Select_Browser(0,0,560,350,0);
browser->type(FL_MULTI_BROWSER);
//browser->type(FL_HOLD_BROWSER);
//browser->color(42);
@@ -159,7 +171,7 @@ int main(int argc, char **argv) {
}
browser->position(0);
- field = new Fl_Int_Input(50, 350, 430, 25, "Line #:");
+ field = new Fl_Int_Input(55, 350, 505, 25, "Line #:");
field->callback(show_cb);
top = new Fl_Button(0, 375, 80, 25, "Top");
@@ -181,12 +193,21 @@ int main(int argc, char **argv) {
sort = new Fl_Button(400, 375, 80, 25, "Sort");
sort->callback(sort_cb);
+ btype = new Fl_Choice(480, 375, 80, 25);
+ btype->add("Normal");
+ btype->add("Select");
+ btype->add("Hold");
+ btype->add("Multi");
+ btype->callback(btype_cb);
+ btype->value(3);
+ btype->tooltip("Changes the browser type()");
+
window.resizable(browser);
window.show(argc,argv);
return Fl::run();
}
//
-// End of "$Id: browser.cxx 9736 2012-12-05 14:53:03Z manolo $".
+// End of "$Id: browser.cxx 9847 2013-03-23 21:32:34Z greg.ercolano $".
//
diff --git a/test/checkers.app/Contents/Info.plist b/test/checkers.app/Contents/Info.plist
index 1e77037..4929602 100644
--- a/test/checkers.app/Contents/Info.plist
+++ b/test/checkers.app/Contents/Info.plist
@@ -40,5 +40,8 @@
<key>CFBundleGetInfoString</key>
<string>1.0, Copyright 1997-2010 by Bill Spitzak and others</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+
</dict>
</plist>
diff --git a/test/colbrowser.cxx b/test/colbrowser.cxx
index cff586c..56ace1b 100644
--- a/test/colbrowser.cxx
+++ b/test/colbrowser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: colbrowser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: colbrowser.cxx 10266 2014-09-03 10:10:37Z AlbrechtS $"
//
// X Color Browser demo program for the Fast Light Tool Kit (FLTK).
//
@@ -196,7 +196,7 @@ static int load_browser(char *fname)
static int search_entry(int r, int g, int b)
{
- register RGBdb *db = rgbdb;
+ RGBdb *db = rgbdb;
int i, j, diffr, diffg, diffb;
unsigned int diff, mindiff;
@@ -336,5 +336,5 @@ static void create_form_cl(void)
}
//
-// End of "$Id: colbrowser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: colbrowser.cxx 10266 2014-09-03 10:10:37Z AlbrechtS $".
//
diff --git a/test/cursor.cxx b/test/cursor.cxx
index 2cffee0..c2ac263 100644
--- a/test/cursor.cxx
+++ b/test/cursor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: cursor.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: cursor.cxx 10196 2014-06-16 11:17:57Z ossman $"
//
// Cursor test program for the Fast Light Tool Kit (FLTK).
//
@@ -23,8 +23,6 @@
#include <FL/fl_draw.H>
#include <FL/Fl_Box.H>
-Fl_Color fg = FL_BLACK;
-Fl_Color bg = FL_WHITE;
Fl_Cursor cursor = FL_CURSOR_DEFAULT;
Fl_Hor_Value_Slider *cursor_slider;
@@ -32,7 +30,7 @@ Fl_Hor_Value_Slider *cursor_slider;
void choice_cb(Fl_Widget *, void *v) {
cursor = (Fl_Cursor)(fl_intptr_t)v;
cursor_slider->value(cursor);
- fl_cursor(cursor,fg,bg);
+ fl_cursor(cursor);
}
Fl_Menu_Item choices[] = {
@@ -48,8 +46,6 @@ Fl_Menu_Item choices[] = {
{"FL_CURSOR_WE",0,choice_cb,(void*)FL_CURSOR_WE},
{"FL_CURSOR_NWSE",0,choice_cb,(void*)FL_CURSOR_NWSE},
{"FL_CURSOR_NESW",0,choice_cb,(void*)FL_CURSOR_NESW},
- {"FL_CURSOR_NONE",0,choice_cb,(void*)FL_CURSOR_NONE},
-#if 0
{"FL_CURSOR_N",0,choice_cb,(void*)FL_CURSOR_N},
{"FL_CURSOR_NE",0,choice_cb,(void*)FL_CURSOR_NE},
{"FL_CURSOR_E",0,choice_cb,(void*)FL_CURSOR_E},
@@ -58,26 +54,14 @@ Fl_Menu_Item choices[] = {
{"FL_CURSOR_SW",0,choice_cb,(void*)FL_CURSOR_SW},
{"FL_CURSOR_W",0,choice_cb,(void*)FL_CURSOR_W},
{"FL_CURSOR_NW",0,choice_cb,(void*)FL_CURSOR_NW},
-#endif
+ {"FL_CURSOR_NONE",0,choice_cb,(void*)FL_CURSOR_NONE},
{0}
};
void setcursor(Fl_Widget *o, void *) {
Fl_Hor_Value_Slider *slider = (Fl_Hor_Value_Slider *)o;
cursor = Fl_Cursor((int)slider->value());
- fl_cursor(cursor,fg,bg);
-}
-
-void setfg(Fl_Widget *o, void *) {
- Fl_Hor_Value_Slider *slider = (Fl_Hor_Value_Slider *)o;
- fg = Fl_Color((int)slider->value());
- fl_cursor(cursor,fg,bg);
-}
-
-void setbg(Fl_Widget *o, void *) {
- Fl_Hor_Value_Slider *slider = (Fl_Hor_Value_Slider *)o;
- bg = Fl_Color((int)slider->value());
- fl_cursor(cursor,fg,bg);
+ fl_cursor(cursor);
}
// draw the label without any ^C or \nnn conversions:
@@ -103,29 +87,11 @@ int main(int argc, char **argv) {
slider1.align(FL_ALIGN_LEFT);
slider1.step(1);
slider1.precision(0);
- slider1.bounds(0,100);
+ slider1.bounds(0,255);
slider1.value(0);
slider1.callback(setcursor);
slider1.value(cursor);
- Fl_Hor_Value_Slider slider2(80,220,310,30,"fgcolor:");
- slider2.align(FL_ALIGN_LEFT);
- slider2.step(1);
- slider2.precision(0);
- slider2.bounds(0,255);
- slider2.value(0);
- slider2.callback(setfg);
- slider2.value(fg);
-
- Fl_Hor_Value_Slider slider3(80,260,310,30,"bgcolor:");
- slider3.align(FL_ALIGN_LEFT);
- slider3.step(1);
- slider3.precision(0);
- slider3.bounds(0,255);
- slider3.value(0);
- slider3.callback(setbg);
- slider3.value(bg);
-
#if 0
// draw the manual's diagram of cursors...
window.size(400,800);
@@ -152,5 +118,5 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: cursor.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: cursor.cxx 10196 2014-06-16 11:17:57Z ossman $".
//
diff --git a/test/demo.cxx b/test/demo.cxx
index 36605bb..5141cd6 100644
--- a/test/demo.cxx
+++ b/test/demo.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: demo.cxx 9736 2012-12-05 14:53:03Z manolo $"
+// "$Id: demo.cxx 10115 2014-02-26 21:21:14Z ianmacarthur $"
//
// Main demo program for the Fast Light Tool Kit (FLTK).
//
@@ -72,12 +72,15 @@ void create_the_forms() {
choice->labelfont(FL_HELVETICA_BOLD);
choice->add("none");
choice->add("gtk+");
+ choice->add("gleam");
choice->add("plastic");
choice->callback((Fl_Callback *)doscheme);
Fl::scheme(NULL);
if (!Fl::scheme()) choice->value(0);
else if (!strcmp(Fl::scheme(), "gtk+")) choice->value(1);
- else choice->value(2);
+ else if (!strcmp(Fl::scheme(), "gleam")) choice->value(2);
+ else if (!strcmp(Fl::scheme(), "plastic")) choice->value(3);
+ else choice->value(0);
obj = new Fl_Button(10,15,330,380); obj->type(FL_HIDDEN_BUTTON);
obj->callback(doback);
obj = but[0] = new Fl_Button( 30, 85,90,90);
@@ -296,6 +299,11 @@ void dobut(Fl_Widget *, long arg)
}
}
+ char *name = new char[strlen(cmd) + 5];
+ strcpy(name, cmd);
+ strcat(name, ".app");
+ // check whether app bundle exists
+ if ( ! fl_filename_isdir(name) ) strcpy(name, cmd);
if (arg) {
const char *fluidpath;
*arg = 0;
@@ -305,15 +313,18 @@ void dobut(Fl_Widget *, long arg)
#else
strcpy(path, app_path); strcat(path, "/");
fluidpath = "../fluid/fluid.app";
+ // check whether fluid bundle exists
+ if ( ! fl_filename_isdir(fluidpath) ) fluidpath = "../fluid";
#endif
if (strcmp(cmd, "../fluid/fluid")==0) {
sprintf(command, "open %s --args %s%s", fluidpath, path, arg+1);
} else {
- sprintf(command, "open %s.app --args %s%s", cmd, path, arg+1);
+ sprintf(command, "open %s --args %s%s", name, path, arg+1);
}
} else {
- sprintf(command, "open %s.app", cmd);
+ sprintf(command, "open %s", name);
}
+ delete[] name;
// puts(command);
system(command);
@@ -429,6 +440,6 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: demo.cxx 9736 2012-12-05 14:53:03Z manolo $".
+// End of "$Id: demo.cxx 10115 2014-02-26 21:21:14Z ianmacarthur $".
//
diff --git a/test/device.cxx b/test/device.cxx
index f5063a4..ba7f2e6 100644
--- a/test/device.cxx
+++ b/test/device.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: device.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: device.cxx 10159 2014-05-23 16:47:21Z manolo $"
//
// Device test program for the Fast Light Tool Kit (FLTK).
//
@@ -21,6 +21,7 @@
#include <FL/Fl_Overlay_Window.H>
#include <FL/Fl_Light_Button.H>
+#include <FL/Fl_Radio_Round_Button.H>
#include <FL/fl_draw.H>
#include <FL/Fl_Clock.H>
#include "pixmaps/porsche.xpm"
@@ -30,8 +31,8 @@
#include <FL/Fl_Printer.H>
-
-//#include "fl_printer_chooser.H"
+#include <FL/Fl_Copy_Surface.H>
+#include <FL/Fl_Image_Surface.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/fl_draw.H>
@@ -448,7 +449,6 @@ class MyWidget5: public Fl_Box{
protected:
void draw(){
Fl_Box::draw();
- //fl_push_clip(x(),y(),w(),h());
fl_push_matrix();
fl_translate(x(),y());
@@ -512,11 +512,6 @@ protected:
fl_end_complex_polygon();
fl_pop_matrix();
-
- // fl_color(FL_BLACK);
- // fl_line_style(0);
- //fl_pop_clip();
-
};
public:
MyWidget5(int x, int y):Fl_Box(x,y,230,250, "Complex (double) drawings:\nBlue ellipse may not be\ncorrectly transformed\ndue to non-orthogonal\ntransformation"){
@@ -551,37 +546,53 @@ void make_image() {
}
-void print(Fl_Widget *, void *w) {
- Fl_Widget * g = (Fl_Widget *)w;
+Fl_Widget *target;
+const char *operation;
+
+void copy(Fl_Widget *, void *data) {
+ if (strcmp(operation, "Fl_Image_Surface") == 0) {
+ Fl_Image_Surface *rgb_surf = new Fl_Image_Surface(target->w()+20, target->h()+10);
+ rgb_surf->set_current();
+ fl_color(FL_BLUE);fl_rectf(0,0,1000,1000);
+ rgb_surf->draw(target,10,5);
+ Fl_Image *img = rgb_surf->image();
+ delete rgb_surf;
+ Fl_Display_Device::display_device()->set_current();
+ Fl_Window* g2 = new Fl_Window(img->w(), img->h());
+ Fl_Box *b = new Fl_Box(FL_NO_BOX,0,0,img->w(), img->h(),0);
+ b->image(img);
+ g2->end();
+ g2->show();
+ return;
+ }
- Fl_Printer * p = new Fl_Printer();
- if (!p->start_job(1)) {
- p->start_page();
- p->print_window(g->window());
- p->end_page();
- p->end_job();
+
+ if (strcmp(operation, "Fl_Copy_Surface") == 0) {
+ Fl_Copy_Surface *copy_surf = new Fl_Copy_Surface(target->w()+10, target->h()+20);
+ copy_surf->set_current();
+ fl_color(FL_YELLOW);fl_rectf(0,0,1000,1000);
+ copy_surf->draw(target, 5, 10);
+ delete copy_surf;
+ Fl_Display_Device::display_device()->set_current();
+ }
+
+ if (strcmp(operation, "Fl_Printer") == 0) {
+ Fl_Printer * p = new Fl_Printer();
+ if (!p->start_job(1)) {
+ p->start_page();
+ if (target->as_window()) p->print_window(target->as_window());
+ else p->print_widget(target);
+ p->end_page();
+ p->end_job();
+ }
+ delete p;
}
- delete p;
}
-/*void print2(Fl_Widget *, void *w) {
- Fl_Widget * g = (Fl_Widget *)w;
- Fl_Printer * p = fl_printer_chooser();
- if(!p) return;
- p->page(Fl_Printer::A4);
- // fitting inside margins 1 inch wide
- p->place(g, FL_INCH, FL_INCH, p->page_width() - 2 * FL_INCH, p->page_height() - 2 * FL_INCH, FL_ALIGN_CENTER);
- Fl_Device * c = p->set_current();
- fl_draw(g);
- c->set_current();
- delete p;
- };*/
-
class My_Button:public Fl_Button{
protected:
void draw(){
- // Fl_Button::draw();
if (type() == FL_HIDDEN_BUTTON) return;
Fl_Color col = value() ? selection_color() : color();
draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col);
@@ -598,15 +609,22 @@ public:
};
+void target_cb(Fl_Widget* wid, void *data)
+{
+ target = (Fl_Widget*)data;
+}
+
+void operation_cb(Fl_Widget* wid, void *data)
+{
+ operation = wid->label();
+}
+
int main(int argc, char ** argv) {
- //Fl::scheme("plastic");
-
-
+ //Fl::scheme("plastic");
Fl_Window * w2 = new Fl_Window(500,560,"Graphics test");
-
Fl_Group *c2 =new Fl_Group(3, 43, 494, 514 );
new MyWidget(10,140);
@@ -643,14 +661,12 @@ int main(int argc, char ** argv) {
but5.labelfont(FL_BOLD|FL_ITALIC);
but5.labeltype(FL_SHADOW_LABEL);
but5.box(FL_ROUND_UP_BOX);
- // but5.selection_color(FL_WHITE);
Fl_Button but6(360, 460, 120, 30, "Plastic");
but6.box(FL_PLASTIC_UP_BOX);
- //Fl_Button but7(, 480, 120, 30, "Engraved box");
- //but7.box(FL_ENGRAVED_BOX);
- { Fl_Group* o = new Fl_Group(360, 495, 120, 40);
+ Fl_Group *group;
+ { Fl_Group* o = new Fl_Group(360, 495, 120, 40); group=o;
o->box(FL_UP_BOX);
{ Fl_Group* o = new Fl_Group(365, 500, 110, 30);
o->box(FL_THIN_UP_FRAME);
@@ -673,20 +689,34 @@ int main(int argc, char ** argv) {
tx.hide();
c2->end();
- Fl_Button *b4 = new Fl_Button(10,5, 150, 25, "Print");
- b4->callback(print,c2);
- /*Fl_Button *b5 = new Fl_Button(165,5, 90, 25, "Print");
- b5->tooltip("This is a tooltip");
- b5->callback(print2,c2);*/
+
+ Fl_Radio_Round_Button *rb;
+ Fl_Window *w3 = new Fl_Window(2,5,w2->w()-10,55);
+ w3->box(FL_DOWN_BOX);
+ Fl_Group *g1 = new Fl_Group(w3->x(),w3->y(),w3->w(),w3->h());
+ rb = new Fl_Radio_Round_Button(5,5,150,12, "Fl_Image_Surface");
+ rb->set(); rb->callback(operation_cb, NULL); operation = rb->label();
+ rb = new Fl_Radio_Round_Button(5,22,150,12, "Fl_Copy_Surface"); rb->callback(operation_cb, NULL);
+ rb = new Fl_Radio_Round_Button(5,39,150,12, "Fl_Printer"); rb->callback(operation_cb, NULL);
+ g1->end();
+
+ Fl_Group *g2 = new Fl_Group(w3->x(),w3->y(),w3->w(),w3->h());
+ rb = new Fl_Radio_Round_Button(170,5,150,12, "Window");
+ rb->set(); rb->callback(target_cb, w2); target = w2;
+ rb = new Fl_Radio_Round_Button(170,22,150,12, "Sub-window"); rb->callback(target_cb, w3);
+ rb = new Fl_Radio_Round_Button(170,39,150,12, "Group"); rb->callback(target_cb, group);
+ g2->end();
+ Fl_Button *b4 = new Fl_Button(330, (w3->h() - 25)/2, 150, 25, "GO");
+ b4->callback((Fl_Callback*)copy,NULL);
+ w3->end();
w2->end();
w2->show(argc, argv);
-
Fl::run();
return 0;
}
//
-// End of "$Id: device.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// End of "$Id: device.cxx 10159 2014-05-23 16:47:21Z manolo $"
//
diff --git a/test/editor.cxx b/test/editor.cxx
index 9f21d6e..e50f022 100644
--- a/test/editor.cxx
+++ b/test/editor.cxx
@@ -1,11 +1,11 @@
//
-// "$Id: editor.cxx 9718 2012-11-13 13:03:20Z manolo $"
+// "$Id: editor.cxx 10360 2014-10-05 19:49:19Z AlbrechtS $"
//
// A simple text editor program for the Fast Light Tool Kit (FLTK).
//
// This program is described in Chapter 4 of the FLTK Programmer's Guide.
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -33,6 +33,7 @@
#endif
#include <FL/Fl.H>
+#include <FL/x.H> // for fl_open_callback
#include <FL/Fl_Group.H>
#include <FL/Fl_Double_Window.H>
#include <FL/fl_ask.H>
@@ -515,6 +516,30 @@ void delete_cb(Fl_Widget*, void*) {
textbuf->remove_selection();
}
+void linenumbers_cb(Fl_Widget *w, void* v) {
+ EditorWindow* e = (EditorWindow*)v;
+ Fl_Menu_Bar* m = (Fl_Menu_Bar*)w;
+ const Fl_Menu_Item* i = m->mvalue();
+ if ( i->value() ) {
+ e->editor->linenumber_width(50); // enable
+ e->editor->linenumber_size(e->editor->textsize());
+ } else {
+ e->editor->linenumber_width(0); // disable
+ }
+ e->redraw();
+}
+
+void wordwrap_cb(Fl_Widget *w, void* v) {
+ EditorWindow* e = (EditorWindow*)v;
+ Fl_Menu_Bar* m = (Fl_Menu_Bar*)w;
+ const Fl_Menu_Item* i = m->mvalue();
+ if ( i->value() )
+ e->editor->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0);
+ else
+ e->editor->wrap_mode(Fl_Text_Display::WRAP_NONE, 0);
+ e->redraw();
+}
+
void find_cb(Fl_Widget* w, void* v) {
EditorWindow* e = (EditorWindow*)v;
const char *val;
@@ -751,6 +776,10 @@ Fl_Menu_Item menuitems[] = {
{ "&Copy", FL_COMMAND + 'c', (Fl_Callback *)copy_cb },
{ "&Paste", FL_COMMAND + 'v', (Fl_Callback *)paste_cb },
{ "&Delete", 0, (Fl_Callback *)delete_cb },
+ { "Preferences", 0, 0, 0, FL_SUBMENU },
+ { "Line Numbers", FL_COMMAND + 'l', (Fl_Callback *)linenumbers_cb, 0, FL_MENU_TOGGLE },
+ { "Word Wrap", 0, (Fl_Callback *)wordwrap_cb, 0, FL_MENU_TOGGLE },
+ { 0 },
{ 0 },
{ "&Search", 0, 0, 0, FL_SUBMENU },
@@ -776,8 +805,6 @@ Fl_Window* new_view() {
w->editor->highlight_data(stylebuf, styletable,
sizeof(styletable) / sizeof(styletable[0]),
'A', style_unfinished_cb, 0);
- textbuf->text();
- style_init();
w->end();
w->resizable(w->editor);
w->callback((Fl_Callback *)close_cb, w);
@@ -810,5 +837,5 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: editor.cxx 9718 2012-11-13 13:03:20Z manolo $".
+// End of "$Id: editor.cxx 10360 2014-10-05 19:49:19Z AlbrechtS $".
//
diff --git a/test/fast_slow.fl b/test/fast_slow.fl
index 63e3762..6c53443 100644
--- a/test/fast_slow.fl
+++ b/test/fast_slow.fl
@@ -1,14 +1,11 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.00
+version 1.0303
header_name {.h}
-code_name {.cxx}
-gridx 10
-gridy 10
-snap 3
+code_name {.cxx}
Function {} {open
} {
Fl_Window {} {open
- xywh {143 188 318 443} resizable visible
+ xywh {397 202 318 443} type Double resizable visible
} {
Fl_Slider control {
label {move
diff --git a/test/forms.cxx b/test/forms.cxx
index dfdd918..0563318 100644
--- a/test/forms.cxx
+++ b/test/forms.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: forms.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: forms.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $"
//
// Another forms demo for the Fast Light Tool Kit (FLTK).
//
@@ -58,6 +58,7 @@ static VN_struct btypes[]=
{FL_PLASTIC_DOWN_BOX,"plastic downbox"},
{FL_GTK_UP_BOX,"GTK up box"},
{FL_GTK_ROUND_UP_BOX,"GTK round up box"},
+ {FL_GLEAM_UP_BOX,"Gleam up box"},
/* sentinel */
{-1}
};
@@ -226,5 +227,5 @@ main (int argc, char *argv[])
}
//
-// End of "$Id: forms.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: forms.cxx 10113 2014-02-25 04:24:41Z greg.ercolano $".
//
diff --git a/test/fracviewer.cxx b/test/fracviewer.cxx
index bc45cc0..ca1c274 100644
--- a/test/fracviewer.cxx
+++ b/test/fracviewer.cxx
@@ -331,10 +331,37 @@ void agvSwitchMoveMode(int move)
void agvHandleButton(int button, int state, int x, int y)
{
- if (state == GLUT_DOWN && downb == -1) {
+ // deal with mouse wheel events, that fltk sends as buttons 3 or 4
+ //if (button > GLUT_RIGHT_BUTTON)return;
+ if ((state == GLUT_DOWN) && ((button == 3) || (button == 4))) {
+ // attempt to process scrollwheel as zoom in/out
+ float deltay = 0.25;
+ if (button == 3) {
+ deltay = (-0.25);
+ }
+ downb = -1;
+ downDist = EyeDist;
+ downEx = Ex;
+ downEy = Ey;
+ downEz = Ez;
+ downEyeMove = EyeMove;
+ EyeMove = 0;
+
+ EyeDist = downDist + deltay;
+ Ex = downEx - E_SENS*deltay*sin(TORAD(EyeAz))*cos(TORAD(EyeEl));
+ Ey = downEy - E_SENS*deltay*sin(TORAD(EyeEl));
+ Ez = downEz + E_SENS*deltay*cos(TORAD(EyeAz))*cos(TORAD(EyeEl));
+
+ EyeMove = downEyeMove;
+ glutPostRedisplay();
+ return;
+ }
+ else if (button > GLUT_RIGHT_BUTTON)return; // ignore any other button...
+
+ if (state == GLUT_DOWN && downb == -1) {
lastx = downx = x;
lasty = downy = y;
- downb = button;
+ downb = button;
switch (button) {
case GLUT_LEFT_BUTTON:
diff --git a/test/fullscreen.cxx b/test/fullscreen.cxx
index bcbbb27..4d30966 100644
--- a/test/fullscreen.cxx
+++ b/test/fullscreen.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fullscreen.cxx 9605 2012-06-14 15:09:46Z manolo $"
+// "$Id: fullscreen.cxx 10189 2014-06-11 09:10:53Z ossman $"
//
//
@@ -127,7 +127,7 @@ class fullscreen_window : public Fl_Single_Window {
fullscreen_window(int W, int H, const char *t=0);
int handle (int e);
Fl_Toggle_Light_Button *b3;
-
+ Fl_Toggle_Light_Button *b4;
};
fullscreen_window::fullscreen_window(int W, int H, const char *t) : Fl_Single_Window(W, H, t) {
@@ -170,27 +170,63 @@ void border_cb(Fl_Widget *o, void *p) {
#endif
}
-int px,py,pw,ph;
Fl_Button *border_button;
void fullscreen_cb(Fl_Widget *o, void *p) {
Fl_Window *w = (Fl_Window *)p;
int d = ((Fl_Button *)o)->value();
if (d) {
- px = w->x();
- py = w->y();
- pw = w->w();
- ph = w->h();
w->fullscreen();
- w->override();
#ifndef WIN32 // update our border state in case border was turned off
border_button->value(w->border());
#endif
} else {
- //w->fullscreen_off(px,py,pw,ph);
w->fullscreen_off();
}
}
+void allscreens_cb(Fl_Widget *o, void *p) {
+ Fl_Window *w = (Fl_Window *)p;
+ int d = ((Fl_Button *)o)->value();
+ if (d) {
+ int top, bottom, left, right;
+ int top_y, bottom_y, left_x, right_x;
+
+ int sx, sy, sw, sh;
+
+ top = bottom = left = right = 0;
+
+ Fl::screen_xywh(sx, sy, sw, sh, 0);
+ top_y = sy;
+ bottom_y = sy + sh;
+ left_x = sx;
+ right_x = sx + sw;
+
+ for (int i = 1;i < Fl::screen_count();i++) {
+ Fl::screen_xywh(sx, sy, sw, sh, i);
+ if (sy < top_y) {
+ top = i;
+ top_y = sy;
+ }
+ if ((sy + sh) > bottom_y) {
+ bottom = i;
+ bottom_y = sy + sh;
+ }
+ if (sx < left_x) {
+ left = i;
+ left_x = sx;
+ }
+ if ((sx + sw) > right_x) {
+ right = i;
+ right_x = sx + sw;
+ }
+ }
+
+ w->fullscreen_screens(top, bottom, left, right);
+ } else {
+ w->fullscreen_screens(-1, -1, -1, -1);
+ }
+}
+
void update_screeninfo(Fl_Widget *b, void *p) {
Fl_Browser *browser = (Fl_Browser *)p;
int x, y, w, h;
@@ -219,7 +255,7 @@ void exit_cb(Fl_Widget *, void *) {
exit(0);
}
-#define NUMB 7
+#define NUMB 8
int twowindow = 0;
int initfull = 0;
@@ -284,6 +320,10 @@ int main(int argc, char **argv) {
window.b3->callback(fullscreen_cb,w);
y+=30;
+ window.b4 = new Fl_Toggle_Light_Button(50,y,window.w()-60,30,"All Screens");
+ window.b4->callback(allscreens_cb,w);
+ y+=30;
+
Fl_Button eb(50,y,window.w()-60,30,"Exit");
eb.callback(exit_cb);
y+=30;
@@ -305,5 +345,5 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: fullscreen.cxx 9605 2012-06-14 15:09:46Z manolo $".
+// End of "$Id: fullscreen.cxx 10189 2014-06-11 09:10:53Z ossman $".
//
diff --git a/test/help-test.html b/test/help-test.html
new file mode 100644
index 0000000..5b65d22
--- /dev/null
+++ b/test/help-test.html
@@ -0,0 +1,254 @@
+<!--
+ Test the Fl_Help_View's ability to parse simple HTML.
+-->
+<H1>Simple HTML Tests</H1>
+<UL>
+ <LI> <a href="#Plain Test">Plain Text Test</A>
+ <LI> <a href="#Pre Test">PRE (preformatted Text) Test</A>
+ <LI> <a href="#Headings">Heading Tests</A>
+ <LI> <a href="#Lists">UL, OL, DL Lists</A>
+ <LI> <a href="#Table">TABLE Tests</A>
+ <LI> <a href="#Center">CENTER Tests</A>
+ <LI> <a href="#HR">HR (Horizontal Rule) Tests</A>
+ <LI> <a href="#Tabs">PRE Tab Indent Tests</A>
+</UL>
+<P>
+
+<A NAME="Plain Test"></A>
+<B>Plain text paragraphs</B><P>
+ The licenses for most software are designed to take away your freedom to
+ share and change it. By contrast, the GNU General Public Licenses are
+ intended to guarantee your freedom to share and change free software--to
+ make sure the software is free for all its users.
+ <P>
+ This license, the Library General Public License, applies to some
+ specially designated Free Software Foundation software, and to any
+ other libraries whose authors decide to use it. You can use it for
+ your libraries, too.
+ <P>
+ <I>Italic content.</I> <B>Bold content</B> <BIG>Big content.</BIG>
+ <SMALL>Small content.</SMALL> <U>Underline content.</U> <STRIKE>Strike out content.</STRIKE>
+ <FONT COLOR=RED>Red font content.</FONT> <FONT COLOR=#ff8800>Orange #ff8800 font content.</FONT>
+ <FONT COLOR=BLUE>Blue font content.</FONT>
+ <P>
+ <FONT FACE="Helvetica">This should be Helvetica. 0123456789</FONT><BR>
+ <FONT FACE="Arial">This should be Arial. 0123456789</FONT><BR>
+ <FONT FACE="Sans">This should be Sans. 0123456789</FONT><BR>
+ <FONT FACE="Times">This should be Times. 0123456789</FONT><BR>
+ <FONT FACE="Serif">This should be Serif. 0123456789</FONT><BR>
+ <FONT FACE="Courier">This should be Courier. 0123456789</FONT><BR>
+ <FONT FACE="Symbol">This should be Symbol. 0123456789</FONT>
+<P>
+
+<A NAME="Pre Test"></A>
+<B>Preformatted paragraphs</B><PRE>
+The following 2 paragraphs should be indented 4 spaces.
+
+ The licenses for most software are designed to take away
+ your freedom to share and change it. By contrast, the
+ GNU General Public Licenses are intended to guarantee your
+ freedom to share and change free software -- to make sure
+ the software is free for all its users.
+
+ This license, the Library General Public License, applies to
+ some specially designated Free Software Foundation software,
+ and to any other libraries whose authors decide to use it.
+ You can use it for your libraries, too.
+
+The following 2 paragraphs should be indented 8 spaces.
+
+ The licenses for most software are designed to take away
+ your freedom to share and change it. By contrast, the
+ GNU General Public Licenses are intended to guarantee
+ your freedom to share and change free software --
+ to make sure the software is free for all its users.
+
+ This license, the Library General Public License,
+ applies to some specially designated Free Software
+ Foundation software, and to any other libraries whose
+ authors decide to use it. You can use it for your
+ libraries, too.
+
+The following text content should all be indented 4 apces.
+
+ <I>Italic content.</I> <B>Bold content</B> <BIG>Big content.</BIG>
+ <SMALL>Small content.</SMALL> <U>Underline content.</U> <STRIKE>Strike out content.</STRIKE>.
+ <FONT COLOR=RED>Red font content.</FONT> <FONT COLOR=#ff8800>Orange #ff8800 font content.</FONT>
+ <FONT COLOR=BLUE>Blue font content.</FONT>
+</PRE>
+<P>
+
+<A NAME="Headings"></A>
+<B>Heading tests</B>
+<H1>This is H1 text</H1>
+<H2>This is H2 text</H2>
+<H3>This is H3 text</H3>
+<H4>This is H4 text</H4>
+<H5>This is H5 text</H5>
+<H6>This is H6 text</H6>
+<P>
+
+<A NAME="Lists"></A>
+<B>UL tests</B>
+<UL>
+ This text should be indented in a UL.<BR>
+ This should be a second line of indent.<P>
+ <LI> First list item with default attributes</LI>
+ <LI> Second list item</LI>
+ <LI> Third list item</LI>
+</UL>
+End of UL. Starting an OL:
+<OL>
+ This text should be indented in an OL.<BR>
+ This should be a second line of indent.<P>
+ <LI> First list item with default attributes</LI>
+ <LI> Second list item</LI>
+ <LI> Third list item</LI>
+</OL>
+End of OL. Starting a DL:
+<DL>
+ A DL has been started. This should be a list of terms.
+ Some browsers display the description indented right
+ relative to the terms, though I don't think FLTK's does this.<P>
+ <DT>First term</DT>
+ <DD>Description of first term.</DD>
+ <DT>Second term</DT>
+ <DD>Description of second term goes here.</DD>
+ <DT>Third term</DT>
+ <DD>Description of third term goes here.</DD>
+</DL>
+End of DL.
+<P>
+
+<A NAME="Table"></A>
+<B>Simple 2 Column Non-border Table, No Headings</B>
+<TABLE>
+ <TR>
+ <TD>Column 1</TD> <TD>Column 2</TD>
+ </TR><TR>
+ <TD>Aaa Aaa Aaa</TD> <TD>Xxx Xxx Xxx</TD>
+ </TR><TR>
+ <TD>Bbb Bbb Bbb</TD> <TD>Yyy Yyy Yyy</TD>
+ </TR><TR>
+ <TD>Ccc Ccc Ccc</TD> <TD>Zzz Zzz Zzz</TD>
+ </TR>
+</TABLE>
+<P>
+<B>Simple 2 Column Bordered Table, No Headings</B>
+<TABLE BORDER=1>
+ <TR>
+ <TD>Column 1</TD> <TD>Column 2</TD>
+ </TR><TR>
+ <TD>Aaa Aaa Aaa</TD> <TD>Xxx Xxx Xxx</TD>
+ </TR><TR>
+ <TD>Bbb Bbb Bbb</TD> <TD>Yyy Yyy Yyy</TD>
+ </TR><TR>
+ <TD>Ccc Ccc Ccc</TD> <TD>Zzz Zzz Zzz</TD>
+ </TR>
+</TABLE>
+<P>
+<B>Simple Two Column Table With Borders And Heading</B>
+<TABLE BORDER=1>
+ <TH>Table Heading</TH>
+ <TR>
+ <TD>Column 1</TD> <TD>Column 2</TD>
+ </TR><TR>
+ <TD>Aaa Aaa Aaa</TD> <TD>Xxx Xxx Xxx</TD>
+ </TR><TR>
+ <TD>Bbb Bbb Bbb</TD> <TD>Yyy Yyy Yyy</TD>
+ </TR><TR>
+ <TD>Ccc Ccc Ccc</TD> <TD>Zzz Zzz Zzz</TD>
+ </TR>
+</TABLE>
+<P>
+<B>Simple Bordered Table With Heading And 10 Cell Padding + Spacing</B>
+<TABLE BORDER=1 CELLPADDING=10 CELLSPACING=10>
+ <TH>Table Heading</TH>
+ <TR>
+ <TD>Column 1</TD> <TD>Column 2</TD>
+ </TR><TR>
+ <TD>Aaa Aaa Aaa</TD> <TD>Xxx Xxx Xxx</TD>
+ </TR><TR>
+ <TD>Bbb Bbb Bbb</TD> <TD>Yyy Yyy Yyy</TD>
+ </TR><TR>
+ <TD>Ccc Ccc Ccc</TD> <TD>Zzz Zzz Zzz</TD>
+ </TR>
+</TABLE>
+<P>
+<B>Simple Table Of Images, Two Columns, Three Rows</B>
+<TABLE BORDER=1 CELLPADDING=10 CELLSPACING=10>
+ <TH>Table Heading</TH>
+ <TR>
+ <TD>Column 1</TD> <TD>Column 2</TD>
+ </TR><TR>
+ <TD><IMG SRC="../documentation/src/FL200.png"></TD>
+ <TD>This is the FLTK logo</TD>
+ </TR><TR>
+ <TD><IMG SRC="../documentation/src/tiny.png"></TD>
+ <TD>Tiny FLTK logo.</TD>
+ </TR><TR>
+ <TD><IMG SRC="../documentation/src/Fl_Value_Input.png"></TD>
+ <TD>This is an image of Fl_Value_Input</TD>
+ </TR><TR>
+ <TD><IMG SRC="../documentation/src/Fl_Value_Output.png"></TD>
+ <TD>This is an image of Fl_Value_Output</TD>
+ </TR>
+</TABLE>
+<P>
+
+<A NAME="Center"></A>
+<B>Testing Centered Text And Image</B>
+<center>This text should be centered. What follows is a line break..
+<BR>
+After the line break, still centered. What follows is a paragraph break.
+<P>
+This text should be in a paragraph break. This is paragraph #1 of 2.
+<P>
+This text should be in a paragraph break as well. This is paragraph #2 of 2.
+<P>
+What follows should be a centered image..<BR>
+<IMG SRC="../documentation/src/FL200.png"><BR>
+That should be a centered image.
+<P>
+</center>
+<P>
+
+<A NAME="HR"></A>
+<B>Testing Horizontal Line</B>
+<HR>
+This text should be between two horizontal lines.
+<HR>
+<P>
+<A NAME="Tabs"></A>
+<B>Preformatted Indent Test</B>
+<PRE>
+ This tests that tabs and space indenting work correctly.
+ Each line should be one space right of the line preceding it
+ unless otherwise specified:
+
+0 Tab
+ 1 Space
+ 2 Space
+ 3 Space
+ 4 Space
+ 5 Space
+ 6 Space
+ 7 Space __
+ 8 Space |
+ 4 Space + 1 Tab |-- shold all be
+ 1 Tab __| same indent level
+ 1 Tab + 1 Space
+ 1 Tab + 2 Space
+ 1 Tab + 3 Space
+ 1 Tab + 4 Space
+ 1 Tab + 5 Space
+ 1 Tab + 6 Space
+ 1 Tab + 7 Space __
+ 1 Tab + 8 Space |
+ 4 Space + 1 Tab + 8 Space |-- should all be
+ 2 Tab __| same indent level
+ 2 Tab + 1 Space
+ 2 Tab + 2 Space
+ 2 Tab + 3 Space
+ ..
+</PRE>
diff --git a/test/help.cxx b/test/help.cxx
index 527228e..94c6da0 100644
--- a/test/help.cxx
+++ b/test/help.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: help.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: help.cxx 10097 2014-02-08 20:44:09Z greg.ercolano $"
//
// Fl_Help_Dialog test program.
//
@@ -68,14 +68,14 @@ main(int argc, // I - Number of command-line arguments
set_app_dir();
if (argc <= argn)
- help->load("../../../../documentation/html/intro.html");
+ help->load("../../../../test/help-test.html");
else
help->load(argv[argn]);
#else
if (argc <= argn)
- help->load("../documentation/html/intro.html");
+ help->load("help-test.html");
else
help->load(argv[1]);
@@ -92,5 +92,5 @@ main(int argc, // I - Number of command-line arguments
//
-// End of "$Id: help.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: help.cxx 10097 2014-02-08 20:44:09Z greg.ercolano $".
//
diff --git a/test/icon.cxx b/test/icon.cxx
new file mode 100644
index 0000000..75c43ab
--- /dev/null
+++ b/test/icon.cxx
@@ -0,0 +1,51 @@
+//
+// Icon test program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Choice.H>
+#include <FL/Fl_RGB_Image.H>
+
+static Fl_Double_Window *win;
+
+void choice_cb(Fl_Widget *, void *v) {
+ Fl_Color c = (Fl_Color)(fl_intptr_t)v;
+ uchar buffer[32*32*3];
+ Fl_RGB_Image icon(buffer, 32, 32, 3);
+ icon.color_average(c, 0.0);
+ win->icon(&icon);
+}
+
+Fl_Menu_Item choices[] = {
+ {"Red",0,choice_cb,(void*)FL_RED},
+ {"Green",0,choice_cb,(void*)FL_GREEN},
+ {"Blue",0,choice_cb,(void*)FL_BLUE},
+ {0}
+};
+
+int main(int argc, char **argv) {
+ Fl_Double_Window window(400,300);
+ win = &window;
+
+ Fl_Choice choice(80,100,200,25,"Colour:");
+ choice.menu(choices);
+ choice.callback(choice_cb);
+ choice.when(FL_WHEN_RELEASE|FL_WHEN_NOT_CHANGED);
+
+ window.end();
+ window.show(argc,argv);
+ return Fl::run();
+}
diff --git a/test/inactive.fl b/test/inactive.fl
index e8e9037..cfe016e 100644
--- a/test/inactive.fl
+++ b/test/inactive.fl
@@ -1,11 +1,11 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0107
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {} {open
} {
Fl_Window {} {open
- xywh {379 190 420 369} type Double resizable visible
+ xywh {390 200 420 369} type Double resizable visible
} {
Fl_Group the_group {
label {activate()/deactivate() called on this Fl_Group} open
@@ -62,23 +62,23 @@ Function {} {open
} {
MenuItem {} {
label item
- xywh {0 0 100 20} labelsize 14
+ xywh {0 0 100 20}
}
MenuItem {} {
label item
- xywh {10 10 100 20} labelsize 14
+ xywh {10 10 100 20}
}
MenuItem {} {
label item
- xywh {20 20 100 20} labelsize 14
+ xywh {20 20 100 20}
}
MenuItem {} {
label item
- xywh {30 30 100 20} labelsize 14
+ xywh {30 30 100 20}
}
MenuItem {} {
label item
- xywh {40 40 100 20} labelsize 14
+ xywh {40 40 100 20}
}
}
Fl_Value_Output {} {
diff --git a/test/keyboard_ui.fl b/test/keyboard_ui.fl
index 4cc78bd..3f6bdad 100644
--- a/test/keyboard_ui.fl
+++ b/test/keyboard_ui.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {make_window()} {open
diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx
index df12739..8718c20 100644
--- a/test/list_visuals.cxx
+++ b/test/list_visuals.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: list_visuals.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: list_visuals.cxx 9979 2013-09-20 03:36:02Z greg.ercolano $"
//
// Visual list utility for the Fast Light Tool Kit (FLTK).
//
@@ -213,6 +213,7 @@ void list_visuals() {
putchar('\n');
}
+ if ( overlayInfo ) { XFree(overlayInfo); overlayInfo = 0; }
}
#endif
@@ -228,5 +229,5 @@ int main(int argc, char **argv) {
#endif
//
-// End of "$Id: list_visuals.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: list_visuals.cxx 9979 2013-09-20 03:36:02Z greg.ercolano $".
//
diff --git a/test/makedepend b/test/makedepend
index 50f5bf9..03901ff 100644
--- a/test/makedepend
+++ b/test/makedepend
@@ -1,79 +1,90 @@
# DO NOT DELETE THIS LINE -- make depend depends on it.
unittests.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-unittests.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-unittests.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-unittests.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-unittests.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-unittests.o: ../FL/Fl_Image.H ../FL/Fl_Help_View.H ../FL/Fl.H ../FL/fl_draw.H
-unittests.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
+unittests.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+unittests.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+unittests.o: ../FL/Fl_Image.H ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H
+unittests.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+unittests.o: ../FL/Fl_Valuator.H ../FL/Fl_Help_View.H ../FL/Fl.H
+unittests.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
unittests.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
unittests.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
unittests.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H ../FL/filename.H
unittests.o: ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/fl_draw.H
unittests.o: unittest_about.cxx unittest_points.cxx unittest_lines.cxx
unittests.o: unittest_rects.cxx unittest_circles.cxx unittest_text.cxx
-unittests.o: unittest_images.cxx unittest_viewport.cxx
+unittests.o: unittest_symbol.cxx unittest_images.cxx unittest_viewport.cxx
unittests.o: unittest_scrollbarsize.cxx ../FL/Fl_Browser.H ../FL/Fl_Tree.H
unittests.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Tree_Item.H ../FL/Fl_Widget.H
unittests.o: ../FL/Fl_Tree_Item_Array.H ../FL/Fl_Tree_Prefs.H
-unittests.o: ../FL/Fl_Value_Slider.H
+unittests.o: ../FL/Fl_Table.H ../FL/Fl_Scroll.H ../FL/Fl_Value_Slider.H
+unittests.o: unittest_schemes.cxx ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+unittests.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Button.H ../FL/Fl_Tabs.H
+unittests.o: ../FL/Fl_Clock.H ../FL/Fl_Progress.H ../FL/Fl_Slider.H
+unittests.o: ../FL/Fl_Value_Output.H ../FL/Fl_Adjuster.H ../FL/Fl_Counter.H
+unittests.o: ../FL/Fl_Roller.H ../FL/Fl_Value_Input.H ../FL/Fl_Input.H
+unittests.o: ../FL/Fl_Input_.H ../FL/Fl_Input.H ../FL/Fl_Output.H
+unittests.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
+unittests.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
+unittests.o: ../FL/Fl_File_Input.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+unittests.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
adjuster.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-adjuster.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-adjuster.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-adjuster.o: ../FL/Fl_Adjuster.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
+adjuster.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+adjuster.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+adjuster.o: ../FL/Fl_Image.H ../FL/Fl_Adjuster.H ../FL/Fl_Box.H
arc.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-arc.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-arc.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+arc.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+arc.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
arc.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
arc.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H
ask.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-ask.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-ask.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Input.H
-ask.o: ../FL/Fl_Input_.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
+ask.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+ask.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+ask.o: ../FL/Fl_Input.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
ask.o: ../FL/Fl_Button.H ../FL/fl_ask.H
bitmap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-bitmap.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-bitmap.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-bitmap.o: ../FL/Fl_Button.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+bitmap.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+bitmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+bitmap.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Bitmap.H
bitmap.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
blocks.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-blocks.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-blocks.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-blocks.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_XPM_Image.H
-blocks.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_XBM_Image.H
-blocks.o: ../FL/Fl_Bitmap.H ../FL/Fl_Tiled_Image.H ../FL/fl_draw.H ../FL/x.H
-blocks.o: ../config.h pixmaps/blast.xpm pixmaps/red.xpm pixmaps/red_bomb.xpm
+blocks.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+blocks.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+blocks.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
+blocks.o: ../FL/Fl_XPM_Image.H ../FL/Fl_Pixmap.H ../FL/Fl_XBM_Image.H
+blocks.o: ../FL/Fl_Tiled_Image.H ../FL/fl_draw.H ../FL/x.H ../config.h
+blocks.o: pixmaps/blast.xpm pixmaps/red.xpm pixmaps/red_bomb.xpm
blocks.o: pixmaps/green.xpm pixmaps/green_bomb.xpm pixmaps/blue.xpm
blocks.o: pixmaps/blue_bomb.xpm pixmaps/yellow.xpm pixmaps/yellow_bomb.xpm
blocks.o: pixmaps/cyan.xpm pixmaps/cyan_bomb.xpm pixmaps/magenta.xpm
blocks.o: pixmaps/magenta_bomb.xpm pixmaps/gray.xpm pixmaps/gray_bomb.xpm
boxtype.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-boxtype.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-boxtype.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-boxtype.o: ../FL/Fl_Box.H
+boxtype.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+boxtype.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+boxtype.o: ../FL/Fl_Image.H ../FL/Fl_Box.H
browser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-browser.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Select_Browser.H
-browser.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-browser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Image.H
-browser.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-browser.o: ../FL/Fl_Widget.H ../FL/Fl_Button.H ../FL/Fl_Int_Input.H
-browser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_ask.H
+browser.o: ../FL/Enumerations.H ../FL/Fl_Select_Browser.H ../FL/Fl_Browser.H
+browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+browser.o: ../FL/Fl_Valuator.H ../FL/Fl_Image.H ../FL/Fl_Double_Window.H
+browser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+browser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Button.H ../FL/Fl_Int_Input.H
+browser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Choice.H
+browser.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/fl_ask.H
button.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-button.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-button.o: ../FL/Fl_Button.H
+button.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Button.H
+button.o: ../FL/fl_ask.H
buttons.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-buttons.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-buttons.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
+buttons.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Button.H
+buttons.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
buttons.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Check_Button.H
buttons.o: ../FL/Fl_Light_Button.H ../FL/Fl_Light_Button.H
buttons.o: ../FL/Fl_Round_Button.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
cairo_test.o: ../config.h ../FL/fl_ask.H ../FL/Enumerations.H
cairo_test.o: ../FL/Fl_Export.H ../FL/fl_types.h
checkers.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-checkers.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-checkers.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-checkers.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_draw.H
+checkers.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+checkers.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+checkers.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/fl_draw.H
checkers.o: ../FL/Fl_Menu_Item.H ../FL/fl_ask.H pixmaps/black_1.xbm
checkers.o: pixmaps/black_2.xbm pixmaps/black_3.xbm pixmaps/black_4.xbm
checkers.o: pixmaps/white_1.xbm pixmaps/white_2.xbm pixmaps/white_3.xbm
@@ -82,323 +93,337 @@ checkers.o: pixmaps/blackking_2.xbm pixmaps/blackking_3.xbm
checkers.o: pixmaps/blackking_4.xbm pixmaps/whiteking_1.xbm
checkers.o: pixmaps/whiteking_2.xbm pixmaps/whiteking_3.xbm
checkers.o: pixmaps/whiteking_4.xbm ../FL/Fl_Box.H ../FL/Fl_Slider.H
-checkers.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Output.H
+checkers.o: ../FL/Fl_Value_Output.H
clock.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-clock.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-clock.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-clock.o: ../FL/Fl_Clock.H ../FL/Fl_Round_Clock.H ../FL/Fl_Clock.H
+clock.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+clock.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+clock.o: ../FL/Fl_Image.H ../FL/Fl_Clock.H ../FL/Fl_Round_Clock.H
+clock.o: ../FL/Fl_Clock.H
colbrowser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-colbrowser.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-colbrowser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-colbrowser.o: ../FL/Fl_Button.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
-colbrowser.o: ../FL/Fl_Valuator.H ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H
-colbrowser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Image.H
+colbrowser.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+colbrowser.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+colbrowser.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Value_Slider.H
+colbrowser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Hold_Browser.H
+colbrowser.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
colbrowser.o: ../FL/Fl_Box.H ../FL/fl_ask.H ../FL/filename.H
color_chooser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-color_chooser.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-color_chooser.o: ../FL/Fl_Window.H ../FL/Fl_Box.H ../FL/Fl_Button.H
-color_chooser.o: ../FL/fl_show_colormap.H ../FL/Fl_Color_Chooser.H
-color_chooser.o: ../FL/Fl_Group.H ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
-color_chooser.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Widget.H
-color_chooser.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Value_Input.H
-color_chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-color_chooser.o: ../FL/Fl_Image.H ../FL/x.H ../FL/Fl_Window.H
-color_chooser.o: ../FL/Fl_Group.H ../FL/fl_draw.H list_visuals.cxx
+color_chooser.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+color_chooser.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/fl_show_colormap.H
+color_chooser.o: ../FL/Fl_Color_Chooser.H ../FL/Fl_Group.H
+color_chooser.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Choice.H
+color_chooser.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H
+color_chooser.o: ../FL/Fl_Image.H ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
+color_chooser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Image.H
+color_chooser.o: ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+color_chooser.o: ../FL/Fl_Bitmap.H ../FL/fl_draw.H list_visuals.cxx
color_chooser.o: ../config.h
cube.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-cube.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
+cube.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
cube.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Radio_Light_Button.H
-cube.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Slider.H
-cube.o: ../FL/Fl_Valuator.H ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
-cube.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/gl.h ../FL/Fl_Sys_Menu_Bar.H
-cube.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-cube.o: ../FL/Fl_Image.H ../FL/x.H ../FL/Fl_Printer.H ../FL/x.H
-cube.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
-cube.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
-cube.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/fl_draw.H
-cube.o: ../FL/Fl_PostScript.H
+cube.o: ../FL/Fl_Light_Button.H ../FL/Fl_Slider.H ../FL/Fl_Gl_Window.H
+cube.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+cube.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/gl.h ../FL/Fl_Sys_Menu_Bar.H
+cube.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/x.H
+cube.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Fl_Paged_Device.H
+cube.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+cube.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+cube.o: ../FL/Fl_RGB_Image.H ../FL/fl_draw.H ../FL/Fl_PostScript.H
CubeMain.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-CubeMain.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H CubeViewUI.h
+CubeMain.o: ../FL/fl_types.h ../FL/Enumerations.H CubeViewUI.h
CubeMain.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-CubeMain.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/Fl_Roller.H
-CubeMain.o: ../FL/Fl_Valuator.H ../FL/Fl_Slider.H ../FL/Fl_Box.H CubeView.h
-CubeMain.o: ../FL/Fl_Gl_Window.H ../FL/gl.h ../FL/Fl_Value_Slider.H
-CubeMain.o: ../FL/Fl_Slider.H
+CubeMain.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+CubeMain.o: ../FL/Fl_Group.H ../FL/Fl_Roller.H ../FL/Fl_Slider.H
+CubeMain.o: ../FL/Fl_Box.H CubeView.h ../FL/Fl_Gl_Window.H ../FL/gl.h
+CubeMain.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
CubeView.o: CubeView.h ../config.h ../FL/Fl.H ../FL/fl_utf8.h
-CubeView.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-CubeView.o: ../FL/Enumerations.H ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
-CubeView.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/gl.h
+CubeView.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+CubeView.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+CubeView.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/gl.h
cursor.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-cursor.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-cursor.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-cursor.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
-cursor.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Choice.H
-cursor.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+cursor.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+cursor.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+cursor.o: ../FL/Fl_Image.H ../FL/Fl_Hor_Value_Slider.H
+cursor.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+cursor.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
cursor.o: ../FL/fl_draw.H ../FL/Fl_Box.H
curve.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-curve.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-curve.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-curve.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
+curve.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+curve.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+curve.o: ../FL/Fl_Image.H ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
curve.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H
curve.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
demo.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-demo.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-demo.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Box.H
-demo.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-demo.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/filename.H ../FL/x.H
+demo.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+demo.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+demo.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+demo.o: ../FL/Fl_Menu_Item.H ../FL/filename.H ../FL/x.H
device.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-device.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Overlay_Window.H
+device.o: ../FL/Enumerations.H ../FL/Fl_Overlay_Window.H
device.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-device.o: ../FL/Fl_Widget.H ../FL/Fl_Light_Button.H ../FL/fl_draw.H
-device.o: ../FL/Fl_Clock.H pixmaps/porsche.xpm ../FL/Fl_Pixmap.H
-device.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Round_Button.H
-device.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Printer.H
-device.o: ../FL/x.H ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H
-device.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-device.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H ../FL/Fl_PostScript.H
-device.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H ../FL/Fl_Group.H
-device.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-device.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
-device.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-device.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-device.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-device.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
-device.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+device.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+device.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+device.o: ../FL/Fl_Radio_Round_Button.H ../FL/Fl_Round_Button.H
+device.o: ../FL/Fl_Light_Button.H ../FL/fl_draw.H ../FL/Fl_Clock.H
+device.o: pixmaps/porsche.xpm ../FL/Fl_Pixmap.H ../FL/Fl_Bitmap.H
+device.o: ../FL/Fl_Round_Button.H ../FL/Fl_Printer.H ../FL/x.H
+device.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+device.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
+device.o: ../FL/Fl_Window.H ../FL/Fl_PostScript.H ../FL/Fl_Copy_Surface.H
+device.o: ../FL/Fl_Image_Surface.H ../FL/Fl_File_Chooser.H
+device.o: ../FL/Fl_Double_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
+device.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H
+device.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+device.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+device.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+device.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H ../FL/Fl_Box.H
+device.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
device.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H
doublebuffer.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-doublebuffer.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Single_Window.H
+doublebuffer.o: ../FL/Enumerations.H ../FL/Fl_Single_Window.H
doublebuffer.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-doublebuffer.o: ../FL/Fl_Double_Window.H ../FL/Fl_Box.H ../FL/fl_draw.H
-doublebuffer.o: ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-doublebuffer.o: ../FL/math.h
+doublebuffer.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Double_Window.H
+doublebuffer.o: ../FL/Fl_Box.H ../FL/fl_draw.H ../FL/Fl_Hor_Slider.H
+doublebuffer.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/math.h
editor.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-editor.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Group.H
-editor.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-editor.o: ../FL/Fl_Widget.H ../FL/fl_ask.H ../FL/Fl_Native_File_Chooser.H
-editor.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-editor.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H
-editor.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
-editor.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-editor.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-editor.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H ../FL/Fl_Box.H
-editor.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-editor.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-editor.o: ../FL/Fl_Return_Button.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Text_Buffer.H
-editor.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H ../FL/fl_draw.H
-editor.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-editor.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-editor.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
-editor.o: ../FL/Fl_Text_Buffer.H ../FL/filename.H
+editor.o: ../FL/Enumerations.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+editor.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+editor.o: ../FL/Fl_Group.H ../FL/Fl_Double_Window.H ../FL/fl_ask.H
+editor.o: ../FL/Fl_Native_File_Chooser.H ../FL/Fl_File_Chooser.H
+editor.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+editor.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
+editor.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
+editor.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+editor.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
+editor.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
+editor.o: ../FL/Fl_Light_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
+editor.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Menu_Bar.H
+editor.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Editor.H
+editor.o: ../FL/Fl_Text_Display.H ../FL/fl_draw.H ../FL/Enumerations.H
+editor.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+editor.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+editor.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Text_Buffer.H
+editor.o: ../FL/filename.H
fast_slow.o: fast_slow.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fast_slow.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fast_slow.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fast_slow.o: ../FL/Fl_Widget.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+fast_slow.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+fast_slow.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fast_slow.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Slider.H
fast_slow.o: ../FL/Fl_Box.H
file_chooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl.H ../FL/fl_utf8.h
-file_chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Xutf8.h
-file_chooser.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-file_chooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+file_chooser.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Enumerations.H
+file_chooser.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+file_chooser.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
file_chooser.o: ../FL/Fl_Group.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-file_chooser.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H
-file_chooser.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+file_chooser.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
+file_chooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
file_chooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
file_chooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
file_chooser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
file_chooser.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
-file_chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-file_chooser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-file_chooser.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/Fl_File_Icon.H
-file_chooser.o: ../FL/Fl_Shared_Image.H ../FL/Fl_PNM_Image.H
-file_chooser.o: ../FL/Fl_Light_Button.H
+file_chooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_File_Input.H
+file_chooser.o: ../FL/Fl_Input.H ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
+file_chooser.o: ../FL/fl_ask.H ../FL/Fl_File_Icon.H ../FL/Fl_Shared_Image.H
+file_chooser.o: ../FL/Fl_PNM_Image.H ../FL/Fl_Light_Button.H
fonts.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-fonts.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-fonts.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Tile.H
-fonts.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
-fonts.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-fonts.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/Fl_Box.H ../FL/fl_ask.H
+fonts.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+fonts.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+fonts.o: ../FL/Fl_Image.H ../FL/Fl_Tile.H ../FL/Fl_Hold_Browser.H
+fonts.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
+fonts.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/Fl_Box.H
+fonts.o: ../FL/fl_ask.H
forms.o: ../FL/forms.H ../FL/Fl.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
forms.o: ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/fl_types.h
-forms.o: ../FL/Fl_Window.H ../FL/fl_draw.H ../FL/x.H ../FL/Xutf8.h
-forms.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
+forms.o: ../FL/Fl_Window.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/fl_draw.H
+forms.o: ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Device.H
forms.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-forms.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-forms.o: ../FL/Fl_RGB_Image.H ../FL/Fl_FormsBitmap.H ../FL/Fl_Bitmap.H
-forms.o: ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H ../FL/Fl_Box.H
-forms.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-forms.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl.H ../FL/fl_utf8.h
-forms.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Round_Button.H
-forms.o: ../FL/Fl_Check_Button.H ../FL/Fl_Chart.H ../FL/Fl_Choice.H
-forms.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Clock.H
-forms.o: ../FL/Fl_Counter.H ../FL/Fl_Dial.H ../FL/Fl_Free.H ../FL/fl_ask.H
-forms.o: ../FL/fl_show_colormap.H ../FL/filename.H ../FL/Fl_File_Chooser.H
-forms.o: ../FL/Fl_Double_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
-forms.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
-forms.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_File_Icon.H
-forms.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H
-forms.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
-forms.o: ../FL/fl_ask.H ../FL/Fl_Input.H ../FL/Fl_Menu_Button.H
-forms.o: ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H ../FL/Fl_Timer.H
-forms.o: pixmaps/srs.xbm
+forms.o: ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H
+forms.o: ../FL/Fl_FormsBitmap.H ../FL/Fl_FormsPixmap.H ../FL/Fl_Pixmap.H
+forms.o: ../FL/Fl_Box.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+forms.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+forms.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+forms.o: ../FL/Fl_Round_Button.H ../FL/Fl_Check_Button.H ../FL/Fl_Chart.H
+forms.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+forms.o: ../FL/Fl_Clock.H ../FL/Fl_Counter.H ../FL/Fl_Dial.H ../FL/Fl_Free.H
+forms.o: ../FL/fl_ask.H ../FL/fl_show_colormap.H ../FL/filename.H
+forms.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H ../FL/Fl_Group.H
+forms.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
+forms.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
+forms.o: ../FL/Fl_File_Icon.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
+forms.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Return_Button.H
+forms.o: ../FL/fl_ask.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+forms.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Positioner.H ../FL/Fl_Value_Slider.H
+forms.o: ../FL/Fl_Timer.H pixmaps/srs.xbm
fractals.o: ../config.h ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
fractals.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
fractals.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fractals.o: ../FL/Fl_Widget.H ../FL/glu.h fracviewer.h ../FL/Fl_Button.H
-fractals.o: ../FL/Fl_Group.H ../FL/Fl_Window.H
+fractals.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/glu.h
+fractals.o: fracviewer.h ../FL/Fl_Button.H ../FL/Fl_Group.H ../FL/Fl_Window.H
fullscreen.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-fullscreen.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-fullscreen.o: ../FL/Fl_Single_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-fullscreen.o: ../FL/Fl_Widget.H ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H
-fullscreen.o: ../FL/Fl_Valuator.H ../FL/Fl_Toggle_Light_Button.H
-fullscreen.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/math.h
-fullscreen.o: ../FL/gl.h ../FL/Fl_Gl_Window.H
+fullscreen.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Single_Window.H
+fullscreen.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+fullscreen.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Hor_Slider.H
+fullscreen.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Input.H
+fullscreen.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+fullscreen.o: ../FL/Fl_Toggle_Light_Button.H ../FL/Fl_Light_Button.H
+fullscreen.o: ../FL/math.h ../FL/fl_ask.H ../FL/Fl_Browser.H ../FL/gl.h
+fullscreen.o: ../FL/Fl_Gl_Window.H
gl_overlay.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-gl_overlay.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-gl_overlay.o: ../FL/Fl_Window.H ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H
-gl_overlay.o: ../FL/Fl_Valuator.H ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
-gl_overlay.o: ../FL/math.h ../FL/gl.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
-gl_overlay.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H
+gl_overlay.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+gl_overlay.o: ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+gl_overlay.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H ../FL/math.h
+gl_overlay.o: ../FL/gl.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+gl_overlay.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+gl_overlay.o: ../FL/Fl_Image.H
glpuzzle.o: ../config.h ../FL/glut.H ../FL/gl.h ../FL/Enumerations.H
glpuzzle.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl.H
glpuzzle.o: ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-glpuzzle.o: ../FL/Fl_Widget.H ../FL/glu.h trackball.c trackball.h
+glpuzzle.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/glu.h
+glpuzzle.o: trackball.c trackball.h
hello.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-hello.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Box.H
+hello.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Box.H
help.o: ../FL/Fl_Help_Dialog.H ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-help.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-help.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-help.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/Fl_Button.H ../FL/Fl_Input.H
-help.o: ../FL/Fl_Input_.H ../FL/Fl_Box.H ../FL/Fl_Help_View.H ../FL/Fl.H
+help.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+help.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+help.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Group.H ../FL/Fl_Button.H
+help.o: ../FL/Fl_Input.H ../FL/Fl_Box.H ../FL/Fl_Help_View.H ../FL/Fl.H
help.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
help.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
help.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-help.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
+help.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
help.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H ../FL/filename.H
+icon.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
+icon.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+icon.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+icon.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+icon.o: ../FL/Fl_RGB_Image.H
iconize.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-iconize.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-iconize.o: ../FL/Fl_Button.H ../FL/Fl_Box.H
+iconize.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Button.H
+iconize.o: ../FL/Fl_Box.H
image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-image.o: ../FL/Fl_Button.H ../FL/Fl_Image.H ../FL/Fl_Toggle_Button.H
-image.o: ../FL/Fl_Button.H ../FL/x.H list_visuals.cxx ../config.h
+image.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+image.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+image.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Image.H
+image.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H ../FL/x.H
+image.o: list_visuals.cxx ../config.h
inactive.o: inactive.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-inactive.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-inactive.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-inactive.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/Fl_Button.H
-inactive.o: ../FL/Fl_Light_Button.H ../FL/Fl_Check_Button.H
-inactive.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Round_Button.H
-inactive.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Input.H
-inactive.o: ../FL/Fl_Input_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
-inactive.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Value_Output.H
-inactive.o: ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H ../FL/Fl_Roller.H
-inactive.o: ../FL/Fl_Dial.H ../FL/Fl_Clock.H
+inactive.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+inactive.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+inactive.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Group.H
+inactive.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+inactive.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+inactive.o: ../FL/Fl_Round_Button.H ../FL/Fl_Slider.H ../FL/Fl_Input.H
+inactive.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+inactive.o: ../FL/Fl_Value_Output.H ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
+inactive.o: ../FL/Fl_Roller.H ../FL/Fl_Dial.H ../FL/Fl_Valuator.H
+inactive.o: ../FL/Fl_Clock.H
input.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-input.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-input.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Float_Input.H
-input.o: ../FL/Fl_Input.H ../FL/Fl_Int_Input.H ../FL/Fl_Secret_Input.H
+input.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Input.H
+input.o: ../FL/Fl_Float_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+input.o: ../FL/Fl_Int_Input.H ../FL/Fl_Secret_Input.H
input.o: ../FL/Fl_Multiline_Input.H ../FL/Fl_Button.H
input.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
input.o: ../FL/Fl_Color_Chooser.H ../FL/Fl_Group.H ../FL/Fl_Box.H
input.o: ../FL/Fl_Return_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-input.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+input.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
input.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
input_choice.o: ../FL/Fl_Button.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
input_choice.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Enumerations.H
-input_choice.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Input_Choice.H
-input_choice.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Xutf8.h ../FL/Fl_Group.H
-input_choice.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Menu_Button.H
-input_choice.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
+input_choice.o: ../FL/Fl_Export.H ../FL/fl_types.h ../FL/Fl_Bitmap.H
+input_choice.o: ../FL/Fl_Image.H ../FL/Fl_Input_Choice.H ../FL/Fl.H
+input_choice.o: ../FL/fl_utf8.h ../FL/Fl_Group.H ../FL/Fl_Input.H
+input_choice.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
input_choice.o: ../FL/fl_draw.H
keyboard.o: keyboard_ui.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-keyboard.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H keyboard.h
+keyboard.o: ../FL/fl_types.h ../FL/Enumerations.H keyboard.h
keyboard.o: ../FL/Fl_Window.H ../FL/Fl_Button.H ../FL/Fl_Output.H
keyboard.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Box.H ../FL/Fl_Dial.H
+keyboard.o: ../FL/Fl_Valuator.H
label.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-label.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-label.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Box.H
-label.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
-label.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Toggle_Button.H
-label.o: ../FL/Fl_Button.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+label.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+label.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+label.o: ../FL/Fl_Image.H ../FL/Fl_Box.H ../FL/Fl_Hor_Value_Slider.H
+label.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+label.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H ../FL/Fl_Input.H
label.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-label.o: ../FL/Fl_Image.H ../FL/Fl_Pixmap.H ../FL/fl_draw.H pixmaps/blast.xpm
+label.o: ../FL/Fl_Pixmap.H ../FL/fl_draw.H pixmaps/blast.xpm
line_style.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-line_style.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-line_style.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-line_style.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-line_style.o: ../FL/fl_draw.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-line_style.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Check_Button.H
-line_style.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Box.H
+line_style.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+line_style.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+line_style.o: ../FL/Fl_Image.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
+line_style.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/Fl_Choice.H
+line_style.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Check_Button.H
+line_style.o: ../FL/Fl_Light_Button.H ../FL/Fl_Box.H
list_visuals.o: ../config.h
mandelbrot.o: mandelbrot_ui.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-mandelbrot.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-mandelbrot.o: mandelbrot.h ../FL/Fl_Box.H ../FL/Fl_Slider.H
-mandelbrot.o: ../FL/Fl_Valuator.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
-mandelbrot.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Input.H
-mandelbrot.o: ../FL/Fl_Input_.H ../FL/Fl_Window.H ../FL/Fl_Float_Input.H
-mandelbrot.o: ../FL/Fl_Input.H ../FL/fl_draw.H ../FL/Fl_Button.H
+mandelbrot.o: ../FL/fl_types.h ../FL/Enumerations.H mandelbrot.h
+mandelbrot.o: ../FL/Fl_Box.H ../FL/Fl_Slider.H ../FL/Fl_Double_Window.H
+mandelbrot.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+mandelbrot.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Input.H
+mandelbrot.o: ../FL/Fl_Window.H ../FL/Fl_Float_Input.H ../FL/Fl_Input.H
+mandelbrot.o: ../FL/Fl_Input_.H ../FL/fl_draw.H ../FL/Fl_Button.H
mandelbrot.o: ../FL/Fl_Printer.H ../FL/x.H ../FL/Fl_Paged_Device.H
mandelbrot.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
-mandelbrot.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
-mandelbrot.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_PostScript.H
+mandelbrot.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Pixmap.H
+mandelbrot.o: ../FL/Fl_RGB_Image.H ../FL/Fl_PostScript.H
menubar.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-menubar.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Box.H
-menubar.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-menubar.o: ../FL/Fl_Widget.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H
-menubar.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Toggle_Button.H
-menubar.o: ../FL/Fl_Button.H ../FL/Fl_Menu_Button.H ../FL/Fl_Choice.H
-menubar.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h ../FL/fl_draw.H
+menubar.o: ../FL/Enumerations.H ../FL/Fl_Box.H ../FL/Fl_Double_Window.H
+menubar.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+menubar.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Sys_Menu_Bar.H
+menubar.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+menubar.o: ../FL/x.H ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
+menubar.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Choice.H ../src/flstring.h
+menubar.o: ../FL/Fl_Export.H ../config.h ../FL/fl_draw.H
message.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-message.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-message.o: ../FL/fl_ask.H
+message.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/fl_ask.H
minimum.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-minimum.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-minimum.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-minimum.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Box.H
+minimum.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+minimum.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+minimum.o: ../FL/Fl_Image.H ../FL/Fl_Slider.H ../FL/Fl_Box.H
minimum.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
native-filechooser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-native-filechooser.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-native-filechooser.o: ../FL/fl_ask.H ../FL/Fl_Window.H ../FL/Fl_Button.H
-native-filechooser.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Box.H
-native-filechooser.o: ../FL/Fl_Native_File_Chooser.H ../FL/Fl_File_Chooser.H
-native-filechooser.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
-native-filechooser.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Group.H
+native-filechooser.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/fl_ask.H
+native-filechooser.o: ../FL/Fl_Window.H ../FL/Fl_Button.H ../FL/Fl_Input.H
+native-filechooser.o: ../FL/Fl_Box.H ../FL/Fl_Native_File_Chooser.H
+native-filechooser.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H
+native-filechooser.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+native-filechooser.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Group.H
native-filechooser.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-native-filechooser.o: ../FL/Fl_Image.H ../FL/Fl_Menu_Button.H
-native-filechooser.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
-native-filechooser.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-native-filechooser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-native-filechooser.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-native-filechooser.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
-native-filechooser.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
-native-filechooser.o: ../FL/Fl_Button.H ../FL/Fl_File_Input.H
-native-filechooser.o: ../FL/Fl_Return_Button.H
+native-filechooser.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Preferences.H
+native-filechooser.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
+native-filechooser.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+native-filechooser.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+native-filechooser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
+native-filechooser.o: ../FL/filename.H ../FL/Fl_Check_Button.H
+native-filechooser.o: ../FL/Fl_Light_Button.H ../FL/Fl_File_Input.H
+native-filechooser.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
navigation.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-navigation.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-navigation.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Light_Button.H
+navigation.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Input.H
+navigation.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
output.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-output.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Value_Input.H
-output.o: ../FL/Fl_Valuator.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-output.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-output.o: ../FL/Fl_Widget.H ../FL/Fl_Box.H ../FL/Fl_Hor_Value_Slider.H
-output.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Toggle_Button.H
-output.o: ../FL/Fl_Button.H ../FL/Fl_Input.H ../FL/fl_draw.H
-output.o: ../FL/Fl_Output.H ../FL/Fl_Multiline_Output.H ../FL/Fl_Output.H
+output.o: ../FL/Enumerations.H ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
+output.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Double_Window.H
+output.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+output.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Box.H
+output.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
+output.o: ../FL/Fl_Slider.H ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
+output.o: ../FL/Fl_Input.H ../FL/fl_draw.H ../FL/Fl_Output.H
+output.o: ../FL/Fl_Multiline_Output.H ../FL/Fl_Output.H
overlay.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-overlay.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-overlay.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
-overlay.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+overlay.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Overlay_Window.H
+overlay.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+overlay.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
overlay.o: ../FL/Fl_Button.H ../FL/fl_draw.H
pack.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-pack.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Button.H
-pack.o: ../FL/Fl_Light_Button.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
-pack.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Scroll.H
-pack.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-pack.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
+pack.o: ../FL/Enumerations.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+pack.o: ../FL/Fl_Button.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+pack.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+pack.o: ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+pack.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Slider.H ../FL/Fl_Pack.H
+pack.o: ../FL/Fl_Group.H
pixmap_browser.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-pixmap_browser.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-pixmap_browser.o: ../FL/Fl_Box.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
-pixmap_browser.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Button.H
-pixmap_browser.o: ../FL/Fl_Shared_Image.H ../FL/Fl_Image.H
+pixmap_browser.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Box.H
+pixmap_browser.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+pixmap_browser.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+pixmap_browser.o: ../FL/Fl_Button.H ../FL/Fl_Shared_Image.H
pixmap_browser.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
pixmap_browser.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
pixmap_browser.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Preferences.H
@@ -406,172 +431,186 @@ pixmap_browser.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
pixmap_browser.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
pixmap_browser.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
pixmap_browser.o: ../FL/filename.H ../FL/Fl_Check_Button.H
-pixmap_browser.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
-pixmap_browser.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-pixmap_browser.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H ../FL/fl_message.H
-pixmap_browser.o: ../FL/fl_ask.H
+pixmap_browser.o: ../FL/Fl_Light_Button.H ../FL/Fl_File_Input.H
+pixmap_browser.o: ../FL/Fl_Input.H ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
+pixmap_browser.o: ../FL/fl_ask.H ../FL/fl_message.H ../FL/fl_ask.H
pixmap.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-pixmap.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-pixmap.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-pixmap.o: ../FL/Fl_Button.H ../FL/Fl_Pixmap.H ../FL/Fl_Image.H
+pixmap.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+pixmap.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+pixmap.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Pixmap.H
pixmap.o: pixmaps/porsche.xpm ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
pixmap.o: ../FL/Fl_Multi_Label.H
preferences.o: preferences.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-preferences.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-preferences.o: ../FL/Fl_Preferences.H ../FL/Fl_Double_Window.H
-preferences.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+preferences.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Preferences.H
+preferences.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
+preferences.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
preferences.o: ../FL/Fl_Button.H ../FL/Fl_Group.H ../FL/Fl_Input.H
-preferences.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-preferences.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Round_Button.H
-preferences.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Box.H
+preferences.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+preferences.o: ../FL/Fl_Round_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Box.H
preferences.o: ../FL/Fl_Check_Button.H ../FL/Fl_Int_Input.H ../FL/Fl_Input.H
-preferences.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-preferences.o: ../FL/filename.H ../FL/fl_ask.H
+preferences.o: ../FL/Fl_Input_.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
+preferences.o: ../FL/Fl_Valuator.H ../FL/filename.H ../FL/fl_ask.H
device.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-device.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Overlay_Window.H
+device.o: ../FL/Enumerations.H ../FL/Fl_Overlay_Window.H
device.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-device.o: ../FL/Fl_Widget.H ../FL/Fl_Light_Button.H ../FL/fl_draw.H
-device.o: ../FL/Fl_Clock.H pixmaps/porsche.xpm ../FL/Fl_Pixmap.H
-device.o: ../FL/Fl_Image.H ../FL/Fl_Bitmap.H ../FL/Fl_Round_Button.H
-device.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Printer.H
-device.o: ../FL/x.H ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H
-device.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-device.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Window.H ../FL/Fl_PostScript.H
-device.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H ../FL/Fl_Group.H
-device.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
-device.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
-device.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
-device.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-device.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-device.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
-device.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+device.o: ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+device.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+device.o: ../FL/Fl_Radio_Round_Button.H ../FL/Fl_Round_Button.H
+device.o: ../FL/Fl_Light_Button.H ../FL/fl_draw.H ../FL/Fl_Clock.H
+device.o: pixmaps/porsche.xpm ../FL/Fl_Pixmap.H ../FL/Fl_Bitmap.H
+device.o: ../FL/Fl_Round_Button.H ../FL/Fl_Printer.H ../FL/x.H
+device.o: ../FL/Fl_Paged_Device.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+device.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_RGB_Image.H
+device.o: ../FL/Fl_Window.H ../FL/Fl_PostScript.H ../FL/Fl_Copy_Surface.H
+device.o: ../FL/Fl_Image_Surface.H ../FL/Fl_File_Chooser.H
+device.o: ../FL/Fl_Double_Window.H ../FL/Fl_Group.H ../FL/Fl_Choice.H
+device.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H
+device.o: ../FL/Fl_Button.H ../FL/Fl_Preferences.H ../FL/Fl_Tile.H
+device.o: ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
+device.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+device.o: ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H ../FL/Fl_Box.H
+device.o: ../FL/Fl_Check_Button.H ../FL/Fl_File_Input.H ../FL/Fl_Input.H
device.o: ../FL/Fl_Return_Button.H ../FL/fl_ask.H
radio.o: radio.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-radio.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-radio.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-radio.o: ../FL/Fl_Widget.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
-radio.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Check_Button.H
-radio.o: ../FL/Fl_Light_Button.H ../FL/Fl_Round_Button.H ../FL/Fl_Group.H
-radio.o: ../FL/Fl_Output.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+radio.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+radio.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+radio.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Button.H
+radio.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
+radio.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+radio.o: ../FL/Fl_Round_Button.H ../FL/Fl_Group.H ../FL/Fl_Output.H
+radio.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H
resizebox.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-resizebox.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-resizebox.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-resizebox.o: ../FL/Fl_Box.H ../FL/Fl_Radio_Button.H ../FL/Fl_Button.H
-resizebox.o: ../FL/fl_draw.H ../FL/fl_message.H ../FL/fl_ask.H
+resizebox.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+resizebox.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+resizebox.o: ../FL/Fl_Image.H ../FL/Fl_Box.H ../FL/Fl_Radio_Button.H
+resizebox.o: ../FL/Fl_Button.H ../FL/fl_draw.H ../FL/fl_message.H
+resizebox.o: ../FL/fl_ask.H
resize.o: resize.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-resize.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-resize.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-resize.o: ../FL/Fl_Widget.H ../FL/Fl_Button.H ../FL/Fl_Box.H
+resize.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+resize.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+resize.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Box.H
rotated_text.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-rotated_text.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+rotated_text.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
rotated_text.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-rotated_text.o: ../FL/Fl_Box.H ../FL/Fl_Hor_Value_Slider.H
-rotated_text.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+rotated_text.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Box.H
+rotated_text.o: ../FL/Fl_Hor_Value_Slider.H ../FL/Fl_Value_Slider.H
+rotated_text.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
rotated_text.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H ../FL/Fl_Input.H
-rotated_text.o: ../FL/Fl_Input_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-rotated_text.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/fl_draw.H
+rotated_text.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+rotated_text.o: ../FL/fl_draw.H
scroll.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-scroll.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-scroll.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-scroll.o: ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
-scroll.o: ../FL/Fl_Valuator.H ../FL/Fl_Light_Button.H ../FL/Fl_Choice.H
-scroll.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
-scroll.o: ../FL/Fl_Box.H ../FL/fl_draw.H ../FL/math.h
+scroll.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+scroll.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+scroll.o: ../FL/Fl_Image.H ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H
+scroll.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Light_Button.H
+scroll.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
+scroll.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Box.H ../FL/fl_draw.H ../FL/math.h
shape.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-shape.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-shape.o: ../FL/Fl_Window.H ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H
-shape.o: ../FL/Fl_Valuator.H ../FL/math.h ../FL/gl.h ../FL/Fl_Gl_Window.H
-shape.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+shape.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Window.H
+shape.o: ../FL/Fl_Hor_Slider.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
+shape.o: ../FL/math.h ../FL/gl.h ../FL/Fl_Gl_Window.H ../FL/Fl_Window.H
+shape.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+shape.o: ../FL/Fl_Image.H
subwindow.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-subwindow.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-subwindow.o: ../FL/Fl_Toggle_Button.H ../FL/Fl_Button.H
-subwindow.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Widget.H
-subwindow.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Box.H
-subwindow.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H
+subwindow.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Toggle_Button.H
+subwindow.o: ../FL/Fl_Button.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
+subwindow.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
+subwindow.o: ../FL/Fl_Box.H ../FL/Fl_Input.H
sudoku.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-sudoku.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Enumerations.H
-sudoku.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-sudoku.o: ../FL/Fl_Widget.H ../FL/Fl_Button.H ../FL/Fl_Group.H ../FL/fl_ask.H
-sudoku.o: ../FL/fl_draw.H ../FL/Fl_Help_Dialog.H ../FL/Fl_Input.H
-sudoku.o: ../FL/Fl_Input_.H ../FL/Fl_Box.H ../FL/Fl_Help_View.H ../FL/Fl.H
-sudoku.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
-sudoku.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H ../FL/Fl_Device.H
-sudoku.o: ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H ../FL/Fl_Image.H
-sudoku.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Pixmap.H
-sudoku.o: ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H ../FL/filename.H
-sudoku.o: ../FL/Fl_Preferences.H ../FL/Fl_Sys_Menu_Bar.H ../FL/Fl_Menu_Bar.H
-sudoku.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/x.H ../FL/math.h
-sudoku.o: pixmaps/sudoku.xbm ../config.h
+sudoku.o: ../FL/Enumerations.H ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+sudoku.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+sudoku.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Button.H
+sudoku.o: ../FL/Fl_Group.H ../FL/fl_ask.H ../FL/fl_draw.H
+sudoku.o: ../FL/Fl_Help_Dialog.H ../FL/Fl_Input.H ../FL/Fl_Box.H
+sudoku.o: ../FL/Fl_Help_View.H ../FL/Fl.H ../FL/Fl_Scrollbar.H
+sudoku.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H ../FL/x.H
+sudoku.o: ../FL/Fl_Window.H ../FL/Fl_Device.H ../FL/Fl_Plugin.H
+sudoku.o: ../FL/Fl_Preferences.H ../FL/Fl_Image.H ../FL/Fl_Bitmap.H
+sudoku.o: ../FL/Fl_Pixmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Shared_Image.H
+sudoku.o: ../FL/filename.H ../FL/Fl_Preferences.H ../FL/Fl_Sys_Menu_Bar.H
+sudoku.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/x.H
+sudoku.o: ../FL/math.h pixmaps/sudoku.xbm ../config.h
symbols.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-symbols.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-symbols.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-symbols.o: ../FL/Fl_Box.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
-symbols.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H
+symbols.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+symbols.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+symbols.o: ../FL/Fl_Image.H ../FL/Fl_Box.H ../FL/Fl_Value_Slider.H
+symbols.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H
table.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-table.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Window.H
-table.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Check_Button.H
-table.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Choice.H
-table.o: ../FL/Fl_Menu_.H ../FL/Fl_Widget.H ../FL/Fl_Menu_Item.H
+table.o: ../FL/Enumerations.H ../FL/Fl_Window.H ../FL/Fl_Input.H
+table.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Choice.H
+table.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H
table.o: ../FL/Fl_Image.H ../FL/fl_draw.H ../FL/fl_ask.H ../FL/Fl_Table_Row.H
table.o: ../FL/Fl_Table.H ../FL/Fl_Group.H ../FL/Fl_Scroll.H ../FL/Fl_Group.H
table.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
table.o: ../FL/Fl_Box.H ../FL/Fl_Scrollbar.H
tabs.o: tabs.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-tabs.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-tabs.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Box.H
-tabs.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
+tabs.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+tabs.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+tabs.o: ../FL/Fl_Box.H ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Input.H
tabs.o: ../FL/Fl_Button.H ../FL/fl_ask.H ../FL/Fl_Clock.H ../FL/Fl_Wizard.H
tabs.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
threads.o: ../config.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-threads.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-threads.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-threads.o: ../FL/Fl_Widget.H ../FL/Fl_Browser.H ../FL/Fl_Value_Output.H
-threads.o: ../FL/fl_ask.H threads.h
+threads.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+threads.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+threads.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Browser.H
+threads.o: ../FL/Fl_Value_Output.H ../FL/fl_ask.H threads.h
tile.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-tile.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-tile.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Tile.H
-tile.o: ../FL/Fl_Box.H
+tile.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+tile.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
+tile.o: ../FL/Fl_Tile.H ../FL/Fl_Box.H
tiled_image.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-tiled_image.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+tiled_image.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H
tiled_image.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
-tiled_image.o: ../FL/Fl_Button.H ../FL/Fl_Pixmap.H ../FL/Fl_Image.H
-tiled_image.o: ../FL/Fl_Tiled_Image.H pixmaps/tile.xpm ../FL/x.H
-tiled_image.o: list_visuals.cxx ../config.h
+tiled_image.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Button.H
+tiled_image.o: ../FL/Fl_Pixmap.H ../FL/Fl_Tiled_Image.H pixmaps/tile.xpm
+tiled_image.o: ../FL/x.H list_visuals.cxx ../config.h
tree.o: tree.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-tree.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Pixmap.H ../FL/Fl_Image.H
-tree.o: ../FL/Fl_Group.H ../FL/Fl_Tree.H ../FL/Fl_Scrollbar.H ../FL/fl_draw.H
-tree.o: ../FL/Fl_Tree_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
-tree.o: ../FL/Fl_Tree_Item_Array.H ../FL/Fl_Tree_Prefs.H ../FL/fl_ask.H
-tree.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/Fl_File_Chooser.H
-tree.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-tree.o: ../FL/Fl_Widget.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-tree.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H
-tree.o: ../FL/Fl_Preferences.H ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H
-tree.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
-tree.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H
-tree.o: ../FL/filename.H ../FL/Fl_Box.H ../FL/Fl_Check_Button.H
-tree.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_File_Input.H
-tree.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
-tree.o: ../FL/Fl_Color_Chooser.H ../FL/Fl_Value_Input.H ../FL/Fl_Input.H
+tree.o: ../FL/Enumerations.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
+tree.o: ../FL/Fl_Pixmap.H ../FL/Fl_Image.H ../FL/Fl_Group.H ../FL/Fl_Tree.H
+tree.o: ../FL/Fl_Scrollbar.H ../FL/fl_draw.H ../FL/Fl_Tree_Item.H
+tree.o: ../FL/Fl_Image.H ../FL/Fl_Tree_Item_Array.H ../FL/Fl_Tree_Prefs.H
+tree.o: ../FL/fl_ask.H ../FL/fl_message.H ../FL/fl_ask.H
+tree.o: ../FL/Fl_File_Chooser.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+tree.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+tree.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
+tree.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Button.H ../FL/Fl_Preferences.H
+tree.o: ../FL/Fl_Tile.H ../FL/Fl_File_Browser.H ../FL/Fl_Browser.H
+tree.o: ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
+tree.o: ../FL/Fl_Valuator.H ../FL/Fl_File_Icon.H ../FL/Fl.H ../FL/filename.H
+tree.o: ../FL/Fl_Box.H ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
+tree.o: ../FL/Fl_File_Input.H ../FL/Fl_Input.H ../FL/Fl_Return_Button.H
+tree.o: ../FL/Fl_Button.H ../FL/Fl_Color_Chooser.H ../FL/Fl_Value_Input.H
+tree.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Text_Display.H
+tree.o: ../FL/fl_draw.H ../FL/x.H ../FL/Enumerations.H ../FL/Fl_Window.H
+tree.o: ../FL/Fl_Device.H ../FL/Fl_Plugin.H ../FL/Fl_Preferences.H
+tree.o: ../FL/Fl_Bitmap.H ../FL/Fl_RGB_Image.H ../FL/Fl_Text_Buffer.H
tree.o: ../FL/Fl_Value_Slider.H ../FL/Fl_Light_Button.H
+twowin.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
+twowin.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+twowin.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H
+twowin.o: ../FL/Fl_Image.H ../FL/Fl_Button.H ../FL/Fl_Input.H
valuators.o: valuators.h ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H
-valuators.o: ../FL/fl_types.h ../FL/Xutf8.h ../FL/Enumerations.H
-valuators.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
-valuators.o: ../FL/Fl_Widget.H ../FL/Fl_Box.H ../FL/Fl_Slider.H
-valuators.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
-valuators.o: ../FL/Fl_Value_Input.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
-valuators.o: ../FL/Fl_Value_Output.H ../FL/Fl_Scrollbar.H ../FL/Fl_Adjuster.H
-valuators.o: ../FL/Fl_Counter.H ../FL/Fl_Spinner.H ../FL/Enumerations.H
-valuators.o: ../FL/Fl_Group.H ../FL/Fl_Input.H ../FL/Fl_Repeat_Button.H
-valuators.o: ../FL/Fl.H ../FL/Fl_Button.H ../FL/Fl_Dial.H ../FL/Fl_Roller.H
+valuators.o: ../FL/fl_types.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
+valuators.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+valuators.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Box.H
+valuators.o: ../FL/Fl_Slider.H ../FL/Fl_Value_Slider.H ../FL/Fl_Slider.H
+valuators.o: ../FL/Fl_Valuator.H ../FL/Fl_Value_Input.H ../FL/Fl_Input.H
+valuators.o: ../FL/Fl_Input_.H ../FL/Fl_Value_Output.H ../FL/Fl_Scrollbar.H
+valuators.o: ../FL/Fl_Adjuster.H ../FL/Fl_Counter.H ../FL/Fl_Spinner.H
+valuators.o: ../FL/Enumerations.H ../FL/Fl_Group.H ../FL/Fl_Input.H
+valuators.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Button.H
+valuators.o: ../FL/Fl_Dial.H ../FL/Fl_Roller.H
utf8.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
-utf8.o: ../FL/Xutf8.h ../FL/Enumerations.H ../FL/Fl_Double_Window.H
-utf8.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+utf8.o: ../FL/Enumerations.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
+utf8.o: ../FL/Fl_Group.H ../FL/Fl_Widget.H ../FL/Fl_Bitmap.H ../FL/Fl_Image.H
utf8.o: ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
utf8.o: ../FL/Fl_Valuator.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
-utf8.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H ../FL/Fl_Input.H
-utf8.o: ../FL/Fl_Input_.H ../FL/Fl_Box.H ../FL/Fl_Tile.H
+utf8.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Input.H ../FL/Fl_Box.H ../FL/Fl_Tile.H
utf8.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
utf8.o: ../FL/Fl_Value_Output.H ../FL/Fl_Button.H ../FL/Fl_Check_Button.H
-utf8.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Output.H
-utf8.o: ../FL/Fl_Input.H ../FL/fl_draw.H ../FL/fl_utf8.h
+utf8.o: ../FL/Fl_Light_Button.H ../FL/Fl_Output.H ../FL/Fl_Input.H
+utf8.o: ../FL/Fl_Input_.H ../FL/fl_draw.H ../FL/fl_utf8.h
+windowfocus.o: ../FL/Fl.H ../FL/fl_utf8.h ../FL/Fl_Export.H ../FL/fl_types.h
+windowfocus.o: ../FL/Enumerations.H ../FL/Fl_Box.H ../FL/Fl_Double_Window.H
+windowfocus.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
+windowfocus.o: ../FL/Fl_Bitmap.H ../FL/Fl_Image.H ../FL/Fl_Input.H
diff --git a/test/mandelbrot_ui.fl b/test/mandelbrot_ui.fl
index 6c6072e..b77c775 100644
--- a/test/mandelbrot_ui.fl
+++ b/test/mandelbrot_ui.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
decl {\#include "mandelbrot.h"} {public local
@@ -13,7 +13,7 @@ class Drawing_Window {open
Function {make_window()} {open return_type void
} {
Fl_Window window {open
- xywh {178 479 450 520} type Single resizable
+ xywh {515 343 450 520} type Single resizable
code0 {o->size_range(220,220);} visible
} {
Fl_Box d {
@@ -25,21 +25,21 @@ class Drawing_Window {open
label {x:}
callback {d->X = atof(o->value());;
d->new_display();}
- xywh {30 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 20 textfont 11 textsize 20
+ xywh {30 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
}
Fl_Input y_input {
label {y:}
callback {d->Y = atof(o->value());
d->new_display();}
- xywh {175 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 20 textfont 11 textsize 20
+ xywh {175 15 125 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
}
Fl_Input w_input {
label {w:}
callback {d->scale = atof(o->value());
d->new_display();}
- xywh {325 15 105 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 20 textfont 11 textsize 20
+ xywh {325 15 105 30} type Float box THIN_DOWN_BOX color 48 selection_color 7 labelfont 11 labelsize 16 textfont 11 textsize 12
code0 {o->when(FL_WHEN_ENTER_KEY|FL_WHEN_RELEASE);}
}
Fl_Slider {} {
@@ -54,7 +54,7 @@ d->new_display();}
Fl_Box {} {
label {left: click = zoom out, drag = zoom in
right click: Julia set, ctrl-P: Print} selected
- xywh {240 50 190 30} labelsize 10 align 24 deactivate
+ xywh {240 50 190 30} labelsize 8 align 24 deactivate
}
Fl_Slider {} {
label {iterations:}
diff --git a/test/native-filechooser.cxx b/test/native-filechooser.cxx
index 76411bc..8f4e68f 100644
--- a/test/native-filechooser.cxx
+++ b/test/native-filechooser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: native-filechooser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: native-filechooser.cxx 9957 2013-08-15 23:01:15Z greg.ercolano $"
//
// Simple test of the Fl_Native_File_Chooser.
//
@@ -28,7 +28,7 @@
// GLOBALS
Fl_Input *G_filename = NULL;
-void Butt_CB(Fl_Widget*, void*) {
+void PickFile_CB(Fl_Widget*, void*) {
// Create native chooser
Fl_Native_File_Chooser native;
native.title("Pick a file");
@@ -51,6 +51,26 @@ void Butt_CB(Fl_Widget*, void*) {
}
}
+void PickDir_CB(Fl_Widget*, void*) {
+ // Create native chooser
+ Fl_Native_File_Chooser native;
+ native.title("Pick a Directory");
+ native.directory(G_filename->value());
+ native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY);
+ // Show native chooser
+ switch ( native.show() ) {
+ case -1: fprintf(stderr, "ERROR: %s\n", native.errmsg()); break; // ERROR
+ case 1: fprintf(stderr, "*** CANCEL\n"); fl_beep(); break; // CANCEL
+ default: // PICKED DIR
+ if ( native.filename() ) {
+ G_filename->value(native.filename());
+ } else {
+ G_filename->value("NULL");
+ }
+ break;
+ }
+}
+
int main(int argc, char **argv) {
//// For a nicer looking browser under linux, call Fl_File_Icon::load_system_icons();
//// (If you do this, you'll need to link with fltk_images)
@@ -79,7 +99,9 @@ int main(int argc, char **argv) {
G_filename->tooltip("Default filename");
y += G_filename->h() + 5;
Fl_Button *but = new Fl_Button(win->w()-80-10, win->h()-25-10, 80, 25, "Pick File");
- but->callback(Butt_CB);
+ but->callback(PickFile_CB);
+ Fl_Button *butdir = new Fl_Button(but->x()-80-10, win->h()-25-10, 80, 25, "Pick Dir");
+ butdir->callback(PickDir_CB);
Fl_Box *dummy = new Fl_Box(80, 0, 430, 100);
dummy->hide();
win->resizable(dummy);
@@ -90,6 +112,6 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: native-filechooser.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: native-filechooser.cxx 9957 2013-08-15 23:01:15Z greg.ercolano $".
//
diff --git a/test/preferences.fl b/test/preferences.fl
index a72ab28..e836eaa 100644
--- a/test/preferences.fl
+++ b/test/preferences.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
decl {\#include <FL/Fl_Preferences.H>} {public local
@@ -45,7 +45,7 @@ Function {} {open return_type int
Fl_Window myWindow {
label {My Preferences}
callback closeWindowCB open
- xywh {709 76 298 311} type Double visible
+ xywh {408 202 298 311} type Double visible
} {
Fl_Button {} {
label Cancel
diff --git a/test/radio.fl b/test/radio.fl
index e8ec5e6..35ad146 100644
--- a/test/radio.fl
+++ b/test/radio.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {button_cb(Fl_Button *b, void *)} {
diff --git a/test/resize.fl b/test/resize.fl
index 3b21801..79c5f63 100644
--- a/test/resize.fl
+++ b/test/resize.fl
@@ -1,11 +1,11 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {} {open
} {
Fl_Window {} {open
- xywh {333 489 366 261} type Double resizable visible
+ xywh {401 207 366 261} type Double resizable visible
} {
Fl_Button {} {
label {@<-}
diff --git a/test/sudoku.app/Contents/Info.plist b/test/sudoku.app/Contents/Info.plist
index 00eeb05..b75285c 100644
--- a/test/sudoku.app/Contents/Info.plist
+++ b/test/sudoku.app/Contents/Info.plist
@@ -40,5 +40,8 @@
<key>CFBundleGetInfoString</key>
<string>1.0, Copyright 2005-2006 by Michael Sweet</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+
</dict>
</plist>
diff --git a/test/sudoku.cxx b/test/sudoku.cxx
index 1fca7a7..de11703 100644
--- a/test/sudoku.cxx
+++ b/test/sudoku.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: sudoku.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: sudoku.cxx 10419 2014-10-30 16:05:22Z AlbrechtS $"
//
// Sudoku game using the Fast Light Tool Kit (FLTK).
//
@@ -90,6 +90,9 @@ class SudokuSound {
// Private, OS-specific data...
#ifdef __APPLE__
AudioDeviceID device;
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
AudioDeviceIOProcID audio_proc_id;
# endif
@@ -415,8 +418,9 @@ SudokuSound::audio_cb(AudioDeviceID device,
}
#endif // __APPLE__
+#define NOTE_DURATION 50
-// Play a note for 250ms...
+// Play a note for <NOTE_DURATION> ms...
void SudokuSound::play(char note) {
Fl::check();
@@ -426,7 +430,7 @@ void SudokuSound::play(char note) {
remaining = sample_size * 2;
// Wait for the sound to complete...
- usleep(50000);
+ usleep(NOTE_DURATION*1000);
#elif defined(WIN32)
if (sample_size) {
@@ -434,8 +438,8 @@ void SudokuSound::play(char note) {
waveOutWrite(device, header_ptr, sizeof(WAVEHDR));
- Sleep(50);
- } else Beep(frequencies[note - 'A'], 50);
+ Sleep(NOTE_DURATION);
+ } else Beep(frequencies[note - 'A'], NOTE_DURATION);
#else
# ifdef HAVE_ALSA_ASOUNDLIB_H
@@ -445,7 +449,7 @@ void SudokuSound::play(char note) {
snd_pcm_prepare(handle);
snd_pcm_writei(handle, sample_data[note - 'A'], sample_size);
}
- usleep(50000);
+ usleep(NOTE_DURATION*1000);
return;
}
# endif // HAVE_ALSA_ASOUNDLIB_H
@@ -460,7 +464,7 @@ void SudokuSound::play(char note) {
// Sound a tone for the given note...
control.bell_percent = 100;
control.bell_pitch = frequencies[note - 'A'];
- control.bell_duration = 50;
+ control.bell_duration = NOTE_DURATION;
XChangeKeyboardControl(fl_display,
KBBellPercent | KBBellPitch | KBBellDuration,
@@ -1333,5 +1337,5 @@ main(int argc, char *argv[]) {
//
-// End of "$Id: sudoku.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: sudoku.cxx 10419 2014-10-30 16:05:22Z AlbrechtS $".
//
diff --git a/test/tabs.fl b/test/tabs.fl
index 29b8b37..0f1393f 100644
--- a/test/tabs.fl
+++ b/test/tabs.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0108
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {} {open
diff --git a/test/threads.cxx b/test/threads.cxx
index 3f4fba5..0a9c86f 100644
--- a/test/threads.cxx
+++ b/test/threads.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: threads.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: threads.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Threading example program for the Fast Light Tool Kit (FLTK).
//
@@ -41,7 +41,7 @@ void magic_number_cb(void *p)
w->redraw_label();
}
-void* prime_func(void* p)
+extern "C" void* prime_func(void* p)
{
Fl_Browser* browser = (Fl_Browser*) p;
Fl_Value_Output *value;
@@ -160,5 +160,5 @@ int main() {
//
-// End of "$Id: threads.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: threads.cxx 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/test/threads.h b/test/threads.h
index 1c8a7a2..c8f29e2 100644
--- a/test/threads.h
+++ b/test/threads.h
@@ -1,5 +1,5 @@
//
-// "$Id: threads.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: threads.h 9980 2013-09-21 16:41:23Z greg.ercolano $"
//
// Simple threading API for the Fast Light Tool Kit (FLTK).
//
@@ -40,8 +40,11 @@
# include <pthread.h>
typedef pthread_t Fl_Thread;
+extern "C" {
+ typedef void *(Fl_Thread_Func)(void *);
+}
-static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
+static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return pthread_create((pthread_t*)&t, 0, f, p);
}
@@ -51,8 +54,11 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
# include <process.h>
typedef unsigned long Fl_Thread;
+extern "C" {
+ typedef void *(__cdecl Fl_Thread_Func)(void *);
+}
-static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
+static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p);
}
@@ -60,13 +66,16 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
# include <process.h>
typedef unsigned long Fl_Thread;
+extern "C" {
+ typedef void *(__cdecl Fl_Thread_Func)(void *);
+}
-static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) {
+static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) {
return t = (Fl_Thread)_beginthread((void(* )( void * ))f, 32000, p);
}
# endif // !HAVE_PTHREAD_H
#endif // !Threads_h
//
-// End of "$Id: threads.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: threads.h 9980 2013-09-21 16:41:23Z greg.ercolano $".
//
diff --git a/test/tile.cxx b/test/tile.cxx
index c6248a1..32ba704 100644
--- a/test/tile.cxx
+++ b/test/tile.cxx
@@ -1,9 +1,9 @@
//
-// "$Id: tile.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: tile.cxx 10385 2014-10-19 14:17:47Z AlbrechtS $"
//
// Tile test program for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -27,19 +27,23 @@ int main(int argc, char** argv) {
Fl_Double_Window window(300,300);
window.box(FL_NO_BOX);
window.resizable(window);
+
+ int dx = 20, dy = dx; // border width of resizable() - see below
Fl_Tile tile(0,0,300,300);
+
Fl_Box box0(0,0,150,150,"0");
box0.box(FL_DOWN_BOX);
box0.color(9);
box0.labelsize(36);
box0.align(FL_ALIGN_CLIP);
+
Fl_Double_Window w1(150,0,150,150,"1");
w1.box(FL_NO_BOX);
- Fl_Box box1(0,0,150,150,"1\nThis is a\nchild\nwindow");
+ Fl_Box box1(0,0,150,150,"1\nThis is a child window");
box1.box(FL_DOWN_BOX);
box1.color(19);
box1.labelsize(18);
- box1.align(FL_ALIGN_CLIP);
+ box1.align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
w1.resizable(box1);
w1.end();
@@ -49,6 +53,7 @@ int main(int argc, char** argv) {
box2a.color(12);
box2a.labelsize(36);
box2a.align(FL_ALIGN_CLIP);
+
Fl_Box box2b(70,150,80,150,"2b");
box2b.box(FL_DOWN_BOX);
box2b.color(13);
@@ -62,27 +67,32 @@ int main(int argc, char** argv) {
box3a.color(12);
box3a.labelsize(36);
box3a.align(FL_ALIGN_CLIP);
+
Fl_Box box3b(150,150+70,150,80,"3b");
box3b.box(FL_DOWN_BOX);
box3b.color(13);
box3b.labelsize(36);
box3b.align(FL_ALIGN_CLIP);
//tile3.end();
-
- Fl_Box r(10,0,300-10,300-10);
+
+ // create the symmetrical resize box with dx and dy pixels distance, resp.
+ // from the borders of the Fl_Tile widget
+ Fl_Box r(tile.x()+dx,tile.y()+dy,tile.w()-2*dx,tile.h()-2*dy);
tile.resizable(r);
// r.box(FL_BORDER_FRAME);
tile.end();
window.end();
-#ifdef TEST_INACTIVE // test inactive case
+
+#ifdef TEST_INACTIVE // test inactive case
tile.deactivate();
#endif
+
w1.show();
window.show(argc,argv);
return Fl::run();
}
//
-// End of "$Id: tile.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: tile.cxx 10385 2014-10-19 14:17:47Z AlbrechtS $".
//
diff --git a/test/trackball.c b/test/trackball.c
index f23d3db..d081dc8 100644
--- a/test/trackball.c
+++ b/test/trackball.c
@@ -94,7 +94,7 @@ vsub(const float *src1, const float *src2, float *dst)
void
vcopy(const float *v1, float *v2)
{
- register int i;
+ int i;
for (i = 0 ; i < 3 ; i++)
v2[i] = v1[i];
}
diff --git a/test/tree.fl b/test/tree.fl
index ebb1b1b..d7a375c 100644
--- a/test/tree.fl
+++ b/test/tree.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0300
+version 1.0303
header_name {.h}
code_name {.cxx}
decl {\#include <stdio.h>} {public global
@@ -8,6 +8,9 @@ decl {\#include <stdio.h>} {public global
decl {\#include <FL/Fl.H>} {public global
}
+decl {\#include <FL/Fl_Tooltip.H>} {public global
+}
+
decl {\#include <FL/Fl_Pixmap.H>} {public global
}
@@ -48,6 +51,7 @@ Function {reason_as_name(Fl_Tree_Reason reason)} {
case FL_TREE_REASON_DESELECTED: return("deselected");
case FL_TREE_REASON_OPENED: return("opened");
case FL_TREE_REASON_CLOSED: return("closed");
+ case FL_TREE_REASON_DRAGGED: return("dragged");
\#if FLTK_ABI_VERSION >= 10301
case FL_TREE_REASON_RESELECTED: return("reselected");
\#endif
@@ -233,11 +237,17 @@ tree->add("Descending/Bbb");
tree->add("Descending/Yyy");
tree->add("Descending/Ccc");
-// Add 500 items in numerical order
+// Add a long line to trigger horiz scrollbar
tree->sortorder(FL_TREE_SORT_NONE);
+tree->add("Long Line")->close();
+tree->add("Long Line/The quick brown fox jumped over the lazy dog. 0123456789");
+tree->add("Long Line/Longer Line")->close();
+tree->add("Long Line/Longer Line/The quick brown fox jumped over the lazy dog. ---------------- 0123456789");
+
+// Add 500 items in numerical order
for ( int t=0; t<500; t++ ) {
static char s[80];
- sprintf(s, "500 Items/item %04d", t);
+ sprintf(s, "500 Items/item %04d", t+1);
tree->add(s);
}
tree->close("500 Items"); // close the 500 items by default
@@ -336,7 +346,7 @@ Function {} {open
} {
Fl_Window window {
label tree open
- xywh {5 44 1045 580} type Double visible
+ xywh {115 293 1045 580} type Double visible
} {
Fl_Group tree {
label Tree
@@ -367,7 +377,7 @@ tree->clear_changed();} open
class Fl_Tree
} {}
Fl_Group {} {open
- xywh {300 5 731 615}
+ xywh {350 5 681 615}
code0 {o->resizable(0);}
} {
Fl_Box {} {
@@ -393,7 +403,7 @@ tree->marginleft(val);
tree->redraw();}
tooltip {Changes the left margin for the tree widget} xywh {505 60 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
code0 {o->value(tree->marginleft());}
- code1 {o->range(0.0, 100.0);}
+ code1 {o->range(0.0, 200.0);}
code2 {o->step(1.0);}
}
Fl_Value_Slider marginbottom_slider {
@@ -409,7 +419,7 @@ tree->redraw();
marginbottom_slider->deactivate(); // deactivate if this ABI feature is disabled
marginbottom_slider->tooltip("DISABLED.\\n"
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
- "to get this feature");
+ "to enable this feature");
\#endif}
tooltip {Changes the bottom margin for the tree
Sets how far beyond bottom of tree you can scroll} xywh {505 80 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
@@ -462,9 +472,11 @@ tree->redraw();
widgetmarginleft_slider->deactivate();
widgetmarginleft_slider->tooltip("DISABLED.\\n"
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
- "to get this feature");
+ "to enable this feature");
\#endif}
- tooltip {Changes the margin to the left of child FLTK widget()} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
+ tooltip {Changes the margin to the left of child FLTK widget()
+"Show label + widget" must be 'on' for this to take effect, i.e.
+item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)} xywh {505 160 155 16} type Horizontal color 46 selection_color 1 labelsize 10 align 4 textsize 9
code0 {o->value(GetTreeWidgetMarginLeft()); // handle ABI feature}
code1 {o->range(0.0, 100.0);}
code2 {o->step(1.0);}
@@ -580,7 +592,7 @@ switch ( collapseicons_chooser->value() ) {
tree->showcollapse(0);
break;
}}
- tooltip {Tests Fl_Tree::openicon() and Fl_Tree::closeicon()} xywh {520 225 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ tooltip {Tests Fl_Tree::openicon(), Fl_Tree::closeicon() and Fl_Tree::showcollapse().} xywh {520 225 140 21} down_box BORDER_BOX labelsize 12 textsize 11
} {
MenuItem {} {
label Normal
@@ -603,7 +615,7 @@ switch ( connectorstyle_chooser->value() ) {
case 1: tree->connectorstyle(FL_TREE_CONNECTOR_DOTTED); break;
case 2: tree->connectorstyle(FL_TREE_CONNECTOR_SOLID); break;
}}
- tooltip {Tests connectorstyle() bit flags} xywh {520 249 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ tooltip {Tests Fl_Tree::connectorstyle() bit flags} xywh {520 249 140 21} down_box BORDER_BOX labelsize 12 textsize 11
code0 {switch (tree->connectorstyle()) { case FL_TREE_CONNECTOR_NONE: connectorstyle_chooser->value(0); break; case FL_TREE_CONNECTOR_DOTTED: connectorstyle_chooser->value(1); break; case FL_TREE_CONNECTOR_SOLID: connectorstyle_chooser->value(2); break; }}
} {
MenuItem {} {
@@ -626,9 +638,14 @@ switch ( selectmode_chooser->value() ) {
case 0: tree->selectmode(FL_TREE_SELECT_NONE); break; // None
case 1: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
case 2: tree->selectmode(FL_TREE_SELECT_MULTI); break; // Multi
+ case 3: tree->selectmode(FL_TREE_SELECT_SINGLE_DRAGGABLE); break; // Single draggable
default: tree->selectmode(FL_TREE_SELECT_SINGLE); break; // Single
-}}
- tooltip {Sets how Fl_Tree handles mouse selection of tree items} xywh {520 273 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+}} open selected
+ tooltip {Tests Fl_Tree::selectmode()
+Sets how Fl_Tree handles mouse selection of tree items.
+ NONE -- Not selectable by keyboard/mouse
+ SINGLE -- Only one item at a time selectable by keyboard/mouse
+ MULTI -- Multiple items selectable} xywh {520 273 140 21} down_box BORDER_BOX labelsize 12 textsize 11
code0 {selectmode_chooser->value(2);}
code1 {cb_selectmode_chooser(selectmode_chooser, (void*)0);}
} {
@@ -644,6 +661,10 @@ switch ( selectmode_chooser->value() ) {
label Multi
xywh {60 60 36 21} labelsize 12
}
+ MenuItem {} {
+ label {Single + drag}
+ xywh {70 70 36 21} labelsize 12
+ }
}
Fl_Choice reselectmode_chooser {
label {Item Reselect Mode}
@@ -659,11 +680,13 @@ switch ( reselectmode_chooser->value() ) {
reselectmode_chooser->deactivate(); // deactivate if this ABI feature is disabled
reselectmode_chooser->tooltip("DISABLED.\\n"
"Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
- "to get this feature");
+ "to enable this feature");
window->redraw(); // deactivated
\#endif}
- tooltip {Enable 'reselect' events
-These happen when mouse drags or multi-clicks an item} xywh {520 297 140 21} down_box BORDER_BOX labelsize 12 textsize 11
+ tooltip {Tests Fl_Tree::item_reselect_mode().
+Enables 'reselect' events.
+These happen when someone selects an item already selected
+(mouse drags or multi-clicks)} xywh {520 297 140 21} down_box BORDER_BOX labelsize 12 textsize 11
code0 {reselectmode_chooser->value(1);}
code1 {reselectmode_chooser->do_callback();}
} {
@@ -727,7 +750,7 @@ tree->visible_focus(onoff);}
}
Fl_Check_Button labelandwidget_radio {
label {Show label + widget}
- callback {\#if FLTK_ABI_VERSION >= 10301
+ callback {\#if FLTK_ABI_VERSION >= 10303
// NEW
int flags = tree->item_draw_mode();
if ( labelandwidget_radio->value() )
@@ -740,18 +763,20 @@ tree->redraw();
// OLD
labelandwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
labelandwidget_radio->tooltip("DISABLED.\\n"
- "Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
- "to get this feature");
+ "Set FLTK_ABI_VERSION to 10303 (or higher)\\n"
+ "to enable this feature");
window->redraw(); // deactivated
\#endif}
- tooltip {Enables both label and widget() for display.
-When enabled, widget should appear to the right of the item's label. By default, the widget() is shown in place of the item's label.} xywh {645 356 20 16} down_box DOWN_BOX labelsize 11 align 7
+ tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
+Enables both label and widget() for display.
+When enabled, widget should appear to the right of the item's label.
+By default, the widget() is shown in place of the item's label.} xywh {645 356 20 16} down_box DOWN_BOX labelsize 11 align 7
code0 {labelandwidget_radio->value(0);}
code1 {labelandwidget_radio->do_callback();}
}
Fl_Check_Button itemheightfromwidget_radio {
label {Item h() from widget}
- callback {\#if FLTK_ABI_VERSION >= 10301
+ callback {\#if FLTK_ABI_VERSION >= 10303
// NEW
int flags = tree->item_draw_mode();
if ( itemheightfromwidget_radio->value() )
@@ -764,11 +789,12 @@ tree->redraw();
// OLD
itemheightfromwidget_radio->deactivate(); // deactivate if this ABI feature is disabled
itemheightfromwidget_radio->tooltip("DISABLED.\\n"
- "Set FLTK_ABI_VERSION to 10301 (or higher)\\n"
- "to get this feature");
+ "Set FLTK_ABI_VERSION to 10303 (or higher)\\n"
+ "to enable this feature");
window->redraw(); // deactivated
\#endif}
- tooltip {If enabled, item's height will track the widget()'s height.
+ tooltip {Tests Fl_Tree::item_draw_mode(FL_TREE_ITEM_HEIGHT_FROM_WIDGET)
+If enabled, item's height will track the widget()'s height.
When enabled, click 'ccc' or 'D1/D2' buttons to test.} xywh {645 371 20 16} down_box DOWN_BOX labelsize 11 align 7
code0 {itemheightfromwidget_radio->value(0);}
code1 {itemheightfromwidget_radio->do_callback();}
@@ -877,7 +903,8 @@ switch ( tree->item_pathname(pathname, sizeof(pathname), item) ) {
case -1: fl_message("item_pathname() returned -1 (NOT FOUND)"); break;
case -2: fl_message("item_pathname() returned -2 (STRING TOO LONG)"); break;
}}
- tooltip {Show the pathname for the selected item. Tests the Fl_Tree::item_pathname() method.} xywh {470 531 95 16} labelsize 9
+ tooltip {Tests Fl_Tree::item_pathname()
+Show the pathname for the selected item.} xywh {470 531 95 16} labelsize 9
}
Fl_Button closeall_button {
label {Close All}
@@ -895,8 +922,8 @@ tree->redraw();}
label {Clear All}
callback {tree->clear();
tree->redraw();}
- tooltip {Clears all items
-Tests Fl_Tree::clear()} xywh {570 471 95 16} labelsize 9
+ tooltip {Tests Fl_Tree::clear().
+Clears all items} xywh {570 471 95 16} labelsize 9
}
Fl_Button testcallbackflag_button {
label {Test Callback Flag}
@@ -1021,7 +1048,9 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Changes the font for the selected items's labels. If none selected, all are changed. Tests Fl_Tree_Item::labelfont();} xywh {863 31 140 21} down_box BORDER_BOX labelsize 11 textsize 11
+ tooltip {Tests Fl_Tree_Item::labelfont();
+Changes the font for the selected items's labels.
+If none selected, all are changed.} xywh {863 31 140 21} down_box BORDER_BOX labelsize 11 textsize 11
code0 {o->value((int)tree->item_labelfont()); // get tree's current font, assign to chooser}
} {
MenuItem {} {
@@ -1112,7 +1141,9 @@ if ( ! count ) {
}
tree->redraw();}
- tooltip {Changes the font size of the selected items's labels. If none selected, all are changed. Tests Fl_Tree_Item::labelsize();} xywh {863 55 140 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 12
+ tooltip {Tests Fl_Tree_Item::labelsize();
+Changes the font size of the selected items's labels.
+If none selected, all are changed.} xywh {863 55 140 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 12
code0 {o->value(tree->item_labelsize());}
code1 {o->range(5.0, 200.0);}
code2 {o->step(1.0);}
@@ -1289,6 +1320,20 @@ tree->redraw();}
tree->redraw();}
tooltip {Deselects all items in the tree} xywh {724 219 95 16} labelsize 9
}
+ Fl_Button nextselected_button {
+ label {next_selected()}
+ callback {printf("--- TEST next_selected():\\n");
+printf(" // Walk down the tree (forwards)\\n");
+ for ( Fl_Tree_Item *i=tree->first_selected_item(); i; i=tree->next_selected_item(i, FL_Down) ) {
+ printf(" Selected item: %s\\n", i->label()?i->label():"<nolabel>");
+ }
+
+printf(" // Walk up the tree (backwards)\\n");
+ for ( Fl_Tree_Item *i=tree->last_selected_item(); i; i=tree->next_selected_item(i, FL_Up) ) {
+ printf(" Selected item: %s\\n", i->label()?i->label():"<nolabel>");
+ }}
+ tooltip {Tests the Fl_Tree::next_selected() function} xywh {723 239 95 16} labelsize 9
+ }
Fl_Light_Button bbbselect_toggle {
label { Select Bbb}
callback {// Toggle select of just the Bbb item (not children)
@@ -1359,14 +1404,14 @@ else tree->deselect_all(item); // deselect /ROOT and its children}
}
Fl_Box {} {
label {Tree Fonts + Colors}
- tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {695 298 335 244} box GTK_DOWN_BOX color 47 labelsize 12 align 1
+ tooltip {These controls only affect the selected items. If no items are selected, all existing items in tree are modified.} xywh {695 298 335 186} box GTK_DOWN_BOX color 47 labelsize 12 align 1
}
Fl_Choice labelfont_choice {
label {labelfont()}
callback {Fl_Font val = (Fl_Font)labelfont_choice->value();
tree->labelfont(val);
window->redraw();}
- tooltip {Sets the default font used for new items created. Does NOT affect existing items.} xywh {850 319 140 21} down_box BORDER_BOX labelsize 12 textsize 12
+ tooltip {Sets the default font used for new items created. Does NOT affect existing items.} xywh {848 314 140 21} down_box BORDER_BOX labelsize 12 textsize 12
code0 {o->value((int)tree->labelfont()); // get tree's current font, assign to chooser}
} {
MenuItem {} {
@@ -1440,7 +1485,7 @@ window->redraw();}
callback {tree->labelsize((int)labelsize_slider->value());
window->redraw();}
tooltip {Sets the font size for the tree's label().
-This is also the font size that will be used to draw the items IF their size hasn't been set with Fl_Tree_Item::labelsize() or Fl_Tree::item_labelsize()} xywh {850 343 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
+This is also the font size that will be used to draw the items IF their size hasn't been set with Fl_Tree_Item::labelsize() or Fl_Tree::item_labelsize()} xywh {848 338 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
code0 {o->value((int)tree->labelsize());}
code1 {o->range(1.0, 50.0);}
code2 {o->step(1.0);}
@@ -1452,7 +1497,7 @@ This is also the font size that will be used to draw the items IF their size has
tree->item_labelfont(val);
tree->redraw();}
tooltip {Sets the default font used for new items created.
-.Also affects any items whose font has NOT specifically been set with item->labelfont().} xywh {850 363 140 21} down_box BORDER_BOX labelsize 12 textsize 12
+.Also affects any items whose font has NOT specifically been set with item->labelfont().} xywh {848 358 140 21} down_box BORDER_BOX labelsize 12 textsize 12
code0 {o->value((int)tree->item_labelfont());}
} {
MenuItem {} {
@@ -1526,7 +1571,7 @@ tree->redraw();}
callback {tree->item_labelsize((int)item_labelsize_slider->value());
tree->redraw();}
tooltip {Sets the default font size used for new items created.
-.Also affects any items whose font size has NOT specifically been set with item->labelsize().} xywh {850 388 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
+.Also affects any items whose font size has NOT specifically been set with item->labelsize().} xywh {848 383 140 16} type Horizontal color 46 selection_color 1 labelsize 12 align 4 textsize 12
code0 {o->value((int)tree->item_labelsize());}
code1 {o->range(1.0, 50.0);}
code2 {o->step(1.0);}
@@ -1540,7 +1585,7 @@ labelcolor_button->color(val); // update modified color to button
tree->labelcolor(val);
window->redraw(); // affects window (tree's label is outside tree's area)}
tooltip {Changes Fl_Tree::labelcolor().
-This affects the text color of the widget's label.} xywh {815 458 16 16} box DOWN_BOX labelsize 11 align 7
+This affects the text color of the widget's label.} xywh {813 414 16 16} box DOWN_BOX labelsize 11 align 7
code0 {o->color(tree->labelcolor());}
}
Fl_Button color_button {
@@ -1552,7 +1597,7 @@ tree->color(val);
UpdateColorChips();
tree->redraw();}
tooltip {Changes Fl_Tree::color().
-This affects the background color of the widget. It also affects the bg color of newly created items *if* Fl_Tree::item_labelbgcolor() hasn't been changed.} xywh {815 477 16 16} box DOWN_BOX labelsize 11 align 7
+This affects the background color of the widget. It also affects the bg color of newly created items *if* Fl_Tree::item_labelbgcolor() hasn't been changed.} xywh {813 433 16 16} box DOWN_BOX labelsize 11 align 7
code0 {o->color(tree->color());}
}
Fl_Button selection_color_button {
@@ -1563,7 +1608,7 @@ selection_color_button->color(val); // update modified color to button
tree->selection_color(val);
tree->redraw();}
tooltip {Sets the Fl_Tree::selection_color().
-This affects the item's colors when they're selected.} xywh {815 496 16 16} box DOWN_BOX labelsize 11 align 7
+This affects the item's colors when they're selected.} xywh {813 452 16 16} box DOWN_BOX labelsize 11 align 7
code0 {o->color(tree->selection_color());}
}
Fl_Button item_labelfgcolor_button {
@@ -1573,7 +1618,7 @@ if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit
tree->item_labelfgcolor(val); // apply modified color to tree
item_labelfgcolor_button->color(val); // update modified color to button
tree->redraw();}
- tooltip {Sets the default label fg color for newly created items.} xywh {975 458 16 16} box DOWN_BOX labelsize 12 align 7
+ tooltip {Sets the default label fg color for newly created items.} xywh {973 414 16 16} box DOWN_BOX labelsize 12 align 7
code0 {o->color(tree->item_labelfgcolor());}
}
Fl_Button item_labelbgcolor_button {
@@ -1583,7 +1628,7 @@ if ( EditColor(val) == 0 ) return; // Let user edit color. (return if they hit
tree->item_labelbgcolor(val); // apply modified color to tree
item_labelbgcolor_button->color(val); // update modified color to button
tree->redraw();}
- tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {975 477 16 16} box DOWN_BOX labelsize 12 align 7
+ tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {973 433 16 16} box DOWN_BOX labelsize 12 align 7
code0 {item_labelbgcolor_button->color(tree->item_labelbgcolor());}
}
Fl_Button x_item_labelbgcolor_button {
@@ -1591,7 +1636,7 @@ tree->redraw();}
callback {tree->item_labelbgcolor(0xffffffff);
UpdateColorChips();
tree->redraw();}
- tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {995 477 16 16} labelsize 10 align 16
+ tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {993 433 16 16} labelsize 10 align 16
}
Fl_Button testsuggs_button {
label {Test Suggestions}
@@ -1620,23 +1665,50 @@ tree->redraw();}
" 3) Disable same, item labels should disappear,\\n"
" showing the widgets in their place.\\n"
"\\n"
-" COLORS\\n"
-" ======\\n"
-" 1) Start program\\n"
-" 2) Change 'Tree Fonts+Colors' -> color()\\n"
-" 3) Entire tree's background color will change, including items.\\n"
-" 4) Change the 'Tree Fonts + Colors -> item_labelbgcolor()'\\n"
-" 6) Click the '111' item to select it.\\n"
-" 7) Click 'Test Operations -> Insert Above'\\n"
-" New items should appear above the selected item using the new color.\\n"
-" This color will be different from the background color.\\n"
-" 8) Change the 'Tree Fonts+Colors' -> color()\\n"
-" The entire tree's bg should change, except the new items.\\n"
-" 9) Click the Tree Fonts+Colors -> item_labelbgcolor() 'X' button.\\n"
-" This resets item_labelbgcolor() to the default 'transparent' color (0xffffffff)\\n"
-" 10) Again, click the 'Insert Above' button.\\n"
-" New items will be created in the background color, and changing the color()\\n"
-" should affect the new items too.\\n"
+"COLORS\\n"
+"======\\n"
+" 1) Start program\\n"
+" 2) Change 'Tree Fonts+Colors' -> color()\\n"
+" 3) Entire tree's background color will change, including items.\\n"
+" 4) Change the 'Tree Fonts + Colors -> item_labelbgcolor()'\\n"
+" 6) Click the '111' item to select it.\\n"
+" 7) Click 'Test Operations -> Insert Above'\\n"
+" New items should appear above the selected item using the new color.\\n"
+" This color will be different from the background color.\\n"
+" 8) Change the 'Tree Fonts+Colors' -> color()\\n"
+" The entire tree's bg should change, except the new items.\\n"
+" 9) Click the Tree Fonts+Colors -> item_labelbgcolor() 'X' button.\\n"
+" This resets item_labelbgcolor() to the default 'transparent' color (0xffffffff)\\n"
+" 10) Again, click the 'Insert Above' button.\\n"
+" New items will be created in the background color, and changing the color()\\n"
+" should affect the new items too.\\n"
+"\\n"
+"SCROLLING\\n"
+"=========\\n"
+" 1) Open '500 items' and 'Long Line' so that both scrollbars appear:\\n"
+" * The 'focus box' for the selected item should not be clipped\\n"
+" horizontally by the vertical scrollbar.\\n"
+" * Resizing the window horizontally should resize the focus box\\n"
+" * Scrolling vertically/horizontally should show reveal all\\n"
+" edges of the tree. One *exception* is the widget label\\n"
+" to the right of the 'ccc button'; labels aren't part\\n"
+" of the widget, and therefore don't affect scroll tabs\\n"
+" 2) Scroll vertical scroller to the middle of the tree\\n"
+" 3) Left click and drag up/down to extend the selection:\\n"
+" * Selection should autoscroll if you drag off the top/bottom\\n"
+" * Selection should work *even* if you drag horizontally\\n"
+" off the window edge; moving up/down outside the window\\n"
+" should continue to autoscroll\\n"
+" 4) Click either of the the scrollbar tabs and drag:\\n"
+" * Even if you drag off the scrollbar, the scrollbar\\n"
+" tab should continue to move\\n"
+" * Should continue to work if you drag off the window edge\\n"
+" horizontally drag off the window.\\n"
+" 5) Click 'Bbb' and hit 'Add 20,000', then position the\\n"
+" 'ccc button' so it's partially obscured by a scrollbar tab:\\n"
+" * Clicking the obscured button should work\\n"
+" * Clicking on the tab over the button should not 'click through'\\n"
+" to the button.\\n"
"";
static Fl_Double_Window *helpwin = 0;
@@ -1654,9 +1726,30 @@ if ( !helpwin ) {
helpwin->end();
}
helpwin->resizable(helpdisp);
-helpwin->show();} selected
+helpwin->show();}
tooltip {Suggestions on how to do tests} xywh {935 554 95 16} labelsize 9
}
+ Fl_Value_Slider tree_scrollbar_size_slider {
+ label {Fl_Tree::scrollbar_size()}
+ callback {tree->scrollbar_size((int)tree_scrollbar_size_slider->value());
+tree->redraw();}
+ tooltip {Tests Fl_Tree::scrollbar_size() effects on tree clipping.
+The value is normally 0, which causes Fl_Tree to use the global Fl::scrollbar_size() instead.} xywh {835 499 180 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 9
+ code0 {o->value(tree->scrollbar_size());}
+ code1 {o->range(0.0, 30.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
+ Fl_Value_Slider scrollbar_size_slider {
+ label {Fl::scrollbar_size()}
+ callback {Fl::scrollbar_size((int)scrollbar_size_slider->value());
+tree->redraw();}
+ tooltip {Tests Fl::scrollbar_size() effects on tree clipping} xywh {835 519 180 16} type Horizontal color 46 selection_color 1 labelsize 11 align 4 textsize 9
+ code0 {o->value(Fl::scrollbar_size());}
+ code1 {o->range(5.0, 30.0);}
+ code2 {o->step(1.0);}
+ code3 {o->color(46); o->selection_color(FL_RED);}
+ }
}
Fl_Box resizer_box {
xywh {0 263 15 14}
@@ -1673,6 +1766,8 @@ RebuildTree();
//Fl::scheme("gtk+");
+Fl_Tooltip::size(10); // small font for tooltips
+
window->resizable(tree);
window->size_range(window->w(), window->h(), 0, 0);
diff --git a/test/twowin.cxx b/test/twowin.cxx
new file mode 100644
index 0000000..6634dfc
--- /dev/null
+++ b/test/twowin.cxx
@@ -0,0 +1,60 @@
+//
+// "$Id: twowin.cxx 10341 2014-09-27 00:07:27Z AlbrechtS $"
+//
+// Cross-window focus test program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Input.H>
+
+static Fl_Input *b1, *b2;
+
+static void cb1(Fl_Widget *, void *) {
+ b2->take_focus();
+}
+
+static void cb2(Fl_Widget *, void *) {
+ b1->take_focus();
+}
+
+int main() {
+
+ Fl_Double_Window *win1 = new Fl_Double_Window(200, 200);
+ Fl_Button *bb1 = new Fl_Button(10, 10, 100, 100, "b1");
+ bb1->callback(cb1);
+ b1 = new Fl_Input(10, 150, 100, 25);
+ win1->label("win1");
+ win1->end();
+
+ Fl_Double_Window *win2 = new Fl_Double_Window(200, 200);
+ Fl_Button *bb2 = new Fl_Button(10, 10, 100, 100, "b2");
+ bb2->callback(cb2);
+ b2 = new Fl_Input(10, 150, 100, 25);
+ win2->label("win2");
+ win2->end();
+
+ win1->position(200, 200);
+ win2->position(400, 200);
+
+ win1->show();
+ win2->show();
+ return Fl::run();
+}
+
+//
+// End of "$Id: twowin.cxx 10341 2014-09-27 00:07:27Z AlbrechtS $".
+//
diff --git a/test/unittest_schemes.cxx b/test/unittest_schemes.cxx
new file mode 100644
index 0000000..c0be605
--- /dev/null
+++ b/test/unittest_schemes.cxx
@@ -0,0 +1,301 @@
+//
+// "$Id: unittest_schemes.cxx 10165 2014-05-24 02:59:19Z greg.ercolano $"
+//
+// Unit tests for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// Nods to Edmanuel Torres for the widget layout (STR#2672)
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Choice.H>
+
+// needed by Edmanuel's test layout
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Tabs.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Clock.H>
+#include <FL/Fl_Progress.H>
+#include <FL/Fl_Slider.H>
+#include <FL/Fl_Scrollbar.H>
+#include <FL/Fl_Value_Slider.H>
+#include <FL/Fl_Value_Output.H>
+#include <FL/Fl_Adjuster.H>
+#include <FL/Fl_Counter.H>
+#include <FL/Fl_Roller.H>
+#include <FL/Fl_Value_Input.H>
+#include <FL/Fl_Input.H>
+#include <FL/Fl_Output.H>
+#include <FL/Fl_Text_Editor.H>
+#include <FL/Fl_Text_Display.H>
+#include <FL/Fl_File_Input.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Light_Button.H>
+#include <FL/Fl_Check_Button.H>
+
+class SchemesTest : public Fl_Group {
+ Fl_Choice *schemechoice;
+ static void SchemeChoice_CB(Fl_Widget*,void *data) {
+ SchemesTest *st = (SchemesTest*)data;
+ const char *name = st->schemechoice->text();
+ if ( name ) {
+ Fl::scheme(name); // change scheme
+ st->window()->redraw(); // redraw window
+ }
+ }
+public:
+ static Fl_Widget *create() {
+ return new SchemesTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
+ }
+ SchemesTest(int X,int Y,int W,int H) : Fl_Group(X,Y,W,H) {
+ schemechoice = new Fl_Choice(X+125,Y,140,25,"FLTK Scheme");
+ schemechoice->add("none");
+ schemechoice->add("plastic");
+ schemechoice->add("gtk+");
+ schemechoice->add("gleam");
+ schemechoice->value(0);
+ schemechoice->labelfont(FL_HELVETICA_BOLD);
+ const char *name = Fl::scheme();
+ if ( name ) {
+ if ( strcmp(name, "plastic") == 0) { schemechoice->value(1); }
+ else if ( strcmp(name, "gtk+") == 0) { schemechoice->value(2); }
+ else if ( strcmp(name, "gleam") == 0) { schemechoice->value(3); }
+ }
+ schemechoice->callback(SchemeChoice_CB, (void*)this);
+
+ Fl_Window *subwin = new Fl_Window(X,Y+30,W,H-30);
+ subwin->begin();
+ {
+ // Pasted from Edmanuel's gleam test app
+ { Fl_Button* o = new Fl_Button(10, 9, 90, 25, "button");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)101);
+ o->tooltip("selection_color() = default");
+ o->labelfont(5);
+ } // Fl_Button* o
+ { Fl_Button* o = new Fl_Button(10, 36, 90, 25, "button");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)179);
+ o->selection_color(o->color());
+ o->tooltip("selection_color() = color()");
+ o->labelfont(4);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ } // Fl_Button* o
+ { Fl_Button* o = new Fl_Button(10, 63, 90, 25, "button");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)91);
+ o->selection_color(fl_lighter(o->color()));
+ o->tooltip("selection_color() = fl_lighter(color())");
+ } // Fl_Button* o
+ { Fl_Button* o = new Fl_Button(10, 90, 90, 25, "button");
+ o->box(FL_UP_BOX);
+ o->color(FL_INACTIVE_COLOR);
+ o->selection_color(fl_darker(o->color()));
+ o->tooltip("selection_color() = fl_darker(color())");
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ } // Fl_Button* o
+ { Fl_Tabs* o = new Fl_Tabs(10, 120, 320, 215);
+ o->color(FL_DARK1);
+ o->selection_color(FL_DARK1);
+ { Fl_Group* o = new Fl_Group(14, 141, 310, 190, "tab1");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ o->selection_color((Fl_Color)23);
+ o->hide();
+ { Fl_Clock* o = new Fl_Clock(24, 166, 130, 130);
+ o->box(FL_THIN_UP_BOX);
+ o->color((Fl_Color)12);
+ o->selection_color(FL_BACKGROUND2_COLOR);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->tooltip("Fl_Clock with thin up box");
+ } // Fl_Clock* o
+ { new Fl_Progress(22, 306, 290, 20);
+ } // Fl_Progress* o
+ { Fl_Clock* o = new Fl_Clock(179, 166, 130, 130);
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)26);
+ o->tooltip("Fl_Clock with thin down box");
+ } // Fl_Clock* o
+ o->end();
+ } // Fl_Group* o
+ { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab2");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ { Fl_Slider* o = new Fl_Slider(20, 161, 25, 155);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Slider with down box");
+ } // Fl_Slider* o
+ { Fl_Scrollbar* o = new Fl_Scrollbar(50, 161, 25, 155);
+ o->value(0, 50, 1, 100);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Scrollbar with down box");
+ } // Fl_Scrollbar* o
+ { Fl_Value_Slider* o = new Fl_Value_Slider(115, 161, 25, 155);
+ o->box(FL_DOWN_BOX);
+ } // Fl_Value_Slider* o
+ { Fl_Value_Output* o = new Fl_Value_Output(240, 265, 75, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Value_Output with down box");
+ } // Fl_Value_Output* o
+ { Fl_Adjuster* o = new Fl_Adjuster(185, 210, 100, 25);
+ o->tooltip("Fl_Adjuster");
+ } // Fl_Adjuster* o
+ { Fl_Counter* o = new Fl_Counter(185, 180, 100, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Counter with down box");
+ } // Fl_Counter* o
+ { Fl_Roller* o = new Fl_Roller(85, 161, 25, 155);
+ o->box(FL_UP_BOX);
+ o->tooltip("Fl_Roller with up box");
+ } // Fl_Roller* o
+ { Fl_Value_Input* o = new Fl_Value_Input(155, 265, 75, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Value_Input with down box");
+ } // Fl_Value_Input* o
+ o->end();
+ } // Fl_Group* o
+ { Fl_Group* o = new Fl_Group(15, 140, 310, 190, "tab3");
+ //o->box(FL_THIN_UP_BOX);
+ o->color(FL_DARK1);
+ o->hide();
+ { Fl_Input* o = new Fl_Input(40, 230, 120, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Input with down box");
+ } // Fl_Input* o
+ { Fl_Output* o = new Fl_Output(40, 260, 120, 25);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_Output with down box");
+ } // Fl_Output* o
+ { Fl_Text_Editor* o = new Fl_Text_Editor(220, 160, 90, 55);
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)80);
+ o->tooltip("Fl_Text_Editor with down frame");
+ } // Fl_Text_Editor* o
+ { Fl_Text_Display* o = new Fl_Text_Display(220, 230, 90, 55);
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)12);
+ o->tooltip("Fl_Text_Display with down frame");
+ } // Fl_Text_Display* o
+ { Fl_File_Input* o = new Fl_File_Input(40, 290, 265, 30);
+ o->box(FL_DOWN_BOX);
+ o->tooltip("Fl_File_Input with down box");
+ } // Fl_File_Input* o
+ o->end();
+ } // Fl_Group* o
+ o->end();
+ } // Fl_Tabs* o
+ { Fl_Box* o = new Fl_Box(341, 10, 80, 50, "thin box\ndown1");
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)20);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(430, 10, 80, 50, "thin box\nup1");
+ o->box(FL_THIN_UP_BOX);
+ o->color(FL_SELECTION_COLOR);
+ o->labelcolor((Fl_Color)6);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(341, 71, 80, 44, "thin box\ndown2");
+ o->box(FL_THIN_DOWN_BOX);
+ o->color((Fl_Color)190);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(430, 71, 80, 44, "thin box\nup2");
+ o->box(FL_THIN_UP_BOX);
+ o->color((Fl_Color)96);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(341, 127, 80, 50, "box down3");
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)3);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(430, 127, 80, 50, "box up3");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)104);
+ o->labelcolor((Fl_Color)3);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(341, 189, 80, 50, "box down4");
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)42);
+ o->labelcolor(FL_DARK_RED);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(430, 189, 80, 50, "box up4");
+ o->box(FL_UP_BOX);
+ o->color((Fl_Color)30);
+ o->labelcolor((Fl_Color)26);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(341, 251, 80, 82, "box down5");
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)19);
+ o->labelcolor((Fl_Color)4);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Box* o = new Fl_Box(430, 251, 80, 82, "box up5");
+ o->box(FL_UP_BOX);
+ o->color(FL_FOREGROUND_COLOR);
+ o->labelcolor(FL_BACKGROUND2_COLOR);
+ o->labelsize(10);
+ } // Fl_Box* o
+ { Fl_Light_Button* o = new Fl_Light_Button(110, 10, 105, 25, "Light");
+ o->box(FL_DOWN_BOX);
+ o->color(FL_BACKGROUND2_COLOR);
+ o->selection_color((Fl_Color)30);
+ o->tooltip("Fl_Light_Button with down box");
+ } // Fl_Light_Button* o
+ { Fl_Check_Button* o = new Fl_Check_Button(110, 37, 105, 25, "Check");
+ o->box(FL_DOWN_FRAME);
+ o->down_box(FL_DOWN_BOX);
+ o->color(FL_DARK1);
+ o->tooltip("Fl_Check_Button with down frame");
+ } // Fl_Check_Button* o
+ { Fl_Input* o = new Fl_Input(220, 10, 100, 25);
+ o->box(FL_DOWN_BOX);
+ o->color((Fl_Color)23);
+ o->tooltip("Fl_Input with down box");
+ } // Fl_Input* o
+ { Fl_Adjuster* o = new Fl_Adjuster(110, 65, 80, 43);
+ o->box(FL_UP_BOX);
+ o->color(FL_INACTIVE_COLOR);
+ o->selection_color(FL_BACKGROUND2_COLOR);
+ o->labelcolor((Fl_Color)55);
+ o->tooltip("Fl_Adjuster with up box");
+ } // Fl_Adjuster* o
+ { Fl_Text_Editor* o = new Fl_Text_Editor(220, 53, 100, 29, "down frame");
+ o->box(FL_DOWN_FRAME);
+ o->color((Fl_Color)19);
+ o->selection_color(FL_DARK1);
+ o->tooltip("Fl_Adjuster with down frame");
+ } // Fl_Text_Editor* o
+ { Fl_Text_Editor* o = new Fl_Text_Editor(220, 99, 100, 38, "up frame");
+ o->box(FL_UP_FRAME);
+ o->color((Fl_Color)19);
+ o->selection_color(FL_DARK1);
+ o->tooltip("Fl_Text_Editor with up frame");
+ } // Fl_Text_Editor* o
+ }
+ subwin->end();
+ subwin->resizable(subwin);
+ subwin->show();
+ }
+};
+
+UnitTest schemestest("schemes test", SchemesTest::create);
+
+//
+// End of "$Id: unittest_schemes.cxx 10165 2014-05-24 02:59:19Z greg.ercolano $
+//
diff --git a/test/unittest_symbol.cxx b/test/unittest_symbol.cxx
new file mode 100644
index 0000000..3ff2cec
--- /dev/null
+++ b/test/unittest_symbol.cxx
@@ -0,0 +1,95 @@
+//
+// "$Id: unittest_symbol.cxx 9852 2013-03-27 19:21:22Z greg.ercolano $"
+//
+// Unit tests for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2010 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl_Box.H>
+#include <FL/fl_draw.H>
+
+//
+// Test symbol rendering
+//
+class SymbolTest : public Fl_Widget
+{
+ void DrawTextAndBoxes(const char *txt, int X, int Y) {
+ int wo = 0, ho = 0;
+ fl_measure(txt, wo, ho, 1);
+ // Draw fl_measure() rect
+ fl_color(FL_RED);
+ fl_rect(X, Y, wo, ho);
+ // //////////////////////////////////////////////////////////////////////
+ // NOTE: fl_text_extents() currently does not support multiline strings..
+ // until it does, let's leave this out, as we do multiline tests..
+ // //////////////////////////////////////////////////////////////////////
+ // // draw fl_text_extents() glyph bounding box
+ // int dx,dy;
+ // fl_text_extents(txt, dx, dy, wo, ho);
+ // fl_color(FL_GREEN);
+ // fl_rect(X+dx, Y+dy, wo, ho);
+ //
+ // Draw text with symbols enabled
+ fl_color(FL_BLACK);
+ fl_draw(txt, X, Y, 10, 10, FL_ALIGN_INSIDE|FL_ALIGN_TOP|FL_ALIGN_LEFT, 0, 1);
+ }
+public:
+ static Fl_Widget *create() {
+ return new SymbolTest(TESTAREA_X, TESTAREA_Y, TESTAREA_W, TESTAREA_H);
+ }
+ SymbolTest(int x, int y, int w, int h) : Fl_Widget(x, y, w, h) {}
+ void draw(void) {
+ int x0 = x(); // origin is current window position for Fl_Box
+ int y0 = y();
+ int w0 = w();
+ int h0 = h();
+ fl_push_clip(x0, y0, w0, h0); // reset local clipping
+ {
+ // set the background colour - slightly off-white to enhance the green bounding box
+ fl_color(fl_gray_ramp(FL_NUM_GRAY - 3));
+ fl_rectf(x0, y0, w0, h0);
+ int fsize = 25;
+ fl_font(FL_HELVETICA, fsize);
+ int xx = x0+10;
+ int yy = y0+10;
+ DrawTextAndBoxes("Text" ,xx,yy); yy += fsize+10; // check no symbols
+ DrawTextAndBoxes("@->" ,xx,yy); yy += fsize+10; // check symbol alone
+ DrawTextAndBoxes("@-> " ,xx,yy); yy += fsize+10; // check symbol with trailing space
+ DrawTextAndBoxes("@-> Rt Arrow" ,xx,yy); yy += fsize+10; // check symbol at left edge
+ DrawTextAndBoxes("Lt Arrow @<-" ,xx,yy); yy += fsize+10; // check symbol at right edge
+ DrawTextAndBoxes("@-> Rt/Lt @<-" ,xx,yy); yy += fsize+10; // check symbol at lt+rt edges
+ DrawTextAndBoxes("@@ At/Lt @<-" ,xx,yy); yy += fsize+10; // check @@ at left, symbol at right
+ DrawTextAndBoxes("@-> Lt/At @@" ,xx,yy); yy += fsize+10; // check symbol at left, @@ at right
+ DrawTextAndBoxes("@@ At/At @@" ,xx,yy); yy += fsize+10; // check @@ at left+right
+ xx = x0+200;
+ yy = y0+10;
+ DrawTextAndBoxes("Line1\nLine2" ,xx,yy); yy += (fsize+10)*2; // check 2 lines, no symbol
+ DrawTextAndBoxes("@-> Line1\nLine2 @<-" ,xx,yy); yy += (fsize+10)*2; // check 2 lines, lt+rt symbols
+ DrawTextAndBoxes("@-> Line1\nLine2\nLine3 @<-",xx,yy); yy += (fsize+10)*3; // check 3 lines, lt+rt symbols
+ DrawTextAndBoxes("@@@@" ,xx,yy); yy += (fsize+10); // check abutting @@'s
+ DrawTextAndBoxes("@@ @@" ,xx,yy); yy += (fsize+10); // check @@'s with space sep
+
+ fl_font(FL_HELVETICA, 14);
+ fl_color(FL_RED);
+ fl_draw("fl_measure bounding box in RED", x0+10,y0+h0-20);
+ }
+ fl_pop_clip(); // remove the local clip
+ }
+};
+
+UnitTest symbolExtents("symbol text", SymbolTest::create);
+
+//
+// End of "$Id: unittest_symbol.cxx 9852 2013-03-27 19:21:22Z greg.ercolano $"
+//
diff --git a/test/unittests.cxx b/test/unittests.cxx
index a154b38..3103909 100644
--- a/test/unittests.cxx
+++ b/test/unittests.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: unittests.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $"
+// "$Id: unittests.cxx 9978 2013-09-16 20:25:14Z greg.ercolano $"
//
// Unit tests for the Fast Light Tool Kit (FLTK).
//
@@ -88,11 +88,11 @@ private:
nTest++;
}
static int nTest;
- static UnitTest *fTest[200];
+ static UnitTest *fTest[];
};
int UnitTest::nTest = 0;
-UnitTest *UnitTest::fTest[];
+UnitTest *UnitTest::fTest[200];
// The main window needs an additional drawing feature in order to support
@@ -148,10 +148,11 @@ public:
#include "unittest_rects.cxx"
#include "unittest_circles.cxx"
#include "unittest_text.cxx"
+#include "unittest_symbol.cxx"
#include "unittest_images.cxx"
#include "unittest_viewport.cxx"
#include "unittest_scrollbarsize.cxx"
-
+#include "unittest_schemes.cxx"
// callback whenever the browser value changes
void Browser_CB(Fl_Widget*, void*) {
@@ -196,5 +197,5 @@ int main(int argc, char **argv) {
}
//
-// End of "$Id: unittests.cxx 8864 2011-07-19 04:49:30Z greg.ercolano $".
+// End of "$Id: unittests.cxx 9978 2013-09-16 20:25:14Z greg.ercolano $".
//
diff --git a/test/valuators.fl b/test/valuators.fl
index 668a462..25b272a 100644
--- a/test/valuators.fl
+++ b/test/valuators.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0107
+version 1.0303
header_name {.h}
code_name {.cxx}
Function {callback(Fl_Widget* o, void*)} {open private return_type void
@@ -12,7 +12,7 @@ Function {} {open
} {
Fl_Window {} {
label {Valuator classes, showing values for type()} open
- xywh {479 151 580 510} type Double color 43 selection_color 43
+ xywh {400 199 580 510} type Double color 43 selection_color 43
code0 {\#include <stdio.h>} visible
} {
Fl_Box {} {
diff --git a/test/windowfocus.cxx b/test/windowfocus.cxx
new file mode 100644
index 0000000..e4d7c2d
--- /dev/null
+++ b/test/windowfocus.cxx
@@ -0,0 +1,64 @@
+//
+// "$Id: windowfocus.cxx 10340 2014-09-27 00:04:15Z AlbrechtS $"
+//
+// Cross-window show/focus test program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2014 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// http://www.fltk.org/COPYING.php
+//
+// Please report all bugs and problems on the following page:
+//
+// http://www.fltk.org/str.php
+//
+
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Input.H>
+
+static Fl_Double_Window *win1, *win2;
+static Fl_Input *inp;
+
+static void popup(Fl_Widget *, void *) {
+
+ win2->position(win1->x() + win1->w(), win1->y());
+
+ win2->show();
+ win2->wait_for_expose();
+ inp->take_focus();
+}
+
+int main(int argc, char **argv) {
+
+ win1 = new Fl_Double_Window(300, 200);
+ win1->label("show() focus test");
+
+ Fl_Box *b = new Fl_Box(10, 10, 280, 130);
+ b->label("Type something to pop the subwindow up. "
+ "The focus should stay on the input, "
+ "and you should be able to continue typing.");
+ b->align(FL_ALIGN_WRAP | FL_ALIGN_LEFT | FL_ALIGN_INSIDE);
+
+ inp = new Fl_Input(10, 150, 150, 25);
+ inp->when(FL_WHEN_CHANGED);
+ inp->callback(popup);
+
+ win1->end();
+
+ win2 = new Fl_Double_Window(300, 200);
+ win2->label("window2");
+ win2->end();
+
+ win1->show(argc,argv);
+
+ return Fl::run();
+}
+
+//
+// End of "$Id: windowfocus.cxx 10340 2014-09-27 00:04:15Z AlbrechtS $".
+//
diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
index d12e460..e960806 100644
--- a/zlib/CMakeLists.txt
+++ b/zlib/CMakeLists.txt
@@ -1,32 +1,20 @@
-project(FLTKZLIB)
-include_regular_expression(regex_match "[.][h|c]$")
-
-include_directories(${FLTKZLIB_SOURCE_DIR})
-include_directories(${FLTKZLIB_BINARY_DIR})
# source files for zlib
set(ZLIB_SRCS
- adler32.c compress.c crc32.c deflate.c
+ adler32.c compress.c crc32.c deflate.c
gzclose.c gzlib.c gzread.c gzwrite.c
- inffast.c infback.c inflate.c inftrees.c
+ inffast.c infback.c inflate.c inftrees.c
trees.c uncompr.c zutil.c
)
#######################################################################
-add_library(fltk_z ${ZLIB_SRCS})
+FL_ADD_LIBRARY(fltk_z STATIC "${ZLIB_SRCS}")
-if(MSVC)
- set_target_properties(fltk_z
- PROPERTIES
- OUTPUT_NAME zlib
- DEBUG_OUTPUT_NAME zlibd
- )
- if(OPTION_LARGE_FILE)
- set_target_properties(fltk_z PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE)
- endif(OPTION_LARGE_FILE)
-endif(MSVC)
+#######################################################################
+if(OPTION_BUILD_SHARED_LIBS)
+#######################################################################
+FL_ADD_LIBRARY(fltk_z SHARED "${ZLIB_SRCS}")
-install(TARGETS fltk_z
- EXPORT fltk-install
- DESTINATION ${PREFIX_LIB}
-)
+#######################################################################
+endif(OPTION_BUILD_SHARED_LIBS)
+#######################################################################