diff options
| author | gustavo <gustavo> | 1999-04-30 16:29:40 +0000 |
|---|---|---|
| committer | gustavo <gustavo> | 1999-04-30 16:29:40 +0000 |
| commit | 5c3e88c386ff80b96688b45c2806524273109b5b (patch) | |
| tree | 20b884e84c0482999deba7b0d9bd691f97a98d2c | |
| parent | 84e4e91a3c7b9b37be49e170249f3f2c4c4b692b (diff) | |
Properly handling the "return outermost widget" case now.
Function returns same class as the outermost widget.
Couldn't figure out how/whether to include files and
class forward declarations, though.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/Fl_Function_Type.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 08cb46806..8a45b941b 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.1 1999/03/29 17:39:24 carl Exp $" +// "$Id: Fl_Function_Type.cxx,v 1.15.2.2 1999/04/30 16:29:40 gustavo Exp $" // // C function type code for the Fast Light Tool Kit (FLTK). // @@ -203,9 +203,13 @@ void Fl_Function_Type::write_code1() { if (!strcmp(t,"virtual")) {is_virtual = 1; t = 0;} else if (!strncmp(t,"virtual ",8)) {is_virtual = 1; t += 8;} } + char buf[32]; if (!t) { - if (havewidgets) t = "Fl_Window*"; - else t = "void"; + if (havewidgets) { + strcpy(buf,subclassname(child)); + strcat(buf,"*"); + t=buf; + } else t = "void"; } const char* k = class_name(); @@ -240,7 +244,7 @@ void Fl_Function_Type::write_code1() { write_c("%s %s {\n", t, name()); } } - if (havewidgets) write_c(" Fl_Window* w;\n"); + if (havewidgets) write_c(" %s* w;\n",subclassname(child)); indentation += 2; } @@ -634,5 +638,5 @@ void Fl_Class_Type::write_code2() { } // -// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.1 1999/03/29 17:39:24 carl Exp $". +// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.2 1999/04/30 16:29:40 gustavo Exp $". // |
