Browse Source

Fix widget width tooltip and default parameter handling code.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
pull/168/head
Michael R Sweet 23 years ago
parent
commit
6592f0919b
  1. 2
      CHANGES
  2. 18
      fluid/Fl_Function_Type.cxx
  3. 2
      fluid/widget_panel.cxx
  4. 9
      fluid/widget_panel.fl

2
CHANGES

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0 CHANGES IN FLTK 1.1.0
- Fixed widget width tooltip and default argument
handling code in FLUID.
- Fixed colors used when drawing antialiased text using - Fixed colors used when drawing antialiased text using
Xft. Xft.
- Fl_Preferences::makePath() now uses access() instead - Fl_Preferences::makePath() now uses access() instead

18
fluid/Fl_Function_Type.cxx

@ -1,5 +1,5 @@
// //
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.5 2002/05/12 01:02:17 easysw Exp $" // "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.6 2002/05/15 23:32:25 easysw Exp $"
// //
// C function type code for the Fast Light Tool Kit (FLTK). // C function type code for the Fast Light Tool Kit (FLTK).
// //
@ -258,21 +258,23 @@ void Fl_Function_Type::write_code1() {
write_h("%s;\n", s); write_h("%s;\n", s);
// skip all function default param. init in body: // skip all function default param. init in body:
int skips=0; int skips=0,skipc=0;
int nc=0,level=0; int nc=0,level=0;
for (sptr=s,nptr=(char*)name(); *nptr; nc++,nptr++) { for (sptr=s,nptr=(char*)name(); *nptr; nc++,nptr++) {
if (!skips && *nptr=='(') level++; if (!skips && *nptr=='(') level++;
else if (!skips && *nptr==')') level--; else if (!skips && *nptr==')') level--;
if ( *nptr=='"' && !(nc && *(nptr-1)=='\\') ) if ( *nptr=='"' && !(nc && *(nptr-1)=='\\') )
skips = skips ? 0 : 1; skips = skips ? 0 : 1;
if(!skips && level==1 && *nptr =='=' && else if(!skips && *nptr=='\'' && !(nc && *(nptr-1)=='\\'))
skipc = skipc ? 0 : 1;
if(!skips && !skipc && level==1 && *nptr =='=' &&
!(nc && *(nptr-1)=='\'') ) // ignore '=' case !(nc && *(nptr-1)=='\'') ) // ignore '=' case
while(*++nptr && (skips || *(nptr-1)=='\'' || while(*++nptr && (skips || skipc || (*nptr!=',' && *nptr!=')' || level!=1) )) {
(*nptr!=',' && (*nptr!=')' || level!=1) ))) {
if ( *nptr=='"' && *(nptr-1)!='\\' ) if ( *nptr=='"' && *(nptr-1)!='\\' )
skips = skips ? 0 : 1; skips = skips ? 0 : 1;
if (!skips && *nptr=='(') level++; else if(!skips && *nptr=='\'' && *(nptr-1)!='\\')
skipc = skipc ? 0 : 1;
if (!skips && !skipc && *nptr=='(') level++;
else if (!skips && *nptr==')') level--; else if (!skips && *nptr==')') level--;
} }
*sptr++ = *nptr; *sptr++ = *nptr;
@ -702,5 +704,5 @@ void Fl_Class_Type::write_code2() {
} }
// //
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.5 2002/05/12 01:02:17 easysw Exp $". // End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.6 2002/05/15 23:32:25 easysw Exp $".
// //

2
fluid/widget_panel.cxx

@ -64,7 +64,7 @@ Fl_Window* make_widget_panel() {
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
} }
{ Fl_Value_Input* o = new Fl_Value_Input(215, 150, 60, 20, "Width:"); { Fl_Value_Input* o = new Fl_Value_Input(215, 150, 60, 20, "Width:");
o->tooltip("The widget of the widget."); o->tooltip("The width of the widget.");
o->labelsize(10); o->labelsize(10);
o->maximum(2048); o->maximum(2048);
o->step(1); o->step(1);

9
fluid/widget_panel.fl

@ -2,9 +2,6 @@
version 1.0100 version 1.0100
header_name {.h} header_name {.h}
code_name {.cxx} code_name {.cxx}
gridx 5
gridy 5
snap 3
Function {make_widget_panel()} {open Function {make_widget_panel()} {open
} { } {
Fl_Window {} {open Fl_Window {} {open
@ -63,11 +60,11 @@ Function {make_widget_panel()} {open
Fl_Value_Input {} { Fl_Value_Input {} {
label {Width:} label {Width:}
callback w_cb callback w_cb
tooltip {The widget of the widget.} xywh {215 150 60 20} labelsize 10 align 5 maximum 2048 step 1 tooltip {The width of the widget.} xywh {215 150 60 20} labelsize 10 align 5 maximum 2048 step 1
} }
Fl_Value_Input {} { Fl_Value_Input {} {
label {Height:} label {Height:}
callback h_cb callback h_cb selected
tooltip {The height of the widget.} xywh {275 150 60 20} labelsize 10 align 5 maximum 2048 step 1 tooltip {The height of the widget.} xywh {275 150 60 20} labelsize 10 align 5 maximum 2048 step 1
} }
Fl_Group {} { Fl_Group {} {
@ -379,7 +376,7 @@ image}
} }
Fl_Button {} { Fl_Button {} {
label Cancel label Cancel
callback cancel_cb selected callback cancel_cb
xywh {325 335 80 25} xywh {325 335 80 25}
} }
Fl_Return_Button {} { Fl_Return_Button {} {

Loading…
Cancel
Save