FLUID: quick fix for live preview of Grid: #1092

- Grid Type live preview support was not implemented
- this is not a final fix, but just to avoid a crash
- additional work needed for Flex and Grid
This commit is contained in:
Matthias Melcher 2024-10-22 12:41:48 +02:00
parent 18e5c8232a
commit fb5c652200
2 changed files with 10 additions and 0 deletions

View File

@ -291,6 +291,14 @@ Fl_Widget *Fl_Grid_Type::widget(int X,int Y,int W,int H) {
return g;
}
Fl_Widget *Fl_Grid_Type::enter_live_mode(int top) {
Fl_Grid *grid = new Fl_Grid(o->x(), o->y(), o->w(), o->h());
return propagate_live_mode(grid);
}
void Fl_Grid_Type::leave_live_mode() {
}
void Fl_Grid_Type::copy_properties()
{
super::copy_properties();

View File

@ -61,6 +61,8 @@ public:
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
void write_parent_properties(Fd_Project_Writer &f, Fl_Type *child, bool encapsulate) FL_OVERRIDE;
void read_parent_property(Fd_Project_Reader &f, Fl_Type *child, const char *property) FL_OVERRIDE;
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
void leave_live_mode() FL_OVERRIDE;
void copy_properties() FL_OVERRIDE;
void write_code1(Fd_Code_Writer& f) FL_OVERRIDE;
void write_code2(Fd_Code_Writer& f) FL_OVERRIDE;