diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-10-20 00:34:48 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-10-20 00:34:48 +0000 |
| commit | 2ab7525eb3bc2fc3aae41df8805770fce3d277fd (patch) | |
| tree | 6843da63fd218f82b6eba058205b0b1f53b1fa58 | |
| parent | 2d2b24b78105bf7a29063a43864762b7a9f90c54 (diff) | |
Treat all "Window" classed widgets as window widgets.
Don't automatically include non-FLTK headers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5525 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 4 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.cxx | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 7e53e09f5..64d657f12 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1866,7 +1866,9 @@ int isdeclare(const char *c) { void Fl_Widget_Type::write_static() { const char* t = subclassname(this); - if (!subclass() || is_class()) write_declare("#include <FL/%s.H>", t); + if (!subclass() || (is_class() && !strncmp(t, "Fl_", 3))) { + write_declare("#include <FL/%s.H>", t); + } for (int n=0; n < NUM_EXTRA_CODE; n++) { if (extra_code(n) && isdeclare(extra_code(n))) write_declare("%s", extra_code(n)); diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx index 2951f5cdd..dec2cddef 100644 --- a/fluid/Fl_Window_Type.cxx +++ b/fluid/Fl_Window_Type.cxx @@ -1418,10 +1418,7 @@ void Fl_Widget_Class_Type::write_code1() { if (!c) c = "Fl_Group"; write_h("\nclass %s : public %s {\n", name(), c); - if (!strcmp(c, "Fl_Window") || - !strcmp(c, "Fl_Double_Window") || - !strcmp(c, "Fl_Gl_Window") || - !strcmp(c, "Fl_Overlay_Window")) { + if (strstr(c, "Window")) { write_h(" void _%s();\n", name()); write_h("public:\n"); write_h(" %s(int X, int Y, int W, int H, const char *L = 0);\n", name()); |
