Commit Graph

66 Commits

Author SHA1 Message Date
Fabien Costantini fabf5fc181 Fixed bad comments in fl_color_chooser, r g b param are in/out params and not in. Added param and return dox commands to these functions. Added a new Common Dialogs Module containing all fl_ask,fl,fl_color,fl_file dialogs. Fixed the fl_old_shortcut appearing in Fl_Button.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-03 11:20:50 +00:00
Fabien Costantini b763b271a7 Doxygen documentation : removed useless FLTK prefix to Modules list as it doesn't change their order in the Modules page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-03 08:05:48 +00:00
Albrecht Schlosser acbb5af54b doxygen docs for some missing Fl_Group methods, updated Fl::focus().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-28 22:25:23 +00:00
Fabien Costantini ffad932289 + Cairo branch merged after successful testing on Mac OS X 10.5.4, Linux Ubuntu 8.04,Windows XPSP2.
This integration is minimum as discussed, in particular it does not feature any fltk cairo drawing substitution
  as in fltk2.
  Still it provides all the fundations to go further even in next 1.4 ... 
  By default *no* cairo features are implemented nor linked, it can only be activated by --enable-cairo
  whose default is false.
  Please visit the README.cairo for complete description.

+ fixed UTF8 compilation pb on linux ubuntu

+ minor comments fixes on the fly



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-25 18:26:33 +00:00
Matthias Melcher e8f467b9e3 Updating fl_utf8.h references. Fixing copyright date in .fl files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19 17:40:20 +00:00
Fabien Costantini e8478458bf Doxygen documentation: Fixed most important warnings for the Fl_Widget, Fl_Window, Fl_Valuator classes that should be now a 100% documented. For the rest I drastically reduced the undocumented APIs, but many others (less important) remains.
It looks and feels pretty good now :-)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 19:09:34 +00:00
Fabien Costantini d75b9717c7 Doxygen documentation: added groups to Fl, now appearing in modules. I don't like to see an isolated fl_color_chooser function instead it should be attached to a group called Common Dialogs with all fltk ask color file directory predefined dialogs...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 13:20:25 +00:00
Fabien Costantini 3787be9b6e Doxygen documentation: replace all occurences in comments of " by a quote char. Temporarily set warn_if_undocumented to NO until we correct more severe messages.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6283 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-17 15:44:43 +00:00
Fabien Costantini ae697b80b2 Doxygen documentation : took the opportunity to update copyright info as we modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16 07:26:22 +00:00
Fabien Costantini a99524ef2d Doxygen documentation. Completed Fl class, added a todo related to recent Fl API to document. Matt?. More cosmetics have been done, replaced *all* <pre> </pre> tags by \code \endcode sequences.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15 19:21:20 +00:00
Fabien Costantini d55dfeb5e9 Doxygen documentation. Fixed somes typos and also H4 remanent misplaced tags and comments.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-15 17:46:42 +00:00
Fabien Costantini 9bf19e2329 WP1 merged from my branch, WP2 reserved, todo list updated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-13 22:33:03 +00:00
Matthias Melcher b6bde2e456 Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10 23:56:49 +00:00
Michael R Sweet d8c288df3e Fix compiler warnings/errors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20 16:18:31 +00:00
Matthias Melcher 18f2016b1f Removed the Fl::set_awake_cb API and documented the Fl::awake(function, data) API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-03-20 10:41:14 +00:00
Matthias Melcher 11a15d83a2 This is a suggested change. It is complete except for documentation.
I did not like the awake_cb system at all. These changes implement Fl::awake(Fl_Awake_Handler, void*) which is called from a thread and tells the main loop to call the specified handler (rather a callback I guess) as soon as possible from within the main thread. It is implemented as Fifo (currently 1024 entry ring buffer), so handlers are called in the order that they are generated in.

"test/threads" was modified to change the label color as soon as a thread reaches 10000 - pretty boring, but it show the wonderful simplicity of this approach: you can write libraries that don't need to add to the main loop or register a handler at all... .

I will do some more stress testing tonight.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-03-06 17:15:03 +00:00
Michael R Sweet 6e9a163035 Add handler for thread messages (STR #1536)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-08 23:04:20 +00:00
Michael R Sweet 8ea3a45772 Merge all of the scrollbar sizes into a single API call
(Fl::scrollbar_size()) rather than a bunch of separate APIs and
hardcoded values (STR #1800)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-11-16 23:17:13 +00:00
Michael R Sweet 3ebd631cf0 Fl::x(), Fl::y(), Fl::w(), and Fl::h() did not report the desktop
work area on X11 (STR #1482)

Fix another "missing sentinel" warning in the Xft code.

FL/Fl.H:
    - Remove in-line x() and y() implementation for X11.

src/Fl_x.cxx:
    - Fl::x(), Fl::y(): Added.
    - fl_init_workarea(): Added to get _NET_WORKAREA property from the
      root window; if none, is available, the code falls back to 0, 0,
      DisplayWidth, and DisplayHeight.

src/fl_font_xft.cxx:
    - Missing sentinel needs cast to void *.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5535 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-10-30 14:16:08 +00:00
Matthias Melcher 428a283f83 Added an event variable "Fl::event_original_key()" which returns the current key code (see Fl::event_key()) before it gets mangled through the NumLock keypad conversion. This way, an application can differentiate between an arrow key and a numeric keypad w/NumLock off.
On Win32, releasing a numeric keypad key w/NumLock off wiould return the wrong keycode (keypad instead of arrow key).

Documentation changed accordingly. X11 code is yet to be tested.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-09 07:48:08 +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
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 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 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 a3d0905c9e Copyright updates and prep for 1.1.5rc1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11 04:39:01 +00:00
Michael R Sweet 00cb676e11 Copyright update for 1.1.3 release (not quite yet, but soon...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30 21:46:07 +00:00
Michael R Sweet 1aecada52c DLL changes (still some more to go...)
Move BMP, GIF, and PNM image loaders to fltkimages project.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2583 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-14 16:19:48 +00:00
Michael R Sweet a6b935289e Move the rest of the image file formats (except for XBM and XPM) to
the fltk_images library; saves about 16k in the FLTK core library on my
Intel system.

Fix a memory leak bug in most of the fl_set_fonts*.cxx implementations;
as a result, the Fl_Fontdesc structure now has a fontname member to old
the human-readable font name.

Lots of fixes for shadowed variables, etc.

Use snprintf, strlcpy, and strlcat in more places.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-08-09 01:09:49 +00:00
Michael R Sweet 35308e5c22 Added Fl::get_boxtype() method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-30 14:57:02 +00:00
Matthias Melcher dfefc7b244 First steps in CodeWarrior on OS_X support.
(Praise the day when I finally stop screwing up cvs ;-/  )


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-17 06:09:26 +00:00
Michael R Sweet aa837b09da More FL_EXPORT stuff for WIN32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2529 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-14 19:08:25 +00:00
Michael R Sweet 16046bf4dd Add Fl::remove_handler() method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2491 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-08 15:14:38 +00:00
Michael R Sweet dc355ebb54 Add Fl::dnd_text_ops() methods.
Fl_Input now conditionally supports DND out via run-time option.

Fl_Input now clears selection if you click inside the selection when
DND is turned on.

Added support for scheme, dndTextOps, and visibleFocus resources under
X11.

Documented all X resources supported under X11...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-13 22:17:46 +00:00
Bill Spitzak 5f55e1cd63 Back-ported cut & paste code from fltk2.0.
This code splits the cut & paste into two buffers. The "SELECTION" is
used for the currently highlighted text and for middle-mouse paste and
(if possible) for handling drag & drop. The "CLIPBOARD" is for Ctrl+C
and Ctrl+V style cut & paste.

This matches how Motif, GTK, and KDE 3.0 work. But many older X
applications (including KDE 2) can only see SELECTION, this results in
cut & paste incompatability that is familiar to X users. However this
now moves fltk over to the majority camp.  On all systems this
eliminates the annoying inability to select a region and replace it
with Ctrl+V.

On Mac and Win32 the SELECTION is local to the application, so
middle-mouse paste only works between fields in the application. There
may be tricks (special clipboard data types? use drag & drop?) to make
it communicate, but unless there are standards it would be fltk-only.

The file Fl_cutpaste.cxx has been deleted, so update the IDE files!
The Win32 and Mac versions have NOT BEEN TESTED! I tried to be careful
editing them but they may need some work.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-07 19:22:58 +00:00
Michael R Sweet 6eff9b3b14 First round of DND additions to 1.1 - just X11 code, and I haven't added
the support in widgets yet.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1925 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-09 21:50:02 +00:00
Michael R Sweet 64b4177ef4 Copyright updates...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01 15:11:33 +00:00
Michael R Sweet df9acaafea Implement Fl::scheme() and Fl::reload_scheme() (this includes support
for new FLTK_SCHEME environment variable, which should get added to
FLTK 2.0 CVS, as well as the -scheme option...)

Revert Fl_Group/Fl_Widget destructor change - it doesn't work for
statically initialized widgets (like the widgets in a color chooser...)

Export fl_round_up_box() and fl_round_down_box() so they can be
restored in Fl::reload_scheme().

Use FL_DOWN_BOX and FL_ROUND_DOWN_BOX in menu drawing code.

Use a static string for the display environment variable in Fl::display().

Updated MacOS README file...

Added window tile image...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1883 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-20 14:41:44 +00:00
Michael R Sweet 329b4127f6 Multiple bug fixes from Sebastien:
- Fl_GIF_Image and Fl_PNG_Image didn't close the file before
      calling Fl::error().
    - Fl_Help_View didn't clear the line array in Fl_Help_Block,
      and Fl_Help_Block::font and ::size were not used.
    - Fl_Shared_Image::get() didn't return NULL if the image
      could not be loaded.
    - Switched to more efficient code for
      Fl_Tiled_Image::color_average() and ::desaturate().
    - Don't delete children in Fl_Text_Display since the group
      will do it.
    - Fixes to filename_isdir(), filename_absolute(), and
      filename_relative().
    - Was using numbers instead of define constants for some
      OpenGL stuff under WIN32.
    - Wasn't exporting threading functions under WIN32.
    - The Fl_Widget destructor now removes from the parent to
      avoid a Purify error since the old widget would be
      referenced by the parent when it was destroyed; this has
      no apparent performance impact since Fl_Group::clear()
      sets children_ to 0, making Fl_Group::remove() very
      fast...
    - WIN32 font enumeration datatype fixes...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-19 18:15:34 +00:00
Michael R Sweet 5c3b2f74bc More tweeking of plastic boxtypes.
Redraw parent if child button loses focus and is using FL_NO_BOX.

Fix test/Makefile to build mandelbrot and shiny demos right.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-14 16:48:13 +00:00
Michael R Sweet fdcdc8fd46 Multiple fixes from Sebastien.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-11 16:03:13 +00:00
Michael R Sweet ba2be02ab2 FLTK 2.0 threading support under FLTK 1.1. Needs porting to OSX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1819 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-06 22:16:49 +00:00
Michael R Sweet c78dcd55ec More doco updates.
Enable tooltips by default, and don't enable them when setting the
tooltip value, since that will negate any changes a program might
make when displaying the file chooser dialog, etc.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-28 20:43:44 +00:00
Michael R Sweet d211b12af7 Add Fl::version() and Fl::event() methods.
Doco updates (use <!-- NEW PAGE --> instead of <HR break>, plus more
Fl_Text_Buffer docos)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-28 18:00:17 +00:00
Michael R Sweet 2b85bf8168 Preliminary commit of my MacOS X work.
**** THIS CODE COMPILES BUT DOES NOT WORK. ****

TODO: fix event handling - getting blank windows, etc.
TODO: re-port OpenGL code.
TODO: add support for images with alpha.
TODO: add support for more then just beeps in fl_beep().
TODO: other stuff I'm sure...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-27 17:44:08 +00:00
Michael R Sweet d3acd6c475 Add Fl::visible_focus() method.
Add optional "draw_symbols" argument to fl_draw and fl_measure functions.

Fl_Repeat_Button didn't handle keyboard focus properly.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1678 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-03 05:11:34 +00:00
Michael R Sweet 28c0d4ffa1 Symbols are now supported by main label drawing code - @@ to insert a
single @. Currently only 1 symbol per label, at the beginning or end of the
label string, with the remaining text (and image) getting formatted as
usual.  The size of the symbol == lines * labelsize, unless there is
no text in which case the size == height of label area.

Fl_Menu_Item::draw() didn't clear the image field in the Fl_Label
structure.

Removed Fl::enable_symbols(), which is now the default.

Dropped FL_IMAGE_LABEL, FL_PIXMAP_LABEL, and FL_BITMAP_LABEL types,
which are no longer needed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-06 03:17:43 +00:00
Michael R Sweet 2d3fd88eeb More mouse wheel stuff (as compatible as possible with the 2.0 code...)
Updated the makefile to use config.status --recheck before calling
config.status (why they can't provide one that does both, I don't
know...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-02 20:09:25 +00:00
Michael R Sweet 94788c4628 Copyright 2001.
FLTK 1.0.11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22 15:13:41 +00:00
Bill Spitzak f5375b6ab6 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.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-12-12 08:57:30 +00:00
Bill Spitzak 1150141ead Changed the name of the new function from "add_interval_timeout" to
"repeat_timeout", which is shorter and more accurately describes what
it does.

GLUT_STROKE_*_ROMAN in glut.h are defined as 0,1 on WIN32 to match the
glut header files there.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-21 17:36:36 +00:00