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
This commit is contained in:
Matthias Melcher 2010-02-26 13:40:10 +00:00
parent 056cd02b10
commit 5fdf6300dd
2 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0
- Added argument-less constructor in Fuid Widget Class
- Fixed menu item counting issue in Fluid (STR #2322)
- Added Fl_Menu_::find_item by callback
- Removed redundant Fl_Group casts

View File

@ -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 {