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
This commit is contained in:
parent
edb2118098
commit
6592f0919b
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
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
|
||||
Xft.
|
||||
- Fl_Preferences::makePath() now uses access() instead
|
||||
|
@ -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).
|
||||
//
|
||||
@ -258,21 +258,23 @@ void Fl_Function_Type::write_code1() {
|
||||
|
||||
write_h("%s;\n", s);
|
||||
// skip all function default param. init in body:
|
||||
int skips=0;
|
||||
int skips=0,skipc=0;
|
||||
int nc=0,level=0;
|
||||
for (sptr=s,nptr=(char*)name(); *nptr; nc++,nptr++) {
|
||||
if (!skips && *nptr=='(') level++;
|
||||
else if (!skips && *nptr==')') level--;
|
||||
|
||||
if ( *nptr=='"' && !(nc && *(nptr-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
|
||||
while(*++nptr && (skips || *(nptr-1)=='\'' ||
|
||||
(*nptr!=',' && (*nptr!=')' || level!=1) ))) {
|
||||
while(*++nptr && (skips || skipc || (*nptr!=',' && *nptr!=')' || level!=1) )) {
|
||||
if ( *nptr=='"' && *(nptr-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--;
|
||||
}
|
||||
*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 $".
|
||||
//
|
||||
|
@ -64,7 +64,7 @@ Fl_Window* make_widget_panel() {
|
||||
o->align(FL_ALIGN_TOP_LEFT);
|
||||
}
|
||||
{ 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->maximum(2048);
|
||||
o->step(1);
|
||||
|
@ -1,10 +1,7 @@
|
||||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0100
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
gridx 5
|
||||
gridy 5
|
||||
snap 3
|
||||
code_name {.cxx}
|
||||
Function {make_widget_panel()} {open
|
||||
} {
|
||||
Fl_Window {} {open
|
||||
@ -63,11 +60,11 @@ Function {make_widget_panel()} {open
|
||||
Fl_Value_Input {} {
|
||||
label {Width:}
|
||||
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 {} {
|
||||
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
|
||||
}
|
||||
Fl_Group {} {
|
||||
@ -379,7 +376,7 @@ image}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label Cancel
|
||||
callback cancel_cb selected
|
||||
callback cancel_cb
|
||||
xywh {325 335 80 25}
|
||||
}
|
||||
Fl_Return_Button {} {
|
||||
|
Loading…
Reference in New Issue
Block a user