From a6b935289ed59305318929b857bf74f671125e87 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 9 Aug 2002 01:09:49 +0000 Subject: 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 --- src/Fl_Check_Browser.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/Fl_Check_Browser.cxx') diff --git a/src/Fl_Check_Browser.cxx b/src/Fl_Check_Browser.cxx index 4f1b08b7c..f520d637b 100644 --- a/src/Fl_Check_Browser.cxx +++ b/src/Fl_Check_Browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Check_Browser.cxx,v 1.1.2.4 2002/04/11 11:52:41 easysw Exp $" +// "$Id: Fl_Check_Browser.cxx,v 1.1.2.5 2002/08/09 01:09:48 easysw Exp $" // // Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK). // @@ -82,8 +82,8 @@ int Fl_Check_Browser::lineno(cb_item *p0) const { return 0; } -Fl_Check_Browser::Fl_Check_Browser(int x, int y, int w, int h, const char *l) - : Fl_Browser_(x, y, w, h, l) { +Fl_Check_Browser::Fl_Check_Browser(int X, int Y, int W, int H, const char *l) + : Fl_Browser_(X, Y, W, H, l) { type(FL_SELECT_BROWSER); when(FL_WHEN_NEVER); first = last = 0; @@ -114,27 +114,27 @@ int Fl_Check_Browser::item_width(void *v) const { return int(fl_width(((cb_item *)v)->text)) + CHECK_SIZE + 8; } -void Fl_Check_Browser::item_draw(void *v, int x, int y, int, int) const { +void Fl_Check_Browser::item_draw(void *v, int X, int Y, int, int) const { cb_item *i = (cb_item *)v; char *s = i->text; - int size = textsize(); + int tsize = textsize(); Fl_Color col = textcolor(); - int cy = y + (size + 1 - CHECK_SIZE) / 2; - x += 2; + int cy = Y + (tsize + 1 - CHECK_SIZE) / 2; + X += 2; fl_color(FL_BLACK); - fl_loop(x, cy, x, cy + CHECK_SIZE, - x + CHECK_SIZE, cy + CHECK_SIZE, x + CHECK_SIZE, cy); + fl_loop(X, cy, X, cy + CHECK_SIZE, + X + CHECK_SIZE, cy + CHECK_SIZE, X + CHECK_SIZE, cy); if (i->checked) { - fl_line(x, cy, x + CHECK_SIZE, cy + CHECK_SIZE); - fl_line(x, cy + CHECK_SIZE, x + CHECK_SIZE, cy); + fl_line(X, cy, X + CHECK_SIZE, cy + CHECK_SIZE); + fl_line(X, cy + CHECK_SIZE, X + CHECK_SIZE, cy); } - fl_font(textfont(), size); + fl_font(textfont(), tsize); if (i->selected) { col = fl_contrast(col, selection_color()); } fl_color(col); - fl_draw(s, x + CHECK_SIZE + 8, y + size - 1); + fl_draw(s, X + CHECK_SIZE + 8, Y + tsize - 1); } void Fl_Check_Browser::item_select(void *v, int state) { @@ -259,5 +259,5 @@ void Fl_Check_Browser::check_none() { // -// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.4 2002/04/11 11:52:41 easysw Exp $". +// End of "$Id: Fl_Check_Browser.cxx,v 1.1.2.5 2002/08/09 01:09:48 easysw Exp $". // -- cgit v1.2.3