Commit Graph

386 Commits

Author SHA1 Message Date
Matthias Melcher 987d9e05f2 Fixed shortcut and default focus for message dialogs (STR #1298).
Default focus is now on the button that also reacts to the 'Enter' key. This should avoid confusion about Enter triggering the button1 or button 0.

Also, I changed the shortcut call to the new convention which works on MSWindows. I don't have a Linux system right now for testing... .

Fixed focus issues (STR #1286, STR #1289, STR #1296)

fl_xfocus was not always updated, making widgets or even whole windows loose focus when any focus changes were not accompanied by a click into the same window. Also, Fl_Tabs would not redraw correctly if focus returned to the active tab.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-30 09:38:19 +00:00
Matthias Melcher ad0fc9ca23 STR #1162: Fl_Menu_Button::popup was trying to access a previously deleted widget (itself). The delayed deleting mechanism in 'Fl::delete_widget' did not work in this case because the main loop is called before the callback returns. The fix implements a type of automatic pointer that will be cleared to NULL should the widget get deleted. This may not be a 'nice' solution, but it does fix the problem reliably. We could actually use this for all widget pointers and remove the delayed delete mechanism alltogether
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5037 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 21:40:47 +00:00
Matthias Melcher a82e7879ce STR #1232: it was not possible to toggle a checkbox in Fl_Check_Browser by clicking the same box twice.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 03:53:41 +00:00
Matthias Melcher c9908d97e3 THIS FIX CONTAINS TWO MORE FILES THAT MUST BE COMPILED. I would
like to ask the maintainers of the build environments to please
add these files to the setup:

  src/fl_encoding_latin1.cxx
  src/fl_encoding_mac_roman.cxx

I ADDED SOME DOCUMENTATION THAT NEEDS TO BE FIXED. Beeing not a
native English speaker, I have a hard time writing documentation.
Would someone please update my babbeling in 
documentation/drawing.html? Thanks.

This commit fixes some very basic problems with OS X's code page in
preparation for the compose-character keyboard fix. It also fixes
issues with MS Windows and X11 not rendering the characters
in the Western (Latin-1) set between 0x80 and 0x9F. In the original
ISO font, they were unused, but are now assigned to international
characters like the Euro currency sign.

This patch also tries to fix one basic flaw with FLTK 1 and
font encoding. I will not put much more work into this because
FLTK 1.2 and FLTK 2 fix the problem entirely by using UTF-8
instead of 8-bit "C"-style strings.

All these changes are only meaningful for foreign language
users or users of special characters like the Euro, the Degree
or the Permille symbol. A short explanation follows.

Max OS X uses a different code page than X11 and Win32. This means
that all characters above 0x7f have an entirely different meaning.
If your source code contains international characters, your 
text will appear different if you change to another OS. This patch
provides two functions that convert text with international
characters from the character set of the source code into the
local character set. Two more functions are provided to convert
them back. The functions are fl_latin1_to_local (source is in Win32 
or X11), fl_mac_roman_to_local (source was written on OS X) and the 
corresponding fl_local_to_latin1 and fl_local_to_mac_roman, which
are very useful if yoou want to store strings with intl. characters
that will be moved between systems.

All this is assuming a "Western" code page as it is common in
the Americas and most of Europe. User of other languages will have 
to use FLTK 2.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-18 13:07:42 +00:00
Matthias Melcher b8bc24764e STR 1183: swapping two items in an Fl_Browser_ widget would corrupt redrawing if either item was "top". This fix swaps the top_ variable correctly, and also swaps the selection flag as the user would expect.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-03-28 23:27:20 +00:00
Matthias Melcher 7e42a63aa6 ST 1148: a preselected filename will also be selected in the file chooser when popping up. I put a lot of effort into trying to make the chooser behave as it previously did in all other situations, e.g. to choose a directory
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4875 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-03-28 15:24:14 +00:00
Michael R Sweet e6bbd2d525 Update copyrights.
Also check for feof() when the character returned by getc is < 0
to work around a bug in Cygwin.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-31 19:00:08 +00:00
Michael R Sweet 192e0ed3bd Fl_Spinner's minimum() and maximum() "get" methods were
misspelled (STR #1146)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4780 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-01-31 16:06:45 +00:00
Michael R Sweet e321cb37bf VC++ 2005 Support, drop old files, add icons for Sudoku
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-27 14:45:48 +00:00
Matthias Melcher 44f06b5d35 STR #1035: Fl_Help_View now accepts direct buffer loading and reading via 'value()' functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4582 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-25 16:54:40 +00:00
Matthias Melcher 2036009919 STR #1007: removed one superfluous ReleaseDC. All demos are running nicely again. I did not see any rendering mistakes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4569 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-15 07:41:17 +00:00
Matthias Melcher 2b6586f64d STR #1007: Applied second patch by hand. OP: could you please check if all changes were made correctly? Thanks!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-12 23:03:34 +00:00
Matthias Melcher a2effb7c2b Fixed C++ style comments in plain C files (STR #997)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4548 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-29 20:16:36 +00:00
Matthias Melcher ef2f6bd456 Slight changes to Fl_Sys_Menu_Bar making it more transparent for multi platform developers. Again, thanks Natevw for the patch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-29 20:05:38 +00:00
Matthias Melcher af39242da6 Fl_Text_Display now auto-scrolls in all directions (STR #915). This is implemented using a timer event. The scroll speed is proportional to the distance of the cursor to the text area
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-10 23:11:51 +00:00
Michael R Sweet 229273b43c Fix Fl_Input_Choice widget positioning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-08 02:45:06 +00:00
Michael R Sweet c9f9b4faa0 Fl_File_Chooser did not implement the user_data() methods (STR
#970)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4473 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-08 00:50:02 +00:00
Dejan Lekic 2febbc8176 Fixed memory leak in Fl_Check_Browser reported by "miguel2i" .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4461 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-05 13:31:02 +00:00
Matthias Melcher 0af617b641 Fl_Preferences: made implicitly defined constructors and operators unavailable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4458 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-07-26 07:59:01 +00:00
Matthias Melcher 770147baf6 Applied hidden copy / ctor patch as suggested in STR 860
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4421 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-07-15 09:34:53 +00:00
Michael R Sweet 74d3204304 Fl_Preferences::getUserdataPath() didn't work for sub-groups (STR
#872)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4361 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-05-20 02:05:38 +00:00
Michael R Sweet 1c399af444 Update source file headers with STR web page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:13:17 +00:00
Michael R Sweet b41cf28662 Update "clean" targets to properly handle core files, remove backup files,
etc.

Add "install" target to test directory which installs the example programs.

Install the config.h file in the examples directory.

Make sure the example programs compile outside the FLTK source dir.

Add example programs to fltk.list.in.

Fix missing redraw() in x_cb() in FLUID...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:01:49 +00:00
Michael R Sweet fc4db19395 Don't make non-inline methods from FLUID inline (that is, remove the
"inline" from non-inline methods...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-15 18:00:33 +00:00
Michael R Sweet 70c4cd102f Fix compiler warnings.
Use fl_yes and fl_no for the Forms emulation, instead of the hardcoded
strings.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4283 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-14 13:56:07 +00:00
Michael R Sweet 0d231668e1 Only use __deprecated__ with GCC 3.0 and higher.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-13 19:35:28 +00:00
Matthias Melcher e72630762d Remove all warnings for Mac buidl with gcc (except one)
- some warnings about using char for indexing
- some warnings about using signed int in strncmp
- some warnings about deprecated fl_ask (replaced with fl_choice)
The on warning not removed is the strftime("%c") in fluid since
I don't know anything about PS and I don't know if a different
data format would break PS. Mike?



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-11 07:35:33 +00:00
Michael R Sweet 25447eeb04 Added missing Fl_Window::copy_label() method.
Cleaned up screen_xywh() conditional stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-09 13:51:32 +00:00
Michael R Sweet cc593f6b64 Add Fl::screen_count() and Fl::screen_xywh() APIs to support multi-
screen displays (currently only X11 support with Xinerama)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-31 16:01:24 +00:00
Michael R Sweet a343b0d4e4 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.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 16:11:07 +00:00
Michael R Sweet ce40d4a0e6 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)

Added more documentation on the file chooser filter pattern format
(in both functions.html and Fl_File_Chooser.html)

Added Fl_File_Chooser::save_label (for favorites dialog) and
Fl_File_Chooser::ok_label() to change the default "OK" button
label to something more appropriate according to the HIG.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4187 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 15:20:26 +00:00
Michael R Sweet 6d65dcba88 Change Fl_Spinner to use double values instead of ints.
Update FLUID dependencies.

The # copies spinner was just a bit too small for 100 copies.

Didn't set the menu divider if there were exactly 10 files in the history.

Add documentation for Fl_Spinner.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4186 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 02:39:25 +00:00
Michael R Sweet da9b29a600 Prep work to support separate FL_PLASTIC_ROUND_UP/DOWN_BOX box types.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-24 13:33:06 +00:00
Matthias Melcher 562198fa31 Polygon drawing fixed #765, fl_message wrapped in Fl_Group::current(0), so it doesn't end up inside some current group #253. Undefined 'check' in Fl_Menu_Item_, so it will compile as an Apple XCode project (to be delivered later)..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 11:38:52 +00:00
Michael R Sweet bcadb07bb2 Printing support for FLUID...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 04:51:16 +00:00
Michael R Sweet e12e37c5f9 Add Fl_Spinner widget (another combo of existing widgets in a header file)
Set the window callback to do the same as the cancel button in the template
panel.

Clean up widget bin + tooltips (didn't have correct tooltips for new widgets)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 23:38:14 +00:00
Michael R Sweet ec7b060957 Fix Fl_Input_Choice in FLUID, and make sure that we expose enough of the
text and box stuff for use in FLUID.

Update dependencies.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-06 00:32:11 +00:00
Michael R Sweet 2c989c8e4c More browser documentation changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 19:31:42 +00:00
Michael R Sweet add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +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 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 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 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 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
Michael R Sweet 23bb059065 Watcom fixes (STR #584, STR #594, STR #595)
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)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3897 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-11-20 03:19:59 +00:00
Michael R Sweet ca005c4067 Documentation updates (STR #568)
More CMake updates (STR #499)

The Watcom C++ compiler needed a small change (STR #567)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18 20:29:58 +00:00
Michael R Sweet bf910884cc Documentation updates (STR #570)
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)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18 20:22:25 +00:00
Michael R Sweet f7fd28ddfc Eliminate shadowed arguments...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-09-29 15:05:48 +00:00