mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
[Summary[Summary] Implementing TRACK Header UI
This commit is contained in:
parent
346115cadd
commit
6e3cdd4023
9 changed files with 128 additions and 121 deletions
|
|
@ -285,9 +285,6 @@ MixerStrip::init ()
|
|||
must be the same as those used in RCOptionEditor so that the configuration changes
|
||||
are recognised when they occur.
|
||||
*/
|
||||
//_visibility.add (&_invert_button_box, X_("PhaseInvert"), _("Phase Invert"));
|
||||
//_visibility.add (solo_safe_led, X_("SoloSafe"), _("Solo Safe"), true, boost::bind (&MixerStrip::override_solo_visibility, this));
|
||||
//_visibility.add (solo_isolated_led, X_("SoloIsolated"), _("Solo Isolated"), true, boost::bind (&MixerStrip::override_solo_visibility, this));
|
||||
_visibility.add (&_comment_button, X_("Comments"), _("Comments"));
|
||||
_visibility.add (&group_button, X_("Group"), _("Group"));
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ RouteUI::RouteUI (ARDOUR::Session* sess, const std::string& layout_script_file)
|
|||
, monitor_input_button (get_waves_button ("monitor_input_button"))
|
||||
, monitor_disk_button (get_waves_button ("monitor_disk_button"))
|
||||
{
|
||||
set_attributes (*this, *xml_tree ()->root (), XMLNodeMap ());
|
||||
std::cout << "RouteUI::RouteUI (" << layout_script_file << ")" << std::endl;
|
||||
if (sess) init ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess,
|
|||
Canvas& /*canvas*/,
|
||||
WavesUI& ui)
|
||||
: AxisView (sess)
|
||||
// , controls_table (2, 8)
|
||||
, _name_editing (false)
|
||||
, height (0)
|
||||
, display_menu (0)
|
||||
|
|
@ -97,10 +96,11 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess,
|
|||
, _preresize_cursor (0)
|
||||
, _have_preresize_cursor (false)
|
||||
, _ebox_release_can_act (true)
|
||||
, controls_event_box (ui.get_container ("controls_event_box"))
|
||||
, time_axis_box (ui.root())
|
||||
, controls_event_box (ui.root ())//ui.get_container ("controls_event_box"))
|
||||
, time_axis_box (ui.root ())
|
||||
, name_entry (ui.get_entry ("name_entry"))
|
||||
, name_label (ui.get_label ("name_label"))
|
||||
, number_label (ui.get_label ("number_label"))
|
||||
{
|
||||
std::cout << "TimeAxisView::TimeAxisView ()" << std::endl;
|
||||
if (extra_height == 0) {
|
||||
|
|
@ -132,33 +132,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess,
|
|||
name_entry.set_text (name_label.get_text());
|
||||
name_entry.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisView::end_name_edit), RESPONSE_OK));
|
||||
|
||||
// name_hbox.pack_start (name_label, true, true);
|
||||
// name_hbox.show ();
|
||||
// name_label.show ();
|
||||
|
||||
//controls_table.set_size_request (200);
|
||||
//controls_table.set_row_spacings (2);
|
||||
//controls_table.set_col_spacings (2);
|
||||
//controls_table.set_border_width (2);
|
||||
//controls_table.set_homogeneous (true);
|
||||
|
||||
//controls_table.attach (name_hbox, 0, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 3, 0);
|
||||
//controls_table.show_all ();
|
||||
//controls_table.set_no_show_all ();
|
||||
|
||||
//HSeparator* separator = manage (new HSeparator());
|
||||
//separator->set_name("TrackSeparator");
|
||||
//separator->set_size_request(-1, 1);
|
||||
//separator->show();
|
||||
|
||||
//controls_vbox.pack_start (controls_table, false, false);
|
||||
//controls_vbox.show ();
|
||||
|
||||
//controls_hbox.pack_start (controls_vbox, true, true);
|
||||
//controls_hbox.show ();
|
||||
|
||||
//controls_ebox.set_name ("TimeAxisViewControlsBaseUnselected");
|
||||
//controls_event_box.add (controls_hbox);
|
||||
controls_event_box.add_events (Gdk::BUTTON_PRESS_MASK|
|
||||
Gdk::BUTTON_RELEASE_MASK|
|
||||
Gdk::POINTER_MOTION_MASK|
|
||||
|
|
@ -174,10 +147,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess,
|
|||
controls_event_box.signal_motion_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_motion));
|
||||
controls_event_box.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave));
|
||||
|
||||
//time_axis_vbox.pack_start (controls_event_box, true, true, 0);
|
||||
//time_axis_vbox.pack_end (*separator, false, false);
|
||||
//time_axis_vbox.show();
|
||||
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
|
||||
|
||||
GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
|
||||
|
|
@ -257,6 +226,7 @@ TimeAxisView::hide ()
|
|||
guint32
|
||||
TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
||||
{
|
||||
time_axis_box.show ();
|
||||
if (control_parent) {
|
||||
control_parent->reorder_child (time_axis_box, nth);
|
||||
} else {
|
||||
|
|
@ -266,6 +236,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
}
|
||||
|
||||
_order = nth;
|
||||
number_label.set_text (string_compose (_("%1"), _order));
|
||||
|
||||
if (_y_position != y) {
|
||||
_canvas_display->set_y_position (y);
|
||||
|
|
@ -722,20 +693,15 @@ TimeAxisView::set_selected (bool yn)
|
|||
Selectable::set_selected (yn);
|
||||
|
||||
if (_selected) {
|
||||
//controls_ebox.set_name (controls_base_selected_name);
|
||||
//time_axis_vbox.set_name (controls_base_selected_name);
|
||||
//controls_vbox.set_name (controls_base_selected_name);
|
||||
controls_event_box.set_state (Gtk::STATE_ACTIVE);
|
||||
} else {
|
||||
//controls_ebox.set_name (controls_base_unselected_name);
|
||||
//time_axis_vbox.set_name (controls_base_unselected_name);
|
||||
//controls_vbox.set_name (controls_base_unselected_name);
|
||||
controls_event_box.set_state (Gtk::STATE_NORMAL);
|
||||
hide_selection ();
|
||||
|
||||
/* children will be set for the yn=true case. but when deselecting
|
||||
the editor only has a list of top-level trackviews, so we
|
||||
have to do this here.
|
||||
*/
|
||||
|
||||
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
(*i)->set_selected (false);
|
||||
}
|
||||
|
|
@ -752,7 +718,7 @@ TimeAxisView::build_display_menu ()
|
|||
display_menu = new Menu;
|
||||
display_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
// Just let implementing classes define what goes into the manu
|
||||
// Just let implementing classes define what goes into the menu
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -205,12 +205,10 @@ class TimeAxisView : public virtual AxisView
|
|||
|
||||
protected:
|
||||
/* The Standard LHS Controls */
|
||||
//Gtk::HBox controls_hbox;
|
||||
//Gtk::Table controls_table;
|
||||
Gtk::Container& controls_event_box;
|
||||
//Gtk::VBox controls_vbox;
|
||||
Gtk::Container& time_axis_box;
|
||||
Gtk::Label& name_label;
|
||||
Gtk::Label& number_label;
|
||||
bool _name_editing;
|
||||
uint32_t height; /* in canvas units */
|
||||
std::string controls_base_unselected_name;
|
||||
|
|
|
|||
|
|
@ -1,78 +1,122 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<RouteUI>
|
||||
<EventBox id="controls_event_box" bgnormal="#383838">
|
||||
<HBox width="232">
|
||||
<Layout bgnormal="#383838"
|
||||
width="100"
|
||||
height="20"
|
||||
id="name_label_home">
|
||||
<RouteUI bgnormal="#383838" bgactive="#6A6A6A">
|
||||
<HBox>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#494949" bgactive="#494949"/>
|
||||
<HBox box.expand="true" box.fill="true">
|
||||
<EventBox width="29" bgactive="#5BA55C">
|
||||
<HBox>
|
||||
<HBox width="12"/>
|
||||
<VBox>
|
||||
<Label id="number_label" text="32" fgnormal="#ffffff" fgactive="#ffffff" font ="Calibri 12"/>
|
||||
</VBox>
|
||||
</HBox>
|
||||
</EventBox>
|
||||
<EventBox width="6" bgnormal="#5BA55C" bgactive="#5BA55C"/>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</HBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000" box.pack="end"/>
|
||||
</VBox>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#494949" bgactive="#494949"/>
|
||||
<HBox width="100"
|
||||
id="name_label_home">
|
||||
<HBox width="5"/>
|
||||
<Label id="name_label"
|
||||
font ="Calibri Bold 12"/>
|
||||
font ="Calibri 12"
|
||||
fgnormal="#ffffff"
|
||||
fgactive="#ffffff"/>
|
||||
<FocusEntry id="name_entry"
|
||||
width="100"
|
||||
height="20"
|
||||
font ="Arial 10"
|
||||
font ="Calibri 12"
|
||||
noshowall="true"
|
||||
visible="false"/>
|
||||
</Layout>
|
||||
<HBox id="invert_button_box"/>
|
||||
<VBox id="gain_meter_home" box.pack="end"/>
|
||||
<VBox box.pack="end">
|
||||
</HBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000" box.pack="end"/>
|
||||
</VBox>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#494949" bgactive="#494949"/>
|
||||
<HBox>
|
||||
<iconbutton id="playlist_button"
|
||||
width="21"
|
||||
height="21"
|
||||
normalicon="time_axis_playlist"
|
||||
activeicon="time_axis_playlist"
|
||||
prelighticon="time_axis_playlist"/>
|
||||
<HBox>
|
||||
<iconbutton id="playlist_button"
|
||||
width="21"
|
||||
height="21"
|
||||
normalicon="time_axis_playlist"
|
||||
activeicon="time_axis_playlist"
|
||||
prelighticon="time_axis_playlist"/>
|
||||
<Layout bgnormal="#000000" width="61" height="21">
|
||||
<HBox spacing="1"
|
||||
x="1"
|
||||
y="1">
|
||||
<iconbutton id="rec_enable_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_record"
|
||||
activeicon="time_axis_record_active"
|
||||
prelighticon="time_axis_record_prelight"/>
|
||||
<iconbutton id="solo_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_solo"
|
||||
activeicon="time_axis_solo_active"
|
||||
prelighticon="time_axis_solo_prelight"/>
|
||||
<iconbutton id="mute_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_mute"
|
||||
activeicon="time_axis_mute_active"
|
||||
prelighticon="time_axis_mute_prelight"/>
|
||||
</HBox>
|
||||
</Layout>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<iconbutton id="rec_enable_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_record"
|
||||
activeicon="time_axis_record_active"
|
||||
prelighticon="time_axis_record_prelight"/>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</VBox>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<iconbutton id="solo_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_solo"
|
||||
activeicon="time_axis_solo_active"
|
||||
prelighticon="time_axis_solo_prelight"/>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</VBox>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<VBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<iconbutton id="mute_button"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_mute"
|
||||
activeicon="time_axis_mute_active"
|
||||
prelighticon="time_axis_mute_prelight"/>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</VBox>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</HBox>
|
||||
<Layout height="23" bgnormal="#383838">
|
||||
<Layout bgnormal="#000000" x="21" width="21" height="22" box.fill="false">
|
||||
<iconbutton id="monitor_input_button"
|
||||
x="1"
|
||||
y="0"
|
||||
width="19"
|
||||
height="21"
|
||||
normalicon="time_axis_monitor_input"
|
||||
activeicon="time_axis_monitor_input_active"
|
||||
prelighticon="time_axis_monitor_input_prelight"/>
|
||||
</Layout>
|
||||
</Layout>
|
||||
</VBox>
|
||||
<Button id="show_sends_button" visible="false" noshowall="true"/>
|
||||
<Button id="monitor_disk_button" visible="false" noshowall="true"/>
|
||||
<Button id="comment_button" visible="false" noshowall="true"/>
|
||||
<Button id="midi_input_enable_button" visible="false" noshowall="true"/>
|
||||
<Button id="group_button" text="Grp" visible="false" noshowall="true"/>
|
||||
</HBox>
|
||||
<HBox>
|
||||
<VBox width="21"/>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
<VBox>
|
||||
<iconbutton id="monitor_input_button"
|
||||
x="1"
|
||||
y="0"
|
||||
width="19"
|
||||
height="19"
|
||||
normalicon="time_axis_monitor_input"
|
||||
activeicon="time_axis_monitor_input_active"
|
||||
prelighticon="time_axis_monitor_input_prelight"/>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</VBox>
|
||||
<EventBox width="1" bgnormal="#000000" bgactive="#000000"/>
|
||||
</HBox>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000" box.pack="end"/>
|
||||
</VBox>
|
||||
<HBox visible="false" noshowall="true">
|
||||
<Button id="show_sends_button"/>
|
||||
<Button id="monitor_disk_button"/>
|
||||
<Button id="comment_button"/>
|
||||
<Button id="midi_input_enable_button"/>
|
||||
<Button id="group_button" text="Grp"/>
|
||||
<Button id="route_group_button"/>
|
||||
<Button id="automation_button"/>
|
||||
</HBox>
|
||||
<Button id="route_group_button" text="r" width="20" height="20"/>
|
||||
<Button id="automation_button" text="a" width="20" height="20"/>
|
||||
</EventBox>
|
||||
<!--<HBox id="gain_meter_home" box.pack="end"/>-->
|
||||
<HBox>
|
||||
<VBox id="gain_meter_home">
|
||||
<EventBox height="1" bgnormal="#494949" bgactive="#494949"/>
|
||||
<EventBox height="1" bgnormal="#000000" bgactive="#000000" box.pack="end"/>
|
||||
</VBox>
|
||||
</HBox>
|
||||
</HBox>
|
||||
</RouteUI>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,6 @@
|
|||
<EventBox id="controls_event_box"/>
|
||||
<VBox id="time_axis_vbox"/>
|
||||
<FocusEntry id="name_entry" font ="Arial 10" justify="left" height="40" width="200"/>
|
||||
<Label id="number_label" text="32" fgnormal="#ffffff" fgactive="#ffffff" font ="Calibri 12"/>
|
||||
</VBox>
|
||||
</RouteUI>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<icon source="display_clock_mockup.png" tooltip="--------------------
This is a mockup
--------------------" />
|
||||
<icon source="display_metrics_mockup.png" tooltip="--------------------
This is a mockup
--------------------" box.pack="end"/>
|
||||
<EventBox bgnormal="#383838" box.expand="false" box.fill="false" width="420" box.padding="4">
|
||||
<EventBox bgnormal="#151515" borderwidth="1"/>
|
||||
<EventBox bgnormal="#474747" borderwidth="1"/>
|
||||
</EventBox>
|
||||
<VBox spacing ="1" box.pack="end">
|
||||
<iconbutton id="mode_stereo_out_button"
|
||||
|
|
|
|||
|
|
@ -100,9 +100,9 @@ WavesIconButton::render (cairo_t* cr)
|
|||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
rounded_function (cr, _left_border_width, _top_border_width, get_width()-_left_border_width-_right_border_width, get_height()-_top_border_width-_bottom_border_width, _corner_radius);
|
||||
cairo_set_source_rgba (cr, bgcolor.get_red_p(), bgcolor.get_green_p(), bgcolor.get_blue_p(), 1);
|
||||
cairo_fill (cr);
|
||||
//rounded_function (cr, _left_border_width, _top_border_width, get_width()-_left_border_width-_right_border_width, get_height()-_top_border_width-_bottom_border_width, _corner_radius);
|
||||
//cairo_set_source_rgba (cr, bgcolor.get_red_p(), bgcolor.get_green_p(), bgcolor.get_blue_p(), 1);
|
||||
//cairo_fill (cr);
|
||||
|
||||
// pixbuf, if any
|
||||
if (pixbuf) {
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
|
|||
Gtk::Label& get_label (const char* id);
|
||||
Gtk::Image& get_image (const char* id);
|
||||
Gtk::ComboBoxText& get_combo_box_text (const char* id);
|
||||
Gtk::Entry& get_entry(const char* id);
|
||||
Gtkmm2ext::FocusEntry& get_focus_entry(const char* id);
|
||||
Gtk::SpinButton& get_spin_button(const char* id);
|
||||
Gtk::Entry& get_entry (const char* id);
|
||||
Gtkmm2ext::FocusEntry& get_focus_entry (const char* id);
|
||||
Gtk::SpinButton& get_spin_button (const char* id);
|
||||
WavesButton& get_waves_button (const char* id);
|
||||
Gtkmm2ext::Fader& get_fader (const char* id);
|
||||
const XMLTree* xml_tree() { return _xml_tree; }
|
||||
const XMLTree* xml_tree () { return _xml_tree; }
|
||||
Gtk::Container& root () { return _root_container; }
|
||||
|
||||
protected:
|
||||
|
|
@ -69,7 +69,7 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
|
|||
const std::string _scrip_file_name;
|
||||
Gtk::Container& _root_container;
|
||||
|
||||
Gtk::Object* get_object(const char *id);
|
||||
Gtk::Object* get_object (const char *id);
|
||||
const XMLTree* load_layout (const std::string& xml_file_name);
|
||||
void create_ui (const XMLTree& layout, Gtk::Container& root);
|
||||
void create_ui (const XMLNodeList& definition, const XMLNodeMap& styles, Gtk::Container& root);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue