#include <sys/types.h>
#include <map>
-#include <string>
#include <vector>
#include <glibmm/refptr.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/adjustment.h>
-using std::map;
-using std::string;
-
namespace ARDOUR {
class Panner;
}
public:
Panner2d (boost::shared_ptr<ARDOUR::Panner>, int32_t height);
~Panner2d ();
-
+
void allow_x_motion(bool);
void allow_y_motion(bool);
void allow_target_motion (bool);
- void hide_puck (int which);
- void show_puck (int which);
int add_target (float x, float y);
int add_puck (const char* text, float x, float y);
- void hide_target (int);
- void show_target (int);
- void remove_target (int);
- void drop_targets ();
- void drop_pucks ();
- void move_target (int, float x, float y);
void move_puck (int, float x, float y);
void reset (uint32_t n_inputs);
Gtk::Adjustment& azimuth (uint32_t which);
boost::shared_ptr<ARDOUR::Panner> get_panner() const { return panner; }
-
+
sigc::signal<void,int> PuckMoved;
sigc::signal<void,int> TargetMoved;
boost::shared_ptr<ARDOUR::Panner> panner;
Glib::RefPtr<Pango::Layout> layout;
- typedef std::map<int,Target *> Targets;
+ typedef std::vector<Target*> Targets;
Targets targets;
Targets pucks;
int height;
bool bypassflag;
-
+
gint compute_x (float);
gint compute_y (float);
void toggle_bypass ();
void handle_state_change ();
void handle_position_change ();
+
+ PBD::ScopedConnection state_connection;
+ PBD::ScopedConnection change_connection;
};
class Panner2dWindow : public Gtk::Window
{
public:
Panner2dWindow (boost::shared_ptr<ARDOUR::Panner>, int32_t height, uint32_t inputs);
-
+
void reset (uint32_t n_inputs);
private: