Moved fl_old_shortcut() from Fl_Menu_add.cxx to Fl.cxx so that using a
button in your program doesn't automatically link in a humumgous chunk of menuing code. -CET git-svn-id: file:///fltk/svn/fltk/trunk@256 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ef50e095e7
commit
03ad382705
13
src/Fl.cxx
13
src/Fl.cxx
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl.cxx,v 1.16 1999/01/26 21:37:14 mike Exp $"
|
||||
// "$Id: Fl.cxx,v 1.17 1999/01/29 16:56:47 carl Exp $"
|
||||
//
|
||||
// Main event handling code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -665,6 +665,15 @@ void Fl_Window::flush() {
|
||||
draw();
|
||||
}
|
||||
|
||||
int fl_old_shortcut(const char* s) {
|
||||
if (!s || !*s) return 0;
|
||||
int n = 0;
|
||||
if (*s == '#') {n |= FL_ALT; s++;}
|
||||
if (*s == '+') {n |= FL_SHIFT; s++;}
|
||||
if (*s == '^') {n |= FL_CTRL; s++;}
|
||||
return n | *s;
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl.cxx,v 1.16 1999/01/26 21:37:14 mike Exp $".
|
||||
// End of "$Id: Fl.cxx,v 1.17 1999/01/29 16:56:47 carl Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Menu_add.cxx,v 1.5 1999/01/07 19:17:23 mike Exp $"
|
||||
// "$Id: Fl_Menu_add.cxx,v 1.6 1999/01/29 16:56:48 carl Exp $"
|
||||
//
|
||||
// Menu utilities for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -38,15 +38,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int fl_old_shortcut(const char* s) {
|
||||
if (!s || !*s) return 0;
|
||||
int n = 0;
|
||||
if (*s == '#') {n |= FL_ALT; s++;}
|
||||
if (*s == '+') {n |= FL_SHIFT; s++;}
|
||||
if (*s == '^') {n |= FL_CTRL; s++;}
|
||||
return n | *s;
|
||||
}
|
||||
|
||||
// always allocate this much initially:
|
||||
#define INITIAL_MENU_SIZE 15
|
||||
|
||||
@ -201,5 +192,5 @@ void Fl_Menu_::clear() {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Menu_add.cxx,v 1.5 1999/01/07 19:17:23 mike Exp $".
|
||||
// End of "$Id: Fl_Menu_add.cxx,v 1.6 1999/01/29 16:56:48 carl Exp $".
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user