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
|
@ -425,6 +425,11 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
gint x, y;
|
||||
float fx, fy;
|
||||
|
||||
if (layout == 0) {
|
||||
layout = create_pango_layout ("");
|
||||
layout->set_font_description (get_style()->get_font());
|
||||
}
|
||||
|
||||
/* redraw the background */
|
||||
|
||||
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) {
|
||||
|
||||
Target* puck = i->second;
|
||||
Pango::Layout layout = new Pango::Layout(get_window()->create_pango_layout());
|
||||
|
||||
if (puck->visible) {
|
||||
/* redraw puck */
|
||||
|
@ -456,13 +460,10 @@ Panner2d::on_expose_event (GdkEventExpose *event)
|
|||
x, y,
|
||||
8, 8,
|
||||
0, 360 * 64);
|
||||
layout.set_text(puck->text);
|
||||
//get_window()->draw_text (get_style()->get_font(),
|
||||
// get_style()->get_fg_gc(Gtk::STATE_NORMAL),
|
||||
// x + 6, y + 6,
|
||||
// puck->text,
|
||||
// puck->textlen);
|
||||
// GTK2FIX : needs a pango layout
|
||||
|
||||
layout->set_text (puck->text);
|
||||
|
||||
get_window()->draw_layout (get_style()->get_fg_gc (STATE_NORMAL), x+6, y+6, layout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ class Panner2d : public Gtk::DrawingArea
|
|||
ARDOUR::Panner& panner;
|
||||
Gtk::Menu* context_menu;
|
||||
Gtk::CheckMenuItem* bypass_menu_item;
|
||||
Glib::RefPtr<Pango::Layout> layout;
|
||||
|
||||
typedef std::map<int,Target *> Targets;
|
||||
Targets targets;
|
||||
|
|
|
@ -79,8 +79,6 @@ class PluginSelector : public ArdourDialog
|
|||
Glib::RefPtr<Gtk::TreeSelection> aselection;
|
||||
Gtk::TreeView added_list;
|
||||
|
||||
void column_clicked (int column, GtkCList* clist);
|
||||
|
||||
#ifdef VST_SUPPORT
|
||||
// page 2
|
||||
struct VstColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
|
|
|
@ -747,7 +747,7 @@ PluginUI::control_port_toggled (ControlUI* cui)
|
|||
}
|
||||
|
||||
void
|
||||
PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
|
||||
PluginUI::control_combo_changed (ControlUI* cui)
|
||||
{
|
||||
if (!cui->ignore_change) {
|
||||
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));
|
||||
|
||||
_pluginui->stop_updating();
|
||||
_pluginui->stop_updating(0);
|
||||
delete_when_idle (this);
|
||||
}
|
||||
|
||||
|
@ -774,22 +774,24 @@ PluginUI::redirect_active_changed (Redirect* r, void* src)
|
|||
bypass_button.set_active (!r->active());
|
||||
}
|
||||
|
||||
void
|
||||
PluginUI::start_updating ()
|
||||
bool
|
||||
PluginUI::start_updating (GdkEventAny* ignored)
|
||||
{
|
||||
if (output_controls.size() > 0 ) {
|
||||
screen_update_connection.disconnect();
|
||||
screen_update_connection = ARDOUR_UI::instance()->RapidScreenUpdate.connect
|
||||
(mem_fun(*this, &PluginUI::output_update));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
PluginUI::stop_updating ()
|
||||
bool
|
||||
PluginUI::stop_updating (GdkEventAny* ignored)
|
||||
{
|
||||
if (output_controls.size() > 0 ) {
|
||||
screen_update_connection.disconnect();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -887,7 +889,7 @@ PlugUIBase::save_plugin_setting ()
|
|||
prompter.show_all();
|
||||
|
||||
switch (prompter.run ()) {
|
||||
case GTK_RESPONSE_ACCEPT:
|
||||
case Gtk::RESPONSE_ACCEPT:
|
||||
|
||||
string name;
|
||||
|
||||
|
|
|
@ -64,15 +64,15 @@ namespace Gtkmm2ext {
|
|||
class PixmapButton;
|
||||
}
|
||||
|
||||
class PlugUIBase : public sigc::trackable
|
||||
class PlugUIBase : public virtual sigc::trackable
|
||||
{
|
||||
public:
|
||||
PlugUIBase (ARDOUR::PluginInsert&);
|
||||
virtual ~PlugUIBase() {}
|
||||
|
||||
virtual gint get_preferred_height () = 0;
|
||||
virtual void start_updating() = 0;
|
||||
virtual void stop_updating() = 0;
|
||||
virtual bool start_updating(GdkEventAny*) = 0;
|
||||
virtual bool stop_updating(GdkEventAny*) = 0;
|
||||
|
||||
protected:
|
||||
ARDOUR::PluginInsert& insert;
|
||||
|
@ -94,8 +94,8 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
|
|||
|
||||
gint get_preferred_height () { return prefheight; }
|
||||
|
||||
void start_updating();
|
||||
void stop_updating();
|
||||
bool start_updating(GdkEventAny*);
|
||||
bool stop_updating(GdkEventAny*);
|
||||
|
||||
private:
|
||||
ARDOUR::AudioEngine &engine;
|
||||
|
@ -186,7 +186,7 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
|
|||
void parameter_changed (uint32_t, float, ControlUI* cui);
|
||||
void update_control_display (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*);
|
||||
|
||||
|
@ -223,8 +223,8 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
~VSTPluginUI ();
|
||||
|
||||
gint get_preferred_height ();
|
||||
void start_updating() {}
|
||||
void stop_updating() {}
|
||||
bool start_updating(GdkEventAny*) {}
|
||||
bool stop_updating(GdkEventAny*) {}
|
||||
|
||||
int package (Gtk::Window&);
|
||||
|
||||
|
|
|
@ -30,14 +30,12 @@
|
|||
#include <ardour/plugin_state.h>
|
||||
#include <ardour/cycles.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::list;
|
||||
using std::set;
|
||||
using std::map;
|
||||
|
||||
|
@ -128,7 +126,7 @@ class Plugin : public Stateful, public sigc::trackable
|
|||
|
||||
virtual bool save_preset(string name) = 0;
|
||||
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;
|
||||
|
||||
|
|
|
@ -265,10 +265,10 @@ Plugin::write_midi_feedback (MIDI::byte* buf, int32_t& bufsize)
|
|||
return buf;
|
||||
}
|
||||
|
||||
list<string>
|
||||
vector<string>
|
||||
Plugin::get_presets()
|
||||
{
|
||||
list<string> labels;
|
||||
vector<string> labels;
|
||||
lrdf_uris* set_uris = lrdf_get_setting_uris(unique_id());
|
||||
|
||||
if (set_uris) {
|
||||
|
@ -281,7 +281,8 @@ Plugin::get_presets()
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue