Commit Graph

46 Commits

Author SHA1 Message Date
Michael R Sweet
57cef6a4bd Remove extra 3 pixel offset when the size is below a certain amount;
instead, use a constant +1 offset.

Add another bit to flags_, VISIBLE_FOCUS, which provides
per-widget keyboard focus control.  The default is for all
widgets to participate in keyboard focus navigation.  Use the
set_visible_focus(), clear_visible_focus(), and visible_focus()
methods on Fl_Widget to control this.

Clean up the Fl_Widget documentation and add missing stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2543 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-23 15:07:33 +00:00
Michael R Sweet
667eb3ef6c Remove 3 pixel X border in input fields.
Don't quote chars 0x80 to 0x9f in input fields (labels didn't...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2541 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-07-20 05:56:44 +00:00
Michael R Sweet
a48e1cac3f Port 2.0 drawing optimizations for Fl_Input_ - this provides a more
efficient fix for anti-aliased text.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2118 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-27 19:20:50 +00:00
Michael R Sweet
c2521c01da Bump version info to 1.1.0rc1.
Force full redraw in Fl_Input when using Xft or OSX anti-aliased text.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-16 17:11:11 +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
84950c0af7 Fl_Output didn't grab input focus, and so was unable to handle CTRL-C
to copy selected text, and wouldn't know when to redraw itself when
it lost focus...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-08 18:32:16 +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
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
Matthias Melcher
d0bdfe300d - MacOS: more keyboard handler fixes, mainly mapping of Mac specific
keys and iBook keys, several fixes to keyboard focus.

Happy Holidays!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1894 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-22 07:16:12 +00:00
Michael R Sweet
e5db11fd43 Make paste logic smarter for int and float fields.
Replace existing text when pasting into an int or float input field.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1691 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-17 17:00:22 +00:00
Michael R Sweet
45658d7c0f Add fl_beep() function.
Don't allow non-int/float text to be pasted into an Fl_Int_Input or
Fl_Float_Input widget.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1690 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-17 16:37:48 +00:00
Michael R Sweet
079082ef7c 32-bit color (RGB0 or 000I), a la FLTK 2.0, including fl_rgb_color()
function to generate an RGB Fl_Color value.

Sort button names in FLUID.

Fix focus and scroll problems in Fl_Text_Display/Editor.

Fix radio/button demo.

Removed D2 menubar.H header...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-10-29 03:44:33 +00:00
Michael R Sweet
72b56edc29 Tooltips, and more tooltips.
Fl_Browser_, Fl_Choice, and Fl_Input_ did not do the tooltip stuff.

Fix write_properties so it writes tooltips properly from FLUID.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-09-29 22:59:45 +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
33c5896a26 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.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1302 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-09-19 07:21:19 +00:00
Bill Spitzak
823b1f8460 Fixes to WORDWRAP modification to Fl_Input based on work done by
Alexander Rabi Beels.  This will not affect things much because WORDWRAP
is normally disabled.  However it fixes a few bugs with word+line selection
and with up/down arrows working when there are tabs or control characters
in the text.  I modified his patches so no changes are needed to the
header files to enable wordwrap and so that very long words scroll
horizontally rather than break between letters.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-20 07:56:09 +00:00
Bill Spitzak
56347777a1 Better horizontal scrolling of Fl_Input when cursor is near end of line, restored the selection of all text when Fl_Input::value(x) is done
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1179 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-08 07:38:29 +00:00
Michael R Sweet
7bf3c4e2eb Fixed bug where Fl_Output and Fl_Multiline_Output would scroll to the
end of the value() text.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-06 18:42:08 +00:00
Michael R Sweet
f87393aaa1 OK, now version 1.0.9
Updated email addresses to point to fltk.org domain...

Updated README and CHANGES files accordingly.

Updated makeinclude and Makefile files to put -L../lib before the
LDFLAGS/GLDFLAGS to avoid problem reported by Alexander.

documentation/Makefile wasn't including makeinclude.

Updated FLUID about window to show version 1.0.9.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05 21:21:24 +00:00
Michael R Sweet
4b561b6e90 Updated copyright notices for all of the 1.0.x files.
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions)

Added install rule to documentation directory.

Dumped old packages directory; added traditional RPM spec file and EPM
list file (that replace all of the packages stuff)

The FLUID man page is now "fluid.1" for the formatted page and "fluid.man"
for the non-formatted page, since only IRIX uses pack'd formatted man pages.

Whew!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25 22:17:00 +00:00
Bill Spitzak
8251826357 Stuff that didn't get into 1.0.7:
Fix for Borland or other platforms where GLint != int.

Fixed browser scrollbars so they work if browser is inside a scroll
(it did not update their position to match where they were drawn)

Fl_Output (and non-focused Fl_Input) now scroll in response to position()
calls from the program to show the position.  In addition I cleaned up the
horizontal scrolling of Fl_Input to be less screwy, it now never scrolls
if the text actually fits in the widget.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-19 05:32:34 +00:00
Bill Spitzak
c3bd173a57 More fixes to the text editing to make the NT users happy.
With all the recent check-ins, the result is that text editing is a
combination of the best parts of "CUA" and X/Motif text editing
(in my opinion).  It mostly acts like CUA with these additions:

1. Clicking in a field the first time selects the entire field (this is a
necessary modification so that it works in point-to-type window managers
and still looks like Windoze, in Windoze it appears that all text fields
are switched to all-selected when the window is "activated").

2. The middle mouse button acts like the left one and *then* does "paste".
Unlike Motif you can replace text by selecting it with the middle mouse button.

3. *drag* of the left mouse button does "copy".  Unlike Motif, other methods
of selecting text (like double-click) does not do "copy".


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-30 20:21:30 +00:00
Bill Spitzak
a7904da09a I fixed Fl_Tabs so that child tabs can be added/removed without any
concern if they are selected, it uses the first visible() child to
indicate the selected tab.

Fixed up rather bogus fix for selecting entire text field when you click
on it.  This new version does not do it for multi-line and does not
mess up the middle-mouse paste action.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@777 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-15 09:01:48 +00:00
Michael R Sweet
516ed80d97 Added "buffer=0" in constructor to avoid purify errors.
git-svn-id: file:///fltk/svn/fltk/trunk@359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-03-04 18:09:18 +00:00
Bill Spitzak
4df7511b18 Didn't like yesterday's fix, I changed it so that zero-length selections
are allowed.  Warning: untested on WIN32 (although it seems likely that
it will work).


git-svn-id: file:///fltk/svn/fltk/trunk@349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-03-02 07:03:15 +00:00
Bill Spitzak
32291ad0d5 Made secret input more secretive (word-select does not work and
it sets X selection to '*' instead of leaving it unchanged)


git-svn-id: file:///fltk/svn/fltk/trunk@348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-03-01 03:44:30 +00:00
Bill Spitzak
f19b6ee3e4 Fixed editor demo redraw bug (actually same fix as somebody else made).
Highlight is cleared if any other widget makes an X selection.


git-svn-id: file:///fltk/svn/fltk/trunk@345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-26 07:07:56 +00:00
Carl E. Thompson
bdbc0b8b2e Fix for redraw bug in editor demo. Fl_Input_::position() didn't seem to
want to properly update the position if the input didn't have the focus.
This works, but I'm not sure if this is the most efficient solution.  Could
someone who really understands the position() and minimal_update() routines
double-check this?

-Carl


git-svn-id: file:///fltk/svn/fltk/trunk@344 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-25 22:34:12 +00:00
Bill Spitzak
f89b5d0cf6 Fixed glpuzzle so you can move the pieces.
Added commented-out line to fl_input that could maybe fix highlight confusion


git-svn-id: file:///fltk/svn/fltk/trunk@343 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-02-25 20:05:30 +00:00
Michael R Sweet
c31a0f7dee More color fixes from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@214 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-13 15:57:38 +00:00
Michael R Sweet
0a36d98420 Yay, change all copyright notices to be 1998-1999.
git-svn-id: file:///fltk/svn/fltk/trunk@201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-07 19:18:01 +00:00
Michael R Sweet
65d091e11b Word wrap update from Bill...
git-svn-id: file:///fltk/svn/fltk/trunk@183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-04 19:29:10 +00:00
Michael R Sweet
b95db33f2c Lots of changes:
- Added #defines for Visual C++ to speed up compiles.
    - Added FLTK.DLL project to visualc directory.
    - Added editor project to visualc directory.
    - Added icon() method to Fl_Window class.
    - Implemented xclass() method for WIN32.
    - Fixed extern declaration of fl_send_extra_move in Fl_Menu_Window.cxx.
    - scandir_win32.c needed to include <stdlib.h>.
    - Added fix from Bill for fl_width() bug.
    - Updated fix for Fl_Input to default to FL_DOWN_BOX.
    - Added visible() check for children of Fl_Pack.
    - Added WinMain() function to library.
    - Now show console window in debug mode.
    - Fixed demo.menu and demo.cxx to work under WIN32.


git-svn-id: file:///fltk/svn/fltk/trunk@180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-04 19:25:40 +00:00
Michael R Sweet
f17882c5cb Fixed the Fl_Input selection color when the user specifies a foreground or
background color on the command-line (patch from Bill).


git-svn-id: file:///fltk/svn/fltk/trunk@172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-12-29 14:05:13 +00:00
Michael R Sweet
849e11623e Changes from Carl to get rid of default_ variables...
git-svn-id: file:///fltk/svn/fltk/trunk@106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-12-02 15:39:39 +00:00
Michael R Sweet
402527311e The slider was not drawing the bar inactive.
git-svn-id: file:///fltk/svn/fltk/trunk@91 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-18 17:26:44 +00:00
Michael R Sweet
5098fc05af Fix from Adrian Miranda - using memcpy() with overlapping buffers; changed
to memmove()...


git-svn-id: file:///fltk/svn/fltk/trunk@90 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-17 18:43:24 +00:00
Michael R Sweet
3ad63de2bf Fl_Input patch from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@83 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-10 14:40:56 +00:00
Michael R Sweet
39be2233f4 Memory overflow fix from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@66 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-06 20:14:41 +00:00
Michael R Sweet
80b1529ef4 Multiple patches from Bill:
- Double-buffered window fixes.
  - Tabs fixes.
  - X/WIN32 fixes.
  - Fl_Input fixes.
  - Support for vsnprintf and friends.
  - Support for printf-style arguments in utility functions.


git-svn-id: file:///fltk/svn/fltk/trunk@52 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-11-05 16:04:53 +00:00
Michael R Sweet
7657a2e4a5 Fixed all the frigging file headings - was missing a $ in the Id string.
Applied some damage bit fixes from Bill Spitzak.


git-svn-id: file:///fltk/svn/fltk/trunk@28 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-21 14:21:44 +00:00
Michael R Sweet
1a86a0ede0 The great heading change - now use standard LGPL header with CVS tags.
git-svn-id: file:///fltk/svn/fltk/trunk@19 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-19 20:46:58 +00:00
Michael R Sweet
512332670a Added Gustavo's damage() update - now use symbolic constants for all values!
git-svn-id: file:///fltk/svn/fltk/trunk@18 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-19 17:53:09 +00:00
Michael R Sweet
f9039b2ae2 Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1998-10-06 18:21:25 +00:00