diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-01-26 15:23:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-26 15:23:43 +0100 |
| commit | 179771acd25ee5ff8e36a5fd192682d4d55c52af (patch) | |
| tree | f7d32685bccef27e64a6f706e7c0e0c9d099c372 /fluid/Fl_Window_Type.h | |
| parent | f314ca75feab8c472a9b136fd25636d2d2da68a7 (diff) | |
Fixing FLUID file corruption from issue #653 (#662)
Removing all globals in file writer (#653 )
Fix some static analyser complaints
Valgrind: handle width==0 in GfxDrivers on Wayland and X11
Don't use `Fl_Input_::static_value`, it accesses previous
buffer that may be deleted
Project file write encapsulated, removing globals
Encapsulating project file reader, removing states in glbals
Project i/o increased source code readability
Diffstat (limited to 'fluid/Fl_Window_Type.h')
| -rw-r--r-- | fluid/Fl_Window_Type.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fluid/Fl_Window_Type.h b/fluid/Fl_Window_Type.h index 4e4ac8a48..519af347b 100644 --- a/fluid/Fl_Window_Type.h +++ b/fluid/Fl_Window_Type.h @@ -51,8 +51,8 @@ protected: void newposition(Fl_Widget_Type *,int &x,int &y,int &w,int &h); int handle(int); void setlabel(const char *) FL_OVERRIDE; - void write_code1() FL_OVERRIDE; - void write_code2() FL_OVERRIDE; + void write_code1(Fd_Code_Writer& f) FL_OVERRIDE; + void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; Fl_Widget_Type *_make() FL_OVERRIDE {return 0;} // we don't call this Fl_Widget *widget(int,int,int,int) FL_OVERRIDE {return 0;} int recalc; // set by fix_overlay() @@ -84,8 +84,8 @@ public: void fix_overlay(); // Update the bounding box, etc uchar *read_image(int &ww, int &hh); // Read an image of the window - void write_properties() FL_OVERRIDE; - void read_property(const char *) FL_OVERRIDE; + void write_properties(Fd_Project_Writer &f) FL_OVERRIDE; + void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE; int read_fdesign(const char*, const char*) FL_OVERRIDE; void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE; @@ -118,11 +118,11 @@ public: char write_public_state; // true when public: has been printed char wc_relative; // if 1, reposition all children, if 2, reposition and resize - void write_properties() FL_OVERRIDE; - void read_property(const char *) FL_OVERRIDE; + void write_properties(Fd_Project_Writer &f) FL_OVERRIDE; + void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE; - void write_code1() FL_OVERRIDE; - void write_code2() FL_OVERRIDE; + void write_code1(Fd_Code_Writer& f) FL_OVERRIDE; + void write_code2(Fd_Code_Writer& f) FL_OVERRIDE; Fl_Type *make(Strategy strategy) FL_OVERRIDE; const char *type_name() FL_OVERRIDE {return "widget_class";} int pixmapID() FL_OVERRIDE { return 48; } |
