Commit Graph

243 Commits

Author SHA1 Message Date
Michael R Sweet
6a6e4ab66c Separate the extra image functions into fltk_images.
Add new fl_register_images() function to register the extra file formats
with Fl_Shared_Image.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2329 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-28 21:04:37 +00:00
Michael R Sweet
cdc15f49a6 Fix math header for nocygwin mode.
Revert focus check in fl_fix_focus().

Don't click the click count in Fl_Browser_::select().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2324 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-27 20:52:44 +00:00
Michael R Sweet
1be610c970 Better MingW handling.
Convert C++ comments to C comments in filename.H, which is included
from some C files.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-26 12:03:28 +00:00
Michael R Sweet
4a6299fbcc Add FLTK_1_0_COMPAT symbol for 1.0.x compatible names.
Document this in the migration appendix, and add a section on keyboard
focus.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2316 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-24 15:22:57 +00:00
Michael R Sweet
34e35db71f Prefer fl_push_clip() over fl_clip().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-11 20:58:12 +00:00
Michael R Sweet
c3cde61e98 Add documentation for using styles in text editor.
Add placeholder for style attributes - hidden + underlined - for
future use.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-09 18:28:49 +00:00
Michael R Sweet
13ae564f03 Add color definitions for "dark red", etc.
Change "text" and "selecion" methods to return char *, not const char *,
since they return a changeable copy of the text.

Add range checking to style lookup in Fl_Text_Display.

Add syntax hilighting to editor example.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-09 13:35:49 +00:00
Michael R Sweet
5d7f42585b Fix test for OpenGL libraries - not == xno, but != xyes.
Add some other NEdit text display data that wasn't in the current
implementation (wrap + line number stuff).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2296 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-08 12:51:38 +00:00
Michael R Sweet
861ad9769b New file chooser.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2286 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-06-07 15:06:32 +00:00
Michael R Sweet
23972703f4 Some C++ compilers can't handle char& and int& versions of methods, so
for now just remove the char (boolean) methods since the integer methods
can also be used for the same thing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2274 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-31 19:27:56 +00:00
Michael R Sweet
d5541b5cd6 fl_read_image() - not implemented for WIN32 or OSX yet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2269 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-30 15:09:03 +00:00
Michael R Sweet
acd6bd5cc8 Clean up string includes.
Fix Fl_Shared_Image::add_handler() and friends.

Fix Fl_PNM_Image loader.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-25 13:38:25 +00:00
Michael R Sweet
262321f5e6 Fix cancel bug in file chooser with multiple-selection mode.
Allow all resizes in the file chooser.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2252 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-24 14:02:56 +00:00
Michael R Sweet
23cfc372a0 Fix links inside PRE
Make style data const in Fl_Text_Display.

Use INT input only when step() is an integral value.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2246 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-21 11:14:59 +00:00
Michael R Sweet
88d54cd78b Massive update to use strlcpy() and strlcat() instead of strncpy()
and strncat() in almost all places (there are still a few strncpy's
that need to be used...)

Added configure check for strlcat() and strlcpy().

Added emulation code for strlcat() and strlcpy().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-16 12:47:44 +00:00
Michael R Sweet
f953ffc27d Change _WIN32 to WIN32 for 1.1.x tree.
Cleanup recent tooltip changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2215 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-13 15:43:10 +00:00
Bill Spitzak
80465e4bff Backported the fltk2.0 tooltips. This may be somewhat binary incompatable
as Fl_Widget::tooltip(x) is no longer an inline (though the previous version
will work if there is at least one call to the new one). It may be better
to just enable tooltips all the time. Also Fl_Tooltip::enable() is changed,
but few programs call that.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2210 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-13 05:05:11 +00:00
Michael R Sweet
ad9546204c Use 16x16 KDE icon images by default.
Tweek plastic boxtypes (didn't draw to the edge of the bounding box)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2205 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-10 00:18:37 +00:00
Michael R Sweet
bde72ca8ce Change "typedef enum {} type" to "enum type {}"...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-07 00:43:20 +00:00
Michael R Sweet
fbf099f11e Fix portability problems with Solaris Forte C++ compiler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-03 20:30:19 +00:00
Michael R Sweet
b010bc55c4 Add sort function to file chooser.
Document sort function and label strings for chooser.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2179 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-02 15:24:34 +00:00
Michael R Sweet
ae0a956f2e Add sort function as optional argument to Fl_File_Browser::load().
Add docos for sort functions and changes to fl_filename_list() and
Fl_File_Browser::load().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-02 14:31:10 +00:00
Michael R Sweet
47e7de17bc Fix new filename stuff for WIN32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-02 14:15:46 +00:00
Michael R Sweet
a237472c70 Update fl_filename_list() to accept a sort function to use, and export
fl_alphasort, fl_casealphasort, fl_casenumericsort, and fl_numericsort.

Still need to document this and provide hooks in the file chooser and
browsers.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-02 11:11:01 +00:00
Michael R Sweet
94a9fb879f Fix backspace "bug" in file chooser - now treat delete and backspace the
same, eliminating any filename completion value.

Added relative argument to fl_file_chooser() and fl_dir_chooser(); both
default to 0 (return absolute paths)

Give focus to the filename field in the chooser when show() is called.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-01 12:41:21 +00:00
Matthias Melcher
adb6fc4eeb added binary support and procedural names to
Fl_Preferences, updated FLUID, update documentation.

Attempted to strip all Win32 CR.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-30 22:25:18 +00:00
Michael R Sweet
8972642109 New Fl_File_Input widget, courtesy of Curtis Edwards old Fl_Input_File
widget (Fl_File_Input is much lighter-weight, and is simpler in function.)

Update file chooser dialog to use new Fl_File_Input widget and always
display absolute path.

Still need to do docos, new screenshots, and update FLUID to support the
new widget.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2145 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-30 21:50:16 +00:00
Michael R Sweet
1f5448409b Fl_Preferences::getUserdataPath() and getPath() methods now require a
length parameter for the string.

Added GUI preferences and file history to FLUID, using Fl_Preferences.

FLUID now uses getUserdataPath() for the cut buffer location.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-30 18:11:49 +00:00
Michael R Sweet
bc0389efbc Damned MS-DOS line endings!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2133 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-29 20:57:31 +00:00
Michael R Sweet
13587f41c2 Re-import the *current* version of Matthias's code, with appropriate
buffer limiting fixes, include "flstring.h" instead of <string.h>,
and replace all use of bool, true, and false, with char, 1, and 0.
(bool is not universally supported by the C++ compilers we currently
use with FLTK 1.x, so 1.x cannot use bool, true, or false without a
lot of configure crap that will make use/distribution a lot more
difficult...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2132 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-29 20:56:19 +00:00
Michael R Sweet
44bb5f60de Add Fl_Preferences class to base library.
Add FLTK_DATADIR definition to config.h for system-wide configuration
data.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-28 16:41:17 +00:00
Michael R Sweet
ee5fdc99ce Images in menu items...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-26 11:32:37 +00:00
Michael R Sweet
7e8ec10e6d Add missing docos for Fl_Progress.
Add Fl_File_Chooser::directory_label, filename_label, and filter_label
static string pointers for labels (allows for I18N of the file chooser).

Fix typos in other docos.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-18 20:37:29 +00:00
Michael R Sweet
e1828d045f Change fl_create_deepmask() to fl_create_alphamask().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-15 12:19:01 +00:00
Michael R Sweet
0c396a615b Added fl_create_deepmask() method for creating alpha blend masks.
Implemented Fl_RGB_Image alpha blending for MacOS X - others still
get 1-bit screen-door transparency...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2083 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-14 21:26:06 +00:00
Michael R Sweet
8e3cdc0ac1 Propagate events from the tooltip window to the widget we are tooltipping
for...

Add "tooltips" resource for default state of tooltips.

Fix another tooltip cycling problem.

Fix default help and argument processing (didn't have the right min
chars for matching, and didn't list new options)

Update docos to list new tooltip resource and list of standard arguments.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2079 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-14 02:43:48 +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
Michael R Sweet
9e2f362016 Move ENTER/LEAVE handling to Fl_Box so that the default event handler
in Fl_Widget doesn't interfere with existing widgets.

Remove unnecessary strcasecmp defines.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-12 20:16:07 +00:00
Michael R Sweet
7482426735 Make Fl_Output a subclass of Fl_Input, and add input_type and readonly
methods/constants to support Fl_Output as a special case of Fl_Input
(you can do everything but change the text in Fl_Output...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-11 11:52:43 +00:00
Michael R Sweet
ef36be385e Redefine FL_ color values to use the color cube.
Add FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR, and FL_FOREGROUND_COLOR,
and use them instead of FL_GRAY, FL_WHITE, and FL_BLACK, respectively.
(FL_GRAY defined to FL_BACKGROUND_COLOR for back-compatibility)

Add fl_rgb_color(uchar g) inline method to map 8-bit grayscale to
24-bit RGB color.

Doco updates for all of this...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-11 10:46:19 +00:00
Michael R Sweet
4586bf0fcc Tooltip fixes: ignore keyboard events, immediately disable new tooltips,
show tooltips for box widgets.

Add docos for Fl_Widget::tooltip() methods.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-09 17:20:24 +00:00
Michael R Sweet
2deb2fdfc9 Add image handler to Fl_Shared_Image class to support additional file
formats.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-29 11:59:56 +00:00
Michael R Sweet
6c796f88c7 Rename all remaining functions that don't start with fl_ to
fl_foo. (filename_xyz becomes fl_filename_xyz, down becomes
fl_down, define_FL_PLASTIC_BOX becomes fl_define_FL_PLASTIC_BOX,
etc.)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-25 21:08:42 +00:00
Michael R Sweet
98c9f2cc6b Stereo OpenGL patch from Stuart Levy...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-25 16:41:01 +00:00
Michael R Sweet
1d7aef987d Automatically resize the convenience dialogs as needed...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-23 15:35:08 +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
e52b682a99 Add Xft support to 1.1.x.
TODO: Fl::set_fonts() should add all of the fonts returned by Xft;
right now it is a no-op.

BUG: Getting X messages like "XRequest.155: 202 0x260002b" for some
reason on my system.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1987 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-06 18:11:01 +00:00
Michael R Sweet
394286265a Fix rendering of background color in table cells.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-03-05 11:26:41 +00:00
Michael R Sweet
50274f8d85 Update copyright in FLUID "about" window.
Update fltk-config to support all C++ file extensions.

Make background of FLTK logo transparent.

Disable overlays if the scheme is set.

Fix table cell formatting in Fl_Help_View.  Still need to resolve an
issue with column widths vs. table widths.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-02-20 13:02:27 +00:00
Michael R Sweet
71f9afb6cb Use +O2 for compiler on HP-UX.
Show where we are installing.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1961 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-02-15 18:15:46 +00:00