mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 14:16:31 +01:00
add buttons to mixer_snapshot_list window, crude implementation for now
This commit is contained in:
parent
838750727b
commit
f2ee9d9937
4 changed files with 30 additions and 3 deletions
|
|
@ -52,6 +52,8 @@ using namespace ARDOUR;
|
||||||
using namespace ARDOUR_UI_UTILS;
|
using namespace ARDOUR_UI_UTILS;
|
||||||
|
|
||||||
MixerSnapshotList::MixerSnapshotList ()
|
MixerSnapshotList::MixerSnapshotList ()
|
||||||
|
: add_template_button("Add Template")
|
||||||
|
, add_session_template_button("Add from Session")
|
||||||
{
|
{
|
||||||
_snapshot_model = ListStore::create (_columns);
|
_snapshot_model = ListStore::create (_columns);
|
||||||
_snapshot_display.set_model (_snapshot_model);
|
_snapshot_display.set_model (_snapshot_model);
|
||||||
|
|
@ -60,9 +62,13 @@ MixerSnapshotList::MixerSnapshotList ()
|
||||||
_snapshot_display.set_size_request (75, -1);
|
_snapshot_display.set_size_request (75, -1);
|
||||||
_snapshot_display.set_headers_visible (true);
|
_snapshot_display.set_headers_visible (true);
|
||||||
_snapshot_display.set_reorderable (false);
|
_snapshot_display.set_reorderable (false);
|
||||||
|
|
||||||
_scroller.add (_snapshot_display);
|
_scroller.add (_snapshot_display);
|
||||||
_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
|
||||||
|
|
||||||
|
// btn_add->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::new_snapshot), global));
|
||||||
|
// btn_new->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::new_snapshot_from_session), global));
|
||||||
|
|
||||||
_snapshot_display.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &MixerSnapshotList::selection_changed));
|
_snapshot_display.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &MixerSnapshotList::selection_changed));
|
||||||
_snapshot_display.signal_button_press_event().connect (sigc::mem_fun (*this, &MixerSnapshotList::button_press), false);
|
_snapshot_display.signal_button_press_event().connect (sigc::mem_fun (*this, &MixerSnapshotList::button_press), false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,14 @@
|
||||||
#ifndef __gtk_ardour_mixer_snapshots_h__
|
#ifndef __gtk_ardour_mixer_snapshots_h__
|
||||||
#define __gtk_ardour_mixer_snapshots_h__
|
#define __gtk_ardour_mixer_snapshots_h__
|
||||||
|
|
||||||
|
#include <ctime>
|
||||||
|
|
||||||
|
#include <gtkmm/button.h>
|
||||||
#include <gtkmm/widget.h>
|
#include <gtkmm/widget.h>
|
||||||
#include <gtkmm/scrolledwindow.h>
|
#include <gtkmm/scrolledwindow.h>
|
||||||
#include <gtkmm/treemodel.h>
|
#include <gtkmm/treemodel.h>
|
||||||
#include <gtkmm/treeview.h>
|
#include <gtkmm/treeview.h>
|
||||||
|
#include <gtkmm/box.h>
|
||||||
|
|
||||||
#include "ardour/mixer_snapshot.h"
|
#include "ardour/mixer_snapshot.h"
|
||||||
|
|
||||||
|
|
@ -38,6 +42,9 @@ public:
|
||||||
return _scroller;
|
return _scroller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gtk::Button& get_add_template_button () {return add_template_button;};
|
||||||
|
Gtk::Button& get_add_session_template_button () {return add_session_template_button;};
|
||||||
|
|
||||||
void redisplay ();
|
void redisplay ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -51,7 +58,7 @@ private:
|
||||||
add (snapshot);
|
add (snapshot);
|
||||||
}
|
}
|
||||||
Gtk::TreeModelColumn<std::string> name;
|
Gtk::TreeModelColumn<std::string> name;
|
||||||
Gtk::TreeModelColumn<std::int64_t> timestamp;
|
Gtk::TreeModelColumn<std::time_t> timestamp;
|
||||||
Gtk::TreeModelColumn<ARDOUR::MixerSnapshot*> snapshot; //ToDo: these are leaked
|
Gtk::TreeModelColumn<ARDOUR::MixerSnapshot*> snapshot; //ToDo: these are leaked
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -60,6 +67,9 @@ private:
|
||||||
Gtk::TreeView _snapshot_display;
|
Gtk::TreeView _snapshot_display;
|
||||||
Gtk::Menu _menu;
|
Gtk::Menu _menu;
|
||||||
|
|
||||||
|
Gtk::Button add_template_button;
|
||||||
|
Gtk::Button add_session_template_button;
|
||||||
|
|
||||||
bool button_press (GdkEventButton *);
|
bool button_press (GdkEventButton *);
|
||||||
void selection_changed ();
|
void selection_changed ();
|
||||||
void popup_context_menu (int, int32_t, std::string);
|
void popup_context_menu (int, int32_t, std::string);
|
||||||
|
|
|
||||||
|
|
@ -275,9 +275,19 @@ Mixer_UI::Mixer_UI ()
|
||||||
rhs_pane2.add (group_display_frame);
|
rhs_pane2.add (group_display_frame);
|
||||||
|
|
||||||
_mix_snaps = new MixerSnapshotList();
|
_mix_snaps = new MixerSnapshotList();
|
||||||
|
|
||||||
|
Gtk::VBox* mix_packer = new Gtk::VBox();
|
||||||
|
mix_packer->pack_start(_mix_snaps->widget());
|
||||||
|
mix_packer->pack_start(_mix_snaps->get_add_template_button());
|
||||||
|
mix_packer->pack_start(_mix_snaps->get_add_session_template_button());
|
||||||
|
|
||||||
|
Gtk::Frame* mix_snap_frame = new Gtk::Frame();
|
||||||
|
mix_snap_frame->set_name("asdf");
|
||||||
|
mix_snap_frame->set_shadow_type (Gtk::SHADOW_IN);
|
||||||
|
mix_snap_frame->add (*mix_packer);
|
||||||
|
|
||||||
rhs_pane3.add (rhs_pane2);
|
rhs_pane3.add (rhs_pane2);
|
||||||
rhs_pane3.add (_mix_snaps->widget());
|
rhs_pane3.add (*mix_snap_frame);
|
||||||
|
|
||||||
list_vpacker.pack_start (rhs_pane3, true, true);
|
list_vpacker.pack_start (rhs_pane3, true, true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,7 @@ private:
|
||||||
Gtk::Frame track_display_frame;
|
Gtk::Frame track_display_frame;
|
||||||
Gtk::Frame group_display_frame;
|
Gtk::Frame group_display_frame;
|
||||||
Gtk::Frame favorite_plugins_frame;
|
Gtk::Frame favorite_plugins_frame;
|
||||||
|
Gtk::Frame mixer_snapshots_list_frame;
|
||||||
Gtk::VBox favorite_plugins_vbox;
|
Gtk::VBox favorite_plugins_vbox;
|
||||||
Gtk::ComboBoxText favorite_plugins_tag_combo;
|
Gtk::ComboBoxText favorite_plugins_tag_combo;
|
||||||
ArdourWidgets::VPane rhs_pane1;
|
ArdourWidgets::VPane rhs_pane1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue