projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tweak a few colors, add options and missing colors
[ardour.git]
/
gtk2_ardour
/
panner2d.h
diff --git
a/gtk2_ardour/panner2d.h
b/gtk2_ardour/panner2d.h
index eb938be8f0f1815fd6b25d90a7d0e7ce044cf9f1..fdd4748f8f753d19a50052321673c4b665736eee 100644
(file)
--- a/
gtk2_ardour/panner2d.h
+++ b/
gtk2_ardour/panner2d.h
@@
-34,7
+34,7
@@
#include "pbd/cartesian.h"
#include "pbd/cartesian.h"
-#include "ardour_
dialog
.h"
+#include "ardour_
window
.h"
namespace ARDOUR {
class PannerShell;
namespace ARDOUR {
class PannerShell;
@@
-53,7
+53,7
@@
class Panner2dWindow;
class Panner2d : public Gtk::DrawingArea
{
class Panner2d : public Gtk::DrawingArea
{
- public:
+
public:
Panner2d (boost::shared_ptr<ARDOUR::PannerShell>, int32_t height);
~Panner2d ();
Panner2d (boost::shared_ptr<ARDOUR::PannerShell>, int32_t height);
~Panner2d ();
@@
-66,13
+66,10
@@
class Panner2d : public Gtk::DrawingArea
boost::shared_ptr<ARDOUR::PannerShell> get_panner_shell() const { return panner_shell; }
boost::shared_ptr<ARDOUR::PannerShell> get_panner_shell() const { return panner_shell; }
- sigc::signal<void,int> PuckMoved;
- sigc::signal<void,int> TargetMoved;
-
void cart_to_gtk (PBD::CartesianVector&) const;
void gtk_to_cart (PBD::CartesianVector&) const;
void cart_to_gtk (PBD::CartesianVector&) const;
void gtk_to_cart (PBD::CartesianVector&) const;
- protected:
+
protected:
bool on_expose_event (GdkEventExpose *);
bool on_button_press_event (GdkEventButton *);
bool on_button_release_event (GdkEventButton *);
bool on_expose_event (GdkEventExpose *);
bool on_button_press_event (GdkEventButton *);
bool on_button_release_event (GdkEventButton *);
@@
-80,9
+77,9
@@
class Panner2d : public Gtk::DrawingArea
bool on_scroll_event (GdkEventScroll *);
void on_size_allocate (Gtk::Allocation& alloc);
bool on_scroll_event (GdkEventScroll *);
void on_size_allocate (Gtk::Allocation& alloc);
- private:
+
private:
class Target {
class Target {
- public:
+
public:
PBD::AngularVector position;
bool visible;
std::string text;
PBD::AngularVector position;
bool visible;
std::string text;
@@
-98,7
+95,7
@@
class Panner2d : public Gtk::DrawingArea
return _selected;
}
return _selected;
}
- private:
+
private:
bool _selected;
};
bool _selected;
};
@@
-108,23
+105,18
@@
class Panner2d : public Gtk::DrawingArea
typedef std::vector<Target*> Targets;
Targets speakers;
Targets signals;
typedef std::vector<Target*> Targets;
Targets speakers;
Targets signals;
-
Target position;
+ Target position;
Target *drag_target;
Target *drag_target;
- int drag_x;
- int drag_y;
- bool allow_speaker_motion;
int width;
int height;
int width;
int height;
-
double radius;
-
double border;
-
double hoffset;
-
double voffset;
-
double last_width;
+ double radius;
+ double border;
+ double hoffset;
+ double voffset;
+ double last_width;
bool did_move;
bool did_move;
-
- gint compute_x (float);
- gint compute_y (float);
+ bool have_elevation;
Target *find_closest_object (gdouble x, gdouble y, bool& is_signal);
Target *find_closest_object (gdouble x, gdouble y, bool& is_signal);
@@
-133,24
+125,26
@@
class Panner2d : public Gtk::DrawingArea
void toggle_bypass ();
void handle_state_change ();
void handle_position_change ();
void toggle_bypass ();
void handle_state_change ();
void handle_position_change ();
-
void label_signals ();
+ void label_signals ();
- PBD::ScopedConnectionList connections;
+ PBD::ScopedConnectionList panshell_connections;
+ PBD::ScopedConnectionList panner_connections;
/* cartesian coordinates in GTK units ; adjust to same but on a circle of radius 1.0
and centered in the middle of our area
*/
void clamp_to_circle (double& x, double& y);
/* cartesian coordinates in GTK units ; adjust to same but on a circle of radius 1.0
and centered in the middle of our area
*/
void clamp_to_circle (double& x, double& y);
+ void sphere_project (double& x, double& y, double& z);
};
};
-class Panner2dWindow : public Ardour
Dialog
+class Panner2dWindow : public Ardour
Window
{
{
- public:
+
public:
Panner2dWindow (boost::shared_ptr<ARDOUR::PannerShell>, int32_t height, uint32_t inputs);
void reset (uint32_t n_inputs);
Panner2dWindow (boost::shared_ptr<ARDOUR::PannerShell>, int32_t height, uint32_t inputs);
void reset (uint32_t n_inputs);
- private:
+
private:
Panner2d widget;
Gtk::HBox hpacker;
Panner2d widget;
Gtk::HBox hpacker;
@@
-159,11
+153,19
@@
class Panner2dWindow : public ArdourDialog
Gtk::VBox spinner_box;
Gtk::VBox left_side;
Gtk::VBox spinner_box;
Gtk::VBox left_side;
- std::vector<Gtk::SpinButton*> spinners;
+ Gtk::Adjustment width_adjustment;
+ Gtk::SpinButton width_spinner;
+
+ PBD::ScopedConnectionList panshell_connections;
+ PBD::ScopedConnectionList panvalue_connections;
+ void set_bypassed();
+ void set_width();
- void bypass_toggled ();
- bool on_key_press_event (GdkEventKey*);
- bool on_key_release_event (GdkEventKey*);
+ void pannable_handler ();
+ void bypass_toggled ();
+ void width_changed ();
+ bool on_key_press_event (GdkEventKey*);
+ bool on_key_release_event (GdkEventKey*);
};
#endif /* __ardour_panner_2d_h__ */
};
#endif /* __ardour_panner_2d_h__ */