Fix prototypes for fl_input() and fl_password().

Change how tabs are colored, and update the tabs demo to show it...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-01-30 13:38:15 +00:00
parent a71a0d21b1
commit a235545e42
4 changed files with 29 additions and 18 deletions

View File

@ -1,5 +1,12 @@
CHANGES IN FLTK 1.1.0b11
- The prototypes for fl_input() and fl_password() did
not default the "default value" to NULL.
- Fl_Tabs now draws tabs using the selection_color() of
the child groups; this allows the tabs to be colored
separately from the body. Selected tabs are a mix of
the Fl_Tabs selection_color() and the child group's
selection_color().
- Fl_Tabs didn't include images in the measurement of
the tabs if no label text was defined.
- The WIN32 code didn't return 0 from the window

View File

@ -1,5 +1,5 @@
//
// "$Id: fl_ask.H,v 1.7.2.4.2.2 2002/01/01 15:11:28 easysw Exp $"
// "$Id: fl_ask.H,v 1.7.2.4.2.3 2002/01/30 13:38:15 easysw Exp $"
//
// Standard dialog header file for the Fast Light Tool Kit (FLTK).
//
@ -44,8 +44,8 @@ FL_EXPORT void fl_message(const char *,...);
FL_EXPORT void fl_alert(const char *,...);
FL_EXPORT int fl_ask(const char *,...);
FL_EXPORT int fl_choice(const char *q,const char *b0,const char *b1,const char *b2,...);
FL_EXPORT const char *fl_input(const char *label, const char *deflt, ...);
FL_EXPORT const char *fl_password(const char *label, const char *deflt, ...);
FL_EXPORT const char *fl_input(const char *label, const char *deflt = 0, ...);
FL_EXPORT const char *fl_password(const char *label, const char *deflt = 0, ...);
FL_EXPORT Fl_Widget *fl_message_icon();
extern FL_EXPORT unsigned char fl_message_font_;
@ -62,5 +62,5 @@ extern FL_EXPORT const char* fl_cancel;
#endif
//
// End of "$Id: fl_ask.H,v 1.7.2.4.2.2 2002/01/01 15:11:28 easysw Exp $".
// End of "$Id: fl_ask.H,v 1.7.2.4.2.3 2002/01/30 13:38:15 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.8 2002/01/29 00:56:19 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.9 2002/01/30 13:38:15 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@ -254,7 +254,9 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
H += dh;
draw_box(box(), x1, y(), W, H, o->color());
draw_box(box(), x1, y(), W, H,
sel ? fl_color_average(selection_color(), o->selection_color(), 0.5f)
: o->selection_color());
o->draw_label(x1, y(), W, H, FL_ALIGN_CENTER);
@ -270,7 +272,9 @@ void Fl_Tabs::draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int what) {
H += dh;
draw_box(box(), x1, y() + h() - H, W, H, o->color());
draw_box(box(), x1, y() + h() - H, W, H,
sel ? fl_color_average(selection_color(), o->selection_color(), 0.5f)
: o->selection_color());
o->draw_label(x1, y() + h() - H, W, H, FL_ALIGN_CENTER);
@ -289,5 +293,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.8 2002/01/29 00:56:19 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.9 2002/01/30 13:38:15 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0009
version 1.0100
header_name {.h}
code_name {.cxx}
gridx 10
@ -8,14 +8,14 @@ snap 3
Function {} {open
} {
Fl_Window foo_window {open
xywh {329 266 321 324} resizable visible
xywh {674 782 321 324} resizable visible
} {
Fl_Tabs {} {open
xywh {10 10 300 200} selection_color 15 resizable
xywh {10 10 300 200} selection_color 7 resizable
} {
Fl_Group {} {
label Label1 open
xywh {10 30 300 180} hide resizable
xywh {10 30 300 180} selection_color 1 hide resizable
} {
Fl_Input {} {
label {input:}
@ -32,7 +32,7 @@ Function {} {open
}
Fl_Group {} {
label tab2 open
xywh {10 30 300 180} hide
xywh {10 30 300 180} selection_color 2 hide
} {
Fl_Button {} {
label button1
@ -48,8 +48,8 @@ Function {} {open
}
}
Fl_Group {} {
label tab3 open selected
xywh {10 30 300 180}
label tab3 open
xywh {10 30 300 180} selection_color 3 hide
} {
Fl_Button {} {
label button2
@ -66,7 +66,7 @@ Function {} {open
}
Fl_Group {} {
label tab4 open
xywh {10 30 300 180} labelfont 2 hide
xywh {10 30 300 180} selection_color 5 labelfont 2 hide
} {
Fl_Button {} {
label button2
@ -82,8 +82,8 @@ Function {} {open
}
}
Fl_Group {} {
label { tab5 } open
xywh {10 30 300 180} labeltype ENGRAVED_LABEL hide
label { tab5 } open selected
xywh {10 30 300 180} labeltype ENGRAVED_LABEL
} {
Fl_Button {} {
label button2