summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-02-26 13:40:10 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-02-26 13:40:10 +0000
commit5fdf6300ddfe50339cf0c830296f2d4ca17d705a (patch)
tree832f268bee5f44b0562d0b0c30c8eff7ee920bd5 /fluid
parent056cd02b10934d5aab3126e7022b3442d1dcee37 (diff)
Added argument-less constructor in Fuid Widget Class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Window_Type.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index 3b766f081..1be5ad9a5 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -1468,18 +1468,32 @@ void Fl_Widget_Class_Type::write_code1() {
write_h("public:\n");
write_h(" %s(int X, int Y, int W, int H, const char *L = 0);\n", name());
write_h(" %s(int W, int H, const char *L = 0);\n", name());
+ write_h(" %s();\n", name());
+ // a constructor with all four dimensions plus label
write_c("%s::%s(int X, int Y, int W, int H, const char *L)\n", name(), name());
write_c(" : %s(X, Y, W, H, L) {\n", c);
write_c(" _%s();\n", name());
write_c("}\n\n");
+ // a constructor with just the size and label. The window manager will position the window
write_c("%s::%s(int W, int H, const char *L)\n", name(), name());
write_c(" : %s(0, 0, W, H, L) {\n", c);
write_c(" clear_flag(16);\n");
write_c(" _%s();\n", name());
write_c("}\n\n");
-
+
+ // a constructor that takes size and label from the Fluid database
+ write_c("%s::%s()\n", name(), name());
+ write_c(" : %s(0, 0, %d, %d, ", c, o->w(), o->h());
+ const char *cstr = label();
+ if (cstr) write_cstring(cstr);
+ else write_c("0");
+ write_c(") {\n");
+ write_c(" clear_flag(16);\n");
+ write_c(" _%s();\n", name());
+ write_c("}\n\n");
+
write_c("void %s::_%s() {\n", name(), name());
// write_c(" %s *w = this;\n", name());
} else {