mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
some C++-ification of GnomeCanvasBlah
git-svn-id: svn://localhost/trunk/ardour2@82 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1a3a776077
commit
183f69970c
58 changed files with 927 additions and 1025 deletions
|
|
@ -1204,10 +1204,10 @@ AudioTimeAxisView::add_gain_automation_child ()
|
|||
|
||||
|
||||
line = new AutomationGainLine ("automation gain", _session, *gain_track,
|
||||
gain_track->canvas_display,
|
||||
*gain_track->canvas_display,
|
||||
_route.gain_automation_curve(),
|
||||
slot (mem_fun (ed, &PublicEditor::canvas_control_point_event)),
|
||||
slot (mem_fun (ed, &PublicEditor::canvas_line_event)));
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
line->set_line_color (color_map[cAutomationLine]);
|
||||
|
||||
|
||||
|
|
@ -1284,7 +1284,7 @@ AudioTimeAxisView::update_pans ()
|
|||
AutomationLine* line;
|
||||
|
||||
line = new AutomationPanLine ("automation pan", _session, *pan_track,
|
||||
pan_track->canvas_display,
|
||||
*pan_track->canvas_display,
|
||||
(*p)->automation(),
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
|
|
@ -1310,7 +1310,7 @@ AudioTimeAxisView::toggle_gain_track ()
|
|||
if (showit != gain_track->marked_for_display()) {
|
||||
if (showit) {
|
||||
gain_track->set_marked_for_display (true);
|
||||
gnome_canvas_item_show (gain_track->canvas_display);
|
||||
gain_track->canvas_display->show();
|
||||
gain_track->get_state_node()->add_property ("shown", X_("yes"));
|
||||
} else {
|
||||
gain_track->set_marked_for_display (false);
|
||||
|
|
@ -1346,7 +1346,7 @@ AudioTimeAxisView::toggle_pan_track ()
|
|||
if (showit != pan_track->marked_for_display()) {
|
||||
if (showit) {
|
||||
pan_track->set_marked_for_display (true);
|
||||
gnome_canvas_item_show (pan_track->canvas_display);
|
||||
pan_track->canvas_display->show();
|
||||
pan_track->get_state_node()->add_property ("shown", X_("yes"));
|
||||
} else {
|
||||
pan_track->set_marked_for_display (false);
|
||||
|
|
@ -1467,7 +1467,7 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w
|
|||
|
||||
ral = new RedirectAutomationLine (name,
|
||||
*redirect, what, _session, *ran->view,
|
||||
ran->view->canvas_display, redirect->automation_list (what),
|
||||
*ran->view->canvas_display, redirect->automation_list (what),
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
|
||||
|
|
@ -1621,7 +1621,7 @@ AudioTimeAxisView::redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutoma
|
|||
|
||||
if (showit) {
|
||||
ran->view->set_marked_for_display (true);
|
||||
gnome_canvas_item_show (ran->view->canvas_display);
|
||||
ran->view->canvas_display->show();
|
||||
} else {
|
||||
rai->redirect->mark_automation_visible (ran->what, true);
|
||||
ran->view->set_marked_for_display (false);
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@
|
|||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, Gnome::Canvas::Item* parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, tv, parent, c, point_callback, line_callback),
|
||||
session (s)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ class TimeAxisView;
|
|||
class AutomationGainLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, Gnome::Canvas::Item* parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
|
||||
void view_to_model_y (double&);
|
||||
void model_to_view_y (double&);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
using namespace Editing;
|
||||
|
||||
ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
: line (al)
|
||||
{
|
||||
model = al.the_list().end();
|
||||
|
|
@ -114,19 +114,19 @@ ControlPoint::~ControlPoint ()
|
|||
void
|
||||
ControlPoint::hide ()
|
||||
{
|
||||
gnome_canvas_item_hide (item);
|
||||
item->hide();
|
||||
}
|
||||
|
||||
void
|
||||
ControlPoint::show()
|
||||
{
|
||||
gnome_canvas_item_show (item);
|
||||
item->show();
|
||||
}
|
||||
|
||||
void
|
||||
ControlPoint::set_visible (bool yn)
|
||||
{
|
||||
gnome_canvas_item_set (item, "draw", (gboolean) yn, NULL);
|
||||
item->set_property ("draw", (gboolean) yn);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -142,10 +142,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
|||
{
|
||||
if (entered) {
|
||||
if (selected) {
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPointSelected], NULL);
|
||||
item->set_property ("outline_color_rgba", color_map[cEnteredControlPointSelected]);
|
||||
set_visible(true);
|
||||
} else {
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPoint], NULL);
|
||||
item->set_property ("outline_color_rgba", color_map[cEnteredControlPoint]);
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
|
|
@ -153,10 +153,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
|||
|
||||
} else {
|
||||
if (selected) {
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPointSelected], NULL);
|
||||
item->set_property ("outline_color_rgba", color_map[cControlPointSelected]);
|
||||
set_visible(true);
|
||||
} else {
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPoint], NULL);
|
||||
item->set_property ("outline_color_rgba", color_map[cControlPoint]);
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
|
|
@ -171,13 +171,9 @@ ControlPoint::set_size (double sz)
|
|||
|
||||
#if 0
|
||||
if (_size > 6.0) {
|
||||
gnome_canvas_item_set (item,
|
||||
"fill", (gboolean) TRUE,
|
||||
NULL);
|
||||
item->set_property ("fill", (gboolean) TRUE);
|
||||
} else {
|
||||
gnome_canvas_item_set (item,
|
||||
"fill", (gboolean) FALSE,
|
||||
NULL);
|
||||
item->set_property ("fill", (gboolean) FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -206,12 +202,10 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
|
|||
break;
|
||||
}
|
||||
|
||||
gnome_canvas_item_set (item,
|
||||
"x1", x1,
|
||||
"x2", x2,
|
||||
"y1", y - half_size,
|
||||
"y2", y + half_size,
|
||||
NULL);
|
||||
item->set_property ("x1", x1);
|
||||
item->set_property ("x2", x2);
|
||||
item->set_property ("y1", y - half_size);
|
||||
item->set_property ("y2", y + half_size);
|
||||
|
||||
_x = x;
|
||||
_y = y;
|
||||
|
|
@ -220,9 +214,9 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
|
|||
|
||||
/*****/
|
||||
|
||||
AutomationLine::AutomationLine (string name, TimeAxisView& tv, GnomeCanvasItem* parent, AutomationList& al,
|
||||
gint (*point_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Item* parent, AutomationList& al,
|
||||
gint (*point_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
: trackview (tv),
|
||||
_name (name),
|
||||
alist (al)
|
||||
|
|
@ -238,20 +232,16 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GnomeCanvasItem*
|
|||
terminal_points_can_slide = true;
|
||||
_height = 0;
|
||||
|
||||
group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(parent),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
group = new Gnome::Canvas::Group (*parent);
|
||||
group->set_property ("x", 0.0);
|
||||
group->set_property ("y", 0.0);
|
||||
|
||||
line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", (guint) 1,
|
||||
NULL);
|
||||
line = new Gnome::Canvas::Line (*group);
|
||||
line->set_property ("width_pixels", (guint)1);
|
||||
|
||||
// cerr << _name << " line @ " << line << endl;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(line), "line", this);
|
||||
line->set_data ("line", this);
|
||||
gtk_signal_connect (GTK_OBJECT(line), "event", (GtkSignalFunc) line_handler, this);
|
||||
|
||||
alist.StateChanged.connect (mem_fun(*this, &AutomationLine::list_changed));
|
||||
|
|
@ -260,7 +250,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GnomeCanvasItem*
|
|||
AutomationLine::~AutomationLine ()
|
||||
{
|
||||
if (point_coords) {
|
||||
gnome_canvas_points_unref (point_coords);
|
||||
gnome_canvas_points_unref (point_coords->gobj());
|
||||
}
|
||||
|
||||
vector_delete (&control_points);
|
||||
|
|
@ -288,7 +278,7 @@ AutomationLine::set_point_size (double sz)
|
|||
void
|
||||
AutomationLine::show ()
|
||||
{
|
||||
gnome_canvas_item_show (line);
|
||||
line->show();
|
||||
|
||||
if (points_visible) {
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
|
|
@ -302,7 +292,7 @@ AutomationLine::show ()
|
|||
void
|
||||
AutomationLine::hide ()
|
||||
{
|
||||
gnome_canvas_item_hide (line);
|
||||
line->hide();
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->hide();
|
||||
}
|
||||
|
|
@ -331,7 +321,7 @@ void
|
|||
AutomationLine::set_line_color (uint32_t color)
|
||||
{
|
||||
_line_color = color;
|
||||
gnome_canvas_item_set (line, "fill_color_rgba", color, NULL);
|
||||
line->set_property ("fill_color_rgba", color);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -478,15 +468,15 @@ void
|
|||
AutomationLine::reset_line_coords (ControlPoint& cp)
|
||||
{
|
||||
if (point_coords) {
|
||||
point_coords->coords[cp.view_index*2] = cp.get_x();
|
||||
point_coords->coords[(cp.view_index*2) + 1] = cp.get_y();
|
||||
point_coords[cp.view_index] = cp.get_x();
|
||||
point_coords[cp.view_index] = cp.get_y();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::update_line ()
|
||||
{
|
||||
gnome_canvas_item_set (line, "points", point_coords, NULL);
|
||||
line->set_property ("points", point_coords);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -667,12 +657,12 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp)
|
|||
}
|
||||
|
||||
void
|
||||
AutomationLine::determine_visible_control_points (GnomeCanvasPoints* points)
|
||||
AutomationLine::determine_visible_control_points (Gnome::Canvas::Points* points)
|
||||
{
|
||||
uint32_t xi, yi, view_index, pi;
|
||||
int n;
|
||||
AutomationList::iterator model;
|
||||
uint32_t npoints = points->num_points;
|
||||
uint32_t npoints = points->size();
|
||||
double last_control_point_x = 0.0;
|
||||
double last_control_point_y = 0.0;
|
||||
uint32_t this_rx = 0;
|
||||
|
|
@ -1201,7 +1191,7 @@ AutomationLine::list_changed (Change ignored)
|
|||
void
|
||||
AutomationLine::reset_callback (const AutomationList& events)
|
||||
{
|
||||
GnomeCanvasPoints *tmp_points;
|
||||
Gnome::Canvas::Points *tmp_points;
|
||||
uint32_t npoints = events.size();
|
||||
|
||||
if (npoints == 0) {
|
||||
|
|
@ -1209,7 +1199,7 @@ AutomationLine::reset_callback (const AutomationList& events)
|
|||
delete *i;
|
||||
}
|
||||
control_points.clear ();
|
||||
gnome_canvas_item_hide (line);
|
||||
line->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1218,20 +1208,21 @@ AutomationLine::reset_callback (const AutomationList& events)
|
|||
uint32_t xi, yi;
|
||||
AutomationList::const_iterator ai;
|
||||
|
||||
for (ai = events.const_begin(), xi = 0, yi = 1; ai != events.const_end(); xi += 2, yi +=2, ++ai) {
|
||||
for (ai = events.const_begin(), xi = 0, yi = 0; ai != events.const_end(); xi += 1, yi +=1, ++ai) {
|
||||
|
||||
tmp_points->coords[xi] = trackview.editor.frame_to_unit ((*ai)->when);
|
||||
tmp_points[xi] = trackview.editor.frame_to_unit ((*ai)->when);
|
||||
double translated_y;
|
||||
|
||||
translated_y = (*ai)->value;
|
||||
model_to_view_y (translated_y);
|
||||
tmp_points->coords[yi] = _height - (translated_y * _height);
|
||||
tmp_points[yi] = _height - (translated_y * _height);
|
||||
}
|
||||
|
||||
tmp_points->num_points = npoints;
|
||||
|
||||
determine_visible_control_points (tmp_points);
|
||||
gnome_canvas_points_unref (tmp_points);
|
||||
gnome_canvas_points_unref (tmp_points->gobj());
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -27,13 +27,14 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include <pbd/undo.h>
|
||||
|
||||
#include <ardour/automation_event.h>
|
||||
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ class Selection;
|
|||
class ControlPoint
|
||||
{
|
||||
public:
|
||||
ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
ControlPoint (AutomationLine& al, gint (*event_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
|
||||
~ControlPoint ();
|
||||
|
||||
|
|
@ -70,7 +71,7 @@ class ControlPoint
|
|||
void set_size (double);
|
||||
void set_visible (bool);
|
||||
|
||||
GnomeCanvasItem* item;
|
||||
Gnome::Canvas::Item* item;
|
||||
AutomationLine& line;
|
||||
uint32_t view_index;
|
||||
ARDOUR::AutomationList::iterator model;
|
||||
|
|
@ -87,9 +88,9 @@ class ControlPoint
|
|||
class AutomationLine : public sigc::trackable
|
||||
{
|
||||
public:
|
||||
AutomationLine (string name, TimeAxisView&, GnomeCanvasItem *, ARDOUR::AutomationList&,
|
||||
gint (*point_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
AutomationLine (string name, TimeAxisView&, Gnome::Canvas::Item&, ARDOUR::AutomationList&,
|
||||
gint (*point_event_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_event_handler)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
|
||||
virtual ~AutomationLine ();
|
||||
|
||||
|
|
@ -130,17 +131,17 @@ class AutomationLine : public sigc::trackable
|
|||
|
||||
TimeAxisView& trackview;
|
||||
|
||||
GnomeCanvasGroup* canvas_group() const { return GNOME_CANVAS_GROUP(group); }
|
||||
GnomeCanvasItem* parent_group() const { return _parent_group; }
|
||||
GnomeCanvasItem* grab_item() const { return line; }
|
||||
Gnome::Canvas::Group* canvas_group() const { return group; }
|
||||
Gnome::Canvas::Item* parent_group() const { return _parent_group; }
|
||||
Gnome::Canvas::Item* grab_item() const { return line; }
|
||||
|
||||
void show_selection();
|
||||
void hide_selection ();
|
||||
|
||||
void set_point_size (double size);
|
||||
|
||||
static void invalidate_point (GnomeCanvasPoints*, uint32_t index);
|
||||
static bool invalid_point (GnomeCanvasPoints*, uint32_t index);
|
||||
static void invalidate_point (Gnome::Canvas::Points*, uint32_t index);
|
||||
static bool invalid_point (Gnome::Canvas::Points*, uint32_t index);
|
||||
|
||||
virtual string get_verbose_cursor_string (float);
|
||||
virtual void view_to_model_y (double&) = 0;
|
||||
|
|
@ -167,15 +168,15 @@ class AutomationLine : public sigc::trackable
|
|||
bool no_draw : 1;
|
||||
bool points_visible : 1;
|
||||
|
||||
GnomeCanvasItem* _parent_group;
|
||||
GnomeCanvasItem* group;
|
||||
GnomeCanvasItem* line; /* line */
|
||||
GnomeCanvasPoints* point_coords; /* coordinates for canvas line */
|
||||
Gnome::Canvas::Item* _parent_group;
|
||||
Gnome::Canvas::Group* group;
|
||||
Gnome::Canvas::Line* line; /* line */
|
||||
Gnome::Canvas::Points* point_coords; /* coordinates for canvas line */
|
||||
vector<ControlPoint*> control_points; /* visible control points */
|
||||
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer);
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer);
|
||||
|
||||
void determine_visible_control_points (GnomeCanvasPoints*);
|
||||
void determine_visible_control_points (Gnome::Canvas::Points*);
|
||||
void sync_model_from (ControlPoint&);
|
||||
void sync_model_with_view_point (ControlPoint&);
|
||||
void sync_model_with_view_line (uint32_t, uint32_t);
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@
|
|||
|
||||
using namespace ARDOUR;
|
||||
|
||||
AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, Gnome::Canvas::Item* parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, tv, parent, c, point_callback, line_callback),
|
||||
session (s)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ class TimeAxisView;
|
|||
class AutomationPanLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, Gnome::Canvas::Item* parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
|
||||
void view_to_model_y (double&);
|
||||
void model_to_view_y (double&);
|
||||
|
|
|
|||
|
|
@ -53,18 +53,26 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
|
|||
auto_play_item = 0;
|
||||
ignore_state_request = false;
|
||||
|
||||
base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 1000000.0,
|
||||
"outline_color_rgba", color_map[cAutomationTrackOutline],
|
||||
/* outline ends and bottom */
|
||||
"outline_what", (guint32) (0x1|0x2|0x8),
|
||||
"fill_color_rgba", color_map[cAutomationTrackFill],
|
||||
NULL);
|
||||
// base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
// gnome_canvas_simplerect_get_type(),
|
||||
// "x1", 0.0,
|
||||
// "y1", 0.0,
|
||||
// "x2", 1000000.0,
|
||||
// "outline_color_rgba", color_map[cAutomationTrackOutline],
|
||||
// /* outline ends and bottom */
|
||||
// "outline_what", (guint32) (0x1|0x2|0x8),
|
||||
// "fill_color_rgba", color_map[cAutomationTrackFill],
|
||||
// NULL);
|
||||
base_rect = new Gnome::Canvas::SimpleRect(*canvas_display);
|
||||
base_rect->set_property ("x1", 0.0);
|
||||
base_rect->set_property ("y1", 0.0);
|
||||
base_rect->set_property ("x2", 1000000.0);
|
||||
base_rect->set_property ("outline_color_rgba", color_map[cAutomationTrackOutline]);
|
||||
/* outline ends and bottom */
|
||||
base_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
|
||||
base_rect->set_property ("fill_color_rgba", color_map[cAutomationTrackFill]);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(base_rect), "trackview", this);
|
||||
base_rect->set_data ("trackview", this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(base_rect), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_automation_track_event,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <ardour/types.h>
|
||||
|
||||
#include "time_axis_view.h"
|
||||
#include "simplerect.h"
|
||||
|
||||
using std::vector;
|
||||
using std::list;
|
||||
|
|
@ -47,7 +48,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
void set_samples_per_unit (double);
|
||||
std::string name() const { return _name; }
|
||||
|
||||
virtual void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
virtual void add_automation_event (Gnome::Canvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
|
||||
void clear_lines ();
|
||||
void add_line (AutomationLine&);
|
||||
|
|
@ -77,7 +78,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
|
||||
protected:
|
||||
ARDOUR::Route& route;
|
||||
GnomeCanvasItem* base_rect;
|
||||
Gnome::Canvas::SimpleRect* base_rect;
|
||||
string _name;
|
||||
string _state_name;
|
||||
bool in_destructor;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ using namespace Editing;
|
|||
|
||||
sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
|
||||
|
||||
CrossfadeView::CrossfadeView (GnomeCanvasGroup *parent,
|
||||
CrossfadeView::CrossfadeView (Gnome::Canvas::Group *parent,
|
||||
AudioTimeAxisView &tv,
|
||||
Crossfade& xf,
|
||||
double spu,
|
||||
|
|
@ -47,7 +47,7 @@ CrossfadeView::CrossfadeView (GnomeCanvasGroup *parent,
|
|||
AudioRegionView& rview)
|
||||
|
||||
|
||||
: TimeAxisViewItem ("xf.name()", parent, tv, spu, basic_color, xf.position(),
|
||||
: TimeAxisViewItem ("xf.name()", *parent, tv, spu, basic_color, xf.position(),
|
||||
xf.overlap_length(), TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowFrame)),
|
||||
crossfade (xf),
|
||||
left_view (lview),
|
||||
|
|
@ -73,11 +73,11 @@ CrossfadeView::CrossfadeView (GnomeCanvasGroup *parent,
|
|||
|
||||
/* no frame around the xfade or overlap rects */
|
||||
|
||||
gnome_canvas_item_set (frame, "outline_what", 0, NULL);
|
||||
frame->set_property ("outline_what", 0);
|
||||
|
||||
/* never show the vestigial frame */
|
||||
|
||||
gnome_canvas_item_hide (vestigial_frame);
|
||||
vestigial_frame->hide();
|
||||
show_vestigial = false;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(group), "crossfadeview", this);
|
||||
|
|
@ -211,16 +211,16 @@ CrossfadeView::redraw_curves ()
|
|||
as regions. This puts crossfade views on top of a track, above all regions.
|
||||
*/
|
||||
|
||||
gnome_canvas_item_raise_to_top (group);
|
||||
group->raise_to_top();
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::active_changed ()
|
||||
{
|
||||
if (crossfade.active()) {
|
||||
gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cActiveCrossfade], NULL);
|
||||
frame->set_property ("fill_color_rgba", color_map[cActiveCrossfade]);
|
||||
} else {
|
||||
gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cInactiveCrossfade], NULL);
|
||||
frame->set_property ("fill_color_rgba", color_map[cInactiveCrossfade]);
|
||||
}
|
||||
|
||||
redraw_curves ();
|
||||
|
|
@ -245,19 +245,19 @@ CrossfadeView::upper_regionview () const
|
|||
void
|
||||
CrossfadeView::show ()
|
||||
{
|
||||
gnome_canvas_item_show (group);
|
||||
group->show();
|
||||
_visible = true;
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::hide ()
|
||||
{
|
||||
gnome_canvas_item_hide (group);
|
||||
group->hide();
|
||||
_visible = false;
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::fake_hide ()
|
||||
{
|
||||
gnome_canvas_item_hide (group);
|
||||
group->hide();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class AudioRegionView;
|
|||
|
||||
struct CrossfadeView : public TimeAxisViewItem
|
||||
{
|
||||
CrossfadeView (GnomeCanvasGroup*,
|
||||
CrossfadeView (Gnome::Canvas::Group*,
|
||||
AudioTimeAxisView&,
|
||||
ARDOUR::Crossfade&,
|
||||
double initial_samples_per_unit,
|
||||
|
|
|
|||
|
|
@ -890,13 +890,13 @@ Editor::initialize_canvas ()
|
|||
transport_bar_drag_rect->set_property ("outline_pixels", 0);
|
||||
transport_bar_drag_rect->hide ();
|
||||
|
||||
marker_drag_line_points.push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
marker_drag_line_points.push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
|
||||
marker_drag_line = new Gnome::Canvas::Line (*track_canvas.root());
|
||||
marker_drag_line->set_property ("width_pixels", 1);
|
||||
marker_drag_line->set_property("fill_color_rgba", color_map[cMarkerDragLine]);
|
||||
marker_drag_line->set_property("points", marker_drag_line_points.gobj());
|
||||
marker_drag_line->set_property("points", marker_drag_line_points->gobj());
|
||||
marker_drag_line->hide();
|
||||
|
||||
range_marker_drag_rect = new Gnome::Canvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
|
||||
|
|
@ -918,12 +918,21 @@ Editor::initialize_canvas ()
|
|||
|
||||
transport_loop_range_rect->lower_to_bottom (); // loop on the bottom
|
||||
|
||||
transport_punchin_line = new Gnome::Canvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
|
||||
transport_punchin_line = new Gnome::Canvas::Line (*time_line_group);
|
||||
transport_punchin_line->set_property ("x1", 0.0);
|
||||
transport_punchin_line->set_property ("y1", 0.0);
|
||||
transport_punchin_line->set_property ("x2", 0.0);
|
||||
transport_punchin_line->set_property ("y2", 0.0);
|
||||
|
||||
transport_punchin_line->set_property ("outline_color_rgba", color_map[cPunchInLine]);
|
||||
transport_punchin_line->set_property ("outline_pixels", 1);
|
||||
transport_punchin_line->hide ();
|
||||
|
||||
transport_punchout_line = new Gnome::Canvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
|
||||
transport_punchout_line = new Gnome::Canvas::Line (*time_line_group);
|
||||
transport_punchout_line->set_property ("x1", 0.0);
|
||||
transport_punchout_line->set_property ("y1", 0.0);
|
||||
transport_punchout_line->set_property ("x2", 0.0);
|
||||
transport_punchout_line->set_property ("y2", 0.0);
|
||||
transport_punchout_line->set_property ("outline_color_rgba", color_map[cPunchOutLine]);
|
||||
transport_punchout_line->set_property ("outline_pixels", 1);
|
||||
transport_punchout_line->hide();
|
||||
|
|
@ -955,31 +964,31 @@ Editor::initialize_canvas ()
|
|||
tempo_line_points.push_back(Gnome::Art::Point(0, timebar_height));
|
||||
tempo_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
|
||||
|
||||
tempo_line = new Gnome::Canvas::Line (*tempo_group, *tempo_line_points);
|
||||
tempo_line = new Gnome::Canvas::Line (*tempo_group, tempo_line_points);
|
||||
tempo_line->set_property ("width_pixels", 0);
|
||||
tempo_line->set_property ("fill_color", "#000000");
|
||||
tempo_line->set_property ("fill_color", Gdk::Color ("#000000"));
|
||||
|
||||
meter_line_points.push_back(Gnome::Art::Point (0, timebar_height));
|
||||
meter_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
|
||||
|
||||
meter_line = new Gnome::Canvas::Line (*meter_group, *meter_line_points);
|
||||
meter_line = new Gnome::Canvas::Line (*meter_group, meter_line_points);
|
||||
meter_line->set_property ("width_pixels", 0);
|
||||
meter_line->set_property ("fill_color", "#000000");
|
||||
meter_line->set_property ("fill_color", Gdk::Color ("#000000"));
|
||||
|
||||
marker_line_points.push_back(Gnome::Art::Point (0, timebar_height));
|
||||
marker_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
|
||||
|
||||
marker_line = new Gnome::Canvas::Line (*marker_group, *marker_line_points);
|
||||
marker_line = new Gnome::Canvas::Line (*marker_group, marker_line_points);
|
||||
marker_line->set_property ("width_pixels", 0);
|
||||
marker_line->set_property ("fill_color", "#000000");
|
||||
marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
|
||||
|
||||
range_marker_line = new Gnome::Canvas::Line (*range_marker_group, *marker_line_points);
|
||||
range_marker_line = new Gnome::Canvas::Line (*range_marker_group, marker_line_points);
|
||||
range_marker_line->set_property ("width_pixels", 0);
|
||||
range_marker_line->set_property ("fill_color", "#000000");
|
||||
range_marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
|
||||
|
||||
transport_marker_line = new Gnome::Canvas::Line (*transport_marker_group, *marker_line_points);
|
||||
transport_marker_line = new Gnome::Canvas::Line (*transport_marker_group, marker_line_points);
|
||||
transport_marker_line->set_property ("width_pixels", 0);
|
||||
transport_marker_line->set_property ("fill_color", "#000000");
|
||||
transport_marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
|
||||
|
||||
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_loop_range_view), false));
|
||||
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_punch_range_view), false));
|
||||
|
|
@ -1342,8 +1351,9 @@ Editor::reset_scrolling_region (GtkAllocation *alloc)
|
|||
if (playhead_cursor) playhead_cursor->set_length (canvas_alloc_height);
|
||||
|
||||
if (marker_drag_line) {
|
||||
marker_drag_line_points[1].set_y (canvas_height);
|
||||
marker_drag_line->set_property("points", marker_drag_line_points.gobj());
|
||||
marker_drag_line_points->back().set_x(canvas_height);
|
||||
// cerr << "set mlA points, nc = " << marker_drag_line_points->num_points << endl;
|
||||
marker_drag_line->set_property("points", marker_drag_line_points);
|
||||
}
|
||||
if (range_marker_drag_rect) {
|
||||
range_marker_drag_rect->set_property("y1", 0.0);
|
||||
|
|
@ -1769,7 +1779,7 @@ Editor::build_cursors ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::popup_fade_context_menu (int button, int32_t time, GnomeCanvasItem* item, ItemType item_type)
|
||||
Editor::popup_fade_context_menu (int button, int32_t time, Gnome::Canvas::Item* item, ItemType item_type)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
|
|
@ -2894,7 +2904,7 @@ Editor::setup_toolbar ()
|
|||
mouse_mode_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Gtk::Box*>(&toolbar_hbox),
|
||||
mouse_mode_tearoff->tearoff_window()));
|
||||
mouse_mode_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Gtk::Box*> (&toolbar_hbox),
|
||||
mmouse_mode_tearoff->tearoff_window(), 1));
|
||||
mouse_mode_tearoff->tearoff_window(), 1));
|
||||
|
||||
mouse_move_button.set_name ("MouseModeButton");
|
||||
mouse_select_button.set_name ("MouseModeButton");
|
||||
|
|
@ -3080,7 +3090,7 @@ Editor::setup_toolbar ()
|
|||
tools_tearoff->set_name ("MouseModeBase");
|
||||
|
||||
tools_tearoff->Detach.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Gtk::Box*>(&toolbar_hbox),
|
||||
tools_tearoff->tearoff_window());
|
||||
tools_tearoff->tearoff_window(), 0));
|
||||
tools_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Gtk::Box*> (&toolbar_hbox),
|
||||
tools_tearoff->tearoff_window(), 0));
|
||||
|
||||
|
|
@ -3679,7 +3689,7 @@ void
|
|||
Editor::set_edit_menu (Menu& menu)
|
||||
{
|
||||
edit_menu = &menu;
|
||||
edit_menu->signal_map.connect (mem_fun(*this, &Editor::edit_menu_map_handler));
|
||||
edit_menu->signal_map_event().connect (mem_fun(*this, &Editor::edit_menu_map_handler));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ class Editor : public PublicEditor
|
|||
void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
|
||||
void add_new_location (ARDOUR::Location *);
|
||||
void location_gone (ARDOUR::Location *);
|
||||
void remove_marker (Gnome::Canvas::Polygon&, GdkEvent*);
|
||||
void remove_marker (Gnome::Canvas::Item&, GdkEvent*);
|
||||
gint really_remove_marker (ARDOUR::Location* loc);
|
||||
|
||||
uint32_t location_marker_color;
|
||||
|
|
@ -422,7 +422,7 @@ class Editor : public PublicEditor
|
|||
typedef std::map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
|
||||
LocationMarkerMap location_markers;
|
||||
|
||||
void hide_marker (GnomeCanvasItem*, GdkEvent*);
|
||||
void hide_marker (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void clear_marker_display ();
|
||||
void mouse_add_new_marker (jack_nframes_t where);
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ class Editor : public PublicEditor
|
|||
|
||||
struct Cursor {
|
||||
Editor& editor;
|
||||
Gnome::Canvas::Points points;
|
||||
Gnome::Canvas::Points* points;
|
||||
Gnome::Canvas::Item* canvas_item;
|
||||
jack_nframes_t current_frame;
|
||||
double length;
|
||||
|
|
@ -826,11 +826,11 @@ class Editor : public PublicEditor
|
|||
jack_nframes_t cut_buffer_length;
|
||||
|
||||
gint typed_event (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint button_press_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint button_release_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint motion_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint enter_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint leave_handler (GnomeCanvasItem*, GdkEvent*, ItemType);
|
||||
gint button_press_handler (Gnome::Canvas::Item*, GdkEvent*, ItemType);
|
||||
gint button_release_handler (Gnome::Canvas::Item*, GdkEvent*, ItemType);
|
||||
gint motion_handler (Gnome::Canvas::Item*, GdkEvent*, ItemType);
|
||||
gint enter_handler (Gnome::Canvas::Item*, GdkEvent*, ItemType);
|
||||
gint leave_handler (Gnome::Canvas::Item*, GdkEvent*, ItemType);
|
||||
|
||||
/* KEYMAP HANDLING */
|
||||
|
||||
|
|
@ -1053,7 +1053,7 @@ class Editor : public PublicEditor
|
|||
void queue_route_list_reordered ();
|
||||
|
||||
struct DragInfo {
|
||||
GnomeCanvasItem* item;
|
||||
Gnome::Canvas::Item* item;
|
||||
void* data;
|
||||
jack_nframes_t last_frame_position;
|
||||
int32_t pointer_frame_offset;
|
||||
|
|
@ -1065,8 +1065,8 @@ class Editor : public PublicEditor
|
|||
double cumulative_y_drag;
|
||||
double current_pointer_x;
|
||||
double current_pointer_y;
|
||||
void (Editor::*motion_callback)(GnomeCanvasItem*, GdkEvent*);
|
||||
void (Editor::*finished_callback)(GnomeCanvasItem*, GdkEvent*);
|
||||
void (Editor::*motion_callback)(Gnome::Canvas::Item*, GdkEvent*);
|
||||
void (Editor::*finished_callback)(Gnome::Canvas::Item*, GdkEvent*);
|
||||
TimeAxisView* last_trackview;
|
||||
bool x_constrained;
|
||||
bool copy;
|
||||
|
|
@ -1086,56 +1086,56 @@ class Editor : public PublicEditor
|
|||
LineDragInfo current_line_drag_info;
|
||||
|
||||
void start_grab (GdkEvent*, Gdk::Cursor* cursor = 0);
|
||||
bool end_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
bool end_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
Gtk::Menu fade_context_menu;
|
||||
void popup_fade_context_menu (int, int, GnomeCanvasItem*, ItemType);
|
||||
void popup_fade_context_menu (int, int, Gnome::Canvas::Item*, ItemType);
|
||||
|
||||
void start_fade_in_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_fade_out_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void fade_in_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void fade_out_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void fade_in_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void fade_out_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_fade_in_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_fade_out_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void fade_in_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void fade_out_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void fade_in_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void fade_out_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
std::set<ARDOUR::Playlist*> motion_frozen_playlists;
|
||||
void region_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void region_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void region_copy_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void region_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void region_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void region_copy_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
void cursor_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void cursor_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void control_point_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void control_point_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void line_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void line_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void cursor_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void cursor_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void marker_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void marker_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void control_point_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void control_point_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void line_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void line_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
void tempo_marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void tempo_marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void meter_marker_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void meter_marker_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void tempo_marker_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void tempo_marker_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void meter_marker_drag_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void meter_marker_drag_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
gint mouse_rename_region (GnomeCanvasItem*, GdkEvent*);
|
||||
gint mouse_rename_region (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
void start_region_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_region_copy_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_region_brush_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_selection_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_cursor_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_marker_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_control_point_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_line_grab_from_regionview (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_line_grab_from_line (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_region_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_region_copy_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_region_brush_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_selection_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_cursor_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_marker_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_control_point_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_line_grab_from_regionview (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_line_grab_from_line (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_line_grab (AutomationLine *, GdkEvent*);
|
||||
void start_tempo_marker_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_meter_marker_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_tempo_marker_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_meter_marker_grab (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
void region_view_item_click (AudioRegionView&, GdkEventButton*);
|
||||
|
||||
void remove_gain_control_point (GnomeCanvasItem*, GdkEvent*);
|
||||
void remove_control_point (GnomeCanvasItem*, GdkEvent*);
|
||||
void remove_gain_control_point (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void remove_control_point (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
void mouse_brush_insert_region (AudioRegionView*, jack_nframes_t pos);
|
||||
void brush (jack_nframes_t);
|
||||
|
|
@ -1258,12 +1258,12 @@ class Editor : public PublicEditor
|
|||
|
||||
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
|
||||
|
||||
typedef vector<GnomeCanvasItem*> TimeLineList;
|
||||
typedef vector<Gnome::Canvas::Line*> TimeLineList;
|
||||
TimeLineList free_measure_lines;
|
||||
TimeLineList used_measure_lines;
|
||||
|
||||
Gnome::Canvas::Group* time_line_group;
|
||||
GnomeCanvasItem* get_time_line ();
|
||||
Gnome::Canvas::Line* get_time_line ();
|
||||
void hide_measures ();
|
||||
void draw_measures ();
|
||||
void draw_time_bars ();
|
||||
|
|
@ -1273,15 +1273,15 @@ class Editor : public PublicEditor
|
|||
void mouse_add_new_tempo_event (jack_nframes_t where);
|
||||
void mouse_add_new_meter_event (jack_nframes_t where);
|
||||
|
||||
void remove_tempo_marker (GnomeCanvasItem*);
|
||||
void remove_meter_marker (GnomeCanvasItem*);
|
||||
void remove_tempo_marker (Gnome::Canvas::Item*);
|
||||
void remove_meter_marker (Gnome::Canvas::Item*);
|
||||
gint real_remove_tempo_marker (ARDOUR::TempoSection*);
|
||||
gint real_remove_meter_marker (ARDOUR::MeterSection*);
|
||||
|
||||
void edit_tempo_section (ARDOUR::TempoSection*);
|
||||
void edit_meter_section (ARDOUR::MeterSection*);
|
||||
void edit_tempo_marker (GnomeCanvasItem*);
|
||||
void edit_meter_marker (GnomeCanvasItem*);
|
||||
void edit_tempo_marker (Gnome::Canvas::Item*);
|
||||
void edit_meter_marker (Gnome::Canvas::Item*);
|
||||
|
||||
void marker_menu_edit ();
|
||||
void marker_menu_remove ();
|
||||
|
|
@ -1297,10 +1297,10 @@ class Editor : public PublicEditor
|
|||
void update_loop_range_view (bool visibility=false);
|
||||
void update_punch_range_view (bool visibility=false);
|
||||
gint new_transport_marker_menu_popdown (GdkEventAny*);
|
||||
void marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
|
||||
void tm_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
|
||||
void transport_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
|
||||
void new_transport_marker_context_menu (GdkEventButton*, GnomeCanvasItem*);
|
||||
void marker_context_menu (GdkEventButton*, Gnome::Canvas::Item*);
|
||||
void tm_marker_context_menu (GdkEventButton*, Gnome::Canvas::Item*);
|
||||
void transport_marker_context_menu (GdkEventButton*, Gnome::Canvas::Item*);
|
||||
void new_transport_marker_context_menu (GdkEventButton*, Gnome::Canvas::Item*);
|
||||
void build_marker_menu ();
|
||||
void build_tm_marker_menu ();
|
||||
void build_transport_marker_menu ();
|
||||
|
|
@ -1310,7 +1310,7 @@ class Editor : public PublicEditor
|
|||
Gtk::Menu* marker_menu;
|
||||
Gtk::Menu* transport_marker_menu;
|
||||
Gtk::Menu* new_transport_marker_menu;
|
||||
GnomeCanvasItem* marker_menu_item;
|
||||
Gnome::Canvas::Item* marker_menu_item;
|
||||
|
||||
typedef list<Marker*> Marks;
|
||||
Marks metric_marks;
|
||||
|
|
@ -1424,9 +1424,9 @@ class Editor : public PublicEditor
|
|||
SelectionMove
|
||||
} selection_op;
|
||||
|
||||
void start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp);
|
||||
void drag_selection (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_selection_op (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void start_selection_op (Gnome::Canvas::Item* item, GdkEvent* event, SelectionOp);
|
||||
void drag_selection (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void end_selection_op (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void cancel_selection ();
|
||||
|
||||
void region_selection_op (void (ARDOUR::Region::*pmf)(void));
|
||||
|
|
@ -1445,28 +1445,27 @@ class Editor : public PublicEditor
|
|||
CreateTransportMarker
|
||||
} range_marker_op;
|
||||
|
||||
void start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeMarkerOp);
|
||||
void drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void start_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event, RangeMarkerOp);
|
||||
void drag_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void end_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
|
||||
|
||||
Gnome::Canvas::Item* range_bar_drag_rect;
|
||||
Gnome::Canvas::Item* transport_bar_drag_rect;
|
||||
Gnome::Canvas::Item* marker_drag_line;
|
||||
Gnome::Canvas::Points marker_drag_line_points;
|
||||
Gnome::Canvas::Item* range_marker_drag_rect;
|
||||
Gnome::Canvas::SimpleRect* range_bar_drag_rect;
|
||||
Gnome::Canvas::SimpleRect* transport_bar_drag_rect;
|
||||
Gnome::Canvas::Line* marker_drag_line;
|
||||
Gnome::Canvas::Points* marker_drag_line_points;
|
||||
Gnome::Canvas::SimpleRect* range_marker_drag_rect;
|
||||
|
||||
void update_marker_drag_item (ARDOUR::Location *);
|
||||
|
||||
GnomeCanvasItem *transport_bar_range_rect;
|
||||
GnomeCanvasItem *transport_bar_preroll_rect;
|
||||
GnomeCanvasItem *transport_bar_postroll_rect;
|
||||
Gnome::Canvas::Item *transport_loop_range_rect;
|
||||
Gnome::Canvas::Item *transport_punch_range_rect;
|
||||
Gnome::Canvas::Item *transport_punchin_line;
|
||||
Gnome::Canvas::Item *transport_punchout_line;
|
||||
GnomeCanvasItem *transport_preroll_rect;
|
||||
GnomeCanvasItem *transport_postroll_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_bar_range_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_bar_preroll_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_bar_postroll_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_loop_range_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_punch_range_rect;
|
||||
Gnome::Canvas::Line *transport_punchin_line;
|
||||
Gnome::Canvas::Line *transport_punchout_line;
|
||||
Gnome::Canvas::SimpleRect *transport_preroll_rect;
|
||||
Gnome::Canvas::SimpleRect *transport_postroll_rect;
|
||||
|
||||
ARDOUR::Location* transport_loop_location();
|
||||
ARDOUR::Location* transport_punch_location();
|
||||
|
|
@ -1475,9 +1474,9 @@ class Editor : public PublicEditor
|
|||
|
||||
/* object rubberband select process */
|
||||
|
||||
void start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void start_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void drag_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void end_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
|
||||
bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
|
||||
|
||||
|
|
@ -1485,9 +1484,9 @@ class Editor : public PublicEditor
|
|||
|
||||
/* mouse zoom process */
|
||||
|
||||
void start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void start_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void drag_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
void end_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event);
|
||||
|
||||
Gnome::Canvas::Item *zoom_rect;
|
||||
void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
|
||||
|
|
@ -1584,14 +1583,14 @@ class Editor : public PublicEditor
|
|||
ContentsTrim,
|
||||
} trim_op;
|
||||
|
||||
void start_trim (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_trim (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void point_trim (GdkEvent*);
|
||||
void trim_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void trim_motion_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void single_contents_trim (AudioRegionView&, jack_nframes_t, bool, bool, bool);
|
||||
void single_start_trim (AudioRegionView&, jack_nframes_t, bool, bool);
|
||||
void single_end_trim (AudioRegionView&, jack_nframes_t, bool, bool);
|
||||
|
||||
void trim_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void trim_finished_callback (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void thaw_region_after_trim (AudioRegionView& rv);
|
||||
|
||||
void trim_region_to_edit_cursor ();
|
||||
|
|
@ -1700,9 +1699,9 @@ class Editor : public PublicEditor
|
|||
|
||||
jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
|
||||
|
||||
void time_fx_motion (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_time_fx (GnomeCanvasItem*, GdkEvent*);
|
||||
void end_time_fx (GnomeCanvasItem*, GdkEvent*);
|
||||
void time_fx_motion (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void start_time_fx (Gnome::Canvas::Item*, GdkEvent*);
|
||||
void end_time_fx (Gnome::Canvas::Item*, GdkEvent*);
|
||||
|
||||
struct TimeStretchDialog : public ArdourDialog {
|
||||
ARDOUR::Session::TimeStretchRequest request;
|
||||
|
|
@ -1760,39 +1759,39 @@ class Editor : public PublicEditor
|
|||
void handle_new_imageframe_time_axis_view(std::string track_name, void* src) ;
|
||||
void handle_new_imageframe_marker_time_axis_view(std::string track_name, TimeAxisView* marked_track) ;
|
||||
|
||||
void start_imageframe_grab(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void start_markerview_grab(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void start_imageframe_grab(Gnome::Canvas::Item*, GdkEvent*) ;
|
||||
void start_markerview_grab(Gnome::Canvas::Item*, GdkEvent*) ;
|
||||
|
||||
void imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent*) ;
|
||||
void markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent*) ;
|
||||
void timeaxis_item_drag_finished_callback(Gnome::Canvas::Item*, GdkEvent*) ;
|
||||
|
||||
gint canvas_imageframe_item_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
|
||||
gint canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_item_view_event(Gnome::Canvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_view_event(Gnome::Canvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
|
||||
gint canvas_imageframe_start_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_end_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
|
||||
gint canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, MarkerTimeAxis* mta);
|
||||
gint canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_marker_time_axis_view_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerTimeAxis* mta);
|
||||
gint canvas_markerview_item_view_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_start_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_end_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerView* mv);
|
||||
|
||||
void imageframe_start_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
|
||||
void markerview_item_start_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_item_end_handle_op(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_item_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void markerview_item_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) ;
|
||||
|
||||
void popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_frame) ;
|
||||
void popup_marker_time_axis_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_frame) ;
|
||||
void popup_imageframe_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_frame) ;
|
||||
void popup_marker_time_axis_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_frame) ;
|
||||
|
||||
ImageFrameSocketHandler* image_socket_listener ;
|
||||
/* </CMT Additions> */
|
||||
|
|
|
|||
|
|
@ -990,7 +990,7 @@ Editor::canvas_zoom_rect_event (GnomeCanvasItem *item, GdkEvent *event)
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_copy_region_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_copy_region_event (GnomeCanvasItem *item GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, RegionItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,13 +33,16 @@ using namespace Gtk;
|
|||
Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)(GdkEvent*))
|
||||
: editor (ed), length(1.0)
|
||||
{
|
||||
|
||||
/* "randomly" initialize coords */
|
||||
|
||||
points.push_back (Gnome::Art::Point (-9383839.0, 0.0));
|
||||
points.push_back (Gnome::Art::Point (1.0, 0.0));
|
||||
points->push_back(Gnome::Art::Point(-9383839.0, 0.0));
|
||||
points->push_back(Gnome::Art::Point(1.0, 0.0));
|
||||
Gnome::Canvas::Group *group = editor.cursor_group;
|
||||
|
||||
canvas_item = new Gnome::Canvas::Line (editor.cursor_group);
|
||||
canvas_item->set_property ("points", points.gobj());
|
||||
// cerr << "set cursor points, nc = " << points->num_points << endl;
|
||||
|
||||
canvas_item = new Gnome::Canvas::Line (*group, *points);
|
||||
canvas_item->set_property ("fill_color", color.c_str());
|
||||
canvas_item->set_property ("width_pixels", 1);
|
||||
canvas_item->set_property ("first_arrowhead", (gboolean) TRUE);
|
||||
|
|
@ -48,8 +51,10 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)
|
|||
canvas_item->set_property ("arrow_shape_b", 0.0);
|
||||
canvas_item->set_property ("arrow_shape_c", 9.0);
|
||||
|
||||
// cerr << "cursor line @ " << canvas_item << endl;
|
||||
|
||||
canvas_item->set_data ("cursor", this);
|
||||
canvas_item->signal_event().connect (slot (ed, callback));
|
||||
canvas_item->signal_event().connect (mem_fun (ed, callbck));
|
||||
|
||||
current_frame = 1; /* force redraw at 0 */
|
||||
}
|
||||
|
|
@ -57,8 +62,8 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)
|
|||
Editor::Cursor::~Cursor ()
|
||||
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT(canvas_item));
|
||||
gnome_canvas_points_unref (points);
|
||||
gtk_object_destroy (GTK_OBJECT(canvas_item));
|
||||
gnome_canvas_points_unref (points->gobj());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -67,43 +72,43 @@ Editor::Cursor::set_position (jack_nframes_t frame)
|
|||
double new_pos = editor.frame_to_unit (frame);
|
||||
|
||||
if (editor.session == 0) {
|
||||
gnome_canvas_item_hide (canvas_item);
|
||||
canvas_item->hide();
|
||||
} else {
|
||||
gnome_canvas_item_show (canvas_item);
|
||||
canvas_item->show();
|
||||
}
|
||||
|
||||
current_frame = frame;
|
||||
|
||||
if (new_pos == points->coords[0]) {
|
||||
if (new_pos == points->front().get_x()) {
|
||||
|
||||
/* change in position is not visible, so just raise it */
|
||||
|
||||
gnome_canvas_item_raise_to_top (canvas_item);
|
||||
canvas_item->raise_to_top();
|
||||
return;
|
||||
}
|
||||
|
||||
points->coords[0] = new_pos;
|
||||
points->coords[2] = new_pos;
|
||||
points->front().set_x(new_pos);
|
||||
points->back().set_x(new_pos);
|
||||
|
||||
// cerr << "set cursor2 al points, nc = " << points->num_points << endl;
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
gnome_canvas_item_raise_to_top (canvas_item);
|
||||
canvas_item->set_property ("points", points);
|
||||
canvas_item->raise_to_top();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::Cursor::set_length (double units)
|
||||
{
|
||||
length = units;
|
||||
points->coords[3] = points->coords[1] + length;
|
||||
points->back().set_x (points->front().get_y() + length);
|
||||
// cerr << "set cursor3 al points, nc = " << points->num_points << endl;
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
canvas_item->set_property("points", points);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::Cursor::set_y_axis (double position)
|
||||
{
|
||||
points->coords[1] = position;
|
||||
points->coords[3] = position + length;
|
||||
points->front().set_y (position);
|
||||
points->back().set_x (position + length);
|
||||
// cerr << "set cursor4 al points, nc = " << points->num_points << endl;
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
canvas_item->set_property("points", points);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ Editor::add_imageframe_marker_time_axis(std::string track_name, TimeAxisView* ma
|
|||
}
|
||||
|
||||
void
|
||||
Editor::popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_item)
|
||||
Editor::popup_imageframe_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_item)
|
||||
{
|
||||
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ Editor::popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* if
|
|||
}
|
||||
|
||||
void
|
||||
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_item)
|
||||
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_item)
|
||||
{
|
||||
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ;
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ Editor::get_named_time_axis(std::string name)
|
|||
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_imageframe_start_handle_event(Gnome::Canvas::Item *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
ImageFrameView* ifv = (ImageFrameView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
|
|
@ -166,7 +166,7 @@ Editor::_canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *e
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_imageframe_end_handle_event(Gnome::Canvas::Item *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
ImageFrameView* ifv = (ImageFrameView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
|
|
@ -175,7 +175,7 @@ Editor::_canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *eve
|
|||
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_imageframe_item_view_event(Gnome::Canvas::Item *item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
ImageFrameView *ifv = (ImageFrameView *) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifv->get_time_axis_view().editor);
|
||||
|
|
@ -183,7 +183,7 @@ Editor::_canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* even
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_imageframe_view_event(Gnome::Canvas::Item *item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
ImageFrameTimeAxis *ifta = (ImageFrameTimeAxis*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&ifta->editor);
|
||||
|
|
@ -191,7 +191,7 @@ Editor::_canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gp
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_marker_time_axis_view_event(Gnome::Canvas::Item* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
MarkerTimeAxis* mta = (MarkerTimeAxis*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mta->editor);
|
||||
|
|
@ -199,7 +199,7 @@ Editor::_canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* eve
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_item_view_event(Gnome::Canvas::Item *item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
MarkerView* mv = (MarkerView*) data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
|
|
@ -207,7 +207,7 @@ Editor::_canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* even
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_start_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
MarkerView* mv = (MarkerView*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
|
|
@ -215,7 +215,7 @@ Editor::_canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* e
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_end_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
MarkerView* mv = (MarkerView*)data ;
|
||||
Editor* editor = dynamic_cast<Editor*> (&mv->get_time_axis_view().editor);
|
||||
|
|
@ -228,7 +228,7 @@ Editor::_canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* eve
|
|||
*/
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_item_view_event(Gnome::Canvas::Item *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
|
|
@ -256,7 +256,7 @@ Editor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent *event
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_start_handle_event(Gnome::Canvas::Item *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
|
|
@ -291,7 +291,7 @@ Editor::canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *ev
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_end_handle_event(Gnome::Canvas::Item *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
|
|
@ -326,7 +326,7 @@ Editor::canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *even
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
|
||||
Editor::canvas_imageframe_view_event(Gnome::Canvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
|
|
@ -349,7 +349,7 @@ Editor::canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, Ima
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_marker_time_axis_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerTimeAxis* mta)
|
||||
Editor::canvas_marker_time_axis_view_event(Gnome::Canvas::Item *item, GdkEvent* event, MarkerTimeAxis* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
|
|
@ -372,7 +372,7 @@ Editor::canvas_marker_time_axis_view_event(GnomeCanvasItem *item, GdkEvent* even
|
|||
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_item_view_event(Gnome::Canvas::Item *item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
|
|
@ -397,7 +397,7 @@ Editor::canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_start_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
|
|
@ -428,7 +428,7 @@ Editor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* ev
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_end_handle_event(Gnome::Canvas::Item* item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
|
|
@ -473,7 +473,7 @@ Editor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* even
|
|||
/* <CMT Additions file="editor_mouse.cc"> */
|
||||
|
||||
void
|
||||
Editor::start_imageframe_grab(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_imageframe_grab(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ;
|
||||
drag_info.copy = false ;
|
||||
|
|
@ -506,7 +506,7 @@ Editor::start_imageframe_grab(GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::start_markerview_grab(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_markerview_grab(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ;
|
||||
drag_info.copy = false ;
|
||||
|
|
@ -539,7 +539,7 @@ Editor::start_markerview_grab(GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
Editor::markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event)
|
||||
{
|
||||
double cx, cy ;
|
||||
|
||||
|
|
@ -586,7 +586,7 @@ Editor::markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
Editor::imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event)
|
||||
{
|
||||
double cx, cy ;
|
||||
|
||||
|
|
@ -625,7 +625,7 @@ Editor::imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
Editor::timeaxis_item_drag_finished_callback(Gnome::Canvas::Item*, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where ;
|
||||
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
|
||||
|
|
@ -663,7 +663,7 @@ Editor::timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
// get the selected item from the parent time axis
|
||||
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
|
||||
|
|
@ -693,7 +693,7 @@ Editor::imageframe_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
// get the selected item from the parent time axis
|
||||
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
|
||||
|
|
@ -725,7 +725,7 @@ Editor::imageframe_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
|
||||
|
||||
|
|
@ -796,7 +796,7 @@ Editor::imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* eve
|
|||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
|
|
@ -816,7 +816,7 @@ Editor::imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
|
|
@ -875,7 +875,7 @@ Editor::imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event
|
|||
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
|
|
@ -897,7 +897,7 @@ Editor::imageframe_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::markerview_item_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_item_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
|
||||
|
||||
|
|
@ -922,7 +922,7 @@ Editor::markerview_item_start_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::markerview_item_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_item_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
|
||||
if (mv == 0)
|
||||
|
|
@ -947,7 +947,7 @@ Editor::markerview_item_end_handle_op(GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
|
|
@ -1021,7 +1021,7 @@ Editor::markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* eve
|
|||
}
|
||||
|
||||
void
|
||||
Editor::markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
|
|
@ -1041,7 +1041,7 @@ Editor::markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
|
|
@ -1117,7 +1117,7 @@ Editor::markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event
|
|||
|
||||
|
||||
void
|
||||
Editor::markerview_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,16 +30,14 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
|
|||
gint x, y;
|
||||
double dx, dy;
|
||||
GdkEvent ev;
|
||||
GdkModifierType mask;
|
||||
Gdk::ModifierType mask;
|
||||
Glib::RefPtr<Gdk::Window> evw = track_canvas.get_window()->get_pointer (x, y, mask);
|
||||
bool doit = false;
|
||||
|
||||
/* get the pointer location */
|
||||
|
||||
RefPtr<GdkWindow> notused (track_canvas.get_window()->get_pointer (x, y, mask));
|
||||
|
||||
if (use_track_canvas && (track_canvas_event_box.get_window()->get_pointer (x, y, mask) != 0)) {
|
||||
if (use_track_canvas && track_canvas_event_box.get_window()->get_pointer(x, y, mask) != 0) {
|
||||
doit = true;
|
||||
} else if (use_time_canvas && (time_canvas_event_box.get_window()->get_pointer (x, y, mask)) != 0) {
|
||||
|
||||
} else if (use_time_canvas && time_canvas_event_box.get_window()->get_pointer(x, y, mask)!= 0) {
|
||||
doit = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,30 +69,30 @@ Editor::add_new_location (Location *location)
|
|||
}
|
||||
|
||||
if (location->is_mark()) {
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(marker_group), color,
|
||||
lam->start = new Marker (*this, *marker_group, color,
|
||||
location->name(), Marker::Mark, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = 0;
|
||||
|
||||
} else if (location->is_auto_loop()) {
|
||||
// transport marker
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->start = new Marker (*this, *transport_marker_group, color,
|
||||
location->name(), Marker::LoopStart, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->end = new Marker (*this, *transport_marker_group, color,
|
||||
location->name(), Marker::LoopEnd, PublicEditor::canvas_marker_event, location->end());
|
||||
|
||||
} else if (location->is_auto_punch()) {
|
||||
// transport marker
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->start = new Marker (*this, *transport_marker_group, color,
|
||||
location->name(), Marker::PunchIn, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->end = new Marker (*this, *transport_marker_group, color,
|
||||
location->name(), Marker::PunchOut, PublicEditor::canvas_marker_event, location->end());
|
||||
|
||||
} else {
|
||||
|
||||
// range marker
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color,
|
||||
lam->start = new Marker (*this, *range_marker_group, color,
|
||||
location->name(), Marker::Start, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color,
|
||||
lam->end = new Marker (*this, *range_marker_group, color,
|
||||
location->name(), Marker::End, PublicEditor::canvas_marker_event, location->end());
|
||||
}
|
||||
|
||||
|
|
@ -293,12 +293,12 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::remove_marker (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::remove_marker (Gnome::Canvas::Item& item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
bool is_start;
|
||||
|
||||
if ((marker = static_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = item.get_data ("marker")) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ Editor::location_gone (Location *location)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::tm_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
Editor::tm_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
|
||||
{
|
||||
if (tm_marker_menu == 0) {
|
||||
build_tm_marker_menu ();
|
||||
|
|
@ -369,7 +369,7 @@ Editor::tm_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
|||
|
||||
|
||||
void
|
||||
Editor::marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
Editor::marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
|
||||
{
|
||||
Marker * marker;
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
|
|
@ -412,7 +412,7 @@ Editor::marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
|||
|
||||
|
||||
void
|
||||
Editor::new_transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
Editor::new_transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
|
||||
{
|
||||
if (new_transport_marker_menu == 0) {
|
||||
build_new_transport_marker_menu ();
|
||||
|
|
@ -423,7 +423,7 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem*
|
|||
}
|
||||
|
||||
void
|
||||
Editor::transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
Editor::transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
|
||||
{
|
||||
if (transport_marker_menu == 0) {
|
||||
build_transport_marker_menu ();
|
||||
|
|
@ -706,7 +706,7 @@ Editor::marker_menu_remove ()
|
|||
} else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
|
||||
remove_tempo_marker (marker_menu_item);
|
||||
} else {
|
||||
remove_marker (marker_menu_item, (GdkEvent*) 0);
|
||||
remove_marker (*marker_menu_item, (GdkEvent*) 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@ Editor::update_current_screen ()
|
|||
|
||||
if (_follow_playhead) {
|
||||
|
||||
gnome_canvas_item_show (playhead_cursor->canvas_item);
|
||||
|
||||
playhead_cursor->canvas_item->show();
|
||||
if (frame != last_update_frame) {
|
||||
|
||||
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
|
||||
|
|
@ -185,7 +184,7 @@ Editor::update_current_screen ()
|
|||
|
||||
if (frame != last_update_frame) {
|
||||
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
|
||||
gnome_canvas_item_hide (playhead_cursor->canvas_item);
|
||||
playhead_cursor->canvas_item->hide();
|
||||
} else {
|
||||
playhead_cursor->set_position (frame);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ Editor::step_mouse_mode (bool next)
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::button_press_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType i
|
|||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
|
||||
if (drag_info.item) {
|
||||
gnome_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
drag_info.item->ungrab (event->button.time);
|
||||
}
|
||||
|
||||
/* single mouse clicks on any of these item types operate
|
||||
|
|
@ -781,7 +781,7 @@ Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType i
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::button_release_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
|
|
@ -926,7 +926,9 @@ Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType
|
|||
break;
|
||||
|
||||
case MarkerItem:
|
||||
remove_marker (item, event);
|
||||
|
||||
remove_marker (*item, event);
|
||||
|
||||
break;
|
||||
|
||||
case RegionItem:
|
||||
|
|
@ -1114,7 +1116,7 @@ Editor::maybe_autoscroll (GdkEvent* event)
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::enter_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
ControlPoint* cp;
|
||||
Marker * marker;
|
||||
|
|
@ -1129,7 +1131,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
double at_x, at_y;
|
||||
at_x = cp->get_x();
|
||||
at_y = cp->get_y ();
|
||||
gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
cp->item->i2w (at_x, at_y);
|
||||
at_x += 20.0;
|
||||
at_y += 20.0;
|
||||
|
||||
|
|
@ -1153,7 +1155,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
double at_x, at_y;
|
||||
at_x = cp->get_x();
|
||||
at_y = cp->get_y ();
|
||||
gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
cp->item->i2w (at_x, at_y);
|
||||
at_x += 20.0;
|
||||
at_y += 20.0;
|
||||
|
||||
|
|
@ -1169,7 +1171,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
|
||||
case GainLineItem:
|
||||
if (mouse_mode == MouseGain) {
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
|
||||
item->set_property ("fill_color_rgba", color_map[cEnteredGainLine]);
|
||||
if (is_drawable()) {
|
||||
track_canvas_scroller.get_window()->set_cursor (*fader_cursor);
|
||||
}
|
||||
|
|
@ -1179,7 +1181,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
|
||||
item->set_property ("fill_color_rgba", color_map[cEnteredAutomationLine]);
|
||||
if (is_drawable()) {
|
||||
track_canvas_scroller.get_window()->set_cursor (*fader_cursor);
|
||||
}
|
||||
|
|
@ -1274,7 +1276,8 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case FadeInHandleItem:
|
||||
case FadeOutHandleItem:
|
||||
if (mouse_mode == MouseObject) {
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", 0, "outline_pixels", 1, NULL);
|
||||
item->set_property ("fill_color_rgba", 0);
|
||||
item->set_property ("outline_pixels", 1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1311,7 +1314,7 @@ Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::leave_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
AutomationLine* al;
|
||||
ControlPoint* cp;
|
||||
|
|
@ -1360,7 +1363,7 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case RedirectAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
|
||||
item->set_property ("fill_color_rgba", al->get_line_color());
|
||||
if (is_drawable()) {
|
||||
track_canvas_scroller.get_window()->set_cursor (*current_canvas_cursor);
|
||||
}
|
||||
|
|
@ -1404,7 +1407,8 @@ Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_typ
|
|||
case FadeInHandleItem:
|
||||
case FadeOutHandleItem:
|
||||
rv = static_cast<AudioRegionView*>(gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", rv->get_fill_color(), "outline_pixels", 0, NULL);
|
||||
item->set_property ("fill_color_rgba", rv->get_fill_color());
|
||||
item->set_property ("outline_pixels", 0);
|
||||
break;
|
||||
|
||||
case AutomationTrackItem:
|
||||
|
|
@ -1433,7 +1437,7 @@ Editor::left_automation_track ()
|
|||
}
|
||||
|
||||
gint
|
||||
Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::motion_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
|
|
@ -1506,8 +1510,8 @@ Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_ty
|
|||
case MarkerViewHandleStartItem:
|
||||
case MarkerViewHandleEndItem:
|
||||
/* </CMT Additions> */
|
||||
if (drag_info.item && (event->motion.state & GDK_BUTTON1_MASK ||
|
||||
(event->motion.state & GDK_BUTTON2_MASK))) {
|
||||
if (drag_info.item && (event->motion.state & Gdk::BUTTON1_MASK ||
|
||||
(event->motion.state & Gdk::BUTTON2_MASK))) {
|
||||
maybe_autoscroll (event);
|
||||
(this->*(drag_info.motion_callback)) (item, event);
|
||||
goto handled;
|
||||
|
|
@ -1579,13 +1583,9 @@ Editor::start_grab (GdkEvent* event, Gdk::Cursor *cursor)
|
|||
drag_info.brushing = false;
|
||||
drag_info.copied_location = 0;
|
||||
|
||||
gnome_canvas_item_grab (drag_info.item,
|
||||
Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
|
||||
cursor->gobj(),
|
||||
event->button.time);
|
||||
//drag_info.item->grab (Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
|
||||
// cursor,
|
||||
// event->button.time);
|
||||
drag_info.item->grab (Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
|
||||
*cursor,
|
||||
event->button.time);
|
||||
|
||||
if (session && session->transport_rolling()) {
|
||||
drag_info.was_rolling = true;
|
||||
|
|
@ -1606,7 +1606,7 @@ Editor::start_grab (GdkEvent* event, Gdk::Cursor *cursor)
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::end_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
bool did_drag = false;
|
||||
|
||||
|
|
@ -1616,7 +1616,7 @@ Editor::end_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
return false;
|
||||
}
|
||||
|
||||
gnome_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
drag_info.item->ungrab (event->button.time);
|
||||
|
||||
if (drag_info.finished_callback) {
|
||||
(this->*(drag_info.finished_callback)) (item, event);
|
||||
|
|
@ -1675,7 +1675,7 @@ Editor::set_playhead_cursor (GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_fade_in_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_fade_in_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::fade_in_drag_motion_callback;
|
||||
|
|
@ -1694,7 +1694,7 @@ Editor::start_fade_in_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::fade_in_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_in_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
|
|
@ -1727,7 +1727,7 @@ Editor::fade_in_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::fade_in_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_in_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
|
|
@ -1765,7 +1765,7 @@ Editor::fade_in_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_fade_out_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_fade_out_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::fade_out_drag_motion_callback;
|
||||
|
|
@ -1784,7 +1784,7 @@ Editor::start_fade_out_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::fade_out_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_out_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
|
|
@ -1819,7 +1819,7 @@ Editor::fade_out_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::fade_out_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_out_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
|
|
@ -1858,7 +1858,7 @@ Editor::fade_out_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_cursor_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_cursor_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::cursor_drag_motion_callback;
|
||||
|
|
@ -1885,7 +1885,7 @@ Editor::start_cursor_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::cursor_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::cursor_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Cursor* cursor = (Cursor *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
|
|
@ -1918,7 +1918,7 @@ Editor::cursor_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::cursor_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::cursor_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
|
|
@ -1941,9 +1941,9 @@ Editor::update_marker_drag_item (Location *location)
|
|||
double x2 = frame_to_pixel (location->end());
|
||||
|
||||
if (location->is_mark()) {
|
||||
marker_drag_line_points[0].set_x (x1);
|
||||
marker_drag_line_points[1].set_x (x1);
|
||||
marker_drag_line->set_property ("points", marker_drag_line_points.gobj());
|
||||
marker_drag_line_points->front().set_x(x1);
|
||||
marker_drag_line_points->back().set_x(x1);
|
||||
marker_drag_line->set_property ("points", marker_drag_line_points);
|
||||
}
|
||||
else {
|
||||
range_marker_drag_rect->set_property ("x1", x1);
|
||||
|
|
@ -1952,7 +1952,7 @@ Editor::update_marker_drag_item (Location *location)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
|
||||
|
|
@ -1991,7 +1991,7 @@ Editor::start_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t f_delta;
|
||||
Marker* marker = (Marker *) drag_info.data;
|
||||
|
|
@ -2070,7 +2070,7 @@ Editor::marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) {
|
||||
marker_drag_motion_callback (item, event);
|
||||
|
|
@ -2089,7 +2089,7 @@ Editor::marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_meter_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_meter_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
|
@ -2120,7 +2120,7 @@ Editor::start_meter_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::meter_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::meter_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
MeterMarker* marker = (MeterMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
|
|
@ -2148,7 +2148,7 @@ Editor::meter_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* even
|
|||
}
|
||||
|
||||
void
|
||||
Editor::meter_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::meter_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
|
|
@ -2168,7 +2168,7 @@ Editor::meter_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* ev
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_tempo_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_tempo_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
|
@ -2201,7 +2201,7 @@ Editor::start_tempo_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::tempo_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::tempo_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
TempoMarker* marker = (TempoMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
|
|
@ -2230,7 +2230,7 @@ Editor::tempo_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* even
|
|||
}
|
||||
|
||||
void
|
||||
Editor::tempo_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::tempo_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
|
|
@ -2250,7 +2250,7 @@ Editor::tempo_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* ev
|
|||
}
|
||||
|
||||
void
|
||||
Editor::remove_gain_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
||||
Editor::remove_gain_control_point (Gnome::Canvas::Item*item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
|
|
@ -2269,7 +2269,7 @@ Editor::remove_gain_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::remove_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
||||
Editor::remove_control_point (Gnome::Canvas::Item*item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
|
|
@ -2282,7 +2282,7 @@ Editor::remove_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_control_point_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_control_point_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
|
|
@ -2308,7 +2308,7 @@ Editor::start_control_point_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::control_point_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::control_point_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
|
||||
|
||||
|
|
@ -2331,7 +2331,7 @@ Editor::control_point_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* eve
|
|||
|
||||
}
|
||||
|
||||
gnome_canvas_item_w2i (cp->line.parent_group(), &cx, &cy);
|
||||
cp->line.parent_group()->w2i (cx, cy);
|
||||
|
||||
cx = max (0.0, cx);
|
||||
cy = max (0.0, cy);
|
||||
|
|
@ -2360,7 +2360,7 @@ Editor::control_point_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* eve
|
|||
}
|
||||
|
||||
void
|
||||
Editor::control_point_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::control_point_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
|
||||
control_point_drag_motion_callback (item, event);
|
||||
|
|
@ -2368,7 +2368,7 @@ Editor::control_point_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* e
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_line_grab_from_regionview (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_line_grab_from_regionview (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
switch (mouse_mode) {
|
||||
case MouseGain:
|
||||
|
|
@ -2380,7 +2380,7 @@ Editor::start_line_grab_from_regionview (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_line_grab_from_line (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_line_grab_from_line (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AutomationLine* al;
|
||||
|
||||
|
|
@ -2405,7 +2405,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
|
|||
|
||||
cx = event->button.x;
|
||||
cy = event->button.y;
|
||||
gnome_canvas_item_w2i (line->parent_group(), &cx, &cy);
|
||||
line->parent_group()->w2i (cx, cy);
|
||||
frame_within_region = (jack_nframes_t) floor (cx * frames_per_unit);
|
||||
|
||||
if (!line->control_points_adjacent (frame_within_region, current_line_drag_info.before,
|
||||
|
|
@ -2431,13 +2431,13 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::line_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::line_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
|
||||
double cx = drag_info.current_pointer_x;
|
||||
double cy = drag_info.current_pointer_y;
|
||||
|
||||
gnome_canvas_item_w2i (line->parent_group(), &cx, &cy);
|
||||
line->parent_group()->w2i (cx, cy);
|
||||
|
||||
double fraction;
|
||||
fraction = 1.0 - (cy / line->height());
|
||||
|
|
@ -2456,7 +2456,7 @@ Editor::line_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::line_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::line_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
|
||||
line_drag_motion_callback (item, event);
|
||||
|
|
@ -2464,7 +2464,7 @@ Editor::line_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_region_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
|
|
@ -2498,7 +2498,7 @@ Editor::start_region_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_region_copy_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_copy_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
|
|
@ -2580,7 +2580,7 @@ Editor::start_region_copy_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_region_brush_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_brush_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
|
|
@ -2613,7 +2613,7 @@ Editor::start_region_brush_grab (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::region_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
double x_delta;
|
||||
double y_delta = 0;
|
||||
|
|
@ -2719,8 +2719,8 @@ Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
double ix1, ix2, iy1, iy2;
|
||||
int32_t n = 0;
|
||||
|
||||
gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
rv2->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
rv2->get_canvas_group()->i2w (ix1, iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
|
|
@ -2889,8 +2889,8 @@ Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
*/
|
||||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
rv2->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
rv2->get_canvas_group()->i2w (ix1, iy1);
|
||||
|
||||
if (ix1 <= 1) {
|
||||
x_delta = 0;
|
||||
|
|
@ -2917,8 +2917,8 @@ Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
the parent.
|
||||
*/
|
||||
|
||||
gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
|
||||
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
rv->get_canvas_group()->i2w (ix1, iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* canvas_atv = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
AudioTimeAxisView* temp_atv;
|
||||
|
|
@ -3005,8 +3005,8 @@ Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
on the top, since its parent is the whole canvas.
|
||||
*/
|
||||
|
||||
gnome_canvas_item_raise_to_top (rv->get_canvas_group());
|
||||
gnome_canvas_item_raise_to_top (rv->get_time_axis_view().canvas_display);
|
||||
rv->get_canvas_group()->raise_to_top();
|
||||
rv->get_time_axis_view().canvas_display->raise_to_top();
|
||||
cursor_group->raise_to_top();
|
||||
|
||||
/* freeze the playlists from notifying till
|
||||
|
|
@ -3048,7 +3048,7 @@ Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::region_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where;
|
||||
AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data);
|
||||
|
|
@ -3129,8 +3129,8 @@ Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
(*i)->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
(*i)->get_canvas_group()->i2w (ix1, iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
|
|
@ -3164,8 +3164,8 @@ Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
(*i)->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
(*i)->get_canvas_group()->i2w (ix1, iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
|
|
@ -3212,8 +3212,8 @@ Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
|
||||
rv->get_canvas_frame()->get_bounds (ix1, iy1, ix2, iy2);
|
||||
rv->get_canvas_group()->i2w (ix1, iy1);
|
||||
where = (jack_nframes_t) (unit_to_frame (ix1) * ownspeed);
|
||||
|
||||
} else {
|
||||
|
|
@ -3389,7 +3389,7 @@ Editor::collect_new_region_view (AudioRegionView* rv)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_selection_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_selection_grab (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (clicked_regionview == 0) {
|
||||
return;
|
||||
|
|
@ -3468,7 +3468,7 @@ Editor::cancel_selection ()
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp op)
|
||||
Editor::start_selection_op (Gnome::Canvas::Item* item, GdkEvent* event, SelectionOp op)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
|
|
@ -3523,7 +3523,7 @@ Editor::start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp
|
|||
}
|
||||
|
||||
void
|
||||
Editor::drag_selection (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_selection (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
|
|
@ -3653,7 +3653,7 @@ Editor::drag_selection (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::end_selection_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_selection_op (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
drag_selection (item, event);
|
||||
|
|
@ -3678,7 +3678,7 @@ Editor::end_selection_op (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_trim (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
|
|
@ -3728,7 +3728,7 @@ Editor::start_trim (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::trim_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::trim_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* rv = clicked_regionview;
|
||||
jack_nframes_t frame_delta = 0;
|
||||
|
|
@ -3954,7 +3954,7 @@ Editor::single_end_trim (AudioRegionView& rv, jack_nframes_t frame_delta, bool l
|
|||
}
|
||||
|
||||
void
|
||||
Editor::trim_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::trim_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
trim_motion_callback (item, event);
|
||||
|
|
@ -4066,7 +4066,7 @@ Editor::thaw_region_after_trim (AudioRegionView& rv)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::hide_marker (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::hide_marker (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
bool is_start;
|
||||
|
|
@ -4082,7 +4082,7 @@ Editor::hide_marker (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeMarkerOp op)
|
||||
Editor::start_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event, RangeMarkerOp op)
|
||||
{
|
||||
|
||||
if (session == 0) {
|
||||
|
|
@ -4117,11 +4117,10 @@ Editor::start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeM
|
|||
}
|
||||
|
||||
void
|
||||
Editor::drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
|
||||
Gnome::Canvas::Item* crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
|
|
@ -4191,7 +4190,7 @@ Editor::drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
Location * newloc = 0;
|
||||
|
||||
|
|
@ -4234,7 +4233,7 @@ Editor::end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
void
|
||||
Editor::start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::drag_mouse_zoom;
|
||||
|
|
@ -4246,7 +4245,7 @@ Editor::start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
|
|
@ -4287,7 +4286,7 @@ Editor::drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
drag_mouse_zoom (item, event);
|
||||
|
|
@ -4315,16 +4314,14 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
|
|||
double x2 = frame_to_pixel (end);
|
||||
double y2 = canvas_height - 2;
|
||||
|
||||
gtk_object_set (GTK_OBJECT(zoom_rect),
|
||||
"x1", x1,
|
||||
"y1", 1.0,
|
||||
"x2", x2,
|
||||
"y2", y2,
|
||||
NULL);
|
||||
zoom_rect->set_property ("x1", x1);
|
||||
zoom_rect->set_property ("y1", 1.0);
|
||||
zoom_rect->set_property ("x2", x2);
|
||||
zoom_rect->set_property ("y2", y2);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::drag_rubberband_select;
|
||||
|
|
@ -4336,7 +4333,7 @@ Editor::start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
|
|
@ -4400,7 +4397,7 @@ Editor::drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
|
||||
|
|
@ -4443,7 +4440,7 @@ Editor::end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
|||
|
||||
|
||||
gint
|
||||
Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::mouse_rename_region (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
@ -4452,7 +4449,6 @@ Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
|
|||
prompter.set_prompt (_("Name for region:"));
|
||||
prompter.set_initial_text (clicked_regionview->region.name());
|
||||
prompter.show_all ();
|
||||
prompter.chosen.connect(sigc::ptr_fun(Gtk::Main::quit));
|
||||
switch (prompter.run ()) {
|
||||
case GTK_RESPONSE_ACCEPT:
|
||||
string str;
|
||||
|
|
@ -4467,7 +4463,7 @@ Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::start_time_fx (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_time_fx (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::time_fx_motion;
|
||||
|
|
@ -4479,7 +4475,7 @@ Editor::start_time_fx (GnomeCanvasItem* item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::time_fx_motion (GnomeCanvasItem *item, GdkEvent* event)
|
||||
Editor::time_fx_motion (Gnome::Canvas::Item *item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* rv = clicked_regionview;
|
||||
|
||||
|
|
@ -4502,7 +4498,7 @@ Editor::time_fx_motion (GnomeCanvasItem *item, GdkEvent* event)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::end_time_fx (GnomeCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_time_fx (Gnome::Canvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
clicked_regionview->get_time_axis_view().hide_timestretch ();
|
||||
|
||||
|
|
|
|||
|
|
@ -998,14 +998,14 @@ Editor::scroll_tracks_up ()
|
|||
void
|
||||
Editor::scroll_tracks_down_line ()
|
||||
{
|
||||
GtkAdjustment* adj = edit_vscrollbar.get_adjustment();
|
||||
Gtk::Adjustment* adj = edit_vscrollbar.get_adjustment();
|
||||
adj->set_value (adj->get_value() + 10);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::scroll_tracks_up_line ()
|
||||
{
|
||||
GtkAdjustment* adj = edit_vscrollbar.get_adjustment();
|
||||
Gtk::Adjustment* adj = edit_vscrollbar.get_adjustment();
|
||||
adj->set_value (adj->get_value() - 10);
|
||||
}
|
||||
|
||||
|
|
@ -1528,14 +1528,14 @@ Editor::insert_region_list_selection (float times)
|
|||
return;
|
||||
}
|
||||
|
||||
RefPtr<TreeSelection> selected = region_list_display.get_selection();
|
||||
Glib::RefPtr<TreeSelection> selected = region_list_display.get_selection();
|
||||
|
||||
if (selected.count_selected_rows() != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
TreeModel::iterator i = region_list_display.get_selection()->get_selected();
|
||||
Region* region = (*i)[region_list_display_columns.region];
|
||||
Region* region = (*i)[region_list_columns.region];
|
||||
|
||||
begin_reversible_command (_("insert region"));
|
||||
session->add_undo (playlist->get_memento());
|
||||
|
|
@ -2603,14 +2603,14 @@ Editor::region_fill_selection ()
|
|||
|
||||
Region *region;
|
||||
|
||||
RefPtr<TreeSelection> selected = region_list_display.get_selection();
|
||||
Glib::RefPtr<TreeSelection> selected = region_list_display.get_selection();
|
||||
|
||||
if (selected.count_selected_rows() != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
TreeModel::iterator i = region_list_display.get_selection()->get_selected();
|
||||
region = (*i)[region_list_display_columns.region];
|
||||
region = (*i)[region_list_columns.region];
|
||||
|
||||
jack_nframes_t start = selection->time[clicked_selection].start;
|
||||
jack_nframes_t end = selection->time[clicked_selection].end;
|
||||
|
|
@ -2924,7 +2924,7 @@ Editor::freeze_route ()
|
|||
|
||||
pthread_create (&itt.thread, 0, _freeze_thread, this);
|
||||
|
||||
track_canvas_scroller.get_window()->set_cursor (Cursor (WATCH));
|
||||
track_canvas_scroller.get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
|
||||
|
||||
while (!itt.done && !itt.cancel) {
|
||||
gtk_main_iteration ();
|
||||
|
|
@ -3173,9 +3173,7 @@ Editor::mouse_paste ()
|
|||
double x, y;
|
||||
double wx, wy;
|
||||
track_canvas.get_pointer (x, y);
|
||||
|
||||
track_canvas.window_to_world (x, y, wx, wy);
|
||||
|
||||
GdkEvent event;
|
||||
event.type = GDK_BUTTON_RELEASE;
|
||||
event.button.x = wx;
|
||||
|
|
@ -3223,14 +3221,14 @@ Editor::paste_named_selection (float times)
|
|||
{
|
||||
TrackSelection::iterator i;
|
||||
|
||||
RefPtr<TreeSelection> selected = named_selection_display.get_selection();
|
||||
Glib::RefPtr<TreeSelection> selected = named_selection_display.get_selection();
|
||||
|
||||
if (selected.count_selected_rows() == 0 || selection->tracks.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TreeModel::iterator i = selected->get_selected();
|
||||
NamedSection* ns = (*i)[named_selection_columns.selection];
|
||||
NamedSelection* ns = (*i)[named_selection_columns.selection];
|
||||
|
||||
list<Playlist*>::iterator chunk;
|
||||
list<Playlist*>::iterator tmp;
|
||||
|
|
@ -3439,8 +3437,7 @@ Editor::remove_last_capture ()
|
|||
choices.push_back (_("No, do nothing."));
|
||||
|
||||
Gtkmm2ext::Choice prompter (prompt, choices);
|
||||
|
||||
prompter.chosen.connect (Gtk::Main::quit.slot());
|
||||
prompter.done.connect (Gtk::Main::quit.slot());
|
||||
prompter.show_all ();
|
||||
|
||||
Gtk::Main::run ();
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <string>
|
||||
#include <climits>
|
||||
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
|
||||
#include <pbd/error.h>
|
||||
|
||||
|
|
@ -71,11 +71,11 @@ Editor::draw_metric_marks (const Metrics& metrics)
|
|||
|
||||
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
|
||||
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
|
||||
metric_marks.push_back (new MeterMarker (*this, GNOME_CANVAS_GROUP(meter_group), color_map[cMeterMarker], buf,
|
||||
metric_marks.push_back (new MeterMarker (*this, *meter_group, color_map[cMeterMarker], buf,
|
||||
*(const_cast<MeterSection*>(ms)), PublicEditor::canvas_meter_marker_event));
|
||||
} else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
|
||||
snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
|
||||
metric_marks.push_back (new TempoMarker (*this, GNOME_CANVAS_GROUP(tempo_group), color_map[cTempoMarker], buf,
|
||||
metric_marks.push_back (new TempoMarker (*this, *tempo_group, color_map[cTempoMarker], buf,
|
||||
*(const_cast<TempoSection*>(ts)), PublicEditor::canvas_tempo_marker_event));
|
||||
}
|
||||
|
||||
|
|
@ -120,21 +120,19 @@ void
|
|||
Editor::hide_measures ()
|
||||
{
|
||||
for (TimeLineList::iterator i = used_measure_lines.begin(); i != used_measure_lines.end(); ++i) {
|
||||
gnome_canvas_item_hide (*i);
|
||||
(*i)->hide();
|
||||
free_measure_lines.push_back (*i);
|
||||
}
|
||||
used_measure_lines.clear ();
|
||||
}
|
||||
|
||||
GnomeCanvasItem *
|
||||
Gnome::Canvas::Line *
|
||||
Editor::get_time_line ()
|
||||
{
|
||||
GnomeCanvasItem *line;
|
||||
Gnome::Canvas::Line *line;
|
||||
|
||||
if (free_measure_lines.empty()) {
|
||||
line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(time_line_group),
|
||||
gnome_canvas_simpleline_get_type(),
|
||||
NULL);
|
||||
line = new Gnome::Canvas::Line (*time_line_group);
|
||||
// cerr << "measure line @ " << line << endl;
|
||||
used_measure_lines.push_back (line);
|
||||
} else {
|
||||
|
|
@ -155,7 +153,7 @@ Editor::draw_measures ()
|
|||
|
||||
TempoMap::BBTPointList::iterator i;
|
||||
TempoMap::BBTPointList *all_bbt_points;
|
||||
GnomeCanvasItem *line;
|
||||
Gnome::Canvas::Line *line;
|
||||
gdouble xpos, last_xpos;
|
||||
uint32_t cnt;
|
||||
uint32_t color;
|
||||
|
|
@ -217,14 +215,12 @@ Editor::draw_measures ()
|
|||
|
||||
if (cnt == 0 || xpos - last_xpos > 4.0) {
|
||||
line = get_time_line ();
|
||||
gtk_object_set (GTK_OBJECT(line),
|
||||
"x1", xpos,
|
||||
"x2", xpos,
|
||||
"y2", (gdouble) canvas_height,
|
||||
"color_rgba", color,
|
||||
NULL);
|
||||
gnome_canvas_item_raise_to_top (line);
|
||||
gnome_canvas_item_show (line);
|
||||
line->set_property ("x1", xpos);
|
||||
line->set_property ("x2", xpos);
|
||||
line->set_property ("y2", (gdouble) canvas_height);
|
||||
line->set_property ("color_rgba", color);
|
||||
line->raise_to_top();
|
||||
line->show();
|
||||
last_xpos = xpos;
|
||||
++cnt;
|
||||
}
|
||||
|
|
@ -328,7 +324,7 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::remove_tempo_marker (GnomeCanvasItem* item)
|
||||
Editor::remove_tempo_marker (Gnome::Canvas::Item* item)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
|
@ -415,7 +411,7 @@ Editor::edit_tempo_section (TempoSection* section)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::edit_tempo_marker (GnomeCanvasItem *item)
|
||||
Editor::edit_tempo_marker (Gnome::Canvas::Item *item)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
|
@ -434,7 +430,7 @@ Editor::edit_tempo_marker (GnomeCanvasItem *item)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::edit_meter_marker (GnomeCanvasItem *item)
|
||||
Editor::edit_meter_marker (Gnome::Canvas::Item *item)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
|
@ -465,7 +461,7 @@ Editor::real_remove_tempo_marker (TempoSection *section)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::remove_meter_marker (GnomeCanvasItem* item)
|
||||
Editor::remove_meter_marker (Gnome::Canvas::Item* item)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ GainAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEven
|
|||
{
|
||||
double x = 0;
|
||||
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
canvas_display->w2i (x, y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@ using namespace Editing;
|
|||
GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
|
||||
: trackview (atv)
|
||||
{
|
||||
group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(trackview.canvas_display),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", initial_pos,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
//group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(trackview.canvas_display),
|
||||
// gnome_canvas_group_get_type(),
|
||||
// "x", initial_pos,
|
||||
// "y", 0.0,
|
||||
// NULL);
|
||||
group = new Gnome::Canvas::Group (*trackview.canvas_display);
|
||||
group->set_property ("x", initial_pos);
|
||||
group->set_property ("y", 0.0);
|
||||
|
||||
base_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) 0.0,
|
||||
"y1", (double) 0.0,
|
||||
"y2", (double) trackview.height,
|
||||
"outline_what", (guint32) 0,
|
||||
"outline_color_rgba", color_map[cGhostTrackBaseOutline],
|
||||
"fill_color_rgba", color_map[cGhostTrackBaseFill],
|
||||
NULL);
|
||||
|
||||
gnome_canvas_item_lower_to_bottom (group);
|
||||
base_rect = new Gnome::Canvas::SimpleRect (*group);
|
||||
base_rect->set_property ("x1", (double) 0.0);
|
||||
base_rect->set_property ("y1", (double) 0.0);
|
||||
base_rect->set_property ("y2", (double) trackview.height);
|
||||
base_rect->set_property ("outline_what", (guint32) 0);
|
||||
base_rect->set_property ("outline_color_rgba", color_map[cGhostTrackBaseOutline]);
|
||||
base_rect->set_property ("fill_color_rgba", color_map[cGhostTrackBaseFill]);
|
||||
group->lower_to_bottom ();
|
||||
|
||||
atv.add_ghost (this);
|
||||
}
|
||||
|
|
@ -39,14 +39,14 @@ void
|
|||
GhostRegion::set_samples_per_unit (double spu)
|
||||
{
|
||||
for (vector<GnomeCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
|
||||
gnome_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GhostRegion::set_duration (double units)
|
||||
{
|
||||
gnome_canvas_item_set (base_rect, "x2", units, NULL);
|
||||
base_rect->set_property ("x2", units);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -56,8 +56,7 @@ GhostRegion::set_height ()
|
|||
vector<GnomeCanvasItem*>::iterator i;
|
||||
uint32_t n;
|
||||
|
||||
gnome_canvas_item_set (base_rect, "y2", (double) trackview.height, NULL);
|
||||
|
||||
base_rect->set_property ("y2", (double) trackview.height);
|
||||
ht = ((trackview.height) / (double) waves.size());
|
||||
|
||||
for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
|
||||
|
|
|
|||
|
|
@ -23,15 +23,16 @@
|
|||
|
||||
#include <vector>
|
||||
#include <sigc++/signal.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
#include "simplerect.h"
|
||||
|
||||
class AutomationTimeAxisView;
|
||||
|
||||
struct GhostRegion : public sigc::trackable
|
||||
{
|
||||
AutomationTimeAxisView& trackview;
|
||||
GnomeCanvasItem* group;
|
||||
GnomeCanvasItem* base_rect;
|
||||
Gnome::Canvas::Group* group;
|
||||
Gnome::Canvas::SimpleRect* base_rect;
|
||||
std::vector<GnomeCanvasItem*> waves;
|
||||
|
||||
GhostRegion (AutomationTimeAxisView& tv, double initial_unit_pos);
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, A
|
|||
{
|
||||
_color = unique_random_color() ;
|
||||
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ;
|
||||
gnome_canvas_item_hide(selection_group) ;
|
||||
//GTK2FIX -- how to get the group? is the canvas display really a group?
|
||||
//selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ;
|
||||
selection_group = new Gnome::Canvas::Group (GNOME_CANVAS_GROUP(canvas_display));
|
||||
selection_group->hide();
|
||||
|
||||
// intialize our data items
|
||||
_marked_for_display = true;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(std::string frame_id, jack_nframes_
|
|||
if(get_named_imageframe_item(frame_id) == 0)
|
||||
{
|
||||
ifv = new ImageFrameView(frame_id,
|
||||
GNOME_CANVAS_GROUP(_view_helper.canvas_item()),
|
||||
_view_helper.canvas_item(),
|
||||
&(_view_helper.trackview()),
|
||||
this,
|
||||
_view_helper.trackview().editor.get_current_zoom(),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "imageframe_time_axis_group.h"
|
||||
#include "marker_time_axis.h"
|
||||
#include "marker_time_axis_view.h"
|
||||
#include "canvas-simplerect.h"
|
||||
#include "public_editor.h"
|
||||
#include "utils.h"
|
||||
#include "imageframe_view.h"
|
||||
|
|
@ -56,7 +55,7 @@ sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
|
|||
* @param num_channels the number of color channels within rgb_data
|
||||
*/
|
||||
ImageFrameView::ImageFrameView(std::string item_id,
|
||||
GnomeCanvasGroup *parent,
|
||||
Gnome::Canvas::Group *parent,
|
||||
ImageFrameTimeAxis* tv,
|
||||
ImageFrameTimeAxisGroup* item_group,
|
||||
double spu,
|
||||
|
|
@ -117,8 +116,8 @@ ImageFrameView::ImageFrameView(std::string item_id,
|
|||
|
||||
/* handle any specific details required by the initial start end duration values */
|
||||
|
||||
gnome_canvas_item_raise_to_top(frame_handle_start) ;
|
||||
gnome_canvas_item_raise_to_top(frame_handle_end) ;
|
||||
frame_handle_start->raise_to_top();
|
||||
frame_handle_end->raise_to_top();
|
||||
|
||||
set_position(start, this) ;
|
||||
set_duration(duration, this) ;
|
||||
|
|
@ -281,18 +280,19 @@ ImageFrameView::set_height (gdouble h)
|
|||
gnome_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
|
||||
gnome_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
|
||||
|
||||
|
||||
gnome_canvas_item_raise_to_top(frame) ;
|
||||
frame->raise_to_top();
|
||||
gnome_canvas_item_raise_to_top(imageframe) ;
|
||||
gnome_canvas_item_raise_to_top(name_highlight) ;
|
||||
gnome_canvas_item_raise_to_top(name_text) ;
|
||||
gnome_canvas_item_raise_to_top(frame_handle_start) ;
|
||||
gnome_canvas_item_raise_to_top(frame_handle_end) ;
|
||||
//imageframe->raise_to_top();
|
||||
name_highlight->raise_to_top();
|
||||
name_text->raise_to_top();
|
||||
frame_handle_start->raise_to_top();
|
||||
frame_handle_end->raise_to_top();
|
||||
|
||||
gnome_canvas_item_set (name_text, "y", h - TimeAxisViewItem::NAME_Y_OFFSET, NULL);
|
||||
gnome_canvas_item_set (frame, "y2", h, NULL);
|
||||
name_text->set_property ("y", h - TimeAxisViewItem::NAME_Y_OFFSET);
|
||||
frame->set_property ("y2", h);
|
||||
|
||||
gnome_canvas_item_set (name_highlight, "y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, "y2", (gdouble) h - 1.0, NULL);
|
||||
name_highlight->set_property ("y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
|
||||
name_highlight->set_property ("y2", (gdouble) h - 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class ImageFrameView : public TimeAxisViewItem
|
|||
* @param num_channels the number of color channels within rgb_data
|
||||
*/
|
||||
ImageFrameView(std::string item_id,
|
||||
GnomeCanvasGroup *parent,
|
||||
Gnome::Canvas::Group *parent,
|
||||
ImageFrameTimeAxis *tv,
|
||||
ImageFrameTimeAxisGroup* group,
|
||||
double spu,
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
#include "i18n.h"
|
||||
|
||||
Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const string& annotation,
|
||||
Type type, gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame)
|
||||
Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, const string& annotation,
|
||||
Type type, gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame)
|
||||
|
||||
: editor (ed), _type(type)
|
||||
{
|
||||
|
|
@ -122,25 +122,16 @@ Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const
|
|||
|
||||
switch (type) {
|
||||
case Mark:
|
||||
points = gnome_canvas_points_new (6);
|
||||
points = new Gnome::Canvas::Points ();
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (6.0, 0.0));
|
||||
|
||||
points->coords[2] = 6.0;
|
||||
points->coords[3] = 0.0;
|
||||
points->push_back (Gnome::Art::Point (6.0, 5.0));
|
||||
points->push_back (Gnome::Art::Point (3.0, 10.0));
|
||||
|
||||
points->coords[4] = 6.0;
|
||||
points->coords[5] = 5.0;
|
||||
|
||||
points->coords[6] = 3.0;
|
||||
points->coords[7] = 10.0;
|
||||
|
||||
points->coords[8] = 0.0;
|
||||
points->coords[9] = 5.0;
|
||||
|
||||
points->coords[10] = 0.0;
|
||||
points->coords[11] = 0.0;
|
||||
points->push_back (Gnome::Art::Point (0.0, 5.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
|
||||
shift = 3;
|
||||
label_offset = 8.0;
|
||||
|
|
@ -148,181 +139,95 @@ Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const
|
|||
|
||||
case Tempo:
|
||||
case Meter:
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 3.0;
|
||||
points->coords[1] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (3.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (6.0, 5.0));
|
||||
|
||||
points->coords[2] = 6.0;
|
||||
points->coords[3] = 5.0;
|
||||
|
||||
points->coords[4] = 6.0;
|
||||
points->coords[5] = 10.0;
|
||||
|
||||
points->coords[6] = 0.0;
|
||||
points->coords[7] = 10.0;
|
||||
|
||||
points->coords[8] = 0.0;
|
||||
points->coords[9] = 5.0;
|
||||
|
||||
points->coords[10] = 3.0;
|
||||
points->coords[11] = 0.0;
|
||||
points->push_back (Gnome::Art::Point (6.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 5.0));
|
||||
points->push_back (Gnome::Art::Point (3.0, 0.0));
|
||||
|
||||
shift = 3;
|
||||
label_offset = 8.0;
|
||||
break;
|
||||
|
||||
case Start:
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 5.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
points->coords[4] = 10.0;
|
||||
points->coords[5] = 5.0;
|
||||
|
||||
points->coords[6] = 5.0;
|
||||
points->coords[7] = 10.0;
|
||||
|
||||
points->coords[8] = 0.0;
|
||||
points->coords[9] = 10.0;
|
||||
|
||||
points->coords[10] = 0.0;
|
||||
points->coords[11] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (5.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (10.0, 5.0));
|
||||
points->push_back (Gnome::Art::Point (5.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
|
||||
shift = 10;
|
||||
label_offset = 12.0;
|
||||
break;
|
||||
|
||||
case End:
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 5.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 10.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
points->coords[4] = 10.0;
|
||||
points->coords[5] = 10.0;
|
||||
|
||||
points->coords[6] = 5.0;
|
||||
points->coords[7] = 10.0;
|
||||
|
||||
points->coords[8] = 0.0;
|
||||
points->coords[9] = 5.0;
|
||||
|
||||
points->coords[10] = 5.0;
|
||||
points->coords[11] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (5.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (10.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (10.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (5.0, 10.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 5.0));
|
||||
points->push_back (Gnome::Art::Point (5.0, 0.0));
|
||||
|
||||
shift = 0;
|
||||
label_offset = 12.0;
|
||||
break;
|
||||
|
||||
case LoopStart:
|
||||
points = gnome_canvas_points_new (7);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 4.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
points->coords[4] = 4.0;
|
||||
points->coords[5] = 8.0;
|
||||
|
||||
points->coords[6] = 8.0;
|
||||
points->coords[7] = 8.0;
|
||||
|
||||
points->coords[8] = 8.0;
|
||||
points->coords[9] = 11.0;
|
||||
|
||||
points->coords[10] = 0.0;
|
||||
points->coords[11] = 11.0;
|
||||
|
||||
points->coords[12] = 0.0;
|
||||
points->coords[13] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 8.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 8.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
|
||||
shift = 0;
|
||||
label_offset = 11.0;
|
||||
break;
|
||||
|
||||
case LoopEnd:
|
||||
points = gnome_canvas_points_new (7);
|
||||
|
||||
points->coords[0] = 8.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 8.0;
|
||||
points->coords[3] = 11.0;
|
||||
|
||||
points->coords[4] = 0.0;
|
||||
points->coords[5] = 11.0;
|
||||
|
||||
points->coords[6] = 0.0;
|
||||
points->coords[7] = 8.0;
|
||||
|
||||
points->coords[8] = 4.0;
|
||||
points->coords[9] = 8.0;
|
||||
|
||||
points->coords[10] = 4.0;
|
||||
points->coords[11] = 0.0;
|
||||
|
||||
points->coords[12] = 8.0;
|
||||
points->coords[13] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (8.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 8.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 8.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 0.0));
|
||||
|
||||
shift = 8;
|
||||
label_offset = 11.0;
|
||||
break;
|
||||
|
||||
case PunchIn:
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 8.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
points->coords[4] = 4.0;
|
||||
points->coords[5] = 4.0;
|
||||
|
||||
points->coords[6] = 4.0;
|
||||
points->coords[7] = 11.0;
|
||||
|
||||
points->coords[8] = 0.0;
|
||||
points->coords[9] = 11.0;
|
||||
|
||||
points->coords[10] = 0.0;
|
||||
points->coords[11] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 4.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
|
||||
shift = 0;
|
||||
label_offset = 10.0;
|
||||
break;
|
||||
|
||||
case PunchOut:
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
|
||||
points->coords[2] = 8.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
points->coords[4] = 8.0;
|
||||
points->coords[5] = 11.0;
|
||||
|
||||
points->coords[6] = 4.0;
|
||||
points->coords[7] = 11.0;
|
||||
|
||||
points->coords[8] = 4.0;
|
||||
points->coords[9] = 4.0;
|
||||
|
||||
points->coords[10] = 0.0;
|
||||
points->coords[11] = 0.0;
|
||||
points = new Gnome::Canvas::Points ();
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 0.0));
|
||||
points->push_back (Gnome::Art::Point (8.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 11.0));
|
||||
points->push_back (Gnome::Art::Point (4.0, 4.0));
|
||||
points->push_back (Gnome::Art::Point (0.0, 0.0));
|
||||
|
||||
shift = 8;
|
||||
label_offset = 11.0;
|
||||
|
|
@ -337,33 +242,26 @@ Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const
|
|||
|
||||
unit_position -= shift;
|
||||
|
||||
group = gnome_canvas_item_new (parent,
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", unit_position,
|
||||
"y", 1.0,
|
||||
NULL);
|
||||
|
||||
group = &parent;
|
||||
group->set_property ("x", unit_position);
|
||||
group->set_property ("y", 1.0);
|
||||
// cerr << "set mark al points, nc = " << points->num_points << endl;
|
||||
mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"points", points,
|
||||
"fill_color_rgba", rgba,
|
||||
"outline_color", "black",
|
||||
NULL);
|
||||
mark = new Gnome::Canvas::Polygon (*group);
|
||||
mark->set_property ("points", points);
|
||||
mark->set_property ("fill_color_rgba", rgba);
|
||||
mark->set_property ("outline_color", Gdk::Color ("black"));
|
||||
|
||||
Pango::FontDescription font = get_font_for_style (N_("MarkerText"));
|
||||
|
||||
text = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_text_get_type (),
|
||||
"text", annotation.c_str(),
|
||||
"x", label_offset,
|
||||
"y", 0.0,
|
||||
"fontdesc", font,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"fill_color", "black",
|
||||
NULL);
|
||||
text = new Gnome::Canvas::Text (*group);
|
||||
text->set_property ("text", annotation.c_str());
|
||||
text->set_property ("x", label_offset);
|
||||
text->set_property ("y", 0.0);
|
||||
text->set_property ("fontdesc", font);
|
||||
text->set_property ("anchor", Gtk::ANCHOR_NW);
|
||||
text->set_property ("fill_color", Gdk::Color ("black"));
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(group), "marker", this);
|
||||
group->set_data ("marker", this);
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event", (GtkSignalFunc) callback, &editor);
|
||||
|
||||
editor.ZoomChanged.connect (mem_fun(*this, &Marker::reposition));
|
||||
|
|
@ -373,13 +271,13 @@ Marker::~Marker ()
|
|||
{
|
||||
/* destroying the group destroys its contents */
|
||||
gtk_object_destroy (GTK_OBJECT(group));
|
||||
gnome_canvas_points_unref (points);
|
||||
gnome_canvas_points_unref (points->gobj());
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set_name (const string& name)
|
||||
{
|
||||
gnome_canvas_item_set (text, "text", name.c_str(), NULL);
|
||||
text->set_property ("text", name.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -387,7 +285,7 @@ Marker::set_position (jack_nframes_t frame)
|
|||
{
|
||||
double new_unit_position = editor.frame_to_unit (frame);
|
||||
new_unit_position -= shift;
|
||||
gnome_canvas_item_move (group, new_unit_position - unit_position, 0.0);
|
||||
group->move (new_unit_position - unit_position, 0.0);
|
||||
frame_position = frame;
|
||||
unit_position = new_unit_position;
|
||||
}
|
||||
|
|
@ -401,31 +299,31 @@ Marker::reposition ()
|
|||
void
|
||||
Marker::show ()
|
||||
{
|
||||
gnome_canvas_item_show (group);
|
||||
group->show();
|
||||
}
|
||||
|
||||
void
|
||||
Marker::hide ()
|
||||
{
|
||||
gnome_canvas_item_hide (group);
|
||||
group->hide();
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set_color_rgba (uint32_t color)
|
||||
{
|
||||
gnome_canvas_item_set (mark, "fill_color_rgba", color, NULL);
|
||||
mark->set_property ("fill_color_rgba", color);
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
TempoMarker::TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
TempoMarker::TempoMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text,
|
||||
ARDOUR::TempoSection& temp,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
|
||||
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer))
|
||||
: Marker (editor, parent, rgba, text, Tempo, callback, 0),
|
||||
_tempo (temp)
|
||||
{
|
||||
set_position (_tempo.frame());
|
||||
gtk_object_set_data (GTK_OBJECT(group), "tempo_marker", this);
|
||||
group->set_data ("tempo_marker", this);
|
||||
}
|
||||
|
||||
TempoMarker::~TempoMarker ()
|
||||
|
|
@ -434,9 +332,9 @@ TempoMarker::~TempoMarker ()
|
|||
|
||||
/***********************************************************************/
|
||||
|
||||
MeterMarker::MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
MeterMarker::MeterMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text,
|
||||
ARDOUR::MeterSection& m,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
|
||||
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer))
|
||||
: Marker (editor, parent, rgba, text, Meter, callback, 0),
|
||||
_meter (m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#include <string>
|
||||
#include <glib.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
#include <libgnomecanvasmm/polygon.h>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
@ -49,8 +50,8 @@ class Marker : public sigc::trackable
|
|||
PunchOut
|
||||
};
|
||||
|
||||
Marker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, Type,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
|
||||
Marker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, Type,
|
||||
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
|
||||
virtual ~Marker ();
|
||||
|
||||
void set_position (jack_nframes_t);
|
||||
|
|
@ -65,10 +66,10 @@ class Marker : public sigc::trackable
|
|||
protected:
|
||||
PublicEditor& editor;
|
||||
|
||||
GnomeCanvasItem *group;
|
||||
GnomeCanvasItem *mark;
|
||||
GnomeCanvasItem *text;
|
||||
GnomeCanvasPoints *points;
|
||||
Gnome::Canvas::Group *group;
|
||||
Gnome::Canvas::Item *mark;
|
||||
Gnome::Canvas::Text *text;
|
||||
Gnome::Canvas::Points *points;
|
||||
|
||||
double unit_position;
|
||||
jack_nframes_t frame_position;
|
||||
|
|
@ -81,8 +82,8 @@ class Marker : public sigc::trackable
|
|||
class TempoMarker : public Marker
|
||||
{
|
||||
public:
|
||||
TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
|
||||
TempoMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
|
||||
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer));
|
||||
~TempoMarker ();
|
||||
|
||||
ARDOUR::TempoSection& tempo() const { return _tempo; }
|
||||
|
|
@ -94,8 +95,8 @@ class TempoMarker : public Marker
|
|||
class MeterMarker : public Marker
|
||||
{
|
||||
public:
|
||||
MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
|
||||
MeterMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
|
||||
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer));
|
||||
~MeterMarker ();
|
||||
|
||||
ARDOUR::MeterSection& meter() const { return _meter; }
|
||||
|
|
|
|||
|
|
@ -65,8 +65,10 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Widget
|
|||
_color = unique_random_color() ;
|
||||
time_axis_name = name ;
|
||||
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), 0) ;
|
||||
gnome_canvas_item_hide(selection_group) ;
|
||||
//GTK2FIX -- how to get the group? is the canvas display really a group?
|
||||
//selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), 0) ;
|
||||
selection_group = new Gnome::Canvas::Group (*canvas_display);
|
||||
selection_group->hide();
|
||||
|
||||
// intialize our data items
|
||||
name_prompter = 0 ;
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
|||
region_color = _trackview.color();
|
||||
stream_base_color = color_map[cMarkerTrackBase];
|
||||
|
||||
canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
|
||||
//GTK2FIX -- how to get the group? is the canvas display really a group?
|
||||
//canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
|
||||
canvas_group = new Gnome::Canvas::Group (*_trackview.canvas_display);
|
||||
|
||||
canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 1000000.0,
|
||||
"y2", (double)20,
|
||||
"outline_color_rgba", color_map[cMarkerTrackOutline],
|
||||
"fill_color_rgba", stream_base_color,
|
||||
0) ;
|
||||
canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
|
||||
canvas_rect->set_property ("x1", 0.0);
|
||||
canvas_rect->set_property ("y1", 0.0);
|
||||
canvas_rect->set_property ("x2", 1000000.0);
|
||||
canvas_rect->set_property ("y2", (double)20);
|
||||
canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]);
|
||||
canvas_rect->set_property ("fill_color_rgba", stream_base_color);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(canvas_rect), "event", (GtkSignalFunc)PublicEditor::canvas_marker_time_axis_view_event, &_trackview) ;
|
||||
|
||||
|
|
@ -142,7 +142,8 @@ MarkerTimeAxisView::set_height(gdouble h)
|
|||
int
|
||||
MarkerTimeAxisView::set_position(gdouble x, gdouble y)
|
||||
{
|
||||
gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
canvas_group->set_property ("x", x);
|
||||
canvas_group->set_property ("y", y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +208,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type,
|
|||
return(0) ;
|
||||
}
|
||||
|
||||
MarkerView* mv = new MarkerView(GNOME_CANVAS_GROUP(canvas_group),
|
||||
MarkerView* mv = new MarkerView(canvas_group,
|
||||
&_trackview,
|
||||
ifv,
|
||||
_trackview.editor.get_current_zoom(),
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@
|
|||
#include <list>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/group.h>
|
||||
#include <libgnomecanvasmm/canvas.h>
|
||||
|
||||
#include <ardour/location.h>
|
||||
#include "simplerect.h"
|
||||
|
||||
class PublicEditor;
|
||||
class MarkerTimeAxis;
|
||||
|
|
@ -73,7 +75,7 @@ class MarkerTimeAxisView : public sigc::trackable
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GnomeCanvasItem *canvas_item() { return canvas_group; }
|
||||
Gnome::Canvas::Item *canvas_item() { return canvas_group; }
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------//
|
||||
|
|
@ -224,8 +226,8 @@ class MarkerTimeAxisView : public sigc::trackable
|
|||
/* the TimeAxisView that this object is acting as the view helper for */
|
||||
MarkerTimeAxis& _trackview ;
|
||||
|
||||
GnomeCanvasItem *canvas_group ;
|
||||
GnomeCanvasItem *canvas_rect ; /* frame around the whole thing */
|
||||
Gnome::Canvas::Group *canvas_group ;
|
||||
Gnome::Canvas::SimpleRect *canvas_rect ; /* frame around the whole thing */
|
||||
|
||||
/** the current samples per unit */
|
||||
double _samples_per_unit;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ sigc::signal<void,MarkerView*> MarkerView::GoingAway;
|
|||
* @param start the start time of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
MarkerView::MarkerView(GnomeCanvasGroup *parent,
|
||||
MarkerView::MarkerView(Gnome::Canvas::Group *parent,
|
||||
TimeAxisView* tv,
|
||||
ImageFrameView* marked,
|
||||
double spu,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class MarkerView : public TimeAxisViewItem
|
|||
* @param start the start time of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
MarkerView(GnomeCanvasGroup *parent,
|
||||
MarkerView(Gnome::Canvas::Group *parent,
|
||||
TimeAxisView *tv,
|
||||
ImageFrameView* marked,
|
||||
double spu,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ using namespace sigc;
|
|||
#define FRAME_NAME "BaseFrame"
|
||||
|
||||
MeterBridge::MeterBridge ()
|
||||
: ArdourDialog ("meter bridge")
|
||||
: ArdourDialog ("meter bridge"),
|
||||
hadjustment (0.0, 0.0, 0.0),
|
||||
vadjustment (0.0, 0.0, 0.0),
|
||||
meter_viewport (hadjustment, vadjustment)
|
||||
{
|
||||
meter_base.set_name ("MeterBase");
|
||||
meter_frame.set_shadow_type (FRAME_SHADOW_STYLE);
|
||||
|
|
@ -240,17 +243,17 @@ MeterBridge::toggle_metering ()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MeterBridge::on_map (GdkEventAny *ev)
|
||||
void
|
||||
MeterBridge::on_map ()
|
||||
{
|
||||
start_metering ();
|
||||
return Window::on_map (ev);
|
||||
return Window::on_map ();
|
||||
}
|
||||
|
||||
bool
|
||||
MeterBridge::on_unmap (GdkEventAny *ev)
|
||||
void
|
||||
MeterBridge::on_unmap ()
|
||||
{
|
||||
stop_metering ();
|
||||
return Window::on_unmap (ev);
|
||||
return Window::on_unmap ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,12 +54,13 @@ class MeterBridge : public ArdourDialog
|
|||
void toggle_metering ();
|
||||
|
||||
protected:
|
||||
bool on_map (GdkEventAny *);
|
||||
bool on_unmap (GdkEventAny *);
|
||||
void on_map ();
|
||||
void on_unmap ();
|
||||
|
||||
private:
|
||||
/* diskstream/recorder display */
|
||||
|
||||
Gtk::Adjustment hadjustment;
|
||||
Gtk::Adjustment vadjustment;
|
||||
Gtk::Viewport meter_viewport;
|
||||
Gtk::ScrolledWindow meter_scroller;
|
||||
Gtk::EventBox meter_scroll_base;
|
||||
|
|
|
|||
|
|
@ -1133,7 +1133,7 @@ MixerStrip::setup_comment_editor ()
|
|||
comment_area.set_editable (true);
|
||||
comment_area.signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
|
||||
comment_area.signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
|
||||
comment_area.changed.connect (mem_fun(*this, &MixerStrip::comment_edited));
|
||||
comment_area.changed.connect (mem_fun(*this, &MixerStrip::comment_edited));
|
||||
// GTK2FIX
|
||||
// comment_area.signal_button_release_event().connect_after (ptr_fun (do_not_propagate));
|
||||
comment_area.show ();
|
||||
|
|
@ -1258,7 +1258,7 @@ MixerStrip::show_route_color ()
|
|||
style = name_button.get_style()->copy();
|
||||
style->set_bg (Gtk::STATE_NORMAL, color());
|
||||
name_button.set_style (style);
|
||||
style->unrefernce();
|
||||
style->unreference();
|
||||
|
||||
route_active_changed ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1012,6 +1012,7 @@ OptionEditor::setup_midi_options ()
|
|||
mtc_button_group = rb->get_group();
|
||||
} else {
|
||||
rb->set_group (mtc_button_group);
|
||||
|
||||
}
|
||||
table->attach (*rb, 4, 5, n+2, n+3, FILL|EXPAND, FILL);
|
||||
rb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::mtc_port_chosen), (*i).second, rb));
|
||||
|
|
@ -1964,7 +1965,7 @@ OptionEditor::edit_button_changed ()
|
|||
}
|
||||
|
||||
void
|
||||
OptionEditor::fixup_combo_size (Gtk::Combo& combo, vector<string>& strings)
|
||||
OptionEditor::fixup_combo_size (Gtk::ComboBoxText& combo, vector<string>& strings)
|
||||
{
|
||||
/* find the widest string */
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ class OptionEditor : public ArdourDialog
|
|||
void debug_keyboard_clicked ();
|
||||
void speed_quieten_clicked ();
|
||||
|
||||
void fixup_combo_size (Gtk::ComboBox&, std::vector<std::string>& strings);
|
||||
void fixup_combo_size (Gtk::ComboBoxText&, std::vector<std::string>& strings);
|
||||
};
|
||||
|
||||
#endif /* __gtk_ardour_option_editor_h__ */
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ PanAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent
|
|||
|
||||
double x = 0;
|
||||
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
canvas_display->w2i (x, y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
|
|
|||
|
|
@ -438,6 +438,7 @@ 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 */
|
||||
|
|
@ -455,12 +456,13 @@ 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
|
||||
// get_window().draw_text (get_style()->get_font(),
|
||||
// get_style()->get_fg_gc(Gtk::STATE_NORMAL),
|
||||
// x + 6, y + 6,
|
||||
// puck->text,
|
||||
// puck->textlen);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,10 +202,10 @@ PannerUI::update_pan_linkage ()
|
|||
|
||||
switch (_io.panner().link_direction()) {
|
||||
case Panner::SameDirection:
|
||||
static_cast<Gdk::Pixmap*> (panning_link_direction_button.get_child())->set (forwdblarrow_xpm);
|
||||
panning_link_direction_button.set_image (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data (forwdblarrow_xpm)))));
|
||||
break;
|
||||
default:
|
||||
static_cast<Gdk::Pixmap*> (panning_link_direction_button.get_child())->set (revdblarrow_xpm);
|
||||
panning_link_direction_button.set_image (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data (revdblarrow_xpm)))));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ PluginUIWindow::PluginUIWindow (AudioEngine &engine, PluginInsert& insert, bool
|
|||
_pluginui = pu;
|
||||
add (*pu);
|
||||
|
||||
map_event.connect (mem_fun (*pu, &PluginUI::start_updating));
|
||||
unmap_event.connect (mem_fun (*pu, &PluginUI::stop_updating));
|
||||
signal_map_event().connect (mem_fun (*pu, &PluginUI::start_updating));
|
||||
signal_unmap_event().connect (mem_fun (*pu, &PluginUI::stop_updating));
|
||||
}
|
||||
|
||||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ using namespace std;
|
|||
using namespace ARDOUR;
|
||||
|
||||
RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s,
|
||||
TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
TimeAxisView& tv, Gnome::Canvas::Item& parent,
|
||||
AutomationList& l,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
|
||||
: AutomationLine (name, tv, parent, l, point_callback, line_callback),
|
||||
session (s),
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ class TimeAxisView;
|
|||
class RedirectAutomationLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, Gnome::Canvas::Item& parent,
|
||||
ARDOUR::AutomationList&,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
|
||||
uint32_t port() const { return _port; }
|
||||
ARDOUR::Redirect& redirect() const { return _redirect; }
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ RedirectAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, Gdk
|
|||
{
|
||||
double x = 0;
|
||||
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
canvas_display->w2i (x, y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
|
|
|||
|
|
@ -17,15 +17,15 @@
|
|||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, GnomeCanvasItem* parent,
|
||||
AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, Gnome::Canvas::Item& parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback),
|
||||
session (s),
|
||||
rv (r)
|
||||
{
|
||||
gnome_canvas_item_raise_to_top (group);
|
||||
group->raise_to_top ();
|
||||
set_verbose_cursor_uses_gain_mapping (true);
|
||||
terminal_points_can_slide = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define __ardour_gtk_region_gain_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include "automation_line.h"
|
||||
|
|
@ -17,10 +17,10 @@ class AudioRegionView;
|
|||
class AudioRegionGainLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, GnomeCanvasItem* parent,
|
||||
AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, Gnome::Canvas::Item& parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer));
|
||||
|
||||
void view_to_model_y (double&);
|
||||
void model_to_view_y (double&);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ static const int32_t sync_mark_width = 9;
|
|||
|
||||
sigc::signal<void,AudioRegionView*> AudioRegionView::AudioRegionViewGoingAway;
|
||||
|
||||
AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisView &tv,
|
||||
AudioRegion& r,
|
||||
double spu,
|
||||
double amplitude_above_axis,
|
||||
|
|
@ -69,7 +69,7 @@ AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &t
|
|||
|
||||
region (r)
|
||||
{
|
||||
GnomeCanvasPoints *shape;
|
||||
Gnome::Canvas::Points *shape;
|
||||
XMLNode *node;
|
||||
|
||||
editor = 0;
|
||||
|
|
@ -100,43 +100,28 @@ AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &t
|
|||
gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this);
|
||||
gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this);
|
||||
|
||||
shape = gnome_canvas_points_new (4);
|
||||
shape = new Gnome::Canvas::Points ();
|
||||
|
||||
/* an equilateral triangle */
|
||||
|
||||
shape->coords[0] = -((sync_mark_width-1)/2);
|
||||
shape->coords[1] = 1;
|
||||
shape->push_back (Gnome::Art::Point (-((sync_mark_width-1)/2), 1));
|
||||
shape->push_back (Gnome::Art::Point ((sync_mark_width - 1)/2, 1));
|
||||
shape->push_back (Gnome::Art::Point (0, sync_mark_width - 1));
|
||||
shape->push_back (Gnome::Art::Point (-((sync_mark_width-1)/2), 1));
|
||||
|
||||
shape->coords[2] = (sync_mark_width - 1)/2;
|
||||
shape->coords[3] = 1;
|
||||
sync_mark = new Gnome::Canvas::Polygon (*group);
|
||||
sync_mark->set_property ("points", shape);
|
||||
sync_mark->set_property ("fill_color_rgba", fill_color);
|
||||
sync_mark->hide();
|
||||
gnome_canvas_points_unref (shape->gobj());
|
||||
|
||||
shape->coords[4] = 0;
|
||||
shape->coords[5] = sync_mark_width - 1;
|
||||
fade_in_shape = new Gnome::Canvas::Polygon (*group);
|
||||
fade_in_shape->set_property ("fill_color_rgba", fade_color);
|
||||
fade_in_shape->set_data ("regionview", this);
|
||||
|
||||
shape->coords[6] = -((sync_mark_width-1)/2);
|
||||
shape->coords[7] = 1;
|
||||
|
||||
// cerr << "set sync mark al points, nc = " << shape->num_points << endl;
|
||||
sync_mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"points", shape,
|
||||
"fill_color_rgba", fill_color,
|
||||
NULL);
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
gnome_canvas_points_unref (shape);
|
||||
|
||||
|
||||
fade_in_shape = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"fill_color_rgba", fade_color,
|
||||
NULL);
|
||||
gtk_object_set_data (GTK_OBJECT(fade_in_shape), "regionview", this);
|
||||
|
||||
fade_out_shape = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"fill_color_rgba", fade_color,
|
||||
NULL);
|
||||
gtk_object_set_data (GTK_OBJECT(fade_out_shape), "regionview", this);
|
||||
fade_out_shape = new Gnome::Canvas::Polygon (*group);
|
||||
fade_out_shape->set_property ("fill_color_rgba", fade_color);
|
||||
fade_out_shape->set_data ("regionview", this);
|
||||
|
||||
|
||||
|
||||
|
|
@ -145,22 +130,20 @@ AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &t
|
|||
UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
|
||||
|
||||
|
||||
fade_in_handle = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
|
||||
"outline_pixels", 0,
|
||||
"y1", 2.0,
|
||||
"y2", 7.0,
|
||||
NULL);
|
||||
gtk_object_set_data (GTK_OBJECT(fade_in_handle), "regionview", this);
|
||||
fade_in_handle = new Gnome::Canvas::SimpleRect (*group);
|
||||
fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
|
||||
fade_in_handle->set_property ("outline_pixels", 0);
|
||||
fade_in_handle->set_property ("y1", 2.0);
|
||||
fade_in_handle->set_property ("y2", 7.0);
|
||||
|
||||
fade_in_handle->set_data ("regionview", this);
|
||||
|
||||
fade_out_handle = new Gnome::Canvas::SimpleRect (*group);
|
||||
fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
|
||||
fade_out_handle->set_property ("outline_pixels", 0);
|
||||
fade_out_handle->set_property ("y1", 2.0);
|
||||
fade_out_handle->set_property ("y2", 7.0);
|
||||
|
||||
fade_out_handle = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"fill_color_rgba", RGBA_TO_UINT(r,g,b,0),
|
||||
"outline_pixels", 0,
|
||||
"y1", 2.0,
|
||||
"y2", 7.0,
|
||||
NULL);
|
||||
gtk_object_set_data (GTK_OBJECT(fade_out_handle), "regionview", this);
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +151,7 @@ AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &t
|
|||
foo += ':';
|
||||
foo += "gain";
|
||||
|
||||
gain_line = new AudioRegionGainLine (foo, tv.session(), *this, group, region.envelope(),
|
||||
gain_line = new AudioRegionGainLine (foo, tv.session(), *this, &group, region.envelope(),
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
|
||||
|
|
@ -196,30 +179,30 @@ AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &t
|
|||
region.StateChanged.connect (mem_fun(*this, &AudioRegionView::region_changed));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_region_view_event,
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_event),
|
||||
this);
|
||||
gtk_signal_connect (GTK_OBJECT(name_highlight), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_region_view_name_highlight_event,
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_name_highlight_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(name_text), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_region_view_name_event,
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_name_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_in_shape), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_fade_in_event,
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_fade_in_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_in_handle), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_fade_in_handle_event,
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_fade_in_handle_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_out_shape), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_fade_out_event,
|
||||
GTK_SIGNAL_FUNC ( PublicEditor::canvas_fade_out_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_out_handle), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_fade_out_handle_event,
|
||||
gtk_signal_connect_object (GTK_OBJECT(fade_out_handle), "event",
|
||||
GTK_SIGNAL_FUNC ( PublicEditor::canvas_fade_out_handle_event),
|
||||
this);
|
||||
|
||||
set_colors ();
|
||||
|
|
@ -252,7 +235,7 @@ AudioRegionView::~AudioRegionView ()
|
|||
}
|
||||
|
||||
gint
|
||||
AudioRegionView::_lock_toggle (GnomeCanvasItem* item, GdkEvent* ev, void* arg)
|
||||
AudioRegionView::_lock_toggle (Gnome::Canvas::Item* item, GdkEvent* ev, void* arg)
|
||||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_RELEASE:
|
||||
|
|
@ -351,18 +334,14 @@ AudioRegionView::fade_in_active_changed ()
|
|||
|
||||
if (region.fade_in_active()) {
|
||||
col = RGBA_TO_UINT(r,g,b,120);
|
||||
gnome_canvas_item_set (fade_in_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 0,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
|
||||
NULL);
|
||||
fade_in_shape->set_property ("fill_color_rgba", col);
|
||||
fade_in_shape->set_property ("width_pixels", 0);
|
||||
fade_in_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,0));
|
||||
} else {
|
||||
col = RGBA_TO_UINT(r,g,b,0);
|
||||
gnome_canvas_item_set (fade_in_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 1,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
|
||||
NULL);
|
||||
fade_in_shape->set_property ("fill_color_rgba", col);
|
||||
fade_in_shape->set_property ("width_pixels", 1);
|
||||
fade_in_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,255));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -375,18 +354,14 @@ AudioRegionView::fade_out_active_changed ()
|
|||
|
||||
if (region.fade_out_active()) {
|
||||
col = RGBA_TO_UINT(r,g,b,120);
|
||||
gnome_canvas_item_set (fade_out_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 0,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,0),
|
||||
NULL);
|
||||
fade_out_shape->set_property ("fill_color_rgba", col);
|
||||
fade_out_shape->set_property ("width_pixels", 0);
|
||||
fade_out_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,0));
|
||||
} else {
|
||||
col = RGBA_TO_UINT(r,g,b,0);
|
||||
gnome_canvas_item_set (fade_out_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 1,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
|
||||
NULL);
|
||||
fade_out_shape->set_property ("fill_color_rgba", col);
|
||||
fade_out_shape->set_property ("width_pixels", 1);
|
||||
fade_out_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,255));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -448,19 +423,19 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
|
|||
_pixel_width = pixel_width;
|
||||
|
||||
if (zero_line) {
|
||||
gnome_canvas_item_set (zero_line, "x2", pixel_width - 1.0, NULL);
|
||||
zero_line->set_property ("x2", pixel_width - 1.0);
|
||||
}
|
||||
|
||||
if (pixel_width <= 6.0) {
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
fade_in_handle->hide();
|
||||
fade_out_handle->hide();
|
||||
} else {
|
||||
if (_height < 5.0) {
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
fade_in_handle->hide();
|
||||
fade_out_handle->hide();
|
||||
} else {
|
||||
gnome_canvas_item_show (fade_in_handle);
|
||||
gnome_canvas_item_show (fade_out_handle);
|
||||
fade_in_handle->show();
|
||||
fade_out_handle->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -535,7 +510,7 @@ AudioRegionView::set_position (jack_nframes_t pos, void* src, double* ignored)
|
|||
|
||||
if (delta) {
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
gnome_canvas_item_move ((*i)->group, delta, 0.0);
|
||||
(*i)->group->move (delta, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -578,7 +553,7 @@ AudioRegionView::set_height (gdouble height)
|
|||
gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE));
|
||||
reset_fade_shapes ();
|
||||
|
||||
gnome_canvas_item_raise_to_top (name_text) ;
|
||||
name_text->raise_to_top();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -590,13 +565,11 @@ AudioRegionView::manage_zero_line ()
|
|||
|
||||
if (_height >= 100) {
|
||||
gdouble wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
|
||||
gnome_canvas_item_set (zero_line,
|
||||
"y1", wave_midpoint,
|
||||
"y2", wave_midpoint,
|
||||
NULL);
|
||||
gnome_canvas_item_show (zero_line);
|
||||
zero_line->set_property ("y1", wave_midpoint);
|
||||
zero_line->set_property ("y2", wave_midpoint);
|
||||
zero_line->show();
|
||||
} else {
|
||||
gnome_canvas_item_hide (zero_line);
|
||||
zero_line->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -626,8 +599,8 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
double h;
|
||||
|
||||
if (_height < 5) {
|
||||
gnome_canvas_item_hide (fade_in_shape);
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
fade_in_shape->hide();
|
||||
fade_in_handle->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -640,17 +613,15 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
handle_center = 3.0;
|
||||
}
|
||||
|
||||
gnome_canvas_item_set (fade_in_handle,
|
||||
"x1", handle_center - 3.0,
|
||||
"x2", handle_center + 3.0,
|
||||
NULL);
|
||||
fade_in_handle->set_property ("x1", handle_center - 3.0);
|
||||
fade_in_handle->set_property ("x2", handle_center + 3.0);
|
||||
|
||||
if (pwidth < 5) {
|
||||
gnome_canvas_item_hide (fade_in_shape);
|
||||
fade_in_shape->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
gnome_canvas_item_show (fade_in_shape);
|
||||
fade_in_shape->show();
|
||||
|
||||
float curve[npoints];
|
||||
region.fade_in().get_vector (0, region.fade_in().back()->when, curve, npoints);
|
||||
|
|
@ -686,7 +657,7 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
|||
points->coords[pi++] = points->coords[0];
|
||||
points->coords[pi] = points->coords[1];
|
||||
|
||||
gnome_canvas_item_set (fade_in_shape, "points", points, NULL);
|
||||
fade_in_shape->set_property ("points", points);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
|
|
@ -709,8 +680,8 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
|||
double h;
|
||||
|
||||
if (_height < 5) {
|
||||
gnome_canvas_item_hide (fade_out_shape);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
fade_out_shape->hide();
|
||||
fade_out_handle->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -723,19 +694,17 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
|||
handle_center = 3.0;
|
||||
}
|
||||
|
||||
gnome_canvas_item_set (fade_out_handle,
|
||||
"x1", handle_center - 3.0,
|
||||
"x2", handle_center + 3.0,
|
||||
NULL);
|
||||
fade_out_handle->set_property ("x1", handle_center - 3.0);
|
||||
fade_out_handle->set_property ("x2", handle_center + 3.0);
|
||||
|
||||
/* don't show shape if its too small */
|
||||
|
||||
if (pwidth < 5) {
|
||||
gnome_canvas_item_hide (fade_out_shape);
|
||||
fade_out_shape->hide();
|
||||
return;
|
||||
}
|
||||
|
||||
gnome_canvas_item_show (fade_out_shape);
|
||||
fade_out_shape->show();
|
||||
|
||||
float curve[npoints];
|
||||
region.fade_out().get_vector (0, region.fade_out().back()->when, curve, npoints);
|
||||
|
|
@ -771,7 +740,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
|||
points->coords[pi++] = points->coords[0];
|
||||
points->coords[pi] = points->coords[1];
|
||||
|
||||
gnome_canvas_item_set (fade_out_shape, "points", points, NULL);
|
||||
fade_out_shape->set_property ("points", points);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
|
|
@ -834,7 +803,7 @@ AudioRegionView::set_colors ()
|
|||
TimeAxisViewItem::set_colors ();
|
||||
|
||||
gain_line->set_line_color (region.envelope_active() ? color_map[cGainLine] : color_map[cGainLineInactive]);
|
||||
gnome_canvas_item_set (sync_mark, "fill_color_rgba", fill_color, NULL);
|
||||
sync_mark->set_property ("fill_color_rgba", fill_color);
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
if (region.muted()) {
|
||||
|
|
@ -916,7 +885,7 @@ AudioRegionView::region_sync_changed ()
|
|||
|
||||
/* no sync mark - its the start of the region */
|
||||
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
sync_mark->hide();
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -924,7 +893,7 @@ AudioRegionView::region_sync_changed ()
|
|||
|
||||
/* no sync mark - its out of the bounds of the region */
|
||||
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
sync_mark->hide();
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -951,8 +920,8 @@ AudioRegionView::region_sync_changed ()
|
|||
points->coords[6] = offset - ((sync_mark_width-1)/2);
|
||||
points->coords[7] = 1;
|
||||
|
||||
gnome_canvas_item_show (sync_mark);
|
||||
gnome_canvas_item_set (sync_mark, "points", points, NULL);
|
||||
sync_mark->show();
|
||||
sync_mark->set_property ("points", points);
|
||||
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
|
@ -1047,12 +1016,10 @@ AudioRegionView::create_waves ()
|
|||
}
|
||||
|
||||
if (create_zero_line) {
|
||||
zero_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simpleline_get_type(),
|
||||
"x1", (gdouble) 1.0,
|
||||
"x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
|
||||
"color_rgba", (guint) color_map[cZeroLine],
|
||||
NULL);
|
||||
zero_line = new Gnome::Canvas::Line (*group);
|
||||
zero_line->set_property ("x1", (gdouble) 1.0);
|
||||
zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
|
||||
zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
|
||||
manage_zero_line ();
|
||||
}
|
||||
}
|
||||
|
|
@ -1122,12 +1089,10 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
|||
tmp_waves.clear ();
|
||||
|
||||
if (!zero_line) {
|
||||
zero_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simpleline_get_type(),
|
||||
"x1", (gdouble) 1.0,
|
||||
"x2", (gdouble) (region.length() / samples_per_unit) - 1.0,
|
||||
"color_rgba", (guint) color_map[cZeroLine],
|
||||
NULL);
|
||||
zero_line = new Gnome::Canvas::Line (*group);
|
||||
zero_line->set_property ("x1", (gdouble) 1.0);
|
||||
zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
|
||||
zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
|
||||
manage_zero_line ();
|
||||
}
|
||||
}
|
||||
|
|
@ -1140,7 +1105,7 @@ AudioRegionView::peaks_ready_handler (uint32_t which)
|
|||
}
|
||||
|
||||
void
|
||||
AudioRegionView::add_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
||||
AudioRegionView::add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev)
|
||||
{
|
||||
double x, y;
|
||||
|
||||
|
|
@ -1151,7 +1116,7 @@ AudioRegionView::add_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
|||
x = ev->button.x;
|
||||
y = ev->button.y;
|
||||
|
||||
gnome_canvas_item_w2i (item, &x, &y);
|
||||
item->w2i (x, y);
|
||||
|
||||
jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
|
||||
|
|
@ -1184,9 +1149,9 @@ AudioRegionView::add_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
|||
}
|
||||
|
||||
void
|
||||
AudioRegionView::remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
||||
AudioRegionView::remove_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev)
|
||||
{
|
||||
ControlPoint *cp = reinterpret_cast<ControlPoint *> (gtk_object_get_data(GTK_OBJECT(item), "control_point"));
|
||||
ControlPoint *cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"));
|
||||
region.envelope().erase (cp->model);
|
||||
}
|
||||
|
||||
|
|
@ -1245,9 +1210,9 @@ AudioRegionView::set_waveform_shape (WaveformShape shape)
|
|||
|
||||
if (zero_line) {
|
||||
if (yn) {
|
||||
gnome_canvas_item_hide (zero_line);
|
||||
zero_line->hide();
|
||||
} else {
|
||||
gnome_canvas_item_show (zero_line);
|
||||
zero_line->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1272,12 +1237,12 @@ AudioRegionView::move (double x_delta, double y_delta)
|
|||
return;
|
||||
}
|
||||
|
||||
gnome_canvas_item_move (get_canvas_group(), x_delta, y_delta);
|
||||
get_canvas_group()->move (x_delta, y_delta);
|
||||
|
||||
/* note: ghosts never leave their tracks so y_delta for them is always zero */
|
||||
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
gnome_canvas_item_move ((*i)->group, x_delta, 0.0);
|
||||
(*i)->group->move (x_delta, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1358,8 +1323,8 @@ AudioRegionView::entered ()
|
|||
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
|
||||
a=255;
|
||||
|
||||
gnome_canvas_item_set (fade_in_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
gnome_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
|
||||
fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1371,8 +1336,8 @@ AudioRegionView::exited ()
|
|||
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
|
||||
a=0;
|
||||
|
||||
gnome_canvas_item_set (fade_in_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
gnome_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
|
||||
fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
#include <vector>
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
#include <libgnomecanvasmm/polygon.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <ardour/region.h>
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ class AutomationTimeAxisView;
|
|||
class AudioRegionView : public TimeAxisViewItem
|
||||
{
|
||||
public:
|
||||
AudioRegionView (GnomeCanvasGroup *,
|
||||
AudioRegionView (Gnome::Canvas::Group *,
|
||||
AudioTimeAxisView&,
|
||||
ARDOUR::AudioRegion&,
|
||||
double initial_samples_per_unit,
|
||||
|
|
@ -89,8 +90,8 @@ class AudioRegionView : public TimeAxisViewItem
|
|||
void show_region_editor ();
|
||||
void hide_region_editor();
|
||||
|
||||
void add_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
|
||||
void remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
|
||||
void add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event);
|
||||
void remove_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event);
|
||||
|
||||
AudioRegionGainLine* get_gain_line() const { return gain_line; }
|
||||
|
||||
|
|
@ -122,13 +123,13 @@ class AudioRegionView : public TimeAxisViewItem
|
|||
|
||||
vector<GnomeCanvasItem *> waves; /* waveviews */
|
||||
vector<GnomeCanvasItem *> tmp_waves; /* see ::create_waves()*/
|
||||
GnomeCanvasItem* sync_mark; /* polgyon for sync position */
|
||||
GnomeCanvasItem* no_wave_msg; /* text */
|
||||
GnomeCanvasItem* zero_line; /* simpleline */
|
||||
GnomeCanvasItem* fade_in_shape; /* polygon */
|
||||
GnomeCanvasItem* fade_out_shape; /* polygon */
|
||||
GnomeCanvasItem* fade_in_handle; /* simplerect */
|
||||
GnomeCanvasItem* fade_out_handle; /* simplerect */
|
||||
Gnome::Canvas::Polygon* sync_mark; /* polgyon for sync position */
|
||||
Gnome::Canvas::Text* no_wave_msg; /* text */
|
||||
Gnome::Canvas::Line* zero_line; /* simpleline */
|
||||
Gnome::Canvas::Polygon* fade_in_shape; /* polygon */
|
||||
Gnome::Canvas::Polygon* fade_out_shape; /* polygon */
|
||||
Gnome::Canvas::SimpleRect* fade_in_handle; /* simplerect */
|
||||
Gnome::Canvas::SimpleRect* fade_out_handle; /* simplerect */
|
||||
|
||||
AudioRegionGainLine* gain_line;
|
||||
AudioRegionEditor *editor;
|
||||
|
|
@ -163,7 +164,7 @@ class AudioRegionView : public TimeAxisViewItem
|
|||
void region_sync_changed ();
|
||||
void region_scale_amplitude_changed ();
|
||||
|
||||
static gint _lock_toggle (GnomeCanvasItem*, GdkEvent*, void*);
|
||||
static gint _lock_toggle (Gnome::Canvas::Item*, GdkEvent*, void*);
|
||||
void lock_toggle ();
|
||||
|
||||
void create_waves ();
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include "ardour_ui.h"
|
||||
#include "crossfade_view.h"
|
||||
#include "rgb_macros.h"
|
||||
//#include "extra_bind.h"
|
||||
#include "gui_thread.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
|
|
@ -46,21 +45,32 @@ StreamView::StreamView (AudioTimeAxisView& tv)
|
|||
|
||||
/* set_position() will position the group */
|
||||
|
||||
canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
|
||||
gnome_canvas_group_get_type (),
|
||||
NULL);
|
||||
//GTK2FIX -- how to get the group? is the canvas display really a group?
|
||||
//canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
|
||||
// gnome_canvas_group_get_type (),
|
||||
// NULL);
|
||||
canvas_group = new Gnome::Canvas::Group(GNOME_CANVAS_GROUP(_trackview.canvas_display));
|
||||
|
||||
canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 1000000.0,
|
||||
"y2", (double) tv.height,
|
||||
"outline_color_rgba", color_map[cAudioTrackOutline],
|
||||
/* outline ends and bottom */
|
||||
"outline_what", (guint32) (0x1|0x2|0x8),
|
||||
"fill_color_rgba", stream_base_color,
|
||||
NULL);
|
||||
//canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
|
||||
// gnome_canvas_simplerect_get_type(),
|
||||
// "x1", 0.0,
|
||||
// "y1", 0.0,
|
||||
// "x2", 1000000.0,
|
||||
// "y2", (double) tv.height,
|
||||
// "outline_color_rgba", color_map[cAudioTrackOutline],
|
||||
// /* outline ends and bottom */
|
||||
// "outline_what", (guint32) (0x1|0x2|0x8),
|
||||
// "fill_color_rgba", stream_base_color,
|
||||
// NULL);
|
||||
canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
|
||||
canvas_rect->set_property ("x1", 0.0);
|
||||
canvas_rect->set_property ("y1", 0.0);
|
||||
canvas_rect->set_property ("x2", 1000000.0);
|
||||
canvas_rect->set_property ("y2", (double) tv.height);
|
||||
canvas_rect->set_property ("outline_color_rgba", color_map[cAudioTrackOutline]);
|
||||
/* outline ends and bottom */
|
||||
canvas_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
|
||||
canvas_rect->set_property ("fill_color_rgba", stream_base_color);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(canvas_rect), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_stream_view_event, &_trackview);
|
||||
|
|
@ -100,7 +110,8 @@ int
|
|||
StreamView::set_position (gdouble x, gdouble y)
|
||||
|
||||
{
|
||||
gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
canvas_group->set_property ("x", x);
|
||||
canvas_group->set_property ("y", y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -156,8 +167,8 @@ StreamView::set_samples_per_unit (gdouble spp)
|
|||
gdouble xstart = _trackview.editor.frame_to_pixel ( recbox.start );
|
||||
gdouble xend = _trackview.editor.frame_to_pixel ( recbox.start + recbox.length );
|
||||
|
||||
gnome_canvas_item_set (recbox.rectangle, "x1", xstart, NULL);
|
||||
gnome_canvas_item_set (recbox.rectangle, "x2", xend, NULL);
|
||||
recbox.rectangle->set_property ("x1", xstart);
|
||||
recbox.rectangle->set_property ("x2", xend);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -213,7 +224,7 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
|
|||
}
|
||||
}
|
||||
|
||||
region_view = new AudioRegionView (GNOME_CANVAS_GROUP(canvas_group),
|
||||
region_view = new AudioRegionView (canvas_group,
|
||||
_trackview,
|
||||
*region,
|
||||
_samples_per_unit,
|
||||
|
|
@ -329,7 +340,7 @@ StreamView::playlist_modified ()
|
|||
}
|
||||
|
||||
for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
|
||||
gnome_canvas_item_raise_to_top ((*i)->get_canvas_group());
|
||||
(*i)->get_canvas_group()->raise_to_top();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -393,7 +404,7 @@ StreamView::add_crossfade (Crossfade *crossfade)
|
|||
}
|
||||
}
|
||||
|
||||
CrossfadeView *cv = new CrossfadeView (GNOME_CANVAS_GROUP(_trackview.canvas_display),
|
||||
CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display,
|
||||
_trackview,
|
||||
*crossfade,
|
||||
_samples_per_unit,
|
||||
|
|
@ -576,13 +587,13 @@ StreamView::set_waveform_shape (WaveformShape shape)
|
|||
void
|
||||
StreamView::region_layered (AudioRegionView* rv)
|
||||
{
|
||||
gnome_canvas_item_lower_to_bottom (rv->get_canvas_group());
|
||||
rv->get_canvas_group()->lower_to_bottom();
|
||||
|
||||
/* don't ever leave it at the bottom, since then it doesn't
|
||||
get events - the parent group does instead ...
|
||||
*/
|
||||
|
||||
gnome_canvas_item_raise (rv->get_canvas_group(), rv->region.layer() + 1);
|
||||
rv->get_canvas_group()->raise (rv->region.layer() + 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -660,15 +671,13 @@ StreamView::setup_rec_box ()
|
|||
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
|
||||
gdouble xend = xstart;
|
||||
|
||||
GnomeCanvasItem * rec_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", xstart,
|
||||
"y1", 1.0,
|
||||
"x2", xend,
|
||||
"y2", (double) _trackview.height - 1,
|
||||
"outline_color_rgba", color_map[cRecordingRectOutline],
|
||||
"fill_color_rgba", color_map[cRecordingRectFill],
|
||||
NULL);
|
||||
Gnome::Canvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
|
||||
rec_rect->set_property ("x1", xstart);
|
||||
rec_rect->set_property ("y1", 1.0);
|
||||
rec_rect->set_property ("x2", xend);
|
||||
rec_rect->set_property ("y2", (double) _trackview.height - 1);
|
||||
rec_rect->set_property ("outline_color_rgba", color_map[cRecordingRectOutline]);
|
||||
rec_rect->set_property ("fill_color_rgba", color_map[cRecordingRectFill]);
|
||||
|
||||
RecBoxInfo recbox;
|
||||
recbox.rectangle = rec_rect;
|
||||
|
|
@ -755,8 +764,8 @@ StreamView::update_rec_box ()
|
|||
gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
|
||||
gdouble xend = _trackview.editor.frame_to_pixel ( at );
|
||||
|
||||
gnome_canvas_item_set (rect.rectangle, "x1", xstart, NULL);
|
||||
gnome_canvas_item_set (rect.rectangle, "x2", xend, NULL);
|
||||
rect.rectangle->set_property ("x1", xstart);
|
||||
rect.rectangle->set_property ("x2", xend);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -849,9 +858,9 @@ StreamView::update_rec_regions ()
|
|||
}
|
||||
|
||||
/* also update rect */
|
||||
GnomeCanvasItem * rect = rec_rects[n].rectangle;
|
||||
Gnome::Canvas::Item * rect = rec_rects[n].rectangle;
|
||||
gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
|
||||
gnome_canvas_item_set (rect, "x2", xend, NULL);
|
||||
rect->set_property ("x2", xend);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -874,8 +883,8 @@ StreamView::update_rec_regions ()
|
|||
}
|
||||
|
||||
/* also hide rect */
|
||||
GnomeCanvasItem * rect = rec_rects[n].rectangle;
|
||||
gnome_canvas_item_hide (rect);
|
||||
Gnome::Canvas::Item * rect = rec_rects[n].rectangle;
|
||||
rect->hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,11 @@
|
|||
#include <cmath>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/libgnomecanvasmm.h>
|
||||
|
||||
#include <ardour/location.h>
|
||||
#include "enums.h"
|
||||
#include "simplerect.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Route;
|
||||
|
|
@ -41,7 +42,7 @@ namespace ARDOUR {
|
|||
}
|
||||
|
||||
struct RecBoxInfo {
|
||||
GnomeCanvasItem* rectangle;
|
||||
Gnome::Canvas::SimpleRect* rectangle;
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t length;
|
||||
};
|
||||
|
|
@ -78,7 +79,7 @@ class StreamView : public sigc::trackable
|
|||
void set_show_waveforms (bool yn);
|
||||
void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
|
||||
|
||||
GnomeCanvasItem* canvas_item() { return canvas_group; }
|
||||
Gnome::Canvas::Item* canvas_item() { return canvas_group; }
|
||||
|
||||
sigc::signal<void,AudioRegionView*> AudioRegionViewAdded;
|
||||
|
||||
|
|
@ -110,8 +111,8 @@ class StreamView : public sigc::trackable
|
|||
private:
|
||||
AudioTimeAxisView& _trackview;
|
||||
|
||||
GnomeCanvasItem* canvas_group;
|
||||
GnomeCanvasItem* canvas_rect; /* frame around the whole thing */
|
||||
Gnome::Canvas::Group* canvas_group;
|
||||
Gnome::Canvas::SimpleRect* canvas_rect; /* frame around the whole thing */
|
||||
|
||||
typedef list<AudioRegionView* > AudioRegionViewList;
|
||||
AudioRegionViewList region_views;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace Gtk;
|
||||
/*can't use sigc namespace while we have the string_compose() in libs/pbd3/pbd */
|
||||
//using namespace sigc;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace Editing;
|
||||
|
||||
|
|
@ -59,16 +58,25 @@ TimeAxisView::TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView
|
|||
editor(ed),
|
||||
controls_table (2, 9)
|
||||
{
|
||||
canvas_display = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(canvas->gobj())),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
//GTK2FIX -- whats going on here? is this canvas really a group?
|
||||
//canvas_display = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(canvas->gobj())),
|
||||
// gnome_canvas_group_get_type(),
|
||||
// "x", 0.0,
|
||||
// "y", 0.0,
|
||||
// NULL);
|
||||
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
gnome_canvas_group_get_type (),
|
||||
NULL);
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
|
||||
canvas_display = new Gnome::Canvas::Item (*canvas);
|
||||
canvas_display->set_property ("x", 0.0);
|
||||
canvas_display->set_property ("y", 0.0);
|
||||
|
||||
selection_group = new Gnome::Canvas::Group (*canvas_display);
|
||||
selection_group->hide();
|
||||
|
||||
//lection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
// gnome_canvas_group_get_type (),
|
||||
// NULL);
|
||||
//ome_canvas_item_hide (selection_group);
|
||||
|
||||
control_parent = 0;
|
||||
display_menu = 0;
|
||||
|
|
@ -200,14 +208,14 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
item's parent ...
|
||||
*/
|
||||
|
||||
gnome_canvas_item_get_bounds (canvas_display, &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (canvas_display->parent, &ix1, &iy1);
|
||||
canvas_display->get_bounds (ix1, iy1, ix2, iy2);
|
||||
canvas_display->parent()->i2w (ix1, iy1);
|
||||
if (iy1 < 0) {
|
||||
iy1 = 0;
|
||||
}
|
||||
gnome_canvas_item_move (canvas_display, 0.0, y - iy1);
|
||||
gnome_canvas_item_show (canvas_display); /* XXX not necessary */
|
||||
|
||||
canvas_display->move (0.0, y - iy1);
|
||||
canvas_display->show();/* XXX not necessary */
|
||||
y_position = y;
|
||||
order = nth;
|
||||
_hidden = false;
|
||||
|
|
@ -219,7 +227,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
|
||||
if ((*i)->marked_for_display()) {
|
||||
gnome_canvas_item_show ((*i)->canvas_display);
|
||||
(*i)->canvas_display->show();
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
|
|
@ -289,7 +297,7 @@ TimeAxisView::hide ()
|
|||
return;
|
||||
}
|
||||
|
||||
gnome_canvas_item_hide (canvas_display);
|
||||
canvas_display->hide();
|
||||
controls_frame.hide ();
|
||||
|
||||
if (control_parent) {
|
||||
|
|
@ -362,7 +370,7 @@ TimeAxisView::name_entry_button_press (GdkEventButton *ev)
|
|||
if (ev->button == 3) {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -506,11 +514,11 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||
gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
}
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
selection_group->hide();
|
||||
}
|
||||
|
||||
gnome_canvas_item_show (selection_group);
|
||||
gnome_canvas_item_raise_to_top (selection_group);
|
||||
selection_group->show();
|
||||
selection_group->raise_to_top();
|
||||
|
||||
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
|
||||
jack_nframes_t start, end, cnt;
|
||||
|
|
@ -580,7 +588,7 @@ TimeAxisView::hide_selection ()
|
|||
gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
}
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
selection_group->hide();
|
||||
}
|
||||
|
||||
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
|
|
@ -589,14 +597,14 @@ TimeAxisView::hide_selection ()
|
|||
}
|
||||
|
||||
void
|
||||
TimeAxisView::order_selection_trims (GnomeCanvasItem *item, bool put_start_on_top)
|
||||
TimeAxisView::order_selection_trims (Gnome::Canvas::Item *item, bool put_start_on_top)
|
||||
{
|
||||
/* find the selection rect this is for. we have the item corresponding to one
|
||||
of the trim handles.
|
||||
*/
|
||||
|
||||
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
|
||||
if ((*i)->start_trim == item || (*i)->end_trim == item) {
|
||||
if ((*i)->start_trim == item->gobj() || (*i)->end_trim == item->gobj()) {
|
||||
|
||||
/* make one trim handle be "above" the other so that if they overlap,
|
||||
the top one is the one last used.
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@
|
|||
#include <list>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvasmm/group.h>
|
||||
#include <libgnomecanvasmm/canvas.h>
|
||||
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/region.h>
|
||||
|
|
@ -87,7 +88,7 @@ class TimeAxisView : public virtual AxisView
|
|||
int order;
|
||||
|
||||
|
||||
GnomeCanvasItem *canvas_display;
|
||||
Gnome::Canvas::Item *canvas_display;
|
||||
Gtk::VBox *control_parent;
|
||||
|
||||
/* The Standard LHS Controls */
|
||||
|
|
@ -168,7 +169,7 @@ class TimeAxisView : public virtual AxisView
|
|||
return 0;
|
||||
}
|
||||
|
||||
void order_selection_trims (GnomeCanvasItem *item, bool put_start_on_top);
|
||||
void order_selection_trims (Gnome::Canvas::Item *item, bool put_start_on_top);
|
||||
|
||||
virtual void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable*>& results);
|
||||
virtual void get_inverted_selectables (Selection&, list<Selectable *>& results);
|
||||
|
|
@ -272,7 +273,7 @@ class TimeAxisView : public virtual AxisView
|
|||
|
||||
/* selection display */
|
||||
|
||||
GnomeCanvasItem *selection_group;
|
||||
Gnome::Canvas::Group *selection_group;
|
||||
|
||||
list<SelectionRect*> free_selection_rects;
|
||||
list<SelectionRect*> used_selection_rects;
|
||||
|
|
|
|||
|
|
@ -524,20 +524,20 @@ TimeAxisViewItem::set_height(double height)
|
|||
}
|
||||
|
||||
if (name_text) {
|
||||
name_text->set ("y", height+1 - NAME_Y_OFFSET, NULL);
|
||||
name_text->set_property ("y", height+1 - NAME_Y_OFFSET);
|
||||
if (height < NAME_HIGHLIGHT_THRESH) {
|
||||
name_text->set_property ("fill_color_rgba", fill_color, NULL) ;
|
||||
name_text->set_property ("fill_color_rgba", fill_color) ;
|
||||
}
|
||||
else {
|
||||
name_text->set_property ("fill_color_rgba", label_color, NULL) ;
|
||||
name_text->set_property ("fill_color_rgba", label_color) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
frame->set_property ("y2", height+1, NULL) ;
|
||||
frame->set_property ("y2", height+1) ;
|
||||
}
|
||||
|
||||
vestigial_frame->set_property ("y2", height+1, NULL) ;
|
||||
vestigial_frame->set_property ("y2", height+1) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -553,7 +553,7 @@ TimeAxisViewItem::set_color(Gdk::Color& base_color)
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GnomeCanvasItem*
|
||||
Gnome::Canvas::Item*
|
||||
TimeAxisViewItem::get_canvas_frame()
|
||||
{
|
||||
return(frame) ;
|
||||
|
|
@ -562,7 +562,7 @@ TimeAxisViewItem::get_canvas_frame()
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GnomeCanvasItem*
|
||||
Gnome::Canvas::Item*
|
||||
TimeAxisViewItem::get_canvas_group()
|
||||
{
|
||||
return(group) ;
|
||||
|
|
@ -571,7 +571,7 @@ TimeAxisViewItem::get_canvas_group()
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GnomeCanvasItem*
|
||||
Gnome::Canvas::Item*
|
||||
TimeAxisViewItem::get_name_highlight()
|
||||
{
|
||||
return(name_highlight) ;
|
||||
|
|
@ -580,7 +580,7 @@ TimeAxisViewItem::get_name_highlight()
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GnomeCanvasItem*
|
||||
Gnome::Canvas::Text*
|
||||
TimeAxisViewItem::get_name_text()
|
||||
{
|
||||
return(name_text) ;
|
||||
|
|
@ -773,7 +773,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
|||
} if (pixel_width < 2.0) {
|
||||
|
||||
if (show_vestigial) {
|
||||
vestigial_frame->hide ();
|
||||
vestigial_frame->show();
|
||||
}
|
||||
|
||||
if (name_highlight) {
|
||||
|
|
@ -782,7 +782,7 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
|||
}
|
||||
|
||||
if (frame) {
|
||||
frame->hide ();
|
||||
frame->hide();
|
||||
}
|
||||
|
||||
if (frame_handle_start) {
|
||||
|
|
@ -806,12 +806,12 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
|||
reset_name_width (pixel_width);
|
||||
}
|
||||
|
||||
name_highlight->set_property ("x1", pixel_width - 1.0, NULL);
|
||||
name_highlight->set_property ("x2", pixel_width - 1.0);
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
frame->show();
|
||||
frame->set_property ("x2", pixel_width, NULL);
|
||||
frame->set_property ("x2", pixel_width);
|
||||
}
|
||||
|
||||
if (frame_handle_start) {
|
||||
|
|
@ -819,9 +819,10 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
|||
frame_handle_start->hide();
|
||||
frame_handle_end->hide();
|
||||
}
|
||||
frame_handle_end->set_property ("x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH ), NULL) ;
|
||||
frame_handle_start->show();
|
||||
frame_handle_end->set_property ("x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH));
|
||||
frame_handle_end->show();
|
||||
frame_handle_end->set_property ("x2", pixel_width, NULL) ;
|
||||
frame_handle_end->set_property ("x2", pixel_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -831,7 +832,7 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
|
|||
{
|
||||
int width;
|
||||
int height;
|
||||
FontDescription fd (NAME_FONT);
|
||||
Pango::FontDescription fd (NAME_FONT);
|
||||
|
||||
if (name_text == 0) {
|
||||
return;
|
||||
|
|
@ -841,7 +842,7 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
|
|||
char cstr[namelen+1];
|
||||
strcpy (cstr, item_name.c_str());
|
||||
|
||||
RefPtr<Pango::Layout> layout = group.get_canvas()->create_pango_layout();
|
||||
Glib::RefPtr<Pango::Layout> layout = group->get_canvas()->create_pango_layout();
|
||||
layout->set_font_description (fd);
|
||||
|
||||
while (namelen) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#define __gtk_ardour_time_axis_view_item_h__
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include <jack/jack.h>
|
||||
#include <string>
|
||||
|
||||
|
|
@ -237,7 +238,8 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
|
|||
/**
|
||||
*
|
||||
*/
|
||||
Gnome::Canvas::Item* get_name_text();
|
||||
Gnome::Canvas::Text* get_name_text();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the samples per unit of this item.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue