summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 23:32:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 23:32:25 +0000
commit6592f0919b07ef389e1b18c7c3e7182b45c19beb (patch)
treea6e6bab787c38027e7912ec94fdb98912dbe0601 /fluid
parentedb211809826317d81639f35a3e261f7e4bcab4f (diff)
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
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Function_Type.cxx18
-rw-r--r--fluid/widget_panel.cxx2
-rw-r--r--fluid/widget_panel.fl11
3 files changed, 15 insertions, 16 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index 8d232c6c2..7b5a1c3fc 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/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).
//
@@ -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 $".
//
diff --git a/fluid/widget_panel.cxx b/fluid/widget_panel.cxx
index 5de0f8e95..f266d9e8e 100644
--- a/fluid/widget_panel.cxx
+++ b/fluid/widget_panel.cxx
@@ -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);
diff --git a/fluid/widget_panel.fl b/fluid/widget_panel.fl
index 041c48829..5b5929fd6 100644
--- a/fluid/widget_panel.fl
+++ b/fluid/widget_panel.fl
@@ -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 {} {