Finished changes needed to support full widget classes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
af10e22140
commit
81fd6777b2
@ -1384,8 +1384,6 @@ void Fl_Widget_Class_Type::write_code2() {
|
||||
if (((Fl_Window*)o)->resizable() == o)
|
||||
write_c("%sresizable(this);\n", indent());
|
||||
write_c("}\n");
|
||||
|
||||
write_h("};\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -250,8 +250,26 @@ static Fl_Type* write_code(Fl_Type* p) {
|
||||
if (!(p==Fl_Type::last && p->is_comment()))
|
||||
p->write_code1();
|
||||
Fl_Type* q;
|
||||
for (q = p->next; q && q->level > p->level;) q = write_code(q);
|
||||
p->write_code2();
|
||||
if (p->is_widget() && p->is_class()) {
|
||||
// Handle widget classes specially
|
||||
for (q = p->next; q && q->level > p->level;) {
|
||||
if (strcmp(q->type_name(), "Function")) q = write_code(q);
|
||||
else q = q->next;
|
||||
}
|
||||
|
||||
p->write_code2();
|
||||
|
||||
for (q = p->next; q && q->level > p->level;) {
|
||||
if (!strcmp(q->type_name(), "Function")) q = write_code(q);
|
||||
else q = q->next;
|
||||
}
|
||||
|
||||
write_h("};\n");
|
||||
} else {
|
||||
for (q = p->next; q && q->level > p->level;) q = write_code(q);
|
||||
|
||||
p->write_code2();
|
||||
}
|
||||
return q;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user