From 923aa16100771ca4cbcdb2e575f3fe17753d5d1f Mon Sep 17 00:00:00 2001 From: gustavo Date: Sun, 18 Apr 1999 14:10:55 +0000 Subject: Changes so that "extra code" goes before o->end() and close bracket. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Widget_Type.cxx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'fluid/Fl_Widget_Type.cxx') diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 7fbcada76..fa5a813eb 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget_Type.cxx,v 1.15.2.1 1999/04/10 09:14:34 bill Exp $" +// "$Id: Fl_Widget_Type.cxx,v 1.15.2.2 1999/04/18 14:10:53 gustavo Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -1427,13 +1427,20 @@ void Fl_Widget_Type::write_widget_code() { write_c("%sw->hotspot(o);\n", indent()); } -void Fl_Widget_Type::write_code2() { - indentation -= 2; - if (!is_parent() && !varused) return; +void Fl_Widget_Type::write_extra_code() { for (int n=0; n < NUM_EXTRA_CODE; n++) if (extra_code(n) && !isdeclare(extra_code(n))) - write_c("%s %s\n", indent(), extra_code(n)); - write_c("%s}\n", indent()); + write_c("%s%s\n", indent(), extra_code(n)); +} + +void Fl_Widget_Type::write_block_close() { + indentation -= 2; + if (is_parent() || varused) write_c("%s}\n", indent()); +} + +void Fl_Widget_Type::write_code2() { + write_extra_code(); + write_block_close(); } //////////////////////////////////////////////////////////////// @@ -1738,5 +1745,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) { } // -// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.1 1999/04/10 09:14:34 bill Exp $". +// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.2 1999/04/18 14:10:53 gustavo Exp $". // -- cgit v1.2.3