From e7f1247552fbb9d056d4c68eb51564a504df3161 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 14 Sep 2024 01:10:35 +0200 Subject: FLUID: type node placement in scene graph revised - fixes copy/paste operation that would place pasted types wrong - improves paste into folded and unfolded groups - improves duplication of multiple types - much improved placement of types that don;t fit at the requested position - some more testing will follow in the next days --- fluid/Fl_Type.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'fluid/Fl_Type.h') diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index 8d9588e13..be5e5f1a6 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -46,7 +46,8 @@ class Fd_Project_Writer; int Fd_Project_Reader::read_project(const char *filename, int merge, Strategy strategy) */ typedef enum { - kAddAsLastChild = 0, + kAddAsFirstChild = 0, + kAddAsLastChild, kAddAfterCurrent } Strategy; @@ -92,6 +93,13 @@ void select_none_cb(Fl_Widget *,void *); void earlier_cb(Fl_Widget*,void*); void later_cb(Fl_Widget*,void*); +#ifndef NDEBUG +void print_project_tree(); +bool validate_project_tree(); +bool validate_independent_branch(class Fl_Type *root); +bool validate_branch(class Fl_Type *root); +#endif + /** \brief This is the base class for all elements in the project tree. @@ -150,7 +158,7 @@ public: // things that should not be public: (see `haderror`). It seems that this is often confused with new_selected which seems to hold the true and visible selection state. */ char selected; // copied here by selection_changed() - char open_; // state of triangle in browser + char folded_; // if set, children are not shown in browser char visible; // true if all parents are open int level; // number of parents over this static Fl_Type *first, *last; -- cgit v1.2.3