Browse Source

Wasn't quoting @label stuff...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1662 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/168/head
Michael R Sweet 24 years ago
parent
commit
a00b52a676
  1. 3
      CHANGES
  2. 12
      test/symbols.cxx

3
CHANGES

@ -7,6 +7,9 @@ CHANGES IN FLTK 1.1.0b5
- Fl_Help_Func now takes a Fl_Widget pointer as well as - Fl_Help_Func now takes a Fl_Widget pointer as well as
a pathname. a pathname.
- Added code to support FL_KEYUP events. - Added code to support FL_KEYUP events.
- The symbols demo didn't show the strings needed to
show the corresponding symbol (the label string was
not quoted...)
CHANGES IN FLTK 1.1.0b4 CHANGES IN FLTK 1.1.0b4

12
test/symbols.cxx

@ -1,5 +1,5 @@
// //
// "$Id: symbols.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $" // "$Id: symbols.cxx,v 1.4.2.3.2.1 2001/10/27 16:38:36 easysw Exp $"
// //
// Symbol test program for the Fast Light Tool Kit (FLTK). // Symbol test program for the Fast Light Tool Kit (FLTK).
// //
@ -23,8 +23,9 @@
// Please report all bugs and problems to "fltk-bugs@fltk.org". // Please report all bugs and problems to "fltk-bugs@fltk.org".
// //
#include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <FL/Fl.H> #include <FL/Fl.H>
#include <FL/Fl_Single_Window.H> #include <FL/Fl_Single_Window.H>
#include <FL/Fl_Box.H> #include <FL/Fl_Box.H>
@ -41,14 +42,15 @@ Fl_Window *window;
void bt(const char *name) { void bt(const char *name) {
int x = N%COLS; int x = N%COLS;
int y = N/COLS; int y = N/COLS;
char buf[255];
N++; N++;
x = x*W+10; x = x*W+10;
y = y*H+10; y = y*H+10;
Fl_Box *a = new Fl_Box(FL_NO_BOX,x,y,W-20,H-20,name); sprintf(buf, "@%s", name);
Fl_Box *a = new Fl_Box(FL_NO_BOX,x,y,W-20,H-20,strdup(buf));
a->align(FL_ALIGN_BOTTOM); a->align(FL_ALIGN_BOTTOM);
a->labelsize(11); a->labelsize(11);
Fl_Box *b = new Fl_Box(FL_UP_BOX,x,y,W-20,H-20,name); Fl_Box *b = new Fl_Box(FL_UP_BOX,x,y,W-20,H-20,name);
b->labeltype(FL_SYMBOL_LABEL);
b->labelcolor(FL_DARK3); b->labelcolor(FL_DARK3);
} }
@ -85,5 +87,5 @@ bt("@DnArrow");
} }
// //
// End of "$Id: symbols.cxx,v 1.4.2.3 2001/01/22 15:13:41 easysw Exp $". // End of "$Id: symbols.cxx,v 1.4.2.3.2.1 2001/10/27 16:38:36 easysw Exp $".
// //

Loading…
Cancel
Save