summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-02-03 08:43:35 +0000
committerBill Spitzak <spitzak@gmail.com>1999-02-03 08:43:35 +0000
commit8009fef12cb88c5d4944bdad9a1e641c282df303 (patch)
tree9c3cacadf5121dba5ee5ab42327ba6a9ab79402a /FL
parent0434a826d57f5de3ef258532cc090717db574d4e (diff)
Put Fl::grab() into it's own source file. Rewritten as suggested so that
it takes a window pointer, and grab(0) releases. You can now call grab repeatedly with the same or different values without it failing. The old Fl::grab() and Fl::release() are emulated in inline functions in Fl.H Added Fl_Menu_::copy(Fl_Menu_Item*), which will be useful for fluid, although that use is nyi. Fixes and cleanup to the code for Fl_Menu_::add(...). git-svn-id: file:///fltk/svn/fltk/trunk@268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl.H9
-rw-r--r--FL/Fl_Menu_.H5
-rw-r--r--FL/fl_draw.H22
3 files changed, 28 insertions, 8 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index dea664d84..6e6cadc24 100644
--- a/FL/Fl.H
+++ b/FL/Fl.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.H,v 1.4 1999/01/07 19:16:50 mike Exp $"
+// "$Id: Fl.H,v 1.5 1999/02/03 08:43:29 bill Exp $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
@@ -104,8 +104,7 @@ public:
static Fl_Window* next_window(const Fl_Window*);
static Fl_Window* modal() {return modal_;}
static Fl_Window* grab() {return grab_;}
- static void grab(Fl_Window&);
- static void release();
+ static void grab(Fl_Window*);
// event information:
static int event_x() {return e_x;}
@@ -192,11 +191,13 @@ public:
static int event_button2() {return e_state&FL_BUTTON2;}
static int event_button3() {return e_state&FL_BUTTON3;}
static void set_idle(void (*cb)()) {idle = cb;}
+ static void grab(Fl_Window&w) {grab(&w);}
+ static void release() {grab(0);}
};
#endif
//
-// End of "$Id: Fl.H,v 1.4 1999/01/07 19:16:50 mike Exp $".
+// End of "$Id: Fl.H,v 1.5 1999/02/03 08:43:29 bill Exp $".
//
diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H
index 11800f7b1..b5c21acf2 100644
--- a/FL/Fl_Menu_.H
+++ b/FL/Fl_Menu_.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Menu_.H,v 1.5 1999/01/07 19:16:57 mike Exp $"
+// "$Id: Fl_Menu_.H,v 1.6 1999/02/03 08:43:30 bill Exp $"
//
// Menu base class header file for the Fast Light Tool Kit (FLTK).
//
@@ -55,6 +55,7 @@ public:
const Fl_Menu_Item *menu() const {return menu_;}
void menu(const Fl_Menu_Item *m);
+ void copy(const Fl_Menu_Item *m, void* user_data = 0);
int add(const char*, int shortcut, Fl_Callback*, void* = 0, int = 0);
int add(const char* a, const char* b, Fl_Callback* c,
void* d = 0, int e = 0) {return add(a,fl_old_shortcut(b),c,d,e);}
@@ -92,5 +93,5 @@ public:
#endif
//
-// End of "$Id: Fl_Menu_.H,v 1.5 1999/01/07 19:16:57 mike Exp $".
+// End of "$Id: Fl_Menu_.H,v 1.6 1999/02/03 08:43:30 bill Exp $".
//
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index 46a88ebc9..db7d706d0 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw.H,v 1.6 1999/01/07 19:17:06 mike Exp $"
+// "$Id: fl_draw.H,v 1.7 1999/02/03 08:43:30 bill Exp $"
//
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
//
@@ -42,6 +42,24 @@ void fl_pop_clip();
int fl_not_clipped(int x, int y, int w, int h);
int fl_clip_box(int, int, int, int, int& x, int& y, int& w, int& h);
+// line style:
+// Enumerations chosen so zero is the default, unfortunatly this does
+// not match values for either X or Windows...
+enum Fl_LineStyle {
+ FL_SOLID = 0,
+ FL_DASH = 1,
+ FL_DOT = 2,
+ FL_DASHDOT = 3,
+ FL_DASHDOTDOT = 4,
+ FL_CAP_FLAT = 0x0100,
+ FL_CAP_ROUND = 0x0200,
+ FL_CAP_SQUARE = 0x0300,
+ FL_JOIN_MITER = 0x1000,
+ FL_JOIN_ROUND = 0x2000,
+ FL_JOIN_BEVEL = 0x3000,
+};
+void fl_line_style(int style, int width = 0, char* dashes = 0);
+
// points:
void fl_point(int x, int y);
@@ -158,5 +176,5 @@ int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable);
#endif
//
-// End of "$Id: fl_draw.H,v 1.6 1999/01/07 19:17:06 mike Exp $".
+// End of "$Id: fl_draw.H,v 1.7 1999/02/03 08:43:30 bill Exp $".
//