{
public:
VisibilityGroup (std::string const &);
-
- void add (Gtk::Widget *, std::string const &, std::string const &, bool visible = true);
+
+ void add (
+ Gtk::Widget *,
+ std::string const &,
+ std::string const &,
+ bool visible = false,
+ boost::function<boost::optional<bool> ()> = 0
+ );
+
Gtk::Menu* menu ();
Gtk::Widget* list_view ();
bool button_press_event (GdkEventButton *);
std::string get_state_value () const;
PBD::Signal0<void> VisibilityChanged;
-
+
+ static std::string remove_element (std::string const& from, std::string const& element);
+ static std::string add_element (std::string const& from, std::string const& element);
+
private:
struct Member {
std::string id;
std::string name;
bool visible;
+ boost::function<boost::optional<bool> ()> override;
};
class ModelColumns : public Gtk::TreeModelColumnRecord {
void toggle (std::vector<Member>::iterator);
void list_view_visible_changed (std::string const &);
void update_list_view ();
+ bool should_actually_be_visible (Member const &) const;
std::vector<Member> _members;
std::string _xml_property_name;