mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 17:46:34 +01:00
advance compilation to include plugin_ui.cc
git-svn-id: svn://localhost/trunk/ardour2@111 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aca31b078b
commit
2dd3c9578f
7 changed files with 32 additions and 31 deletions
|
|
@ -425,6 +425,11 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
||||||
gint x, y;
|
gint x, y;
|
||||||
float fx, fy;
|
float fx, fy;
|
||||||
|
|
||||||
|
if (layout == 0) {
|
||||||
|
layout = create_pango_layout ("");
|
||||||
|
layout->set_font_description (get_style()->get_font());
|
||||||
|
}
|
||||||
|
|
||||||
/* redraw the background */
|
/* redraw the background */
|
||||||
|
|
||||||
get_window()->draw_rectangle (get_style()->get_bg_gc(get_state()),
|
get_window()->draw_rectangle (get_style()->get_bg_gc(get_state()),
|
||||||
|
|
@ -438,7 +443,6 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
||||||
for (Targets::iterator i = pucks.begin(); i != pucks.end(); ++i) {
|
for (Targets::iterator i = pucks.begin(); i != pucks.end(); ++i) {
|
||||||
|
|
||||||
Target* puck = i->second;
|
Target* puck = i->second;
|
||||||
Pango::Layout layout = new Pango::Layout(get_window()->create_pango_layout());
|
|
||||||
|
|
||||||
if (puck->visible) {
|
if (puck->visible) {
|
||||||
/* redraw puck */
|
/* redraw puck */
|
||||||
|
|
@ -456,13 +460,10 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
||||||
x, y,
|
x, y,
|
||||||
8, 8,
|
8, 8,
|
||||||
0, 360 * 64);
|
0, 360 * 64);
|
||||||
layout.set_text(puck->text);
|
|
||||||
//get_window()->draw_text (get_style()->get_font(),
|
layout->set_text (puck->text);
|
||||||
// get_style()->get_fg_gc(Gtk::STATE_NORMAL),
|
|
||||||
// x + 6, y + 6,
|
get_window()->draw_layout (get_style()->get_fg_gc (STATE_NORMAL), x+6, y+6, layout);
|
||||||
// puck->text,
|
|
||||||
// puck->textlen);
|
|
||||||
// GTK2FIX : needs a pango layout
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ class Panner2d : public Gtk::DrawingArea
|
||||||
ARDOUR::Panner& panner;
|
ARDOUR::Panner& panner;
|
||||||
Gtk::Menu* context_menu;
|
Gtk::Menu* context_menu;
|
||||||
Gtk::CheckMenuItem* bypass_menu_item;
|
Gtk::CheckMenuItem* bypass_menu_item;
|
||||||
|
Glib::RefPtr<Pango::Layout> layout;
|
||||||
|
|
||||||
typedef std::map<int,Target *> Targets;
|
typedef std::map<int,Target *> Targets;
|
||||||
Targets targets;
|
Targets targets;
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,6 @@ class PluginSelector : public ArdourDialog
|
||||||
Glib::RefPtr<Gtk::TreeSelection> aselection;
|
Glib::RefPtr<Gtk::TreeSelection> aselection;
|
||||||
Gtk::TreeView added_list;
|
Gtk::TreeView added_list;
|
||||||
|
|
||||||
void column_clicked (int column, GtkCList* clist);
|
|
||||||
|
|
||||||
#ifdef VST_SUPPORT
|
#ifdef VST_SUPPORT
|
||||||
// page 2
|
// page 2
|
||||||
struct VstColumns : public Gtk::TreeModel::ColumnRecord {
|
struct VstColumns : public Gtk::TreeModel::ColumnRecord {
|
||||||
|
|
|
||||||
|
|
@ -747,7 +747,7 @@ PluginUI::control_port_toggled (ControlUI* cui)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
|
PluginUI::control_combo_changed (ControlUI* cui)
|
||||||
{
|
{
|
||||||
if (!cui->ignore_change) {
|
if (!cui->ignore_change) {
|
||||||
string value = cui->combo->get_active_text();
|
string value = cui->combo->get_active_text();
|
||||||
|
|
@ -762,7 +762,7 @@ PluginUIWindow::plugin_going_away (ARDOUR::Redirect* ignored)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginUIWindow::plugin_going_away), ignored));
|
ENSURE_GUI_THREAD(bind (mem_fun(*this, &PluginUIWindow::plugin_going_away), ignored));
|
||||||
|
|
||||||
_pluginui->stop_updating();
|
_pluginui->stop_updating(0);
|
||||||
delete_when_idle (this);
|
delete_when_idle (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -774,22 +774,24 @@ PluginUI::redirect_active_changed (Redirect* r, void* src)
|
||||||
bypass_button.set_active (!r->active());
|
bypass_button.set_active (!r->active());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
PluginUI::start_updating ()
|
PluginUI::start_updating (GdkEventAny* ignored)
|
||||||
{
|
{
|
||||||
if (output_controls.size() > 0 ) {
|
if (output_controls.size() > 0 ) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
|
screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
|
||||||
(mem_fun(*this, &PluginUI::output_update));
|
(mem_fun(*this, &PluginUI::output_update));
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
PluginUI::stop_updating ()
|
PluginUI::stop_updating (GdkEventAny* ignored)
|
||||||
{
|
{
|
||||||
if (output_controls.size() > 0 ) {
|
if (output_controls.size() > 0 ) {
|
||||||
screen_update_connection.disconnect();
|
screen_update_connection.disconnect();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -887,7 +889,7 @@ PlugUIBase::save_plugin_setting ()
|
||||||
prompter.show_all();
|
prompter.show_all();
|
||||||
|
|
||||||
switch (prompter.run ()) {
|
switch (prompter.run ()) {
|
||||||
case GTK_RESPONSE_ACCEPT:
|
case Gtk::RESPONSE_ACCEPT:
|
||||||
|
|
||||||
string name;
|
string name;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,15 +64,15 @@ namespace Gtkmm2ext {
|
||||||
class PixmapButton;
|
class PixmapButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PlugUIBase : public sigc::trackable
|
class PlugUIBase : public virtual sigc::trackable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlugUIBase (ARDOUR::PluginInsert&);
|
PlugUIBase (ARDOUR::PluginInsert&);
|
||||||
virtual ~PlugUIBase() {}
|
virtual ~PlugUIBase() {}
|
||||||
|
|
||||||
virtual gint get_preferred_height () = 0;
|
virtual gint get_preferred_height () = 0;
|
||||||
virtual void start_updating() = 0;
|
virtual bool start_updating(GdkEventAny*) = 0;
|
||||||
virtual void stop_updating() = 0;
|
virtual bool stop_updating(GdkEventAny*) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ARDOUR::PluginInsert& insert;
|
ARDOUR::PluginInsert& insert;
|
||||||
|
|
@ -94,8 +94,8 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
|
|
||||||
gint get_preferred_height () { return prefheight; }
|
gint get_preferred_height () { return prefheight; }
|
||||||
|
|
||||||
void start_updating();
|
bool start_updating(GdkEventAny*);
|
||||||
void stop_updating();
|
bool stop_updating(GdkEventAny*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ARDOUR::AudioEngine &engine;
|
ARDOUR::AudioEngine &engine;
|
||||||
|
|
@ -186,7 +186,7 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
void parameter_changed (uint32_t, float, ControlUI* cui);
|
void parameter_changed (uint32_t, float, ControlUI* cui);
|
||||||
void update_control_display (ControlUI* cui);
|
void update_control_display (ControlUI* cui);
|
||||||
void control_port_toggled (ControlUI* cui);
|
void control_port_toggled (ControlUI* cui);
|
||||||
void control_combo_changed (GdkEventAny* ignored, ControlUI* cui);
|
void control_combo_changed (ControlUI* cui);
|
||||||
|
|
||||||
void redirect_active_changed (ARDOUR::Redirect*, void*);
|
void redirect_active_changed (ARDOUR::Redirect*, void*);
|
||||||
|
|
||||||
|
|
@ -223,8 +223,8 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
||||||
~VSTPluginUI ();
|
~VSTPluginUI ();
|
||||||
|
|
||||||
gint get_preferred_height ();
|
gint get_preferred_height ();
|
||||||
void start_updating() {}
|
bool start_updating(GdkEventAny*) {}
|
||||||
void stop_updating() {}
|
bool stop_updating(GdkEventAny*) {}
|
||||||
|
|
||||||
int package (Gtk::Window&);
|
int package (Gtk::Window&);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,12 @@
|
||||||
#include <ardour/plugin_state.h>
|
#include <ardour/plugin_state.h>
|
||||||
#include <ardour/cycles.h>
|
#include <ardour/cycles.h>
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::list;
|
|
||||||
using std::set;
|
using std::set;
|
||||||
using std::map;
|
using std::map;
|
||||||
|
|
||||||
|
|
@ -128,7 +126,7 @@ class Plugin : public Stateful, public sigc::trackable
|
||||||
|
|
||||||
virtual bool save_preset(string name) = 0;
|
virtual bool save_preset(string name) = 0;
|
||||||
virtual bool load_preset (const string preset_label);
|
virtual bool load_preset (const string preset_label);
|
||||||
virtual list<string> get_presets();
|
virtual std::vector<std::string> get_presets();
|
||||||
|
|
||||||
virtual bool has_editor() const = 0;
|
virtual bool has_editor() const = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,10 +265,10 @@ Plugin::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
list<string>
|
vector<string>
|
||||||
Plugin::get_presets()
|
Plugin::get_presets()
|
||||||
{
|
{
|
||||||
list<string> labels;
|
vector<string> labels;
|
||||||
lrdf_uris* set_uris = lrdf_get_setting_uris(unique_id());
|
lrdf_uris* set_uris = lrdf_get_setting_uris(unique_id());
|
||||||
|
|
||||||
if (set_uris) {
|
if (set_uris) {
|
||||||
|
|
@ -281,7 +281,8 @@ Plugin::get_presets()
|
||||||
lrdf_free_uris(set_uris);
|
lrdf_free_uris(set_uris);
|
||||||
}
|
}
|
||||||
|
|
||||||
labels.unique();
|
// GTK2FIX find an equivalent way to do this with a vector (needed by GUI apis)
|
||||||
|
// labels.unique();
|
||||||
|
|
||||||
return labels;
|
return labels;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue