summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-09-09 02:04:46 +0000
committerBill Spitzak <spitzak@gmail.com>2002-09-09 02:04:46 +0000
commitcf16564eda7815f230658a41bbe776f1b6f84879 (patch)
treed68c16c79ef42d3031ccf9f0f95022d4697ac5f8 /fluid
parentf97b388e383180dd60d9b2e1ea8a9f8e32e6e32e (diff)
Fluid treats any class name for the outer window that does not contain
the word "Window" as a group that needs a 4-element constructor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2622 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Widget_Type.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 3500f1f1a..534521f85 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $"
+// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.19 2002/09/09 02:04:46 spitzak Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
@@ -1491,11 +1491,9 @@ void Fl_Widget_Type::write_code1() {
if (varused) write_c("{ %s* o = ", t);
if (name()) write_c("%s = ", name());
if (is_window()) {
- // Handle special case of Fl_Group class type within a window -
- // output constructor using x, y, w, h...
- if (strcmp(t, "Fl_Group") == 0 ||
- strcmp(t, "Fl_Tabs") == 0 ||
- strcmp(t, "Fl_Tile") == 0)
+ // Handle special case where user is faking a Fl_Group type as a window,
+ // there is no 2-argument constructor in that case:
+ if (!strstr(t, "Window"))
write_c("new %s(0, 0, %d, %d", t, o->w(), o->h());
else
write_c("new %s(%d, %d", t, o->w(), o->h());
@@ -1972,5 +1970,5 @@ int Fl_Widget_Type::read_fdesign(const char* propname, const char* value) {
}
//
-// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.18 2002/09/04 20:33:17 easysw Exp $".
+// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.19 2002/09/09 02:04:46 spitzak Exp $".
//