diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-09 01:09:49 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-08-09 01:09:49 +0000 |
| commit | a6b935289ed59305318929b857bf74f671125e87 (patch) | |
| tree | 20398a4cc1c49f2309b0b607e331aea2c433e17b /FL | |
| parent | 27a54dc22bb9b2fbb16b01a04cd8479d25470bec (diff) | |
Move the rest of the image file formats (except for XBM and XPM) to
the fltk_images library; saves about 16k in the FLTK core library on my
Intel system.
Fix a memory leak bug in most of the fl_set_fonts*.cxx implementations;
as a result, the Fl_Fontdesc structure now has a fontname member to old
the human-readable font name.
Lots of fixes for shadowed variables, etc.
Use snprintf, strlcpy, and strlcat in more places.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Adjuster.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Box.H | 12 | ||||
| -rw-r--r-- | FL/Fl_Menu_.H | 6 | ||||
| -rw-r--r-- | FL/Fl_Menu_Bar.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Pixmap.H | 12 | ||||
| -rw-r--r-- | FL/Fl_Return_Button.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Scrollbar.H | 8 | ||||
| -rw-r--r-- | FL/Fl_Value_Input.H | 6 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 8 | ||||
| -rw-r--r-- | FL/x.H | 10 |
11 files changed, 47 insertions, 47 deletions
@@ -1,5 +1,5 @@ // -// "$Id: Fl.H,v 1.8.2.11.2.19 2002/07/30 14:57:02 easysw Exp $" +// "$Id: Fl.H,v 1.8.2.11.2.20 2002/08/09 01:09:48 easysw Exp $" // // Main header file for the Fast Light Tool Kit (FLTK). // @@ -69,7 +69,7 @@ public: // should be private! static int compose_state; static int visible_focus_; static int dnd_text_ops_; - static void damage(int x) {damage_ = x;} + static void damage(int d) {damage_ = d;} static void (*idle)(); @@ -237,7 +237,7 @@ 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 grab(Fl_Window&win) {grab(&win);} static void release() {grab(0);} // Visible focus methods... @@ -258,5 +258,5 @@ public: #endif // !Fl_H // -// End of "$Id: Fl.H,v 1.8.2.11.2.19 2002/07/30 14:57:02 easysw Exp $". +// End of "$Id: Fl.H,v 1.8.2.11.2.20 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Adjuster.H b/FL/Fl_Adjuster.H index c7967852c..4807a65d1 100644 --- a/FL/Fl_Adjuster.H +++ b/FL/Fl_Adjuster.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Adjuster.H,v 1.5.2.3.2.1 2002/01/01 15:11:27 easysw Exp $" +// "$Id: Fl_Adjuster.H,v 1.5.2.3.2.2 2002/08/09 01:09:48 easysw Exp $" // // Adjuster widget header file for the Fast Light Tool Kit (FLTK). // @@ -41,13 +41,13 @@ protected: FL_EXPORT int handle(int); FL_EXPORT void value_damage(); public: - FL_EXPORT Fl_Adjuster(int x,int y,int w,int h,const char *l=0); - FL_EXPORT void soft(int x) {soft_ = x;} + FL_EXPORT Fl_Adjuster(int X,int Y,int W,int H,const char *l=0); + FL_EXPORT void soft(int s) {soft_ = s;} FL_EXPORT int soft() const {return soft_;} }; #endif // -// End of "$Id: Fl_Adjuster.H,v 1.5.2.3.2.1 2002/01/01 15:11:27 easysw Exp $". +// End of "$Id: Fl_Adjuster.H,v 1.5.2.3.2.2 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Box.H b/FL/Fl_Box.H index 82aa32b1f..adceb4571 100644 --- a/FL/Fl_Box.H +++ b/FL/Fl_Box.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Box.H,v 1.5.2.4.2.2 2002/04/12 20:16:07 easysw Exp $" +// "$Id: Fl_Box.H,v 1.5.2.4.2.3 2002/08/09 01:09:48 easysw Exp $" // // Box header file for the Fast Light Tool Kit (FLTK). // @@ -34,10 +34,10 @@ class Fl_Box : public Fl_Widget { protected: FL_EXPORT void draw(); public: - FL_EXPORT Fl_Box(int x, int y, int w, int h, const char *l=0) - : Fl_Widget(x,y,w,h,l) {} - FL_EXPORT Fl_Box(Fl_Boxtype b, int x, int y, int w, int h, const char *l) - : Fl_Widget(x,y,w,h,l) {box(b);} + FL_EXPORT Fl_Box(int X, int Y, int W, int H, const char *l=0) + : Fl_Widget(X,Y,W,H,l) {} + FL_EXPORT Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l) + : Fl_Widget(X,Y,W,H,l) {box(b);} virtual FL_EXPORT int handle(int); }; @@ -45,5 +45,5 @@ public: #endif // -// End of "$Id: Fl_Box.H,v 1.5.2.4.2.2 2002/04/12 20:16:07 easysw Exp $". +// End of "$Id: Fl_Box.H,v 1.5.2.4.2.3 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H index 810e1db3e..6c547703e 100644 --- a/FL/Fl_Menu_.H +++ b/FL/Fl_Menu_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_.H,v 1.7.2.4.2.2 2002/01/01 15:11:27 easysw Exp $" +// "$Id: Fl_Menu_.H,v 1.7.2.4.2.3 2002/08/09 01:09:48 easysw Exp $" // // Menu base class header file for the Fast Light Tool Kit (FLTK). // @@ -65,7 +65,7 @@ public: FL_EXPORT void replace(int,const char *); FL_EXPORT void remove(int); void shortcut(int i, int s) {menu_[i].shortcut(s);} - void mode(int i,int x) {menu_[i].flags = x;} + void mode(int i,int fl) {menu_[i].flags = fl;} int mode(int i) const {return menu_[i].flags;} const Fl_Menu_Item *mvalue() const {return value_;} @@ -93,5 +93,5 @@ public: #endif // -// End of "$Id: Fl_Menu_.H,v 1.7.2.4.2.2 2002/01/01 15:11:27 easysw Exp $". +// End of "$Id: Fl_Menu_.H,v 1.7.2.4.2.3 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Menu_Bar.H b/FL/Fl_Menu_Bar.H index f6f056b97..43f131b62 100644 --- a/FL/Fl_Menu_Bar.H +++ b/FL/Fl_Menu_Bar.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Bar.H,v 1.5.2.4.2.1 2002/01/01 15:11:27 easysw Exp $" +// "$Id: Fl_Menu_Bar.H,v 1.5.2.4.2.2 2002/08/09 01:09:48 easysw Exp $" // // Menu bar header file for the Fast Light Tool Kit (FLTK). // @@ -33,12 +33,12 @@ protected: FL_EXPORT void draw(); public: FL_EXPORT int handle(int); - Fl_Menu_Bar(int x,int y,int w,int h,const char *l=0) - : Fl_Menu_(x,y,w,h,l) {} + Fl_Menu_Bar(int X, int Y, int W, int H,const char *l=0) + : Fl_Menu_(X,Y,W,H,l) {} }; #endif // -// End of "$Id: Fl_Menu_Bar.H,v 1.5.2.4.2.1 2002/01/01 15:11:27 easysw Exp $". +// End of "$Id: Fl_Menu_Bar.H,v 1.5.2.4.2.2 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Pixmap.H b/FL/Fl_Pixmap.H index 7dc0487d2..baef7a52b 100644 --- a/FL/Fl_Pixmap.H +++ b/FL/Fl_Pixmap.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.8 2002/08/05 17:50:23 easysw Exp $" +// "$Id: Fl_Pixmap.H,v 1.6.2.8.2.9 2002/08/09 01:09:48 easysw Exp $" // // Pixmap header file for the Fast Light Tool Kit (FLTK). // @@ -50,10 +50,10 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image { Fl_Offscreen id; // for internal use Fl_Bitmask mask; // for internal use (mask bitmap) - explicit Fl_Pixmap(char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();} - explicit Fl_Pixmap(uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();} - explicit Fl_Pixmap(const char * const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();} - explicit Fl_Pixmap(const uchar* const * d) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)d); measure();} + explicit Fl_Pixmap(char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(const char * const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} + explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id(0), mask(0) {set_data((const char*const*)D); measure();} virtual ~Fl_Pixmap(); virtual Fl_Image *copy(int W, int H); Fl_Image *copy() { return copy(w(), h()); } @@ -69,5 +69,5 @@ class FL_EXPORT Fl_Pixmap : public Fl_Image { #endif // -// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.8 2002/08/05 17:50:23 easysw Exp $". +// End of "$Id: Fl_Pixmap.H,v 1.6.2.8.2.9 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Return_Button.H b/FL/Fl_Return_Button.H index a57c5c9ea..5ea161e12 100644 --- a/FL/Fl_Return_Button.H +++ b/FL/Fl_Return_Button.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Return_Button.H,v 1.5.2.3.2.1 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Return_Button.H,v 1.5.2.3.2.2 2002/08/09 01:09:48 easysw Exp $" // // Return button header file for the Fast Light Tool Kit (FLTK). // @@ -32,12 +32,12 @@ protected: FL_EXPORT void draw(); public: FL_EXPORT int handle(int); - Fl_Return_Button(int x,int y,int w,int h,const char *l=0) - : Fl_Button(x,y,w,h,l) {} + Fl_Return_Button(int X, int Y, int W, int H,const char *l=0) + : Fl_Button(X,Y,W,H,l) {} }; #endif // -// End of "$Id: Fl_Return_Button.H,v 1.5.2.3.2.1 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Return_Button.H,v 1.5.2.3.2.2 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Scrollbar.H b/FL/Fl_Scrollbar.H index f99978928..87cdb6cbc 100644 --- a/FL/Fl_Scrollbar.H +++ b/FL/Fl_Scrollbar.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Scrollbar.H,v 1.5.2.4.2.1 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Scrollbar.H,v 1.5.2.4.2.2 2002/08/09 01:09:48 easysw Exp $" // // Scroll bar header file for the Fast Light Tool Kit (FLTK). // @@ -43,8 +43,8 @@ public: FL_EXPORT int handle(int); int value() {return int(Fl_Slider::value());} - int value(int position, int size, int top, int total) { - return scrollvalue(position, size, top, total); + int value(int p, int s, int top, int total) { + return scrollvalue(p, s, top, total); } int linesize() const {return linesize_;} void linesize(int i) {linesize_ = i;} @@ -54,5 +54,5 @@ public: #endif // -// End of "$Id: Fl_Scrollbar.H,v 1.5.2.4.2.1 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Scrollbar.H,v 1.5.2.4.2.2 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Value_Input.H b/FL/Fl_Value_Input.H index 8213cf40e..7fa2d41ac 100644 --- a/FL/Fl_Value_Input.H +++ b/FL/Fl_Value_Input.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Value_Input.H,v 1.5.2.3.2.2 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Value_Input.H,v 1.5.2.3.2.3 2002/08/09 01:09:48 easysw Exp $" // // Value input header file for the Fast Light Tool Kit (FLTK). // @@ -42,7 +42,7 @@ public: FL_EXPORT void resize(int,int,int,int); FL_EXPORT Fl_Value_Input(int x,int y,int w,int h,const char *l=0); - void soft(char x) {soft_ = x;} + void soft(char s) {soft_ = s;} char soft() const {return soft_;} Fl_Font textfont() const {return input.textfont();} @@ -59,5 +59,5 @@ public: #endif // -// End of "$Id: Fl_Value_Input.H,v 1.5.2.3.2.2 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Value_Input.H,v 1.5.2.3.2.3 2002/08/09 01:09:48 easysw Exp $". // diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index a51bd7143..05515ebd7 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.H,v 1.6.2.4.2.15 2002/07/23 15:07:32 easysw Exp $" +// "$Id: Fl_Widget.H,v 1.6.2.4.2.16 2002/08/09 01:09:48 easysw Exp $" // // Widget header file for the Fast Light Tool Kit (FLTK). // @@ -103,7 +103,7 @@ public: FL_EXPORT virtual void draw() = 0; FL_EXPORT virtual int handle(int); Fl_Group* parent() const {return parent_;} - void parent(Fl_Group* w) {parent_ = w;} // for hacks only, Fl_Group::add() + void parent(Fl_Group* p) {parent_ = p;} // for hacks only, Fl_Group::add() uchar type() const {return type_;} void type(uchar t) {type_ = t;} @@ -195,7 +195,7 @@ public: FL_EXPORT void damage(uchar c); FL_EXPORT void damage(uchar c,int,int,int,int); FL_EXPORT void draw_label(int, int, int, int, Fl_Align) const; - void measure_label(int& x, int& y) {label_.measure(x,y);} + void measure_label(int& xx, int& yy) {label_.measure(xx,yy);} FL_EXPORT Fl_Window* window() const ; @@ -212,5 +212,5 @@ public: #endif // -// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.15 2002/07/23 15:07:32 easysw Exp $". +// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.16 2002/08/09 01:09:48 easysw Exp $". // @@ -1,5 +1,5 @@ // -// "$Id: x.H,v 1.10.2.8.2.9 2002/04/15 12:19:01 easysw Exp $" +// "$Id: x.H,v 1.10.2.8.2.10 2002/08/09 01:09:48 easysw Exp $" // // X11 header file for the Fast Light Tool Kit (FLTK). // @@ -114,15 +114,15 @@ public: char wait_for_expose; char backbuffer_bad; // used for XDBE static FL_EXPORT Fl_X* first; - static FL_EXPORT Fl_X* i(const Fl_Window* w) {return w->i;} + static FL_EXPORT Fl_X* i(const Fl_Window* wi) {return wi->i;} FL_EXPORT void setwindow(Fl_Window* wi) {w=wi; wi->i=this;} FL_EXPORT void sendxjunk(); static FL_EXPORT void make_xid(Fl_Window*,XVisualInfo* =fl_visual, Colormap=fl_colormap); static FL_EXPORT Fl_X* set_xid(Fl_Window*, Window); // kludges to get around protection: FL_EXPORT void flush() {w->flush();} - static FL_EXPORT void x(Fl_Window* w, int X) {w->x(X);} - static FL_EXPORT void y(Fl_Window* w, int Y) {w->y(Y);} + static FL_EXPORT void x(Fl_Window* wi, int X) {wi->x(X);} + static FL_EXPORT void y(Fl_Window* wi, int Y) {wi->y(Y);} }; // convert xid <-> Fl_Window: @@ -138,5 +138,5 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b) #endif // -// End of "$Id: x.H,v 1.10.2.8.2.9 2002/04/15 12:19:01 easysw Exp $". +// End of "$Id: x.H,v 1.10.2.8.2.10 2002/08/09 01:09:48 easysw Exp $". // |
