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 /src/Fl_Clock.cxx | |
| 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 'src/Fl_Clock.cxx')
| -rw-r--r-- | src/Fl_Clock.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Fl_Clock.cxx b/src/Fl_Clock.cxx index 1ddf23268..302b17b83 100644 --- a/src/Fl_Clock.cxx +++ b/src/Fl_Clock.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Clock.cxx,v 1.8.2.4.2.1 2002/01/01 15:11:30 easysw Exp $" +// "$Id: Fl_Clock.cxx,v 1.8.2.4.2.2 2002/08/09 01:09:48 easysw Exp $" // // Clock widget for the Fast Light Tool Kit (FLTK). // @@ -68,11 +68,11 @@ static void rect(double x, double y, double w, double h) { fl_end_polygon(); } -void Fl_Clock_Output::draw(int x, int y, int w, int h) { - draw_box(box(), x, y, w, h, type()==FL_ROUND_CLOCK ? FL_GRAY : color()); +void Fl_Clock_Output::draw(int X, int Y, int W, int H) { + draw_box(box(), X, Y, W, H, type()==FL_ROUND_CLOCK ? FL_GRAY : color()); fl_push_matrix(); - fl_translate(x+w/2.0-.5, y+h/2.0-.5); - fl_scale((w-1)/28.0, (h-1)/28.0); + fl_translate(X+W/2.0-.5, Y+H/2.0-.5); + fl_scale((W-1)/28.0, (H-1)/28.0); if (type() == FL_ROUND_CLOCK) { fl_color(color()); fl_begin_polygon(); fl_circle(0,0,14); fl_end_polygon(); @@ -104,9 +104,9 @@ void Fl_Clock_Output::draw() { draw_label(); } -void Fl_Clock_Output::value(int h, int m, int s) { - if (h!=hour_ || m!=minute_ || s!=second_) { - hour_ = h; minute_ = m; second_ = s; +void Fl_Clock_Output::value(int H, int m, int s) { + if (H!=hour_ || m!=minute_ || s!=second_) { + hour_ = H; minute_ = m; second_ = s; damage(FL_DAMAGE_CHILD); } } @@ -117,8 +117,8 @@ void Fl_Clock_Output::value(ulong v) { value(timeofday->tm_hour, timeofday->tm_min, timeofday->tm_sec); } -Fl_Clock_Output::Fl_Clock_Output(int x, int y, int w, int h, const char *l) -: Fl_Widget(x, y, w, h, l) { +Fl_Clock_Output::Fl_Clock_Output(int X, int Y, int W, int H, const char *l) +: Fl_Widget(X, Y, W, H, l) { box(FL_UP_BOX); selection_color(fl_gray_ramp(5)); align(FL_ALIGN_BOTTOM); @@ -130,11 +130,11 @@ Fl_Clock_Output::Fl_Clock_Output(int x, int y, int w, int h, const char *l) //////////////////////////////////////////////////////////////// -Fl_Clock::Fl_Clock(int x, int y, int w, int h, const char *l) - : Fl_Clock_Output(x, y, w, h, l) {} +Fl_Clock::Fl_Clock(int X, int Y, int W, int H, const char *l) + : Fl_Clock_Output(X, Y, W, H, l) {} -Fl_Clock::Fl_Clock(uchar t, int x, int y, int w, int h, const char *l) - : Fl_Clock_Output(x, y, w, h, l) { +Fl_Clock::Fl_Clock(uchar t, int X, int Y, int W, int H, const char *l) + : Fl_Clock_Output(X, Y, W, H, l) { type(t); box(t==FL_ROUND_CLOCK ? FL_NO_BOX : FL_UP_BOX); } @@ -170,5 +170,5 @@ Fl_Clock::~Fl_Clock() { } // -// End of "$Id: Fl_Clock.cxx,v 1.8.2.4.2.1 2002/01/01 15:11:30 easysw Exp $". +// End of "$Id: Fl_Clock.cxx,v 1.8.2.4.2.2 2002/08/09 01:09:48 easysw Exp $". // |
