Commit Graph

2094 Commits

Author SHA1 Message Date
Michael R Sweet
9cca0a6c9a Added QNX bug workaround for menu handling (STR #704)
src/Fl_Menu.cxx:
    - menuwindow::handle(): #ifdef QNX check for done menu


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:51:38 +00:00
Michael R Sweet
2df3459457 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/Fl_Input_Choice.H:


documentation/Fl_Input_Choice.html:
    - Added.

documentation/fltk.book:
    - Added Fl_Input_Choice.html + --no-embedfonts option.

documentation/index.html:
    - Update version number and revision.

documentation/input_choice.jpg:
    - Added.

documentation/preface.html:
    - Update version number and revision.

documentation/widgets.html:
    - Add Fl_Input_Choice to lists.

fluid/Fl_Menu_Type.cxx:
    - Add Fl_Input_Choice_Type class and instance.

fluid/Fl_Type.h:
    - Add Fl_Input_Choice_Type class and instance.

fluid/factory.cxx:
    - Add Fl_Input_Choice menu item.

test/Makefile:
    - Add input_choice example.

test/input_choice.cxx:
    - Added.

test/demo.menu:
    - Add input_choice example.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:14:22 +00:00
Michael R Sweet
97b9464f59 Fl_Multiline_Input now scrolls the full height of the widget
instead of 5 lines when the user presses PageUp or PageDown (STR
#727)

src/Fl_Input.cxx:
    - Set repeat_num to h()/textsize() instead of 5.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:35:07 +00:00
Michael R Sweet
c2873e6c63 Fix builds without JPEG library...
src/Fl_JPEG_Image.cxx:
    - Surround FLTK JPEG state structure with #ifdef...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:28:49 +00:00
Michael R Sweet
3ee9c50180 CMake build fixes (STR #724)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4047 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:26:22 +00:00
Michael R Sweet
36402b7fe5 Fl_Browser::swap() didn't handle redraws properly when the
swapped lines had different heights (STR #729)

src/Fl_Browser.cxx:
    - Fl_Browser::swap(): call redraw_lines() instead of
      redrawing individual lines.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4046 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:17:08 +00:00
Michael R Sweet
5b0aae2e87 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.

src/Fl.cxx:
    - Fl::handle(): Send FL_MOUSEWHEEL events to grab() or
      current window instead of focus widget.

src/Fl_Group.cxx:
    - Fl_Group::handle(): Send FL_MOUSEWHEEL events first to an
      event_inside() widget, then to the first non-inside widget
      that accepts them.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-20 00:23:36 +00:00
Michael R Sweet
452c17f8fb Fl::wait() could block on WIN32 if the window was deleted via
Fl::delete_widget() (STR #679)

src/Fl.cxx:
    - Post an application message when a window is hidden on WIN32.

src/Fl_win32.cxx:
    - Change async select message to WM_APP + 1, and document
      our use of WM_APP.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4043 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-14 13:44:24 +00:00
Michael R Sweet
ab8f3f793a Fl_Preferences::RootNode did not find the user's home directory
on some non-US versions of Windows (STR #720)

src/Fl_Preferences.cxx:
    - RootNode::RootNode(): if AppData key does not exist, try Personal
      key instead.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4042 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-14 13:15:39 +00:00
Michael R Sweet
cb852cd3eb Fl_Window::hide() didn't delete the current clipping region on
WIN32, causing a GDI resource leak in some situations (STR #723)

src/Fl.cxx:
    - Fl_Window::hide(): move XDestroyRegion() call outside of
      the X11-specific code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4041 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-14 11:11:19 +00:00
Michael R Sweet
80b9844b53 Fix initializers and error handling.
src/Fl_JPEG_Image.cxx:
    - Add custom error manager structure and update error and output
      handlers so we properly handle bad JPEG files.

src/Fl_Shared_Image.cxx:
    - Add initializers for num_handlers, alloc_handlers, and handlers
      variables.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-12 02:41:52 +00:00
Michael R Sweet
6492c43b4b Check for no icon, and if so manually check for a directory...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 19:36:10 +00:00
Matthias Melcher
16cc0e1f9c ...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4037 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 16:31:59 +00:00
Matthias Melcher
53e7546c23 Fixed a few warnings in OS X. The fluid stuff was 'touche'd, but not changed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 16:28:36 +00:00
Michael R Sweet
f02c5fb451 Fl_Menu now draws the arrow more like other toolkits and 2.0
(STR #651)

src/Fl_Menu.cxx:
    - Change submenu drawing code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 02:03:12 +00:00
Michael R Sweet
cb73c93258 Fixed a VC++ compiler error in Fl_JPEG_Image.cxx (STR #676)
src/Fl_JPEG_Image.cxx:
    - Cast array to (uchar *) in delete[].


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 01:52:15 +00:00
Michael R Sweet
de9bea20b5 FL_SHADOW_BOX/FRAME drew outside of the bounding box (STR #694)
src/fl_boxtype.cxx:
    - Adjust box dw/dh for shadow box/frame types.

src/fl_shadow_box.cxx:
    - Adjust shadow box to draw inside the bounding box.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4033 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 01:42:40 +00:00
Michael R Sweet
b32fefd1c5 Fl_Widget::copy_label(NULL) didn't work (STR #707)
src/Fl_Widget.cxx:
    - Check for NULL in Fl_Widget::copy_label()


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 01:29:54 +00:00
Michael R Sweet
9290da74b7 Fl_Choice now allows click selection like Fl_Menu_Button and
Fl_Menubar (STR #706)

src/Fl_Choice.cxx:
    - Fl_Chocie::handle(): remove call to event_is_click().



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4031 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 01:26:56 +00:00
Michael R Sweet
2816583b83 Add new file for CMake.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4027 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 00:18:19 +00:00
Michael R Sweet
1f2456132e Cmake updates (STR #645)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 00:17:50 +00:00
Michael R Sweet
2bbf66c7a4 Clarify Fl_Choice callback description (STR #692)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4025 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 00:12:15 +00:00
Michael R Sweet
2579ae8d1b Fl_Check_Browser didn't draw properly when inactive (STR #681)
src/Fl_Check_Browser.cxx:
    - Update item_draw() function to check active_r()


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 00:09:17 +00:00
Michael R Sweet
0475dc9363 Removed some redundant code in Fl_Group::handle() (STR #669)
src/Fl_Group.cxx:
    - Don't need to check o->contains() twice.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 00:03:00 +00:00
Michael R Sweet
01e47d8f24 The file chooser didn't always deactivate the OK button when
necessary (STR #653)

src/Fl_File_Chooser2.cxx:
    - Fl_File_Chooser::fileListCB(): deactivate OK button when
      the current item is not the right type.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4021 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 23:00:59 +00:00
Michael R Sweet
4d3a3a7f66 Documentation fix (STR #648)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4019 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 20:35:51 +00:00
Michael R Sweet
89c0329b71 Fix FLUID text color (STR #662)
src/Fl_Double_Window.cxx:
    - Save/restore colors.

src/Fl_Pixmap.cxx:
    - Save/restore colors.

src/fl_draw_image_mac.cxx:
    - Save/restore colors.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4018 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 20:28:31 +00:00
Michael R Sweet
0deaeaa80c Fixed some compiler errors on WIN32 (STR #647)
src/scandir_win32.c:
    - Add casts for malloc and calloc calls.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 19:22:03 +00:00
Michael R Sweet
9527fee96d FLUID didn't update the widget panel X/Y/W/H values when moving
the selected window (STR #701)

fluid/Fl_Window_Type.cxx:
    - Fl_Window_Type::resize(): call update_xywh() on resize.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 18:46:32 +00:00
Michael R Sweet
90590eb8b5 FLUID didn't use the label type constant names for menu items,
causing them to be drawn using the normal label type (STR #668)

fluid/Fl_Menu_Type.cxx:
    - Use FL_*_LABEL constants instead of numeric label types in
      menu items.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 18:36:59 +00:00
Michael R Sweet
3124794f1f Fl_File_Chooser was slow with large directories (STR #654)
FL/Fl_File_Browser.H:
    - Don't reload the directory view unless asked to.

FL/Fl_File_Chooser.H:
    - Rebuilt using current FLUID.

src/Fl_File_Browser.cxx:
    - Don't reload the directory view unless asked to.

src/Fl_File_Chooser.cxx:
    - Fl_File_Chooser::show() calls rescan().

src/Fl_File_Chooser.fl:
    - Fl_File_Chooser::show() calls rescan().

src/Fl_File_Chooser2.cxx:
    - Only call rescan() when chooser is shown.

src/Fl_File_Icon.cxx:
    - Add optimization for Windows - filenames with trailing slash are
      directories.

test/file_chooser.cxx:
    - Only call show() once...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-05 18:26:21 +00:00
Michael R Sweet
b601fdc3bc Remove duplicate definitions and argument-hides-function warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-04 14:11:15 +00:00
Michael R Sweet
18b1a2fdca FLUID didn't add xclass() calls to windows (STR #718)
fluid/Fl_Window_Type.cxx:
    - Fl_Window_Type::write_code2() - now write xclass() code when
      xclass is set.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-02 13:48:08 +00:00
Michael R Sweet
e4ccb4ac07 Fix X11 DND support.
src/Fl_x.cxx:
    - Check the list of source types and pick the first one that
      starts with "text/".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3995 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-01 03:13:01 +00:00
Michael R Sweet
1d871d5744 Temporary fix for JPEG error handle; we need to flag the error in
the callback function and test for it in the main code...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-01-25 20:50:25 +00:00
Michael R Sweet
633e4ef5a5 Remove extraneous fltk.lib from linker options, since we use the VC++
dependency stuff instead to use the correct library file.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3960 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-01-04 15:17:02 +00:00
Michael R Sweet
fa7293b3cf Fix menu crash bug (STR #685)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-01-04 15:02:57 +00:00
Matthias Melcher
1bc50aa780 Fl_Double_Windows would always redraw their full content, even
if only little changes were done in the UI. OS X creates all
windows double buffered, whch would lead FLTK to beleive that
the background buffer was missing on every redraw, causing a
complete redraw of the full UI.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3953 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-27 19:16:42 +00:00
Michael R Sweet
3387edd247 Fl_JPEG_Image did not correctly handle errors reported by the
JPEG library (STR #652)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3946 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-16 21:38:24 +00:00
Michael R Sweet
f912892305 Fl_Menu now draws sub-menu arrows like other toolkits and FLTK
2.0 (STR #651)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-14 13:49:55 +00:00
Michael R Sweet
24a940f11d Fixed a compiler warning in Fl_Window.H (STR #641)
Tooltips disabled shortcut processing (STR #643)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-06 03:31:54 +00:00
Michael R Sweet
b5562132e5 Fl::event_number() didn't always match the value sent to the
handle() method (STR #634)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-03 03:14:17 +00:00
Michael R Sweet
416ff7f24e Fl_Shared_Image::reload() didn't set the image_ pointer properly
in all cases (STR #632)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-03 02:51:03 +00:00
Michael R Sweet
0184365c80 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)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-03 02:48:22 +00:00
Michael R Sweet
a50a8b702a Changelog.
Prep for 1.1.7.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3927 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-29 15:01:43 +00:00
Michael R Sweet
de226bac0a Add missing Watcom makefile...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3926 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-29 14:57:23 +00:00
Matthias Melcher
7aca156564 Fl_Text_Display would hang if the user pressed Ctrl-left with the cursor
in the first columna and line (pos 0)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3921 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-23 23:10:26 +00:00
Michael R Sweet
f26b5336a0 Prep for 1.1.6 release.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-23 20:16:11 +00:00
Michael R Sweet
7acedd91ff Fix compiler errors...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3918 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-23 19:51:03 +00:00
Michael R Sweet
a42ded75e2 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)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3917 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-23 19:47:52 +00:00