Patches from Bill:
- Box type problems with 2-pixel boxes (wrong colors) - Fl_Pixmap fix (uchar instead of char) - Style demo fixes for Windows. - HPUX comparison function prototype wrong. - Spelling errors... git-svn-id: file:///fltk/svn/fltk/trunk@70 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
4c68a1ca54
commit
a90ca2d60a
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Pixmap.H,v 1.3 1998/10/21 14:19:26 mike Exp $"
|
||||
// "$Id: Fl_Pixmap.H,v 1.4 1998/11/08 15:05:44 mike Exp $"
|
||||
//
|
||||
// Pixmap header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -35,6 +35,7 @@ struct Fl_Pixmap {
|
||||
ulong id; // for internal use (the pixmap)
|
||||
ulong mask; // for internal use (mask bitmap)
|
||||
Fl_Pixmap(/*const*/char * const * d) : data(d), w(-1), h(0), id(0),mask(0) {}
|
||||
Fl_Pixmap(/*const*/uchar* const * d) : data((char**)d), w(-1), h(0), id(0),mask(0) {}
|
||||
~Fl_Pixmap();
|
||||
void label(Fl_Widget*);
|
||||
void label(Fl_Menu_Item*);
|
||||
@ -45,5 +46,5 @@ struct Fl_Pixmap {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Pixmap.H,v 1.3 1998/10/21 14:19:26 mike Exp $".
|
||||
// End of "$Id: Fl_Pixmap.H,v 1.4 1998/11/08 15:05:44 mike Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Browser_.cxx,v 1.4 1998/10/21 14:19:57 mike Exp $"
|
||||
// "$Id: Fl_Browser_.cxx,v 1.5 1998/11/08 15:05:45 mike Exp $"
|
||||
//
|
||||
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -326,7 +326,7 @@ J1:
|
||||
else update_child(hscrollbar);
|
||||
}
|
||||
|
||||
// draw that little square between the scrolbars:
|
||||
// draw that little square between the scrollbars:
|
||||
if (drawsquare && scrollbar.visible() && hscrollbar.visible()) {
|
||||
fl_color(parent()->color());
|
||||
fl_rectf(scrollbar.x(), hscrollbar.y(), scrollbar_width_,scrollbar_width_);
|
||||
@ -627,5 +627,5 @@ void Fl_Browser_::item_select(void*, int) {}
|
||||
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Browser_.cxx,v 1.4 1998/10/21 14:19:57 mike Exp $".
|
||||
// End of "$Id: Fl_Browser_.cxx,v 1.5 1998/11/08 15:05:45 mike Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: filename_list.cxx,v 1.5 1998/10/21 14:20:41 mike Exp $"
|
||||
// "$Id: filename_list.cxx,v 1.6 1998/11/08 15:05:45 mike Exp $"
|
||||
//
|
||||
// Filename list routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -40,7 +40,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
int filename_list(const char *d, dirent ***list) {
|
||||
#if defined(_AIX) || defined(CRAY)
|
||||
#if defined(_AIX) || defined(CRAY) || defined(HPUX)
|
||||
// on some systems you may need to do this, due to a rather common
|
||||
// error in the prototype for the sorting function, where a level
|
||||
// of pointer indirection is missing:
|
||||
@ -51,5 +51,5 @@ int filename_list(const char *d, dirent ***list) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: filename_list.cxx,v 1.5 1998/10/21 14:20:41 mike Exp $".
|
||||
// End of "$Id: filename_list.cxx,v 1.6 1998/11/08 15:05:45 mike Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_boxtype.cxx,v 1.4 1998/10/21 14:20:44 mike Exp $"
|
||||
// "$Id: fl_boxtype.cxx,v 1.5 1998/11/08 15:05:46 mike Exp $"
|
||||
//
|
||||
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -120,7 +120,7 @@ void fl_up_frame(int x, int y, int w, int h, Fl_Color) {
|
||||
fl_frame2("HHWW",x,y,w,h);
|
||||
#else
|
||||
#if BORDER_WIDTH == 2
|
||||
fl_frame2("AAPPMMWU",x,y,w,h);
|
||||
fl_frame2("AAUWMMSS",x,y,w,h);
|
||||
#else
|
||||
fl_frame("AAAAWUJJUSNN",x,y,w,h);
|
||||
#endif
|
||||
@ -282,5 +282,5 @@ const {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_boxtype.cxx,v 1.4 1998/10/21 14:20:44 mike Exp $".
|
||||
// End of "$Id: fl_boxtype.cxx,v 1.5 1998/11/08 15:05:46 mike Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_file_chooser.cxx,v 1.5 1998/11/06 16:00:45 mike Exp $"
|
||||
// "$Id: fl_file_chooser.cxx,v 1.6 1998/11/08 15:05:46 mike Exp $"
|
||||
//
|
||||
// File chooser widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -611,5 +611,5 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: fl_file_chooser.cxx,v 1.5 1998/11/06 16:00:45 mike Exp $".
|
||||
// End of "$Id: fl_file_chooser.cxx,v 1.6 1998/11/08 15:05:46 mike Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: input.cxx,v 1.3 1998/10/21 14:21:30 mike Exp $"
|
||||
// "$Id: input.cxx,v 1.4 1998/11/08 15:05:47 mike Exp $"
|
||||
//
|
||||
// Input field test program for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -36,7 +36,7 @@
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
|
||||
void cb(Fl_Widget *ob) {
|
||||
printf("Callback for %s\n",ob->label());
|
||||
printf("Callback for %s '%s'\n",ob->label(),((Fl_Input*)ob)->value());
|
||||
}
|
||||
|
||||
int when = 0;
|
||||
@ -48,7 +48,9 @@ void toggle_cb(Fl_Widget *o, long v) {
|
||||
}
|
||||
|
||||
void test(Fl_Input *i) {
|
||||
if (i->changed()) {i->clear_changed(); printf("%s\n",i->label());}
|
||||
if (i->changed()) {
|
||||
i->clear_changed(); printf("%s '%s'\n",i->label(),i->value());
|
||||
}
|
||||
}
|
||||
|
||||
void button_cb(Fl_Widget *,void *) {
|
||||
@ -115,5 +117,5 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: input.cxx,v 1.3 1998/10/21 14:21:30 mike Exp $".
|
||||
// End of "$Id: input.cxx,v 1.4 1998/11/08 15:05:47 mike Exp $".
|
||||
//
|
||||
|
53
test/style.C
53
test/style.C
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: style.C,v 1.3 1998/10/21 14:21:42 mike Exp $"
|
||||
// "$Id: style.C,v 1.4 1998/11/08 15:05:48 mike Exp $"
|
||||
//
|
||||
// Style demo for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -38,7 +38,9 @@
|
||||
// that the user presses.
|
||||
|
||||
#include "style_ui.C"
|
||||
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
||||
Fl_Menu_Item* font_menu() {
|
||||
@ -78,8 +80,6 @@ void font_size_cb(Fl_Value_Input* c, long i) {
|
||||
Fl::redraw();
|
||||
}
|
||||
|
||||
#include <FL/Fl_Color_Chooser.H>
|
||||
|
||||
void color_button_cb(Fl_Button* w, void*) {
|
||||
Fl_Color c = w->color();
|
||||
uchar r,g,b; Fl::get_color(c, r,g,b);
|
||||
@ -100,10 +100,16 @@ void fl_up_frame(int, int, int, int, Fl_Color);
|
||||
void fl_down_box(int, int, int, int, Fl_Color);
|
||||
void fl_up_box(int, int, int, int, Fl_Color);
|
||||
|
||||
#if BORDER_WIDTH == 3
|
||||
|
||||
#define fl_3_up_frame fl_up_frame
|
||||
#define fl_3_up_box fl_up_box
|
||||
#define fl_3_down_frame fl_down_frame
|
||||
#define fl_3_down_box fl_down_box
|
||||
|
||||
// define the 2-pixel boxes:
|
||||
#include <FL/fl_draw.H>
|
||||
void fl_2_up_frame(int x, int y, int w, int h, Fl_Color) {
|
||||
fl_frame2("AAPPMMWU",x,y,w,h);
|
||||
fl_frame2("AAUWMMSS",x,y,w,h);
|
||||
}
|
||||
void fl_2_up_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
fl_2_up_frame(x,y,w,h,c);
|
||||
@ -117,6 +123,31 @@ void fl_2_down_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
fl_color(c); fl_rectf(x+2, y+2, w-4, h-4);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define fl_2_up_frame fl_up_frame
|
||||
#define fl_2_up_box fl_up_box
|
||||
#define fl_2_down_frame fl_down_frame
|
||||
#define fl_2_down_box fl_down_box
|
||||
|
||||
// define the 3-pixel boxes:
|
||||
void fl_3_up_frame(int x, int y, int w, int h, Fl_Color) {
|
||||
fl_frame("AAAAWUJJUSNN",x,y,w,h);
|
||||
}
|
||||
void fl_3_up_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
fl_3_up_frame(x,y,w,h,c);
|
||||
fl_color(c); fl_rectf(x+3, y+3, w-6, h-6);
|
||||
}
|
||||
void fl_3_down_frame(int x, int y, int w, int h, Fl_Color) {
|
||||
fl_frame("NNSUJJUWAAAA",x,y,w,h);
|
||||
}
|
||||
void fl_3_down_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
fl_3_down_frame(x,y,w,h,c);
|
||||
fl_color(c); fl_rectf(x+3, y+3, w-6, h-6);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void box_thickness_cb(Fl_Value_Slider*v, void*) {
|
||||
switch (int(v->value())) {
|
||||
case 1:
|
||||
@ -132,10 +163,10 @@ void box_thickness_cb(Fl_Value_Slider*v, void*) {
|
||||
Fl::set_boxtype(FL_DOWN_FRAME, fl_2_down_frame, 2,2,4,4);
|
||||
break;
|
||||
default:
|
||||
Fl::set_boxtype(FL_UP_BOX, fl_up_box, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_DOWN_BOX, fl_down_box, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_UP_FRAME, fl_up_frame, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_DOWN_FRAME, fl_down_frame, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_UP_BOX, fl_3_up_box, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_DOWN_BOX, fl_3_down_box, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_UP_FRAME, fl_3_up_frame, 3,3,6,6);
|
||||
Fl::set_boxtype(FL_DOWN_FRAME, fl_3_down_frame, 3,3,6,6);
|
||||
break;
|
||||
}
|
||||
Fl::redraw();
|
||||
@ -163,5 +194,5 @@ void defaults_cb(Fl_Button*, void*) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: style.C,v 1.3 1998/10/21 14:21:42 mike Exp $".
|
||||
// End of "$Id: style.C,v 1.4 1998/11/08 15:05:48 mike Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user