From e52a358e8538151423a52b71ed5cca1f0fe1b15b Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 25 Apr 2024 17:52:32 +0200 Subject: FLUID: Improve usability of Declaration Blocks Decl Blocks can now output code around static code in source and header files. --- fluid/Fl_Function_Type.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'fluid/Fl_Function_Type.h') diff --git a/fluid/Fl_Function_Type.h b/fluid/Fl_Function_Type.h index 06026af06..740792c62 100644 --- a/fluid/Fl_Function_Type.h +++ b/fluid/Fl_Function_Type.h @@ -172,13 +172,21 @@ public: class Fl_DeclBlock_Type : public Fl_Type { typedef Fl_Type super; - const char* after; - char public_; + enum { + CODE_IN_HEADER = 1, + CODE_IN_SOURCE = 2, + STATIC_IN_HEADER = 4, + STATIC_IN_SOURCE = 8 + }; + const char* after; ///< code after all children of this block + int write_map_; ///< see enum above public: Fl_DeclBlock_Type(); ~Fl_DeclBlock_Type(); Fl_Type *make(Strategy strategy) FL_OVERRIDE; + void write_static(Fd_Code_Writer& f) FL_OVERRIDE; + void write_static_after(Fd_Code_Writer& f) FL_OVERRIDE; void write_code1(Fd_Code_Writer& f) FL_OVERRIDE; void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; void open() FL_OVERRIDE; -- cgit v1.2.3