Add sidebar to trigger-page
This commit is contained in:
parent
3e59902573
commit
213cc626be
@ -118,9 +118,18 @@ TriggerPage::TriggerPage ()
|
|||||||
_strip_group_box.pack_start (_cue_area_frame, false, false);
|
_strip_group_box.pack_start (_cue_area_frame, false, false);
|
||||||
_strip_group_box.pack_start (_strip_scroller, true, true);
|
_strip_group_box.pack_start (_strip_scroller, true, true);
|
||||||
|
|
||||||
|
/* sidebar */
|
||||||
|
_sidebar_notebook.set_show_tabs (true);
|
||||||
|
_sidebar_notebook.set_scrollable (true);
|
||||||
|
_sidebar_notebook.popup_disable ();
|
||||||
|
_sidebar_notebook.set_tab_pos (Gtk::POS_RIGHT);
|
||||||
|
|
||||||
|
_sidebar_vbox.pack_start (_sidebar_notebook);
|
||||||
|
add_sidebar_page (_("Clips"), _trigger_clip_picker);
|
||||||
|
|
||||||
/* Upper pane ([slot | strips] | file browser) */
|
/* Upper pane ([slot | strips] | file browser) */
|
||||||
_pane_upper.add (_strip_group_box);
|
_pane_upper.add (_strip_group_box);
|
||||||
_pane_upper.add (_trigger_clip_picker);
|
_pane_upper.add (_sidebar_vbox);
|
||||||
|
|
||||||
/* Bottom -- Properties of selected Slot/Region */
|
/* Bottom -- Properties of selected Slot/Region */
|
||||||
Gtk::Table* table = manage (new Gtk::Table);
|
Gtk::Table* table = manage (new Gtk::Table);
|
||||||
@ -165,6 +174,7 @@ TriggerPage::TriggerPage ()
|
|||||||
_cue_area_frame.show_all ();
|
_cue_area_frame.show_all ();
|
||||||
_trigger_clip_picker.show ();
|
_trigger_clip_picker.show ();
|
||||||
_no_strips.show ();
|
_no_strips.show ();
|
||||||
|
_sidebar_notebook.show_all ();
|
||||||
|
|
||||||
/* setup keybidings */
|
/* setup keybidings */
|
||||||
_content.set_data ("ardour-bindings", bindings);
|
_content.set_data ("ardour-bindings", bindings);
|
||||||
@ -226,12 +236,18 @@ TriggerPage::get_state ()
|
|||||||
|
|
||||||
node->set_property (X_("triggerpage-vpane-pos"), _pane.get_divider ());
|
node->set_property (X_("triggerpage-vpane-pos"), _pane.get_divider ());
|
||||||
node->set_property (X_("triggerpage-hpane-pos"), _pane_upper.get_divider ());
|
node->set_property (X_("triggerpage-hpane-pos"), _pane_upper.get_divider ());
|
||||||
|
node->set_property (X_("triggerpage-sidebar-page"), _sidebar_notebook.get_current_page ());
|
||||||
|
|
||||||
return *node;
|
return *node;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
TriggerPage::set_state (const XMLNode& node, int version)
|
TriggerPage::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
|
int32_t sidebar_page;
|
||||||
|
if (node.get_property (X_("triggerpage-sidebar-page"), sidebar_page)) {
|
||||||
|
_sidebar_notebook.set_current_page (sidebar_page);
|
||||||
|
}
|
||||||
return Tabbable::set_state (node, version);
|
return Tabbable::set_state (node, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,6 +357,17 @@ TriggerPage::update_title ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TriggerPage::add_sidebar_page (string const & name, Gtk::Widget& widget)
|
||||||
|
{
|
||||||
|
EventBox* b = manage (new EventBox);
|
||||||
|
Label* l = manage (new Label (name));
|
||||||
|
l->set_angle (-90);
|
||||||
|
b->add (*l);
|
||||||
|
b->show_all ();
|
||||||
|
_sidebar_notebook.append_page (widget, *b);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TriggerPage::initial_track_display ()
|
TriggerPage::initial_track_display ()
|
||||||
{
|
{
|
||||||
|
@ -72,6 +72,8 @@ private:
|
|||||||
void pi_property_changed (PBD::PropertyChange const&);
|
void pi_property_changed (PBD::PropertyChange const&);
|
||||||
void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr<ARDOUR::Stripable>);
|
void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr<ARDOUR::Stripable>);
|
||||||
|
|
||||||
|
void add_sidebar_page (std::string const&, Gtk::Widget&);
|
||||||
|
|
||||||
bool no_strip_button_event (GdkEventButton*);
|
bool no_strip_button_event (GdkEventButton*);
|
||||||
bool no_strip_drag_motion (Glib::RefPtr<Gdk::DragContext> const&, int, int, guint);
|
bool no_strip_drag_motion (Glib::RefPtr<Gdk::DragContext> const&, int, int, guint);
|
||||||
void no_strip_drag_data_received (Glib::RefPtr<Gdk::DragContext> const&, int, int, Gtk::SelectionData const&, guint, guint);
|
void no_strip_drag_data_received (Glib::RefPtr<Gdk::DragContext> const&, int, int, Gtk::SelectionData const&, guint, guint);
|
||||||
@ -98,7 +100,8 @@ private:
|
|||||||
Gtk::Alignment _cue_area_frame;
|
Gtk::Alignment _cue_area_frame;
|
||||||
Gtk::VBox _cue_area_box;
|
Gtk::VBox _cue_area_box;
|
||||||
Gtk::HBox _parameter_box;
|
Gtk::HBox _parameter_box;
|
||||||
|
Gtk::VBox _sidebar_vbox;
|
||||||
|
Gtk::Notebook _sidebar_notebook;
|
||||||
TriggerClipPicker _trigger_clip_picker;
|
TriggerClipPicker _trigger_clip_picker;
|
||||||
|
|
||||||
CueBoxWidget _cue_box;
|
CueBoxWidget _cue_box;
|
||||||
|
Loading…
Reference in New Issue
Block a user