Commit Graph

845 Commits

Author SHA1 Message Date
Michael R Sweet
df57aa4d2f Re-integrated all of the old WIN32 select() code just in case it is needed
(undefine USE_ASYNC_SELECT to use the old code)

XBell() might be called before fl_display is initialized.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@966 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-30 17:37:05 +00:00
Michael R Sweet
30ce47ef69 New WSAAsyncSelect code for WIN32 Fl::add_fd() support.
Fixes for Fl_Scrollbar - pushed_ bits wrong...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-29 03:14:41 +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
Michael R Sweet
96286acd1b Updates for 1.0.7.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@956 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-17 18:52:47 +00:00
Michael R Sweet
9186cf6ce9 Updated to 1.0.7.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-17 18:51:23 +00:00
Bill Spitzak
b101ac281d Patch from Clemens Hintze to allow declaratons of "typedef" to work.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@954 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-17 18:35:00 +00:00
Bill Spitzak
e7f42fa15f Fixed bug on Win32 where programs would stop paying attention to keys.
What actually happens is that GetKeyState() returns garbage for the
"windoze" keys if you hit them to pop up the start menu.  It now calls
GetAsyncKeyState(), which works.
Also this version calls TranslateEvent on all events before calling
DispatchEvent(), which is apparently what Win32 expects.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-15 04:58:27 +00:00
Michael R Sweet
a2b5dfc5d5 Added #ifdef's for OpenBSD and NetBSD...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@946 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-08 20:49:57 +00:00
Bill Spitzak
3e0db7129e Removed warning messages from gcc compile
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@942 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-07 17:53:09 +00:00
Michael R Sweet
1e3bc4ba57 Minor change - now check the version of Windows we have to
determine if we should use the built-in hand cursor instead of up-
arrow...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-06 14:43:40 +00:00
Michael R Sweet
6ffdd70246 FL_CURSOR_HAND should be IDC_HAND, not IDC_UPARROW.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-05 13:59:26 +00:00
Michael R Sweet
08ed55a14b Scrollbars now "page" when you click outside the scroller.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@934 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-04 12:22:37 +00:00
Bill Spitzak
6291a33526 Fixed warning message in Mike's fix to Fl::args
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@933 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-03 18:11:05 +00:00
Carl E. Thompson
6b60719c6d Fixes argc == 0 segfault.
Carl


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-12-01 15:49:28 +00:00
Carl E. Thompson
6e6261c5bd Fixed fl_call_main.c to compile with BC5. This fix is already in the 2.0
tree.

Carl


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-30 13:14:27 +00:00
Bill Spitzak
ec8a580634 Running with -c on a file with browsers in it does not require X
DISPLAY to be set.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-20 09:17:21 +00:00
Bill Spitzak
c05eed1e54 Correctly measures browser items with @C or @B color formatting commands.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-19 08:44:43 +00:00
Michael R Sweet
555f3eb3a7 Fixed bit reversal table - entry for reversing 1100 was set to 0010
instead of 0011!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@887 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-18 17:12:55 +00:00
Michael R Sweet
ef8eaf25b8 Now set the label() of the message form appropriately (no more ***** in
the title bar!)

Now call MessageBeep() under WIN32 for all popups and XBell() for
fl_alert() under X11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-18 16:33:01 +00:00
Michael R Sweet
89323df848 Fl_Browser_ didn't draw the selection box using an inactive color when
needed.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@880 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-16 14:44:43 +00:00
Bill Spitzak
9ce13e4fff Changes requested by Jeff Meininger
1. Browser responds to FL_KEYBOARD as well as FL_SHORTCUT.  If you subclass
it to accept focus then keyboard navigation will work.  I could not do his full
patch as it broke the file chooser's tab completion and perhaps other programs.

2. Fl_Tile and Fl_Tabs do their callback when the user changes their display.

3. Made some of the private methods of Fl_Browser protected.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-16 07:39:59 +00:00
Michael R Sweet
d1f909be8a fl_arc() and fl_pie() fixes for WIN32 removed - the problem is with
the SGI X server with small arcs & pies, and not with WIN32.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-12 00:19:14 +00:00
Bill Spitzak
b59a07f472 Sets win_gravity correctly, this helps some X window managers that use
it position the window where fltk wants it to be.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-10 09:18:31 +00:00
Michael R Sweet
20522b715e fl_arc() and fl_pie() were drawing 1 pixel too little horizontally and
vertically under WIN32 compared to X11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@834 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-09 16:40:05 +00:00
Bill Spitzak
b23b10c7e0 Zero-width browsers crashed:
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@831 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-07 08:33:36 +00:00
Bill Spitzak
de5a005e69 Minor change: if the X window manager does not do anything else with windows
that don't have their position specified, the windows appear centered in
the screen, rather than in the top-left corner.  This happened with modal
windows under Irix 4Dwm.  This also causes windows to be centered when no
window manager is running, which might be useful for installation gui programs?


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-11-04 18:35:12 +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
Michael R Sweet
936b75f917 C++ comments are not valid ANSI C source!!!!!!!!!!!!!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@796 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-25 20:32:49 +00:00
Bill Spitzak
0627bd9a3e Does not call draw() on child Fl_Windows when their parent is hidden.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@793 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-23 06:19:59 +00:00
Bill Spitzak
ecd524fdc7 Calling deactivate() from a non-displayed widget could cause an infinite
loop.  I didn't really fix this, but I removed deactivate() from constructors
and replaced with set_flag(INACTIVE).  The loop would happen if a widget
responded to FL_MOVE by calling draw_overlay or otherwise creating an
overlay, which is a pretty rare event.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-23 05:59:27 +00:00
Bill Spitzak
06ea565dba Fixed configure uversion for Irix 6.5
Fix (untested) xparsecolor emulation on Win32 for #x where x != 6 digits


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-19 04:50:34 +00:00
Bill Spitzak
2e58f174f7 Changed the sgi -woff pragma to the new #define suggested by Michael Sweet.
Cast in draw_pixmap that produced an error in the OSF1 compiler fixed.

Error in emulation of GLUT_KEY_F?()


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-16 19:58:22 +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
Bill Spitzak
b9c6935372 Fixed the shiny demo (and a DD program). Note: this fix is not
in fltk 2.0.  It correctly draws the box behind a slider.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-15 08:14:37 +00:00
Bill Spitzak
1d5fcfd080 Forgot to check in the header file changes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-14 04:58:13 +00:00
Bill Spitzak
ce249490d4 These are some (hopefully minor) changes we keep needing to edit into
each new version of fltk for use at Digital Domain.  These were found by
running a diff between 1.0.6 and our inhouse version.

1. WinMain is moved to the fl_call_main.c file so that it can easily be
conditionally-compiled out (code copied from fltk 2.0, not tested!)

2. Fl_win32 ignores the value of window->xclass().  This seemed to cause
problems when windows had different xclass() in the same app and did not
have any useful effect on windows.  This value is changed to set the icon
of the app on X.

3. sgi pragmas added to x.H to turn off warnings from their broken xlib
header files.  Please tell me if this causes any sgi compilers to complain,
we should add more stuff to the #ifdef to stop that.

4. Fl_Gl_Window::ortho() changed so that text and images are not erased
if the origin is off the left/bottom of the window.

5. Small change to Fl_Input so that a click that gives it the focus also
selects all the text.  This is more windoze-like and it seems the users
really like it.

Note also that we had to set USE_XDBE to zero to get things to work on
the newest Irix machines.  I give up, Xdbe has been nothing but an impossible
and confusing mess and it is obvious that the X servers are not testing it
and thus it is suffering from software rot so it is unlikely to work anywhere
in the future.  Not sure if we want to switch it off in the official version,
though.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-10-14 04:56:09 +00:00
Michael R Sweet
4ccf6b4b37 Changes for 1.0.6 release.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@752 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-27 18:16:36 +00:00
Bill Spitzak
be101a57e6 Fl_Repeat_Button removes the timeout if it is deactivated or hidden
while it is still held down.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@739 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-20 04:27:24 +00:00
Bill Spitzak
c8794e2f58 Fixed some WIN32 bugs found in 1.0.5:
FL_MOUSELEAVE had an extra underscore
call to toupper() removed
const char* cast added to fl_draw_pixmap

Change to Fl_Gl_Window that did not get in in time for 1.0.5, it caches
the current gl context and does not call glXMakeCurrent (wglMakeCurrent
on WIN32) if not needed.  This distinctly speeds up Mesa, Irix, and
Windows opengl, although I am stumped why such a test is not built
into those libraries already.

If you use other code that sets the current OpenGL context fltk will
get confused because it does not know it changed.  To fix such programs
you must call fl_no_gl_context() to clear the cache.

There is a report that this causes the fractals demo to crash on some
Linux and Irix machines, although I can't reproduce it.  I suspect the
problem is the fractals demo and not fltk, but this change may be making
it more likely to fail.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-16 05:34:27 +00:00
Michael R Sweet
5e57d3cc12 Added missing README file...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-15 17:37:42 +00:00
Michael R Sweet
c4cc8d6693 Fixed typos...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-15 17:19:47 +00:00
Michael R Sweet
fbe24c3b80 Updated for FLTK 1.0.5.
Added EPM distribution list file.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@721 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-15 17:05:50 +00:00
Michael R Sweet
aa9c028aeb Added Fl_Roller fix from 2.0 tree.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@719 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-15 16:07:03 +00:00
Michael R Sweet
9afb77da56 Fixed long-standing bug reported by Rick Sayre in Fl_Browser_ - if the
draw code added a horizontal scrollbar it might not add the vertical one
until the next redraw.

Added FreeBSD to the list of platforms needing the scandir function cast.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@718 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-15 15:18:12 +00:00
Bill Spitzak
54a6bda767 The arrow patch is in!
Slightly modified version of the second version submitted.
It reuses the resizing code for the mouse drag and does not turn on the overlay
if it has been toggled off.  Also cleaned up some very hard to understand
code for handling FL_KEYBOARD.

Arrows move the selected widgets by 1 pixel
Shift moves the right+bottom edge of the selected region
Ctrl moves by the current grid step

Also typing the letter 'o' in a window is a shortcut to toggle the overlay
on and off.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-10 16:40:17 +00:00
Bill Spitzak
820654ccd6 Does not write "extern foo *bar" declarations twice.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@709 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-09-08 06:05:00 +00:00
Bill Spitzak
7f60ccd9ad Added missing FL_EXPORT to Fl_Window::resize()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@691 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-08-27 08:27:42 +00:00
Bill Spitzak
6b07587d74 Now correctly draws XPM files with 16-bit color indexes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@674 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-08-25 05:37:40 +00:00
gustavo
138c7287b2 Changed call_timeouts() and Fl::wait()/wait(double). The wait functions will now return immediately (do fl_wait(0,0)) if any timeouts were called in call_timeouts(). Motivation: An event loop like
while (work_to_do) {
	work_some();
	Fl::check();
    } else {
	Fl::wait();
    }

    Suppose that a timeout sets the work_to_do flag, which is initially cleared.
    Fl::wait() will wait for this timeout, return, then expire the timeout and wait for user input.
    With the fix, it will work as expected.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@669 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-08-22 23:31:21 +00:00
Bill Spitzak
1706466f04 Added inline function make_visible(n) to scroll it to show line n.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-08-20 07:54:36 +00:00