diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-04-19 14:01:23 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-04-19 14:01:23 +0000 |
| commit | df8016354cc3b15968043e347de73609180e5c9e (patch) | |
| tree | 19a4dc381780f940b6e3986911e5268e2ad2f7ac | |
| parent | add808d7c28d572090846322575f0a85a1f70ff4 (diff) | |
Updated documentation version & edition.
FLUID makefile referenced LDFLAGS, but we only define CFLAGS and CXXFLAGS.
Fl_Browser::item_height() didn't handle blank lines (returned 2 for the
height). Also, didn't use textfont() when figuring out text height.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | documentation/index.html | 6 | ||||
| -rw-r--r-- | documentation/preface.html | 4 | ||||
| -rw-r--r-- | fluid/Makefile | 6 | ||||
| -rw-r--r-- | src/Fl_Browser.cxx | 61 |
4 files changed, 43 insertions, 34 deletions
diff --git a/documentation/index.html b/documentation/index.html index 21e1907fb..6e4f14d02 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -1,6 +1,6 @@ <HTML> <HEAD> - <TITLE>FLTK 1.0 Programming Manual</TITLE> + <TITLE>FLTK 1.0.2 Programming Manual</TITLE> </HEAD> <BODY> @@ -8,8 +8,8 @@ <TR> <TD ALIGN=CENTER VALIGN=MIDDLE><IMG SRC=FL.gif ALIGN=ABSMIDDLE></TD> <TD ALIGN=CENTER VALIGN=MIDDLE> -<H1>FLTK 1.0.1 Programming Manual</H1> -Revision 8 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR> +<H1>FLTK 1.0.2 Programming Manual</H1> +Revision 9 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR> Copyright 1998-1999 by Bill Spitzak and others.<BR> </TD> </TR> diff --git a/documentation/preface.html b/documentation/preface.html index 753007eed..0d1a87bb7 100644 --- a/documentation/preface.html +++ b/documentation/preface.html @@ -2,8 +2,8 @@ <HEAD> <META CONTENT="Written by Michael Sweet, Craig P. Earls, and Bill Spitzak" NAME=Author> <META CONTENT="Copyright 1998-1999 by Bill Spitzak and Others." NAME=Copyright> - <META CONTENT="Revision 8" NAME=DocNumber> - <TITLE>FLTK 1.0.1 Programming Manual</TITLE> + <META CONTENT="Revision 9" NAME=DocNumber> + <TITLE>FLTK 1.0.2 Programming Manual</TITLE> </HEAD> <BODY> <H1 ALIGN=RIGHT><A NAME=preface>Preface</A></H1> diff --git a/fluid/Makefile b/fluid/Makefile index fc3c78a04..5fb1b3522 100644 --- a/fluid/Makefile +++ b/fluid/Makefile @@ -1,5 +1,5 @@ # -# "$Id: Makefile,v 1.10.2.1 1999/03/25 15:26:30 mike Exp $" +# "$Id: Makefile,v 1.10.2.2 1999/04/19 14:01:23 mike Exp $" # # Fluid makefile for the Fast Light Tool Kit (FLTK). # @@ -59,7 +59,7 @@ include ../makeinclude $(CXX) -I.. $(CXXFLAGS) -o $@ $< -L../lib -lfltk $(LDLIBS) $(PROGRAM) : $(OBJECTS) ../lib/$(LIBNAME) - $(CXX) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) -L../lib -lfltk $(LDLIBS) + $(CXX) $(CXXFLAGS) -o $(PROGRAM) $(OBJECTS) -L../lib -lfltk $(LDLIBS) clean : -@ rm -f *.o $(PROGRAM) $(CLEAN) core *~ makedepend @@ -91,5 +91,5 @@ rebuild: ./fluid -c widget_panel.fl # -# End of "$Id: Makefile,v 1.10.2.1 1999/03/25 15:26:30 mike Exp $". +# End of "$Id: Makefile,v 1.10.2.2 1999/04/19 14:01:23 mike Exp $". # diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index 18848c2d6..6d2bea829 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Browser.cxx,v 1.9.2.3 1999/03/13 20:35:33 bill Exp $" +// "$Id: Fl_Browser.cxx,v 1.9.2.4 1999/04/19 14:01:23 mike Exp $" // // Browser widget for the Fast Light Tool Kit (FLTK). // @@ -208,31 +208,40 @@ int Fl_Browser::item_height(void* lv) const { if (l->flags & NOTDISPLAYED) return 0; int hmax = 2; // use 2 to insure we don't return a zero! - // do each column sepeartely as they may all set different fonts: - for (char* str = l->txt; *str; str++) { - Fl_Font font = Fl_Font(0); // default font - int size = textsize(); // default size - while (*str==format_char()) { - str++; - switch (*str++) { - case 'l': case 'L': size = 24; break; - case 'm': case 'M': size = 18; break; - case 's': size = 11; break; - case 'b': font = (Fl_Font)(font|FL_BOLD); break; - case 'i': font = (Fl_Font)(font|FL_ITALIC); break; - case 'f': case 't': font = FL_COURIER; break; - case 'S': size = strtol(str,&str,10); break; - case 'F': font = (Fl_Font)strtol(str,&str,10); break; - case 0: case '@': str--; - case '.': goto END_FORMAT; + + if (!l->txt[0]) { + // For blank lines set the height to exactly 1 line! + fl_font(textfont(), textsize()); + int h = fl_height(); + if (h > hmax) hmax = h; + } + else { + // do each column separately as they may all set different fonts: + for (char* str = l->txt; *str; str++) { + Fl_Font font = textfont(); // default font + int size = textsize(); // default size + while (*str==format_char()) { + str++; + switch (*str++) { + case 'l': case 'L': size = 24; break; + case 'm': case 'M': size = 18; break; + case 's': size = 11; break; + case 'b': font = (Fl_Font)(font|FL_BOLD); break; + case 'i': font = (Fl_Font)(font|FL_ITALIC); break; + case 'f': case 't': font = FL_COURIER; break; + case 'S': size = strtol(str,&str,10); break; + case 'F': font = (Fl_Font)strtol(str,&str,10); break; + case 0: case '@': str--; + case '.': goto END_FORMAT; + } + } + END_FORMAT: + char* ptr = str; + for(;*str && (*str!=column_char()); str++) ; + if (ptr < str) { + fl_font(font, size); int h = fl_height(); + if (h > hmax) hmax = h; } - } - END_FORMAT: - char* ptr = str; - for(;*str && (*str!=column_char()); str++) ; - if (ptr < str) { - fl_font(font, size); int h = fl_height(); - if (h > hmax) hmax = h; } } @@ -475,5 +484,5 @@ int Fl_Browser::value() const { } // -// End of "$Id: Fl_Browser.cxx,v 1.9.2.3 1999/03/13 20:35:33 bill Exp $". +// End of "$Id: Fl_Browser.cxx,v 1.9.2.4 1999/04/19 14:01:23 mike Exp $". // |
