ardour
|
#include <visibility_group.h>
Classes | |
struct | Member |
class | ModelColumns |
Public Member Functions | |
VisibilityGroup (std::string const &) | |
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 *) |
void | update () |
void | set_state (XMLNode const &) |
void | set_state (std::string) |
std::string | get_state_name () const |
std::string | get_state_value () const |
Public Attributes | |
PBD::Signal0< void > | VisibilityChanged |
Private Member Functions | |
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 |
Private Attributes | |
std::vector< Member > | _members |
std::string | _xml_property_name |
ModelColumns | _model_columns |
Glib::RefPtr< Gtk::ListStore > | _model |
bool | _ignore_list_view_change |
A class to manage a group of widgets where the visibility of each can be configured by the user. The class can generate a menu to set up visibility, and save and restore visibility state to XML.
Definition at line 35 of file visibility_group.h.
VisibilityGroup::VisibilityGroup | ( | std::string const & | name | ) |
Definition at line 31 of file visibility_group.cc.
void VisibilityGroup::add | ( | Gtk::Widget * | , |
std::string const & | , | ||
std::string const & | , | ||
bool | visible = false , |
||
boost::function< boost::optional< bool >()> | = 0 |
||
) |
Add a widget to the group.
widget | The widget. |
id | Some single-word ID to be used for the state of this member in XML. |
name | User-visible name for the widget. |
visible | true to default to visible, otherwise false. |
override | A functor to decide whether the visibility specified by the member should be overridden by some external factor; if the returned optional value is given, it will be used to override whatever visibility setting the member has. |
Definition at line 49 of file visibility_group.cc.
bool VisibilityGroup::button_press_event | ( | GdkEventButton * | ev | ) |
Pop up a menu (on right-click) to configure visibility of members
Definition at line 63 of file visibility_group.cc.
string VisibilityGroup::get_state_name | ( | ) | const |
Definition at line 171 of file visibility_group.cc.
string VisibilityGroup::get_state_value | ( | ) | const |
Definition at line 177 of file visibility_group.cc.
Gtk::Widget * VisibilityGroup::list_view | ( | ) |
Definition at line 215 of file visibility_group.cc.
|
private |
Definition at line 233 of file visibility_group.cc.
Gtk::Menu * VisibilityGroup::menu | ( | ) |
Definition at line 74 of file visibility_group.cc.
void VisibilityGroup::set_state | ( | XMLNode const & | node | ) |
Definition at line 132 of file visibility_group.cc.
void VisibilityGroup::set_state | ( | std::string | ) |
|
private |
Definition at line 93 of file visibility_group.cc.
|
private |
Definition at line 125 of file visibility_group.cc.
void VisibilityGroup::update | ( | ) |
Update visible consequences of any changes to our _members vector
Definition at line 107 of file visibility_group.cc.
|
private |
Definition at line 193 of file visibility_group.cc.
|
private |
Definition at line 91 of file visibility_group.h.
|
private |
Definition at line 87 of file visibility_group.h.
|
private |
Definition at line 90 of file visibility_group.h.
|
private |
Definition at line 89 of file visibility_group.h.
|
private |
Definition at line 88 of file visibility_group.h.
PBD::Signal0<void> VisibilityGroup::VisibilityChanged |
Definition at line 57 of file visibility_group.h.