Update copyright in FLUID "about" window.
Update fltk-config to support all C++ file extensions. Make background of FLTK logo transparent. Disable overlays if the scheme is set. Fix table cell formatting in Fl_Help_View. Still need to resolve an issue with column widths vs. table widths. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1965 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
be3181a39a
commit
50274f8d85
6
CHANGES
6
CHANGES
@ -1,5 +1,11 @@
|
||||
CHANGES IN FLTK 1.1.0b11
|
||||
|
||||
- Fixed a table rendering bug in the Fl_Help_View
|
||||
widget.
|
||||
- The fltk-config script now recognizes all common C++
|
||||
extensions.
|
||||
- The menu code was using overlay visuals when the
|
||||
scheme was set to "plastic".
|
||||
- Fixed some drawing problems with Fl_Light_Button and
|
||||
its subclasses.
|
||||
- Fixed a minor event propagation bug in Fl_Group that
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Help_View.H,v 1.1.2.7 2002/01/01 15:11:27 easysw Exp $"
|
||||
// "$Id: Fl_Help_View.H,v 1.1.2.8 2002/02/20 13:02:25 easysw Exp $"
|
||||
//
|
||||
// Help Viewer widget definitions.
|
||||
//
|
||||
@ -131,7 +131,6 @@ class Fl_Help_View : public Fl_Group //// Help viewer widget
|
||||
hscrollbar_; // Horizontal scrollbar
|
||||
|
||||
Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
|
||||
static int compare_blocks(const void *a, const void *b);
|
||||
void add_link(const char *n, int xx, int yy, int ww, int hh);
|
||||
void add_target(const char *n, int yy);
|
||||
static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1);
|
||||
@ -187,5 +186,5 @@ class Fl_Help_View : public Fl_Group //// Help viewer widget
|
||||
#endif // !Fl_Help_View_H
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Help_View.H,v 1.1.2.7 2002/01/01 15:11:27 easysw Exp $".
|
||||
// End of "$Id: Fl_Help_View.H,v 1.1.2.8 2002/02/20 13:02:25 easysw Exp $".
|
||||
//
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.3 KiB |
@ -5,11 +5,11 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR">
|
||||
<TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR" WIDTH="700">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" VALIGN="MIDDLE" WIDTH="200">
|
||||
<TD VALIGN="MIDDLE">
|
||||
<IMG SRC="FL.gif" WIDTH="200" HEIGHT="100" ALIGN="ABSMIDDLE" ALT="FL"></TD>
|
||||
<TD ALIGN="CENTER" VALIGN="MIDDLE" WIDTH="500">
|
||||
<TD ALIGN="CENTER" VALIGN="MIDDLE">
|
||||
<H1>FLTK 1.1.0 Programming Manual</H1>
|
||||
<P>Revision 1 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR>
|
||||
Copyright 1998-2002 by Bill Spitzak and others.</P>
|
||||
@ -17,16 +17,16 @@
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR">
|
||||
<TABLE BGCOLOR="#9f9f9f" CELLPADDING="8" CELLSPACING="0" SUMMARY="TITLE BAR" WIDTH="700">
|
||||
<TR>
|
||||
<TD ALIGN="CENTER" WIDTH="600">This software is provided under the terms of the GNU Library General
|
||||
<TD ALIGN="CENTER">This software is provided under the terms of the GNU Library General
|
||||
Public License.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE COLS="2" BGCOLOR="#9f9fef" CELLPADDING="8" CELLSPACING="0" SUMMARY="Table of Contents">
|
||||
<TABLE COLS="2" BGCOLOR="#9f9fef" CELLPADDING="8" CELLSPACING="0" SUMMARY="Table of Contents" WIDTH="700">
|
||||
<TR>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="300"><B><A HREF="preface.html#preface">Preface</A></B>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP"><B><A HREF="preface.html#preface">Preface</A></B>
|
||||
<BR>
|
||||
<BR>
|
||||
<B><A HREF="intro.html#intro">1 - Introduction to FLTK</A></B>
|
||||
@ -57,7 +57,7 @@
|
||||
<B><A HREF="subclassing.html#subclassing">7 - Adding and Extending
|
||||
Widgets</A></B>
|
||||
</TD>
|
||||
<TD ALIGN=LEFT VALIGN=TOP WIDTH=300>
|
||||
<TD ALIGN=LEFT VALIGN=TOP>
|
||||
<B><A HREF="opengl.html#opengl">8 - Using OpenGL</A></B>
|
||||
<BR>
|
||||
<BR>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# "$Id: fltk-config.in,v 1.12.2.7 2002/01/01 15:11:27 easysw Exp $"
|
||||
# "$Id: fltk-config.in,v 1.12.2.8 2002/02/20 13:02:25 easysw Exp $"
|
||||
#
|
||||
# FLTK configuration utility.
|
||||
#
|
||||
@ -200,7 +200,25 @@ if test -n "$echo_help"; then usage 1
|
||||
fi
|
||||
|
||||
if test -n "$compile"; then
|
||||
prog=`basename $compile .cxx`
|
||||
case $compile in
|
||||
*.cxx)
|
||||
prog=`basename $compile .cxx`
|
||||
;;
|
||||
*.cpp)
|
||||
prog=`basename $compile .cpp`
|
||||
;;
|
||||
*.cc)
|
||||
prog=`basename $compile .cc`
|
||||
;;
|
||||
*.C)
|
||||
prog=`basename $compile .C`
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: Unknown/bad C++ source file extension on \"$compile\"!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
post=$prog
|
||||
|
||||
echo $CXX $CXXFLAGS -o $prog $compile $LDSTATIC
|
||||
|
@ -94,7 +94,7 @@ Fl_Window* make_about_panel() {
|
||||
o->labelsize(18);
|
||||
o->labelcolor(7);
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(181, 176, 115, 30, "\251""1998-2001 by\nBill Spitzak and others");
|
||||
{ Fl_Button* o = new Fl_Button(181, 176, 115, 30, "\251""1998-2002 by\nBill Spitzak and others");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->labelsize(10);
|
||||
o->labelcolor(136);
|
||||
|
@ -56,7 +56,7 @@ Version 1.1.0}
|
||||
xywh {140 27 160 123} box OVAL_BOX color 12 selection_color 47 labeltype SHADOW_LABEL labelfont 1 labelsize 18 labelcolor 7
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {©1998-2001 by
|
||||
label {©1998-2002 by
|
||||
Bill Spitzak and others}
|
||||
callback {show_help("license.html");}
|
||||
xywh {181 176 115 30} box THIN_UP_BOX labelsize 10 labelcolor 136
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Help_View.cxx,v 1.1.2.25 2002/01/01 15:11:30 easysw Exp $"
|
||||
// "$Id: Fl_Help_View.cxx,v 1.1.2.26 2002/02/20 13:02:27 easysw Exp $"
|
||||
//
|
||||
// Fl_Help_View widget routines.
|
||||
//
|
||||
@ -45,7 +45,6 @@
|
||||
// Fl_Help_View::topline() - Set the top line to the named target.
|
||||
// Fl_Help_View::topline() - Set the top line by number.
|
||||
// Fl_Help_View::value() - Set the help text directly.
|
||||
// Fl_Help_View::compare_blocks() - Compare two blocks.
|
||||
// scrollbar_callback() - A callback for the scrollbar.
|
||||
//
|
||||
|
||||
@ -330,7 +329,7 @@ Fl_Help_View::draw()
|
||||
needspace; // Do we need whitespace?
|
||||
Fl_Boxtype b = box() ? box() : FL_DOWN_BOX;
|
||||
// Box to draw...
|
||||
Fl_Color tc, c; // Table/cell background color
|
||||
Fl_Color tc, rc, c; // Table/row/cell background color
|
||||
|
||||
|
||||
// Draw the scrollbar(s) and box first...
|
||||
@ -362,11 +361,11 @@ Fl_Help_View::draw()
|
||||
fl_push_clip(x() + 4, y() + 4, ww - 8, hh - 8);
|
||||
fl_color(textcolor_);
|
||||
|
||||
tc = c = bgcolor_;
|
||||
tc = rc = c = bgcolor_;
|
||||
|
||||
// Draw all visible blocks...
|
||||
for (i = 0, block = blocks_; i < nblocks_ && (block->y - topline_) < h(); i ++, block ++)
|
||||
if ((block->y + block->h) >= topline_)
|
||||
for (i = 0, block = blocks_; i < nblocks_; i ++, block ++)
|
||||
if ((block->y + block->h) >= topline_ && block->y < (topline_ + h()))
|
||||
{
|
||||
line = 0;
|
||||
xx = block->line[line];
|
||||
@ -541,15 +540,6 @@ Fl_Help_View::draw()
|
||||
}
|
||||
|
||||
pushfont(font, size);
|
||||
|
||||
if (c != bgcolor_)
|
||||
{
|
||||
fl_color(c);
|
||||
fl_rectf(block->x + x() - 4 - leftline_,
|
||||
block->y - topline_ + y() - size - 3,
|
||||
block->w - block->x + 7, block->h + size - 5);
|
||||
fl_color(textcolor_);
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(buf, "A") == 0 &&
|
||||
get_attr(attrs, "HREF", attr, sizeof(attr)) != NULL)
|
||||
@ -560,30 +550,52 @@ Fl_Help_View::draw()
|
||||
strcasecmp(buf, "STRONG") == 0)
|
||||
pushfont(font |= FL_BOLD, size);
|
||||
else if (strcasecmp(buf, "TABLE") == 0)
|
||||
tc = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), bgcolor_);
|
||||
tc = rc = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), bgcolor_);
|
||||
else if (strcasecmp(buf, "TR") == 0)
|
||||
rc = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), tc);
|
||||
else if (strcasecmp(buf, "TD") == 0 ||
|
||||
strcasecmp(buf, "TH") == 0)
|
||||
{
|
||||
int tx, ty, tw, th;
|
||||
|
||||
if (tolower(buf[1]) == 'h')
|
||||
pushfont(font |= FL_BOLD, size);
|
||||
else
|
||||
pushfont(font = textfont_, size);
|
||||
|
||||
c = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), tc);
|
||||
c = get_color(get_attr(attrs, "BGCOLOR", attr, sizeof(attr)), rc);
|
||||
|
||||
tx = block->x - 4 - leftline_;
|
||||
ty = block->y - topline_ - size - 3;
|
||||
tw = block->w - block->x + 7;
|
||||
th = block->h + size - 5;
|
||||
|
||||
if (tx < 0)
|
||||
{
|
||||
tw += tx;
|
||||
tx = 0;
|
||||
}
|
||||
|
||||
if (ty < 0)
|
||||
{
|
||||
th += ty;
|
||||
ty = 0;
|
||||
}
|
||||
|
||||
tx += x();
|
||||
ty += y();
|
||||
|
||||
// printf("%s: %d,%d - %dx%d\n", buf, tx, ty, tw, th);
|
||||
|
||||
if (c != bgcolor_)
|
||||
{
|
||||
fl_color(c);
|
||||
fl_rectf(block->x + x() - 4 - leftline_,
|
||||
block->y - topline_ + y() - size - 3,
|
||||
block->w - block->x + 7, block->h + size - 5);
|
||||
fl_rectf(tx, ty, tw, th);
|
||||
fl_color(textcolor_);
|
||||
}
|
||||
|
||||
if (block->border)
|
||||
fl_rect(block->x + x() - 4 - leftline_,
|
||||
block->y - topline_ + y() - size - 3,
|
||||
block->w - block->x + 7, block->h + size - 5);
|
||||
fl_rect(tx, ty, tw, th);
|
||||
}
|
||||
else if (strcasecmp(buf, "I") == 0 ||
|
||||
strcasecmp(buf, "EM") == 0)
|
||||
@ -611,10 +623,10 @@ Fl_Help_View::draw()
|
||||
strcasecmp(buf, "/VAR") == 0)
|
||||
popfont(font, size);
|
||||
else if (strcasecmp(buf, "/TABLE") == 0)
|
||||
tc = c = bgcolor_;
|
||||
tc = rc = c = bgcolor_;
|
||||
else if (strcasecmp(buf, "/TD") == 0 ||
|
||||
strcasecmp(buf, "/TH") == 0)
|
||||
c = tc;
|
||||
c = rc;
|
||||
else if (strcasecmp(buf, "/PRE") == 0)
|
||||
{
|
||||
popfont(font, size);
|
||||
@ -766,7 +778,9 @@ Fl_Help_View::format()
|
||||
int done; // Are we done yet?
|
||||
Fl_Help_Block *block, // Current block
|
||||
*cell; // Current table cell
|
||||
int row; // Current table row (block number)
|
||||
int cells[MAX_COLUMNS],
|
||||
// Cells in the current row...
|
||||
row; // Current table row (block number)
|
||||
const char *ptr, // Pointer into block
|
||||
*start, // Pointer to start of element
|
||||
*attrs; // Pointer to start of element attributes
|
||||
@ -1154,12 +1168,20 @@ Fl_Help_View::format()
|
||||
if ((cell->y + cell->h) > yy)
|
||||
yy = cell->y + cell->h;
|
||||
|
||||
block = blocks_ + row;
|
||||
|
||||
block->h = yy - block->y + 2;
|
||||
|
||||
for (cell = blocks_ + row + 1; cell < block; cell ++)
|
||||
cell->h = block->h;
|
||||
for (i = 0; i < column; i ++)
|
||||
if (cells[i])
|
||||
{
|
||||
cell = blocks_ + cells[i];
|
||||
cell->h = block->h;
|
||||
}
|
||||
}
|
||||
|
||||
memset(cells, 0, sizeof(cells));
|
||||
|
||||
yy = block->y + block->h - 4;
|
||||
hh = 0;
|
||||
block = add_block(start, xx, yy, hsize_, 0);
|
||||
@ -1182,10 +1204,16 @@ Fl_Help_View::format()
|
||||
if ((cell->y + cell->h) > yy)
|
||||
yy = cell->y + cell->h;
|
||||
|
||||
block = blocks_ + row;
|
||||
|
||||
block->h = yy - block->y + 2;
|
||||
|
||||
for (cell = blocks_ + row + 1; cell < block; cell ++)
|
||||
cell->h = block->h;
|
||||
for (i = 0; i < column; i ++)
|
||||
if (cells[i])
|
||||
{
|
||||
cell = blocks_ + cells[i];
|
||||
cell->h = block->h;
|
||||
}
|
||||
|
||||
yy = block->y + block->h - 4;
|
||||
block = add_block(start, xx, yy, hsize_, 0);
|
||||
@ -1237,11 +1265,15 @@ Fl_Help_View::format()
|
||||
line = 0;
|
||||
newalign = get_align(attrs, tolower(buf[1]) == 'h' ? CENTER : LEFT);
|
||||
|
||||
column ++;
|
||||
cells[column] = block - blocks_;
|
||||
|
||||
column += colspan;
|
||||
}
|
||||
else if ((strcasecmp(buf, "/TD") == 0 ||
|
||||
strcasecmp(buf, "/TH") == 0) && row)
|
||||
{
|
||||
popfont(font, size);
|
||||
}
|
||||
else if (strcasecmp(buf, "B") == 0 ||
|
||||
strcasecmp(buf, "STRONG") == 0)
|
||||
pushfont(font |= FL_BOLD, size);
|
||||
@ -1406,10 +1438,6 @@ Fl_Help_View::format()
|
||||
qsort(targets_, ntargets_, sizeof(Fl_Help_Target),
|
||||
(compare_func_t)compare_targets);
|
||||
|
||||
if (nblocks_ > 1)
|
||||
qsort(blocks_, nblocks_, sizeof(Fl_Help_Block),
|
||||
(compare_func_t)compare_blocks);
|
||||
|
||||
if (hsize_ > (w() - 24)) {
|
||||
hscrollbar_.show();
|
||||
|
||||
@ -1944,7 +1972,7 @@ Fl_Help_View::get_color(const char *n, // I - Color name
|
||||
int rgb, r, g, b; // RGB values
|
||||
|
||||
|
||||
if (!n)
|
||||
if (!n || !n[0])
|
||||
return (c);
|
||||
|
||||
if (n[0] == '#')
|
||||
@ -1956,19 +1984,14 @@ Fl_Help_View::get_color(const char *n, // I - Color name
|
||||
g = (rgb >> 8) & 255;
|
||||
b = rgb & 255;
|
||||
|
||||
if (r == g && g == b)
|
||||
return (fl_gray_ramp(FL_NUM_GRAY * r / 256));
|
||||
else
|
||||
return (fl_color_cube((FL_NUM_RED - 1) * r / 255,
|
||||
(FL_NUM_GREEN - 1) * g / 255,
|
||||
(FL_NUM_BLUE - 1) * b / 255));
|
||||
return (fl_rgb_color(r, g, b));
|
||||
}
|
||||
else if (strcasecmp(n, "black") == 0)
|
||||
return (FL_BLACK);
|
||||
else if (strcasecmp(n, "red") == 0)
|
||||
return (FL_RED);
|
||||
else if (strcasecmp(n, "green") == 0)
|
||||
return (fl_color_cube(0, 4, 0));
|
||||
return (fl_rgb_color(0, 0x80, 0));
|
||||
else if (strcasecmp(n, "yellow") == 0)
|
||||
return (FL_YELLOW);
|
||||
else if (strcasecmp(n, "blue") == 0)
|
||||
@ -1980,21 +2003,21 @@ Fl_Help_View::get_color(const char *n, // I - Color name
|
||||
else if (strcasecmp(n, "white") == 0)
|
||||
return (FL_WHITE);
|
||||
else if (strcasecmp(n, "gray") == 0 || strcasecmp(n, "grey") == 0)
|
||||
return (FL_GRAY);
|
||||
return (fl_rgb_color(0x80, 0x80, 0x80));
|
||||
else if (strcasecmp(n, "lime") == 0)
|
||||
return (FL_GREEN);
|
||||
else if (strcasecmp(n, "maroon") == 0)
|
||||
return (fl_color_cube(2, 0, 0));
|
||||
return (fl_rgb_color(0x80, 0, 0));
|
||||
else if (strcasecmp(n, "navy") == 0)
|
||||
return (fl_color_cube(0, 0, 2));
|
||||
return (fl_rgb_color(0, 0, 0x80));
|
||||
else if (strcasecmp(n, "olive") == 0)
|
||||
return (fl_color_cube(2, 4, 0));
|
||||
return (fl_rgb_color(0x80, 0x80, 0));
|
||||
else if (strcasecmp(n, "purple") == 0)
|
||||
return (fl_color_cube(2, 0, 2));
|
||||
return (fl_rgb_color(0x80, 0, 0x80));
|
||||
else if (strcasecmp(n, "silver") == 0)
|
||||
return (FL_LIGHT2);
|
||||
return (fl_rgb_color(0xc0, 0xc0, 0xc0));
|
||||
else if (strcasecmp(n, "teal") == 0)
|
||||
return (fl_color_cube(0, 4, 2));
|
||||
return (fl_rgb_color(0, 0x80, 0x80));
|
||||
else
|
||||
return (c);
|
||||
}
|
||||
@ -2455,18 +2478,6 @@ Fl_Help_View::value(const char *v) // I - Text to view
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'Fl_Help_View::compare_blocks()' - Compare two blocks.
|
||||
//
|
||||
|
||||
int // O - Result of comparison
|
||||
Fl_Help_View::compare_blocks(const void *a, // I - First block
|
||||
const void *b) // I - Second block
|
||||
{
|
||||
return (((Fl_Help_Block *)a)->y - ((Fl_Help_Block *)b)->y);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'quote_char()' - Return the character code associated with a quoted char.
|
||||
//
|
||||
@ -2616,5 +2627,5 @@ hscrollbar_callback(Fl_Widget *s, void *)
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.25 2002/01/01 15:11:30 easysw Exp $".
|
||||
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.26 2002/02/20 13:02:27 easysw Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.6 2002/01/01 15:11:30 easysw Exp $"
|
||||
// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.7 2002/02/20 13:02:27 easysw Exp $"
|
||||
//
|
||||
// Menu code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -202,7 +202,7 @@ menutitle::menutitle(int X, int Y, int W, int H, const Fl_Menu_Item* L) :
|
||||
set_modal();
|
||||
clear_border();
|
||||
menu = L;
|
||||
if (L->labelcolor_) clear_overlay();
|
||||
if (L->labelcolor_ || Fl::scheme()) clear_overlay();
|
||||
}
|
||||
|
||||
menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
|
||||
@ -255,7 +255,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp,
|
||||
w1 = int(fl_width(fl_shortcut_label(m->shortcut_))) + 8;
|
||||
if (w1 > hotKeysw) hotKeysw = w1;
|
||||
}
|
||||
if (m->labelcolor_) clear_overlay();
|
||||
if (m->labelcolor_ || Fl::scheme()) clear_overlay();
|
||||
}
|
||||
if (selected >= 0 && !Wp) X -= W/2;
|
||||
int BW = Fl::box_dx(box());
|
||||
@ -756,5 +756,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.6 2002/01/01 15:11:30 easysw Exp $".
|
||||
// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.7 2002/02/20 13:02:27 easysw Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user