Moved FL_LEFT_MOUSE, FL_MIDDLE_MOUSE, and FL_RIGHT_MOUSE from forms.h to
Enumerations.H so they are available to any fltk programs. More fixes to the fake-overlay code in Fl_Gl_Window (it did not work on Win32 when there were 2 different-sized windows) Fix to Fl_compose to not quote the Delete key fixed to allow the right- control key to still be the compose prefix and to allow it to quote control characters. OSF1 used the same parameters for scandir as SGI and unlike Linux and apparently most other Unix's fl_ask, message, etc windows are resizable, which is useful if you use them to display arbitrary output from a program. On Win32 non_modal (but not modal) windows have close and size boxes, as per popular demand at Digital Domain. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1028 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d6caf3aff8
commit
a32453e680
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Enumerations.H,v 1.18.2.8 2000/02/25 03:44:19 mike Exp $"
|
||||
// "$Id: Enumerations.H,v 1.18.2.9 2000/03/05 06:51:03 bill Exp $"
|
||||
//
|
||||
// Enumerations for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -97,7 +97,7 @@ enum Fl_When { // Fl_Widget::when():
|
||||
};
|
||||
|
||||
// Fl::event_key() and Fl::get_key(n) (use ascii letters for all other keys):
|
||||
#define FL_Button 0xfee8 // use Fl_Button+n for mouse button n
|
||||
#define FL_Button 0xfee8 // use Fl_Button+FL_*_MOUSE
|
||||
#define FL_BackSpace 0xff08
|
||||
#define FL_Tab 0xff09
|
||||
#define FL_Enter 0xff0d
|
||||
@ -132,6 +132,11 @@ enum Fl_When { // Fl_Widget::when():
|
||||
#define FL_Alt_R 0xffea
|
||||
#define FL_Delete 0xffff
|
||||
|
||||
// Fl::event_button():
|
||||
#define FL_LEFT_MOUSE 1
|
||||
#define FL_MIDDLE_MOUSE 2
|
||||
#define FL_RIGHT_MOUSE 3
|
||||
|
||||
// Fl::event_state():
|
||||
#define FL_SHIFT 0x00010000
|
||||
#define FL_CAPS_LOCK 0x00020000
|
||||
@ -366,5 +371,5 @@ enum Fl_Damage {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Enumerations.H,v 1.18.2.8 2000/02/25 03:44:19 mike Exp $".
|
||||
// End of "$Id: Enumerations.H,v 1.18.2.9 2000/03/05 06:51:03 bill Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: forms.H,v 1.7.2.1 1999/05/11 09:39:27 bill Exp $"
|
||||
// "$Id: forms.H,v 1.7.2.2 2000/03/05 06:51:04 bill Exp $"
|
||||
//
|
||||
// Forms emulation header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -104,13 +104,10 @@ typedef Fl_Window FL_FORM;
|
||||
#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX
|
||||
|
||||
#define FL_MBUTTON1 1
|
||||
#define FL_LEFT_MOUSE 1
|
||||
#define FL_LEFTMOUSE 1
|
||||
#define FL_MBUTTON2 2
|
||||
#define FL_MIDDLE_MOUSE 2
|
||||
#define FL_MIDDLEMOUSE 2
|
||||
#define FL_MBUTTON3 3
|
||||
#define FL_RIGHT_MOUSE 3
|
||||
#define FL_RIGHTMOUSE 3
|
||||
#define FL_MBUTTON4 4
|
||||
#define FL_MBUTTON5 5
|
||||
@ -841,5 +838,5 @@ inline void fl_draw() {Fl::flush();}
|
||||
#endif /* define __FORMS_H__ */
|
||||
|
||||
//
|
||||
// End of "$Id: forms.H,v 1.7.2.1 1999/05/11 09:39:27 bill Exp $".
|
||||
// End of "$Id: forms.H,v 1.7.2.2 2000/03/05 06:51:04 bill Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.6 2000/01/12 06:06:24 bill Exp $"
|
||||
// "$Id: Fl_Gl_Window.cxx,v 1.12.2.7 2000/03/05 06:51:05 bill Exp $"
|
||||
//
|
||||
// OpenGL window code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -205,7 +205,8 @@ void Fl_Gl_Window::flush() {
|
||||
|
||||
// we use a seperate context for the copy because rasterpos must be 0
|
||||
// and depth test needs to be off:
|
||||
static GLXContext ortho_context;
|
||||
static GLXContext ortho_context = 0;
|
||||
static Fl_Gl_Window* ortho_window = 0;
|
||||
int init = !ortho_context;
|
||||
#ifdef WIN32
|
||||
if (init) ortho_context = wglCreateContext(Fl_X::i(this)->private_dc);
|
||||
@ -214,7 +215,8 @@ void Fl_Gl_Window::flush() {
|
||||
ortho_context = glXCreateContext(fl_display,g->vis,fl_first_context,1);
|
||||
#endif
|
||||
fl_set_gl_context(this, ortho_context);
|
||||
if (init || !save_valid) {
|
||||
if (init || !save_valid || ortho_window != this) {
|
||||
ortho_window = this;
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glReadBuffer(GL_BACK);
|
||||
glDrawBuffer(GL_FRONT);
|
||||
@ -322,5 +324,5 @@ void Fl_Gl_Window::draw_overlay() {}
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.6 2000/01/12 06:06:24 bill Exp $".
|
||||
// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.7 2000/03/05 06:51:05 bill Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_compose.cxx,v 1.1.2.2 2000/02/29 21:54:55 mike Exp $"
|
||||
// "$Id: Fl_compose.cxx,v 1.1.2.3 2000/03/05 06:51:05 bill Exp $"
|
||||
//
|
||||
// Character compose processing for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -64,9 +64,6 @@ int Fl::compose(int& del) {
|
||||
del = 0;
|
||||
char ascii = e_text[0];
|
||||
|
||||
// The Delete and other special keys should not be composed...
|
||||
if (ascii < 32 || ascii == 127) return 0;
|
||||
|
||||
// Alt+letters are reserved for shortcuts. But alt+foreign letters
|
||||
// has to be allowed, because some key layouts require alt to be held
|
||||
// down in order to type them...
|
||||
@ -132,7 +129,7 @@ int Fl::compose(int& del) {
|
||||
#endif
|
||||
|
||||
// Only insert non-control characters:
|
||||
if (e_length && (ascii&~31)) {compose_state = 0; return 1;}
|
||||
if (e_length && (ascii & ~31 && ascii!=127)) {compose_state = 0; return 1;}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_win32.cxx,v 1.33.2.21 2000/02/04 06:35:20 bill Exp $"
|
||||
// "$Id: Fl_win32.cxx,v 1.33.2.22 2000/03/05 06:51:06 bill Exp $"
|
||||
//
|
||||
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -781,7 +781,7 @@ Fl_X* Fl_X::make(Fl_Window* w) {
|
||||
case 2: style |= WS_THICKFRAME | WS_MAXIMIZEBOX | WS_CAPTION ; break;
|
||||
}
|
||||
if (by+bt) {
|
||||
if (!w->non_modal()) style |= WS_SYSMENU | WS_MINIMIZEBOX;
|
||||
if (!w->modal()) style |= WS_SYSMENU | WS_MINIMIZEBOX;
|
||||
wp += 2*bx;
|
||||
hp += 2*by+bt;
|
||||
}
|
||||
@ -954,5 +954,5 @@ void Fl_Window::make_current() {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.21 2000/02/04 06:35:20 bill Exp $".
|
||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.22 2000/03/05 06:51:06 bill Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: filename_list.cxx,v 1.10.2.4 2000/01/27 08:27:26 bill Exp $"
|
||||
// "$Id: filename_list.cxx,v 1.10.2.5 2000/03/05 06:51:06 bill Exp $"
|
||||
//
|
||||
// Filename list routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -43,7 +43,7 @@ int filename_list(const char *d, dirent ***list) {
|
||||
#if defined(__hpux)
|
||||
// HP-UX defines the comparison function like this:
|
||||
return scandir(d, list, 0, (int(*)(const dirent **, const dirent **))numericsort);
|
||||
#elif HAVE_SCANDIR && !defined(__sgi)
|
||||
#elif HAVE_SCANDIR && !defined(__sgi) && !defined(OSF1)
|
||||
// The vast majority of Unix systems want the sort function to have this
|
||||
// prototype, most likely so that it can be passed to qsort without any
|
||||
// changes:
|
||||
@ -56,5 +56,5 @@ int filename_list(const char *d, dirent ***list) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: filename_list.cxx,v 1.10.2.4 2000/01/27 08:27:26 bill Exp $".
|
||||
// End of "$Id: filename_list.cxx,v 1.10.2.5 2000/03/05 06:51:06 bill Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_ask.cxx,v 1.8.2.2 1999/12/30 17:37:05 mike Exp $"
|
||||
// "$Id: fl_ask.cxx,v 1.8.2.3 2000/03/05 06:51:07 bill Exp $"
|
||||
//
|
||||
// Standard dialog functions for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -55,7 +55,10 @@ uchar fl_message_font_ = 0;
|
||||
uchar fl_message_size_ = FL_NORMAL_SIZE;
|
||||
|
||||
static Fl_Window *makeform() {
|
||||
if (message_form) return message_form;
|
||||
if (message_form) {
|
||||
message_form->size(410,105);
|
||||
return message_form;
|
||||
}
|
||||
Fl_Window *w = message_form = new Fl_Window(410,105);
|
||||
// w->clear_border();
|
||||
// w->box(FL_UP_BOX);
|
||||
@ -72,6 +75,7 @@ static Fl_Window *makeform() {
|
||||
(button[0] = new Fl_Button(310, 70, 90, 25))->shortcut("^[");
|
||||
button[1] = new Fl_Return_Button(210, 70, 90, 25);
|
||||
button[2] = new Fl_Button(110, 70, 90, 25);
|
||||
w->resizable(new Fl_Box(60,10,110-60,22));
|
||||
w->end();
|
||||
w->set_modal();
|
||||
return w;
|
||||
@ -228,5 +232,5 @@ const char *fl_password(const char *fmt, const char *defstr, ...) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_ask.cxx,v 1.8.2.2 1999/12/30 17:37:05 mike Exp $".
|
||||
// End of "$Id: fl_ask.cxx,v 1.8.2.3 2000/03/05 06:51:07 bill Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user