X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fstate_manager.h;h=99bfcfc3ceed22055d93be3a364791deab644db6;hb=f07cb624c02c98a5ae375b26cb99c157df64d159;hp=9dc2ea66ad80d3c21be159f54a5aecfb9e56d3c8;hpb=8af0757b61990767f2a85e68f535a5af9976fd79;p=ardour.git diff --git a/libs/ardour/ardour/state_manager.h b/libs/ardour/ardour/state_manager.h index 9dc2ea66ad..99bfcfc3ce 100644 --- a/libs/ardour/ardour/state_manager.h +++ b/libs/ardour/ardour/state_manager.h @@ -3,6 +3,7 @@ #include #include +#include #include @@ -12,8 +13,7 @@ namespace ARDOUR { typedef uint32_t state_id_t; - - class StateManager : virtual public sigc::trackable +class StateManager : public sigc::trackable { public: struct State { @@ -35,7 +35,15 @@ typedef uint32_t state_id_t; state_id_t _current_state_id; + virtual bool should_save_state () const { return true; } + + static void prohibit_save (); + static void allow_save (const char* why, bool dosave); + protected: + static bool _allow_save; + static sigc::signal SaveAllowed; + StateMap states; virtual Change restore_state (State&) = 0;