diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-21 15:42:05 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-21 15:42:05 +0000 |
| commit | eada39df34c50d3f8b95bd479cc548f1dd056e35 (patch) | |
| tree | b329bd66b84ffc63671e6211dc3e399d1ab45a55 /fluid/code.cxx | |
| parent | 7657a2e4a536a9ee50a9277c2662dc49362ae341 (diff) | |
Added fluid patch from Bill Spitzak; this moves the callback code down
before the widgets that use them so that include files will get included
properly.
git-svn-id: file:///fltk/svn/fltk/trunk@29 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index a8028acc1..5a5312528 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -243,8 +243,14 @@ int write_code(const char *s, const char *t) { if (t && include_H_from_C) write_c("#include \"%s\"\n", filename_name(t)); - for (p = Fl_Type::first; p; p = p->next) p->write_static(); - for (p = Fl_Type::first; p;) p = write_code(p); + for (p = Fl_Type::first; p;) { + // write all static data for this & all children first + p->write_static(); + for (Fl_Type* q = p->next; q && q->level > p->level; q = q->next) + q->write_static(); + // then write the nested code: + p = write_code(p); + } if (!s) return 1; int x = fclose(code_file); |
